Andy-Spacetrain said:Does anybody know how to prevent the 13 year limit? Cause I haven't found it out yet.
I don't know the details (sounds like Jargo does though?), but there are some offsets for this listed here:
http://koti.mbnet.fi/platonjr/offsets.txt
13 Year Limit (Not working totally...)
Version: Hex Offset:
Fallout2 (US v1.0)
Fallout2 (US v1.02d) 000938D8
Fallout2 (UK v1.01) 00093688
Fallout2 (UK v1.02e) 00093A88
Fallout2 (GR v1.0)
Fallout2 (GR v1.02d) 00093BA8
Fallout2 (FR v1.0)
Fallout2 (FR v1.02d) 00093BA8
( Fallout2 (315371520) 0003CC12 )
Change to FFFFFFFF (?)
AND change also (so that combat doesn't end the game)
Version: Hex Offset:
Fallout2 (US v1.02d) 0009392D
Fallout2 (UK v1.02e) 00093ADD
Fallout2 (GR v1.02d) 00093BFD
Fallout2 (FR v1.02d) 00093BFD
( Fallout2 (315371520) 0003CC12 )
Change to FFFFFFFF (?)
Even if its a hack that isn't perfect, I think it's still worthwhile to have as an option in FO2LC.
I seem to recall the problem being an integer reaching its max value, so they forced end of game before reaching that limit. I found this in command.h today:
#define MAXINT 4294967295 //Max int
#define INV(x) (MAXINT - x) //An inverse function
Although those are defined in the header, I checked and neither of these are used in scripts, but perhaps these headers were also used as includes for the engine build.
This number 4294967295 is the maximum value that can be stored in 4 bytes. I assume that Jargo found a way to just reset that value back to the beginning when it reaches max value. From a programming perspective, the obvious question is how could this integer be made into a double (not sure if that's doable without the source code).
EDIT: I just had a wild idea about this 13 year limit problem. If one had the source code, the natural thing to do would be to use a double type number rather than integer. The max number would then jump to 18446744073709551615. The problem is we don't have the source, and trying to change it into a double may not be feasable.
However, if I understand this correctly, this is a "game tick" accumulator, and we can see how game ticks translate to time in the define.h header.
/* Time Information (in Ticks) */
#define ONE_GAME_SECOND (10)
#define ONE_GAME_MINUTE (60*ONE_GAME_SECOND)
#define ONE_GAME_HOUR (60*ONE_GAME_MINUTE)
#define ONE_GAME_DAY (24*ONE_GAME_HOUR)
#define ONE_GAME_WEEK (7*ONE_GAME_DAY)
#define ONE_GAME_MONTH (30*ONE_GAME_DAY)
So let's assume that for whatever reason we can't make the tick accumulator wider (to double precision). How about doing the opposite: making one day half the amount of ticks? So one second becomes 5 ticks, one minute 300 ticks. In theory that would at least double the 13 year limit, but the implications of such a change may be too large (ie does it affect combat or other things that might rely on time events). Just a thought.