This is a two-in-one bug fix:
1.) Instant station for free (i.e. build / upgrade incomplete station)
2.) Instant repair of all hull damage when autoupgrading stations
The old hull points are kept (i.e. upgraded station will regenerate to new nominal hull).
This is also recommended for upgraded ships, btw.
Note the Outpost/Starbase self-repair bug (fix)
Code: Select all
In trek.exe at 0x4971E
replace (39 bytes):
DB 84 24 20 01 00 00 31 C0 DD 59 38 66 8B 84 24 14 01 00 00 89 41 48 DD 41 38 8B 84 24 A8 00 00 00 DD 59 40 89 41 4C
with:
DD 41 40 DC 59 38 DF E0 9E DB 84 24 20 01 00 00 72 03 DD 51 40 DD 59 38 0F B7 84 24 14 01 00 00 89 41 48 90 90 90 90
44A31E DD41 40 FLD QWORD [ECX+40] // production invested
44A321 DC59 38 FCOMP QWORD [ECX+38] // old build cost
44A324 DF E0 fnstsw ax
44A326 9E SAHF
44A327 DB8424 20010000 FILD [ESP+120] // build cost new
44A32E 72 03 JB SHORT 44A333 // if unfinished skip next
44A330 DD51 40 FST QWORD [ECX+40] // set new production invested
44A333 DD59 38 FSTP QWORD [ECX+38] // set build cost new
44A336 0FB78424 14010000 MOVZX EAX,WORD[ESP+114] // scan range
44A33E 8941 48 MOV DWORD [ECX+48], EAX // set scan range
44A341 90909090 NOP
Code: Select all
4526D8 E8 B37BFFFF CALL 44A290
Funny side note:
DCER today updated the BotF Wiki starBaseInfo with the same data I discovered for this fix. So I was a bit confused, cause I didn't remember entering, until I noticed it's a fresh update by DCER.