Ugly Hack: FO2 World map slower (Bring back encounters!)

jdoe407

First time out of the vault
This is quite an ugly hack to the fallout2.exe ( 1.02 us edition ) which modifies the main world map event loop. What it does is simply adds a useless loop that counts to a very large number, wasting many cpu cycles causing the world map to run like it was ment to run. You will have to tweak the number until it runs just right for you ( barely any lag, but slow movement speed ). This hack may cause problems in the future. I took out a large section of code which *cough* I hope *cough* was just for error checking/reporting. Either way - it may or may not work. Don't forget to backup your executable!

Code:
Address     Hex
000B025D    E8168D0000

changed to 

Address     Hex
000B025D    E954B10000

The number that I was talking about is 00000001 the number is backwards so its really 1000000 in hexadecimal. EB295033C0403D00000001...
Code:
Address     Hex
000BB3B4    7429E8D106000089C1E8EE01000089EA89F8E8D1FFFFFF89C285C0750789C8E89005000089D0E9C5010000

changed to

Address     Hex
000BB3B4    EB295033C0403D000000017CF858E8B1DBFFFFE9964EFFFF90909090909090909090909090909090909090



here is the assembly from ollydbg
Code:
--- Original code ---
Address    Hex           Assembly
004BFE5D   E8 168D0000   CALL  fallout2.004C8B78

Address    Hex           Assembly
004CAFB4   74 29         JE    SHORT fallout2.004CAFDF          
004CAFB6   E8 D1060000   CALL  fallout2.004CB68C
004CAFBB   89C1          MOV   ECX, EAX
004CAFBD   E8 EE010000   CALL  fallout2.004CB1B0
004CAFC2   89EA          MOV   EDX, EBP
004CAFC4   89F8          MOV   EAX, EDI
004CAFC6   E8 D1FFFFFF   CALL  fallout2.004CAF9C
004CAFCB   89C2          MOV   EDX, EAX
004CAFCD   85C0          TEST  EAX, EAX
004CAFCF   75 07         JNZ   SHORT fallout2.004CAFD8
004CAFD1   89C8          MOV   EAX, ECX
004CAFD3   E8 90050000   CALL  fallout2.004CB568
004CAFD8   89D0          MOV   EAX, EDX
004CAFDA   E9 C5010000   JMP   fallout2.004CB1A4


--- ugly hack ---
Address    Hex           Assembly
004BFE5D   E9 54B10000   JMP     fallout2.004CAFB6

Address    Hex           Assembly                          Comments
004CAFB4   EB 29         JMP     SHORT fallout2.004CAFDF
004CAFB6   50            PUSH    EAX                       ;  store original eax value
004CAFB7   33C0          XOR     EAX, EAX                  ;  set eax to 0
004CAFB9   40            INC     EAX                       ;  increase eax by 1
004CAFBA   3D 00000002   CMP     EAX, 1000000              ;  see if eax is less then given value
004CAFBF   7C F8         JL      SHORT fallout2.004CAFB9   ;  if less, do loop again, else continue
004CAFC1   58            POP     EAX                       ;  restore original eax value
004CAFC2   E8 B1DBFFFF   CALL    fallout2.004C8B78         ;  this is the start of the worldmap loop
004CAFC7   E9 964EFFFF   JMP     fallout2.004BFE62         ;  jump back up to the main map loop
004CAFCC   90            NOP
004CAFCD   90            NOP
004CAFCE   90            NOP
004CAFCF   90            NOP
004CAFD0   90            NOP
004CAFD1   90            NOP
004CAFD2   90            NOP
004CAFD3   90            NOP
004CAFD4   90            NOP
004CAFD5   90            NOP
004CAFD6   90            NOP
004CAFD7   90            NOP
004CAFD8   90            NOP
004CAFD9   90            NOP
004CAFDA   90            NOP
004CAFDB   90            NOP
004CAFDC   90            NOP
004CAFDD   90            NOP
004CAFDE   90            NOP

edit: I haven't had any problems running the game with this patch and it's been on for a few hours

edit 2ish 3: Made a simple binary file patcher that is already set up for this patch/hack found here ( source ). Just compile(or use the precompiled exe) and put the FO2-WorldMapPatcher.exe in the fallout directory. Back up the fallout2.exe even though the program backs it up for you automaticly. Run the FO2-WorldMapPatcher.exe and play fallout2.exe. I have only tested it on my version of fallout2 which i think is still 1.02 US
 
Hmmm, I wonder if I (or anybody else) could make an algorithm to test a users processor speed, and adjust this delay accurately (or as close to). If so, I can add this into FO2LC 0.4 where the loader itself will adjust it. Has anyone ever done this before?
 
On NT (Win2k and XP) Based operating systems it should be fairly easy as you could probably call the value of the CPU from the OS and just compare this in a look up chart to set the speed perhaps.
 
jdoe407 said:
edit 2ish 3: Made a simple binary file patcher that is already set up for this patch/hack found here

The link doesn't work :( Could someone who has that, send me the file? 'Cause i'm having problems not encountering anything. I have tried encounter booster mod, but doesn't work for me. :(
 
Back
Top