While playing, I encountered a crash that appears to be known as seen by this thread:http://forums.larian.com/ubbthreads.php?ubb=showflat&Number=500447
Through debugging the game, I've discovered this isn't due to being encumbered but rather being marked 'Too Heavy' which tries to block movement altogether. For some reason, this messages' floating text causes the game to crash when popped up in the manner its setup for. The crash, in the current Steam version (v1.506) is happening here:
.text:0057E53D loc_57E53D: ; CODE XREF: sub_57E100+439↑j
.text:0057E53D call edx
.text:0057E53F mov eax, [esp+0A4h+var_68]
.text:0057E543 mov ecx, [esp+0A4h+var_6C]
.text:0057E547 mov edi, [esp+0A4h+var_90]
.text:0057E54B mov edx, eax
.text:0057E54D sub edx, ecx
.text:0057E54F sar edx, 2
.text:0057E552 test byte ptr [edi+4], 1 <-- Flag for 'Too Heavy' message is 1..
.text:0057E556 jz short loc_57E587 <-- Jump is taken from this check..
.text:0057E558 test edx, edx
.text:0057E55A ja short loc_57E569
.text:0057E55C call __invalid_parameter_noinfo
.text:0057E561 mov eax, [esp+0A4h+var_68]
.text:0057E565 mov ecx, [esp+0A4h+var_6C]
// snipped code to reduce post size..
.text:0057E587 loc_57E587: ; CODE XREF: sub_57E100+456↑j
.text:0057E587 mov esi, [esp+0A4h+var_88]
.text:0057E58B cmp esi, edx <-- Compare is invalid..
.text:0057E58D jb short loc_57E59C <-- Jump is not taken..
.text:0057E58F call __invalid_parameter_noinfo <-- Crash is here, due to invalid param info exception..
.text:0057E594 mov eax, [esp+0A4h+var_68]
.text:0057E598 mov ecx, [esp+0A4h+var_6C]
To fix this, we can patch the exe to prevent the first jump from happening. Please note! I have not played long with this patch in place! So I cannot say for sure this will fix the crash and not affect anything else during gameplay! Please backup your saved games and your exe before making any changes that I explain below!!!What You Need
- Beyond Divinity (Only tested with the Steam version. 1.506)
- A hex editor. (Any that can scan for byte patterns will work fine. I use 010 Editor personally.)How To Patch This Code
1. Open your hex editor.
2. Open div.exe inside of the hex editor.
3. Go to the following file offset: 0x17D956
4. Change the 74 2F
at this location to: 90 90
5. Save your div.exe and close the hex editor.
For other versions, you can attempt this patch as well by searching for the following byte pattern instead of using the direct file offset:
2B D1 C1 FA 02 F6 47 04 01 74 2F
While using this pattern instead, change the last two bytes of the pattern from 74 2F to 90 90 like above.
This should fix the crash for this 'Too Heavy' floating message now and allow you to play as normal.
You will be blocked from moving while 'Too Heavy' vs. just being slowed down while 'Encumbered'.