Jump to content
Sign in to follow this  
Taimon

Lua console

Recommended Posts

Quite nice, actually. +4 to hit and damage when meleeing missile users is quite clear, for example. And Minsc's rage being a bit better than usual berserker kit rage, since it both increases STR and gives +2 to hit and to damage. Berserker kit rage only gives the +2.

 

Doesn't print effects of resistances, but you can count your way to it. The detailed calculation output is pre-resistances, the "did x damage" output is post-resistances. :)

Share this post


Link to post

The code that calculates the values and strcats the text is still there, but the code that checks Chitin.m_bDisplayExtraCombatInfo and print the text on the console has been deleted (checked 26498 EXE vs 23037 EXE).

Edited by Ascension64

Share this post


Link to post

Came to the same conclusion.

 

I spent quite some time hacking on it today.

Start the exe after the game has come up. (On command line, if you want to see error messages.)

Not sure if this needs administrator priviledges.

And it honors the "Extra Combat Info" option, so you have to set it either in the ini, or enable it per Lua ingame.

 

A bit of a warning here: I've never done anything like this before, so it probably has some bugs and might crash your game. (I don't program on the Windows platform very often.)

Share this post


Link to post

Taimon, really cool. :)

 

Works well for attack rolls, but doesn't give the extra info on damage rolls.

 

Tested on Linux (wine bgmain.exe & sleep 5 ; wine tob_inject.exe) :)

Share this post


Link to post
Okay, updated to add the damage rolls.

Also changed the "infrastructure" of the source.

 

Wow. It seems to work wonderfully, thankyou!

Share this post


Link to post
Guest Mothra Assassin Destroyer
Okay, updated to add the damage rolls.

Also changed the "infrastructure" of the source.

 

Wow. It seems to work wonderfully, thankyou!

 

I'm getting a 'Target bytes don't match that of ToB v26498..Reverting...' error.

 

Running patched version w/ BG3 fixpack and tweaks. Any way around this so it will work?

 

Thanks,

 

MAD

Share this post


Link to post

If you are familiar with programming you can try to find the target bytes in executable yourself (see source) and adjust the offsets accordingly.

But first make sure you really have ToB v26498 installed.

Share this post


Link to post

Would this work with a BG1Easytutu install? I'm getting a message: "Failed to retrieve the process id of the tob process. Make sure the game is actually running"

 

I definitely have the game running before I try to launch the tob_inject.exe

Share this post


Link to post

The injection code looks for a window called "Baldur's Gate II - Shadows of Amn - Throne of Bhaal". I don't know if EasyTutu changes the name. (EXE patch?)

If EasyTutu uses the ToB executable, it should work (theoretically).

 

Just change the window title in tob_inject.h:10, if you are familiar with compiling C code.

Edited by Taimon

Share this post


Link to post
Guest Guest_Ithildur_*

LOL, I took a C++ class a looong time ago, but I think I'd be pretty lost by now unless my memory has held up better than I thought. I'm pretty sure something like that is what's required; easyTutu (for tob) does use the tob exe.

Share this post


Link to post

I can't check if EasyTutu changes the window title. Installation fails and I can't find any source code for it.

 

Did you try starting the game with the bgmain.exe?

You could also start it in windowed mode (config option) and post the window title here.

Share this post


Link to post
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...