How many events can the Civ2 hold?

Starke Von Oben

Chieftain
Joined
Aug 1, 2012
Messages
52
Before I embark on toying with TOT, I think I should get to grips with standard Civ2 scenario design in order to get to grips with events programming.

How many events can an events file hold?
 
Events capacity varies with Civ2 version. It's measured by memory space. Total events memory in ToT is 104 kB, about a third that number in MGE and a quarter in FW. The size of an individual event can also vary. In ToT, a single event requires 284 bytes + strings (1 byte per character, including 1 null terminator per string). Not all words in events.txt are saved as strings; event names and parameters are keywords, and many others are converted to bitmasks. To determine your available memory in ToT, add the line @DEBUG immediately below @BEGINEVENTS in events.txt and then load the scenario. This will produce a file called report.txt in your scenario folder. Navigate to the end of the file and you will find your remaining heap space. Remove or comment out (semi-colon) the @DEBUG line before you release your mod/scenario, otherwise the game will continue dumping to the file (which also slows load times). Some of this info can be found in macro.txt, so yeah, read that.
 
Back
Top Bottom