Avenger Posted January 7, 2012 Author Share Posted January 7, 2012 0x117/0x90 (re enable/disable button) - The resource fields work as an additional matching key. You can have separate reasons for disabling keys that can work independently. Link to comment
igi Posted January 29, 2012 Share Posted January 29, 2012 0xb5 - Can't use itemtype - i managed to use it for books. Sadly, one needs to modify the .exe (overwrite one byte) to make it work with other itemtypes too.param1 - string resref to print param2 - itemtype (if not 0, then goes to /dev/null). And the offset of that 1 byte to change, and the value to change it to is...? Local copy updated - thanks Avenger Link to comment
Avenger Posted January 29, 2012 Author Share Posted January 29, 2012 Well, here is the code (slightly annotated). .text:0053073E 018 mov eax, [edx+_effect.param1] .text:00530741 018 mov [ecx+4], eax .text:00530744 018 mov ecx, [ebp+var_4] .text:00530747 018 mov edx, [ebp+pEffect] .text:0053074A 018 mov eax, [edx+_effect.param2] .text:0053074D 018 mov [ecx], eax .text:0053074F 018 mov ecx, [ebp+pEffect] .text:00530752 018 cmp [ecx+_effect.param2], 0 .text:00530756 018 jnz short loc_53076C .text:00530758 018 mov edx, [ebp+var_4] .text:0053075B 018 push edx .text:0053075C 01C mov ecx, [ebp+pTarget] .text:0053075F 01C add ecx, actor.statsCur.noitemtype .text:00530765 01C call pushDWordOnList .text:0053076A 018 jmp short loc_53077E .text:0053076C ; ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ .text:0053076C .text:0053076C loc_53076C: ; CODE XREF: opc_0b5_noitemtype+5Fj .text:0053076C 018 mov eax, [ebp+var_4] .text:0053076F 018 push eax .text:00530770 01C mov ecx, [ebp+pTarget] .text:00530773 01C add ecx, actor.statsCur.restrictequipitemtype .text:00530779 01C call pushDWordOnList .text:0053077E .text:0053077E loc_53077E: ; CODE XREF: opc_0b5_noitemtype+73j .text:0053077E 018 mov eax, 1 .text:00530783 018 mov esp, ebp .text:00530785 004 pop ebp .text:00530786 000 retn 4 .text:00530786 opc_0b5_noitemtype endp One can either disable the jump based on param2, near 00530756. Easiest is to make the jump a nop. Or you can change the statement near 00530773. It should point to the same list as the one at 0053075F. The second list is ignored, but the first list is supported by the engine. I guess ToBEx can do (or already did) this. Link to comment
Avenger Posted January 29, 2012 Author Share Posted January 29, 2012 More precisely, if our offsets are matching (subtract 0x400000 for file offset), the first modification involves zeroing out the 0x14 byte after 0x75: .text:00530750 4D F0 83 79 1C 00 75 14 8B 55 FC 52 8B 4D 08 81 Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.