Page 2 of 2

Posted: Sat Dec 19, 2009 1:26 pm
by henka
it seems to work when you don't make the first change
46118C add di, [eax+44h] // at 0x6058C change 66 to 90

but i think without this change this bugfix will only work till 65535. But this would be enough for 336 systems :D

Posted: Sat Dec 19, 2009 1:58 pm
by Spocks-cuddly-tribble
henka wrote:this bugfix will only work till 65535.
I think I see the problem. This should be fully operative:

Code: Select all

trek.exe at 0x60581

change:
8B 14 24 8D 83 40 02 00 00 01 D0 66 03 78 44
to:
8D 83 40 02 00 00 03 04 24 0F B7 40 44 03 F8

AND at 0x605C2 change: 0F BF to: 90 8B


asm 461181:
lea     eax, [ebx+240h]
add     eax, [esp]
movzx   eax, word ptr [eax+44h]
add     edi, eax

asm 4611C2: 
nop
mov   edx, edi

Posted: Sat Dec 19, 2009 2:44 pm
by henka
Spocks-cuddly-tribble wrote: I think I see the problem. This should be fully operative:
it is :D

another bug hunted down, great job :)

Posted: Tue Dec 22, 2009 5:09 pm
by marhawkman
thunderchero wrote:henka,

I do not think a total is kept in saved game (at least that I can find).

I think the trek.exe calulates this from each systems morale. When adding them up. It get the - value and throws error before calculation is complete.

The error is located at 0x64fc0 in trek.exe But I am no good at reading what is going on.

thunderchero
My best guess is that this is done as part of calculating your Average morale for your empire. This is what you see in the empire comparison screen. The game doesn't store this but recalculates it every turn. From what you guys have said I think it adds them all together then divides by the number of systems you have in order to do this.

:EDIT: oh you guys already found a fix. cool!

Posted: Tue Dec 22, 2009 7:22 pm
by Tethys
awesome work SCT you are most certainly appreciated :D