AzureDrag0n1 Posted July 19, 2009 Share Posted July 19, 2009 I was looking at the dispel fix and I was interested in using it in my game. However I am not sure how to make it work. Can I copy the code into another mod's tp2 file? Which lines of code would I need? I tried just renaming a weidu.exe which I chose as setup_tactics to setup-tob_hacks.exe. When I open it it runs all the other weidu.exe files and when it finishes at tob_hacks it stops at (pid=-1) without listing a version number. I took this code out of your .tp2 file and put it into an already existing mod. I used a very simple mod that has only 1 component and placed it at the end. It seems to install the changes but I am not sure if it did anything. Is this all I need? //Dispel Fix BEGIN ~Fix the formula in the dispel effect~ DESIGNATED 40 OUTER_PATCH_SAVE orig_bytes_1 ~~ BEGIN INSERT_BYTES 0x000 0xe WRITE_LONG 0x000 0x8b0ac06b WRITE_LONG 0x004 0xe1811c4d WRITE_LONG 0x008 0x000000ff WRITE_SHORT 0x00c 0xc12b END OUTER_PATCH_SAVE patch_bytes_1 ~~ BEGIN INSERT_BYTES 0x000 0xe WRITE_LONG 0x000 0x811c4d8b WRITE_LONG 0x004 0x0000ffe1 WRITE_LONG 0x008 0x6bc12b00 WRITE_SHORT 0x00c 0x0ac0 END OUTER_PATCH_SAVE orig_bytes_2 ~~ BEGIN INSERT_BYTES 0x000 0x12 WRITE_LONG 0x000 0x7ff4553b WRITE_LONG 0x004 0x18458b0d WRITE_LONG 0x008 0x0000ff25 WRITE_LONG 0x00c 0x63f88300 WRITE_SHORT 0x010 0x097e END OUTER_PATCH_SAVE patch_bytes_2 ~~ BEGIN INSERT_BYTES 0x000 0x12 WRITE_LONG 0x000 0x7463fa83 WRITE_LONG 0x004 0x18458b0d WRITE_LONG 0x008 0x0000ff25 WRITE_LONG 0x00c 0xf4453b00 WRITE_SHORT 0x010 0x097c END COPY bgmain.exe bgmain.exe READ_ASCII 0x00143f42 target_bytes_1 ELSE 0 (0xe) READ_ASCII 0x00143f97 target_bytes_2 ELSE 0 (0x12) PATCH_IF (~%target_bytes_1%~ STRING_EQUAL ~%orig_bytes_1%~) AND (~%target_bytes_2%~ STRING_EQUAL ~%orig_bytes_2%~) THEN BEGIN WRITE_ASCIIE 0x00143f42 ~%patch_bytes_1%~ (0xe) WRITE_ASCIIE 0x00143f97 ~%patch_bytes_2%~ (0x12) END ELSE PATCH_IF (~%target_bytes_1%~ STRING_EQUAL ~%patch_bytes_1%~) AND (~%target_bytes_2%~ STRING_EQUAL ~%patch_bytes_2%~) THEN BEGIN PATCH_PRINT ~Patch already applied. Skipping ...~ END ELSE INNER_ACTION BEGIN FAIL ~Target bytes don't match. Aborting ...~ END BUT_ONLY Link to comment
Taimon Posted July 19, 2009 Author Share Posted July 19, 2009 When I open it it runs all the other weidu.exe files and when it finishes at tob_hacks it stops at (pid=-1) without listing a version number. This is WeiDU autoupdate failing due to some unknown problem. (unrelated to the tp2 itself) You can try to invoke it with --noautoupdate or do the update manually. FOR %s IN (setup-*.exe) DO copy /Y weidu.exe %s And yes, that's all you need for the dispel fix. Link to comment
Drelnza Posted July 23, 2009 Share Posted July 23, 2009 This should go after any mod that completely replace the bgmain.exe.No restriction otherwise. But I'd install it as late as possible, to get rid of it, when it starts crashing your game. Folks over at BWP install the two .exe patches "Enable conversations with charm creatures" and "Experience Corrections" before anything else. I understand your patch is not tested but, in theory is it not better to install as soon as possible as well? Link to comment
Ardanis Posted July 23, 2009 Share Posted July 23, 2009 Since the only file affected by exe patches is bgmain.exe, it matters very little if other files were modified by another mod. Installing such patches in the last order means they can be uninstalled with more ease than if they were put in the beginning - there'll be no reinstalling the whole bunch of normal mods. Link to comment
Drelnza Posted July 23, 2009 Share Posted July 23, 2009 Thanks Ardanis, may as well install as late as possible in case there are problems. Link to comment
Elve Posted August 3, 2009 Share Posted August 3, 2009 From shs http://www.shsforums.net/index.php?showtopic=39276 Yeah, I can. Nullpointer dereference. Try replacing the previous patch_part2 with this: OUTER_PATCH_SAVE patch_part2 "" BEGIN INSERT_BYTES 0x00 len_part2 WRITE_LONG 0x00 0x8b51006a WRITE_LONG 0x04 0xb773cc0d WRITE_LONG 0x08 0x48c18100 WRITE_LONG 0x0c 0xe800006c WRITE_LONG 0x10 0xffc75947 WRITE_LONG 0x14 0xff10958b WRITE_LONG 0x18 0x1a8bffff WRITE_LONG 0x1c 0x1874db85 WRITE_LONG 0x20 0x90909090 WRITE_LONG 0x24 0x8b52006a WRITE_LONG 0x28 0xb773cc0d WRITE_LONG 0x2c 0x48c18100 WRITE_LONG 0x30 0xe800006c WRITE_LONG 0x34 0xffc75923 WRITE_LONG 0x38 0xfd448d8b WRITE_LONG 0x3c 0x118bffff WRITE_LONG 0x40 0x8a1052ff END Not the cleanest solution but hopefully it will work. still seems to crash with me... Visible: Try pickpocket -> fail -> crash Invisible: Try pickpocket -> fail -> dialog -> visible -> fail -> dialog Link to comment
Taimon Posted August 4, 2009 Author Share Posted August 4, 2009 Did you try the version in this thread? (see first post / uninstall whatever you installed before) Works for me -- but if you still encounter this problem, please provide a savegame and I'll have a look. Link to comment
Elve Posted August 5, 2009 Share Posted August 5, 2009 diff says they are the same, will append a save when i get home Link to comment
Elve Posted August 10, 2009 Share Posted August 10, 2009 diff says they are the same, will append a save when i get home Took me a while longer... Use Imoen to pickpocket anyone while not being invisible is a sure crash whenever the anti become visible patch is applied... Works fine without... http://rapidshare.com/files/265944751/0000...estBug.zip.html Link to comment
Taimon Posted August 11, 2009 Author Share Posted August 11, 2009 Your priests used some non-standard spell that crashed the savegame upon loading, but nothing that couldn't be fixed. I experienced some crashes while pickpocketing but didn't find a way to reproduce it reliably. It was fairly random. However, seeing that it still crashes I decided to rework the patch and now went the better-safe-than-sorry path. Should be fixed now. Thanks for the report. Link to comment
Guest @vGur Posted August 13, 2009 Share Posted August 13, 2009 (from @vGur) Thanks for Your great work! By default, when U carrying 100+% of Ur maximum weight (101 for example) U start to move in half speed & after reaching additional 20% (120) U can't move anymore. Can this number (120%) be changed to something like 300/400%. Another question, is it possible to add additional effect, like dexterity penalty, to creature who carrying too much (Like in DnD3+). Reason for this - U can carry 200lb, but U can't run with it, like everyone in BG2 likes to do. Another words, person with 5 full plate armors in his backpack is easy target to compare with someone without them. What I want is maximum 50-100lb, when U still can move with 200-300, but slow & deffinetely not in combat. Even if this is too hard, many thanks for all U've done before Link to comment
Guest temujin_ Posted August 14, 2009 Share Posted August 14, 2009 Even if this is too hard... Nothing is too hard for the daimyo of modding. These hardcoded limitations of the vastly intimidating EXE are now nothing more than mere obstacles to be overcome with Taimon's sheer will and brute force. I'm sure Tai will somehow find his way through this blizzard. I know he will. I *know* it. And as usual, he'll unlock this puzzle in the blink of an eye that the masses will be singing a different tune: "gee, was it really hardcoded all these years?" Am I wrong, Mr. T? Link to comment
Taimon Posted August 14, 2009 Author Share Posted August 14, 2009 Can this number (120%) be changed to something like 300/400%. The value that you need to change is at 0x6b73a0. It's a 16-bit word, but keep little endianness in mind when you go over 255. Another question, is it possible to add additional effect, like dexterity penalty, to creature who carrying too much (Like in DnD3+). No, because once I start doing those things, I'm sure everyone wants to have there own personal modification. And adding stuff is always much more difficult than modifying something. (very limited amount of space) Link to comment
devSin Posted August 14, 2009 Share Posted August 14, 2009 And adding stuff is always much more difficult than modifying something. (very limited amount of space)Hmm, just overwrite all that multiplayer code. It's all useless anyway. :-) Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.