The game tick is a 32bit integer, so after 2485 in-game days (~6.8 years) the tick goes into negative range (> 0x7FFFFFFF) until -1 (0xFFFFFFFF).Negative ticks... is this an issue in Fallout.exe? I wonder if the same stands for Fallout2-CE, as it has SDL under the hood. Any more detail here?
That's why there's the 13 years hard limit in the engine, to force-end the game before the tick hits -1 (causing lockup).
For shop restocking issue, UPU/RPU use an additional LVAR in a one-time correction macro and call it in map_enter_p_proc.
But since CE has implemented the "div" unsigned division operator from sfall, you can simply utilize a procedure to do unsigned comparison, just replace
C-like:
if (local_var(LVAR_Barter_Timer) < game_time)
C-like:
if (unsigned_int_compare(local_var(LVAR_Barter_Timer), game_time) < 0)