Time

The game time is stored in the static game_world struct at offset 0x14 as ticks, and is increased by the advance_time function at 0x00530E80.

Ticks

Every ingame day is 256 ticks long, so there are 93440 ticks in a year. Consequently the least significant byte conveniently encodes the time of day.

Ticking Objects

Different game objects tick at different intervals. Information about what happens in those ticks can be found in the respective chapters.

Towns

Towns tick if one of the following equations is true:

game_time & 0b111 == 0b011 &&
town_index == (((unsigned __int8)game_time) + 255) >> 3
game_time & 0b111 == 0b111 &&
town_index == ((unsigned __int8)game_time) >> 3

This results in the following town tick behaviour:

Town IndexGame Time LSB
320b00000_011
330b00001_011
340b00010_011
350b00011_011
......
390b00111_011
000b00000_111
010b00001_111
020b00010_111
030b00011_111
......
310b11111_111

Facilities

All facilities tick when their town ticks.