Saved Game File Format for Test of Time 1.1
The tables that follow present the structure of the SAV/SCN file for Civilization 2: Test of Time (ToT), version 1.1. This page is based heavily on the Hex-Editing Saved Games document, by Allard H.S. Höfelt, et al, written for Fantastic Worlds (FW) and the Multiplayer Gold Edition (MGE). A few years back I adapted the document for my own use with ToT 1.1, adding my own notes as I uncovered more of the file structure. This eventually became a spreadsheet which I used as a quick reference guide - and now an HTML document. There are many who contributed to the original and their work should be acknowledged. In alphabetical order, they are: Agricola, Captain Nemo, Paul "Kull" Cullivan, Carl "Gothmog" Fritz, Allard Höfelt, Andrew Livings, Javier "Yaroslav" Muñoz Kirschberg, James Dustin "Dusty" Reichwein, Angelo Scotto, SlowThinker, Harlan Thompson, Xin Yu and Jorrit "Mercator" Vermeiren.
I am familiar with some sections of the SAV file more than others, ie, those that have proved useful for the development of my own scenario. I have not verified all of the information in this document; it almost certainly contains errors, some of which may be inherited from the original hex-editing document. For that reason and to mitigate against mistakes of your own making, ensure that you back up your scenario files before editing. If you've never done any hex-editing before, this post of mine from the Civilization Fanatics' Center forums might help you out. Links to hex-editing software can be found on this site's Links page under Other Resources.
The File Structure:
Summary
Section | Size (Bytes) | Description | |
File Header | 12 | Game and version number. | |
Unit Transport Settings | 640 | Transport settings from the @UNITS_ADVANCED table in rules.txt. | |
Game Options | 12 | Options selected from within the Game menu. | |
Game Parameters | 42 | State of the game variables. | |
Technologies | 200 | A list of the 100 technologies - who researched them and who found them first. | |
Wonders | 56 | A list of the 28 wonders - their locations if present. | |
Unknown 1 | 288 | ||
Tribe Variables 1 | 1694 | City styles, leader names and titles. Does not include Barbarians. | |
Tribe Variables 2 | 26784 | Variables pertaining to each tribe. Includes Barbarians. | |
Leaders2 Table | 168 | Settings from the @LEADERS2 table in rules.txt. | |
Transporters | 4 + T x 14 | A list of all transporters in the game. (T = Number of Transporters.) | |
Map Header | 16 | Defines map attributes. | |
Map 0 | |||
Visible Tile Improvements | 7 x t | The state of each map tile as last seen by each tribe. (t = Number of Map Tiles.) | |
Map Data | t x 6 | Characteristics of each map tile. (t = Number of Map Tiles.) | |
Resource Seed | 2 | Resource seed of map 0. | |
Map 1 | |||
Visible Tile Improvements | 7 x t | The state of each map tile as last seen by each tribe. (t = Number of Map Tiles.) | |
Map Data | t x 6 | Characteristics of each map tile. (t = Number of Map Tiles.) | |
Resource Seed | 2 | Resource seed of map 1. | |
Map 2 | |||
Visible Tile Improvements | 7 x t | The state of each map tile as last seen by each tribe. (t = Number of Map Tiles.) | |
Map Data | t x 6 | Characteristics of each map tile. (t = Number of Map Tiles.) | |
Resource Seed | 2 | Resource seed of map 2. | |
Map 3 | |||
Visible Tile Improvements | 7 x t | The state of each map tile as last seen by each tribe. (t = Number of Map Tiles.) | |
Map Data | t x 6 | Characteristics of each map tile. (t = Number of Map Tiles.) | |
Resource Seed | 2 | Resource seed of map 3. | |
Unknown Map Block | W/2 x H/4 x 2 | (W/2 = Map Width/2, rounded up, H/4 = Map Height/4, rounded up) | |
Unknown 2 | 10240 | ||
Units Data | U x 40 | A list of units in the game and their attributes. (U = Number of Units.) | |
Cities Data | C x 92 | A list of cities in the game and their attributes. (C = Number of Cities.) | |
Tribe Cities Data | 63 | The number of cities built by each tribe. | |
Unknown 3 | 1390 + H x 60 | (H = Number of human players.) | |
Scenario Parameters | 100 | Only present in scenarios and saved games derived from them. | |
Destroyed Tribes | 340 | Details of destroyed tribes and their destroyers. | |
Multi-player Data | 1172 | Only present in multi-player games. | |
Events | Only present when events have been loaded. |
Detail
Section | No Bytes | Offsets | Type | Values1 | Description/Notes |
File Header | 12 | 0-11 | |||
9 | 0-8 | String | "CIVILIZE" | Last byte is a null terminator | |
1 | 9 | Byte | 0x1A | unknown | |
2 | 10-11 | Short | Game version | ||
0x0031 | Unpatched version 1.0 | ||||
0x0032 | Patched version 1.1 | ||||
Unit Transport Settings | 640 | 12-651 | 80 (maximum number of units) x 8 (4 shorts) | ||
2 | 1st-2nd | Short | Basically a cross-referencing of the unit Build Transport Site mask and the Map Transport Relationships (rules.txt, @UNITS_ADVANCED). Values are for each of the 6 possible relationships. | ||
0x0012 | (0,1), 0b 0000 0000 0001 0010 | ||||
0x0104 | (0,2), 0b 0000 0001 0000 0100 | ||||
0x1008 | (0,3), 0b 0001 0000 0000 1000 | ||||
0x0240 | (1,2), 0b 0000 0010 0100 0000 | ||||
0x2080 | (1,3), 0b 0010 0000 1000 0000 | ||||
0x4800 | (2,3), 0b 0100 1000 0000 0000 | ||||
2 | 3rd-4th | Short | 0x0000 - 0xFFFF | Build Transport Site Mask (rules.txt, @UNITS_ADVANCED, column D) | |
2 | 5th-6th | Short | 0x0000 - 0xFFFF | Use Transport Site Mask (rules.txt, @UNITS_ADVANCED, column E) | |
2 | 7th-8th | Short | 0x0000 - 0xFFFF | Native Transport Site Ability Mask (rules.txt, @UNITS_ADVANCED, column F) | |
Game Options | 12 | 652-663 | |||
1 | 652 | Byte | |||
0x01 | unknown | ||||
0x02 | unknown | ||||
0x04 | unknown | ||||
0x08 | Simplified Combat | ||||
0x10 | unknown | ||||
0x20 | unknown | ||||
0x80 | Bloodlust (No spaceships allowed) | ||||
1 | 653 | Byte | |||
0x01 | unknown | ||||
0x08 | Don't restart eliminated players | ||||
0x80 | Flat world map | ||||
1 | 654 | Byte | |||
0x08 | Music on | ||||
0x10 | Sound effects on | ||||
0x20 | Map grid on | ||||
0x40 | Enter key closes City Screen | ||||
0x80 | Move units without mouse (cursor keys) | ||||
1 | 655 | Byte | |||
0x01 | Tutorial help on | ||||
0x02 | Instant advice on | ||||
0x04 | Fast piece slide | ||||
0x08 | No pause after enemy moves | ||||
0x10 | Show enemy moves | ||||
0x20 | Autosave each turn | ||||
0x40 | Always wait at end of turn | ||||
0x80 | Cheat menu | ||||
1 | 656 | Byte | |||
0x02 | Diplomacy screen graphics | ||||
0x08 | Civilopedia for Advances | ||||
0x40 | Map Layout toggle - no apparent effect | ||||
0x80 | City Layout toggle - no apparent effect | ||||
1 | 657 | Byte | unknown | ||
0x02 | unknown | ||||
1 | 658 | Byte | unknown | ||
0x01 | unknown | ||||
0x02 | unknown | ||||
0x04 | unknown | ||||
0x20 | unknown | ||||
1 | 659 | Byte | unknown | ||
1 | 660 | Byte | |||
0x02 | unknown | ||||
0x04 | unknown | ||||
0x08 | unknown | ||||
0x10 | Cheat penalty/warning | ||||
0x20 | Scoring complete | ||||
0x40 | Scenario file - required for a scenario to generate correctly formatted saved game files. | ||||
0x80 | Toggle scenario flag | ||||
1 | 661 | Byte | unknown | ||
1 | 662 | Byte | |||
0x01 | Announce city improvements built | ||||
0x02 | Warn when city growth halted | ||||
0x04 | Show invalid build instructions | ||||
0x08 | Announce non-combat units built | ||||
0x10 | Announce order restored in city | ||||
0x20 | Announce cities in disorder | ||||
0x40 | Warn when food dangerously low | ||||
0x80 | Announce 'We love the king' day | ||||
1 | 663 | Byte | |||
0x01 | Warn when changing production will cost shields | ||||
0x02 | Warn when new pollution occurs | ||||
0x04 | Zoom-to-city not the default action | ||||
Game Parameters | 42 | 664-705 | |||
1 | 664 | Byte | |||
0x02 | First air unit built. Disables @AIRUNIT tutorial message. | ||||
0x04 | First naval unit built. Disables @SHIPS tutorial message. | ||||
0x10 | First Caravan built. Disables @CARAVAN tutorial message. | ||||
0x20 | First time Republic or Democracy government is adopted. Disables @REPUBLIC tutorial message. | ||||
0xC0 | First significantly damaged unit. Disables @DAMAGE tutorial message. | ||||
3 | 665-667 | Bytes | unknown | ||
2 | 668-669 | Short | Turns elapsed | ||
0x0000 - 0x7FFF | Positive values (AD) | ||||
0x8000 - 0xFFFF | Negative values (BC) | ||||
2 | 670-671 | Short | Number of turns passed to calculate game year | ||
0x0000 - 0x7FFF | Positive values (AD) | ||||
0x8000 - 0xFFFF | Negative values (BC) | ||||
2 | 672-673 | Bytes | 0xFF | unknown | |
2 | 674-675 | Short | Specifies which unit is selected at the start of the game | ||
3 | 676-678 | Bytes | unknown | ||
1 | 679 | Byte | Changes which human player is used | ||
1 | 680 | Byte | 0x00 - 0x07 | Player's map that is used (0 = barbarian) | |
1 | 681 | Byte | 0x00 - 0x07 | Player's tribe number (0 = barbarian) | |
1 | 682 | Byte | Changes with map used (sometimes FF) | ||
1 | 683 | Byte | Reveal map | ||
0x00 | No special view | ||||
0x01 | Entire map | ||||
1 | 684 | Byte | Difficulty level | ||
0x00 | Chieftain (easiest) | ||||
0x01 | Warlord | ||||
0x02 | Prince | ||||
0x03 | King | ||||
0x04 | Emperor | ||||
0x05 | Deity (toughest) | ||||
0x06 | Deity +1 (Classic/CiC/FW only. Will crash MGE/ToT.) | ||||
1 | 685 | Byte | Level of barbarian activity | ||
0x00 | Villages only | ||||
0x01 | Roving bands | ||||
0x02 | Restless bands | ||||
0x03 | Raging hordes | ||||
1 | 686 | Byte | Tribes left in play | ||
0x01 | Tribe 0 (barbarians) alive | ||||
0x02 | Tribe 1 alive | ||||
0x04 | Tribe 2 alive | ||||
0x08 | Tribe 3 alive | ||||
0x10 | Tribe 4 alive | ||||
0x20 | Tribe 5 alive | ||||
0x40 | Tribe 6 alive | ||||
0x80 | Tribe 7 alive | ||||
1 | 687 | Byte | Human player/s | ||
0x01 | Tribe 0 (none) | ||||
0x02 | Tribe 1 | ||||
0x04 | Tribe 2 | ||||
0x08 | Tribe 3 | ||||
0x10 | Tribe 4 | ||||
0x20 | Tribe 5 | ||||
0x40 | Tribe 6 | ||||
0x80 | Tribe 7 | ||||
2 | 688-689 | Bytes | unknown | ||
1 | 690 | Byte | Amount of pollution | ||
0x00 - 0x7F | Positive values | ||||
0x80 - 0xFF | Negative values | ||||
1 | 691 | Byte | Number of times in the game that global warming has occurred | ||
0x00 - 0x7F | Once the value reaches 7F, the world will turn into a big swamp following the next turn of global warming | ||||
0x80 - 0xFF | Prevents any terrain change from global warming | ||||
2 | 692-693 | Bytes | unknown | ||
2 | 694-695 | Short | Number of pollution skulls on the map | ||
0x0000 - 0x7FFF | Positive values | ||||
0x80FF - 0xFFFF | Negative values | ||||
1 | 696 | Byte | 0x00 - 0xFF | Number of turns of peace (counts only after the 200th turn) | |
1 | 697 | Byte | unknown | ||
2 | 698-699 | Short | 0x0001 - ? | Total number of units in the units list (often greater than the actual number of units in the game - gaps left by killed/disbanded units are not automatically removed) | |
2 | 700-701 | Short | 0x0000 - ? | Total number of cities in the cities list (can be greater than the actual number of cities in the game - gaps left by destroyed cities are not automatically removed) | |
4 | 702-705 | Bytes | unknown | ||
Technologies | 200 | 706-905 | 2 blocks, each 100 (number of technologies) x 1 (byte) | ||
100 x 1 | 706-805 | Byte | Number of the tribe which first discovered the technology | ||
0x00 | None | ||||
0x01 | Tribe 1 | ||||
0x02 | Tribe 2 | ||||
0x03 | Tribe 3 | ||||
0x04 | Tribe 4 | ||||
0x05 | Tribe 5 | ||||
0x06 | Tribe 6 | ||||
0x07 | Tribe 7 | ||||
0x08 | More than one tribe, eg, starting technologies. | ||||
100 x 1 | 806-905 | Byte | Tribes which have researched the technology | ||
0x01 | Tribe 0 (barbarians) | ||||
0x02 | Tribe 1 | ||||
0x04 | Tribe 2 | ||||
0x08 | Tribe 3 | ||||
0x10 | Tribe 4 | ||||
0x20 | Tribe 5 | ||||
0x40 | Tribe 6 | ||||
0x80 | Tribe 7 | ||||
Wonders | 56 | 906-961 | 28 (number of wonders) x 2 (shorts) | ||
2 | 1st-2nd | Short | |||
0x0000 - ? | City ID number, beginning at 0 | ||||
0xFFFE | Wonder is lost | ||||
0xFFFF | Wonder has not been built | ||||
Unknown Block 1 | 288 | 962-1249 | |||
1 | 962 | Byte | 0x01 - ? | unknown | |
19 | 963-981 | Bytes | 0x00 - 0x07 | unknown | |
1 | 982 | Byte | Game type | ||
0x00 | Original | ||||
0x01 | Sci-Fi | ||||
0x02 | Fantasy | ||||
1 | 983 | Byte | unknown | ||
1 | 984 | Byte | Global warming cycle counter. Same value as byte number 690. | ||
0x00 | No warming. No global warming icon displayed in status bar. | ||||
0x01 - 0x03 | Stage 1: First global warming icon from Icons.bmp displayed in status bar. | ||||
0x04 - 0x07 | Stage 2: Second global warming icon from Icons.bmp displayed in status bar. | ||||
0x08 - 0x0B | Stage 3: Third global warming icon from Icons.bmp displayed in status bar. | ||||
0x0C - 0x7F | Stage 4: Fourth global warming icon from Icons.bmp displayed in status bar. | ||||
15 | 985-999 | Bytes | unknown | ||
2 | 1000-1001 | Short | Number of pollution skulls on the map. Used to calculate Civilization Score. Same value as byte numbers 694-695. | ||
0x0000 - 0x7FFF | Positive values | ||||
0x80FF - 0xFFFF | Negative values | ||||
2 | 1002-1003 | Short | Number of pollution skulls on the map | ||
0x0000 - 0x7FFF | Positive values | ||||
0x80FF - 0xFFFF | Negative values | ||||
2 | 1004-1005 | Bytes | unknown | ||
244 | 1006-1249 | Bytes | 0x00 | unknown | |
Tribe Variables 1 (No Barbarians) |
1694 | 1250-2943 | 7 blocks (one for each tribe) x 242 (1 short + 10 x 24-character strings) | ||
2 | 1250-1251 + 242n | Short | City style in Cities.bmp, as viewed by the owning tribe. | ||
0x0000 | 1st city row | ||||
0x0001 | 2nd city row | ||||
0x0002 | 3rd city row | ||||
0x0003 | 4th city row | ||||
24 | 1252-1275 + 242n | String | Leader name | ||
24 | 1276-1299 + 242n | String | Tribe name | ||
24 | 1300-1323 + 242n | String | Tribe adjective | ||
24 | 1324-1347 + 242n | String | Leader title 1 (Anarchy) | ||
24 | 1348-1371 + 242n | String | Leader title 2 (Despotism) | ||
24 | 1372-1395 + 242n | String | Leader title 3 (Monarchy) | ||
24 | 1396-1419 + 242n | String | Leader title 4 (Communism) | ||
24 | 1420-1443 + 242n | String | Leader title 5 (Fundamentalism) | ||
24 | 1444-1467 + 242n | String | Leader title 6 (Republic) | ||
24 | 1468-1491 + 242n | String | Leader title 7 (Democracy) | ||
Tribe Variables 2 (Includes Barbarians) |
26784 | 2944-29727 | 8 blocks (one for each tribe) x 3348 bytes | ||
1 | 2944 + 3348N | Byte | Revolution and Philosophy flags | ||
0x01 | Skip next Oedo year (eg, used when falling into anarchy) | ||||
0x02 | Tribe is at war with another tribe? Used for peace turns calculation | ||||
0x04 | Related to anarchy? On at the start of games | ||||
0x08 | Tribe has just recovered from revolution (allows government change) | ||||
0x20 | Free advance available from receiving Philosophy (cleared when received) | ||||
1 | 2945 + 3348N | Byte | Leader Gender | ||
0x00 | Male | ||||
0x02 | Female | ||||
8 | 2946-2953 + 3348N | Bytes | unknown | ||
2 | 2954-2955 + 3348N | Short | 0x0000 - 0x3075 | Money | |
2 | 2956-2957 + 3348N | Bytes | unknown | ||
1 | 2958 + 3348N | Byte | 0x00 - 0x14 | Tribe number, as per @Leaders table in Rules.txt | |
1 | 2959 + 3348N | Byte | 0x00 | When values are greater than 0, the tribe reads its name and leader parameters from labels.txt and menu.txt. Function uncertain. | |
2 | 2960-2961 + 3348N | Short | 0x0000 - 0x869F | Research progress | |
1 | 2962 + 3348N | Byte | Technology currently being researched | ||
0x00 - 0x63 | Technology number as per @Civilize table in Rules.txt | ||||
0xFF | No technology is being researched | ||||
1 | 2963 + 3348N | Byte | Related to technologies, possibly state of previous byte | ||
0x00 | Something is being researched | ||||
0xFF | Nothing is being researched | ||||
2 | 2964-2965 + 3348N | Short | 0x0000 - 0x03FF | The horizontal map coordinate for the tribe's starting position. Function uncertain. | |
2 | 2966-2967 + 3348N | Bytes | unknown | ||
1 | 2968 + 3348N | Byte | Number of technologies acquired (starting techs are not included). Affects the cost in beakers of researching the next technology and also how the tribe is viewed by other AI tribes. | ||
1 | 2969 + 3348N | Byte | 0x00 - 0xFF | Number of Future Technologies researched | |
1 | 2970 + 3348N | Byte | unknown | ||
1 | 2971 + 3348N | Byte | 0x00 - 0x08 | Percentage Science (/10) as shown in the Tax Rate screen | |
1 | 2972 + 3348N | Byte | 0x00 - 0x08 | Percentage Tax (/10) as shown in the Tax rate screen | |
1 | 2973 + 3348N | Byte | Government type | ||
0x00 | Anarchy | ||||
0x01 | Despotism | ||||
0x02 | Monarchy | ||||
0x03 | Communism | ||||
0x04 | Fundamentalism | ||||
0x05 | Republic | ||||
0x06 | Democracy | ||||
8 | 2974-2981 + 3348N | Bytes | unknown | ||
1 | 2982 + 3348N | Byte | 0x00 - 0x08 | Reputation (number of betrayals) | |
1 | 2983 + 3348N | Byte | 0x00 - | Patience | |
32 (8 x 4) | 2984-3015 + 3348N | Treaties (8 blocks of 4 bytes, 1 for each tribe, beginning with tribe 0, barbarians) | |||
1st | Byte | ||||
0x01 | Contact | ||||
0x02 | Cease Fire | ||||
0x04 | Peace | ||||
0x08 | Alliance | ||||
0x10 | Vendetta | ||||
0x80 | Embassy | ||||
2nd | Byte | ||||
0x02 | unknown | ||||
0x04 | unknown | ||||
0x10 | unknown | ||||
0x20 | War | ||||
3rd | Byte | ||||
0x20 | unknown | ||||
0x80 | unknown | ||||
4th | Byte | unknown | |||
1 | 3016 + 3348N | Byte | 0x64 | Attitude to tribe 0 (barbarians) | |
1 | 3017 + 3348N | Byte | 0x00 - 0x64 | Attitude to tribe 1 | |
1 | 3018 + 3348N | Byte | 0x00 - 0x64 | Attitude to tribe 2 | |
1 | 3019 + 3348N | Byte | 0x00 - 0x64 | Attitude to tribe 3 | |
1 | 3020 + 3348N | Byte | 0x00 - 0x64 | Attitude to tribe 4 | |
1 | 3021 + 3348N | Byte | 0x00 - 0x64 | Attitude to tribe 5 | |
1 | 3022 + 3348N | Byte | 0x00 - 0x64 | Attitude to tribe 6 | |
1 | 3023 + 3348N | Byte | 0x00 - 0x64 | Attitude to tribe 7 | |
1 | 3024 + 3348N | Byte | 0x00 - 0x64 | Reputation with tribe 0 (barbarians) | |
1 | 3025 + 3348N | Byte | 0x00 - 0x64 | Reputation with tribe 1 | |
1 | 3026 + 3348N | Byte | 0x00 - 0x64 | Reputation with tribe 2 | |
1 | 3027 + 3348N | Byte | 0x00 - 0x64 | Reputation with tribe 3 | |
1 | 3028 + 3348N | Byte | 0x00 - 0x64 | Reputation with tribe 4 | |
1 | 3029 + 3348N | Byte | 0x00 - 0x64 | Reputation with tribe 5 | |
1 | 3030 + 3348N | Byte | 0x00 - 0x64 | Reputation with tribe 6 | |
1 | 3031 + 3348N | Byte | 0x00 - 0x64 | Reputation with tribe 7 | |
8 | 3032-3039 + 3348N | Bytes | unknown | ||
13 | 3040-3052 + 3348N | Technologies Possessed | |||
3040 + 3348N | Byte | 0x01 | Technology 0 | ||
0x02 | Technology 1 | ||||
0x04 | Technology 2 | ||||
0x08 | Technology 3 | ||||
0x10 | Technology 4 | ||||
0x20 | Technology 5 | ||||
0x40 | Technology 6 | ||||
0x80 | Technology 7 | ||||
3041 + 3348N | Byte | 0x01 | Technology 8 | ||
0x02 | Technology 9 | ||||
0x04 | Technology 10 | ||||
0x08 | Technology 11 | ||||
0x10 | Technology 12 | ||||
0x20 | Technology 13 | ||||
0x40 | Technology 14 | ||||
0x80 | Technology 15 | ||||
3042 + 3348N | Byte | 0x01 | Technology 16 | ||
0x02 | Technology 17 | ||||
0x04 | Technology 18 | ||||
0x08 | Technology 19 | ||||
0x10 | Technology 20 | ||||
0x20 | Technology 21 | ||||
0x40 | Technology 22 | ||||
0x80 | Technology 23 | ||||
3043 + 3348N | Byte | 0x01 | Technology 24 | ||
0x02 | Technology 25 | ||||
0x04 | Technology 26 | ||||
0x08 | Technology 27 | ||||
0x10 | Technology 28 | ||||
0x20 | Technology 29 | ||||
0x40 | Technology 30 | ||||
0x80 | Technology 31 | ||||
3044 + 3348N | Byte | 0x01 | Technology 32 | ||
0x02 | Technology 33 | ||||
0x04 | Technology 34 | ||||
0x08 | Technology 35 | ||||
0x10 | Technology 36 | ||||
0x20 | Technology 37 | ||||
0x40 | Technology 38 | ||||
0x80 | Technology 39 | ||||
3045 + 3348N | Byte | 0x01 | Technology 40 | ||
0x02 | Technology 41 | ||||
0x04 | Technology 42 | ||||
0x08 | Technology 43 | ||||
0x10 | Technology 44 | ||||
0x20 | Technology 45 | ||||
0x40 | Technology 46 | ||||
0x80 | Technology 47 | ||||
3046 + 3348N | Byte | 0x01 | Technology 48 | ||
0x02 | Technology 49 | ||||
0x04 | Technology 50 | ||||
0x08 | Technology 51 | ||||
0x10 | Technology 52 | ||||
0x20 | Technology 53 | ||||
0x40 | Technology 54 | ||||
0x80 | Technology 55 | ||||
3047 + 3348N | Byte | 0x01 | Technology 56 | ||
0x02 | Technology 57 | ||||
0x04 | Technology 58 | ||||
0x08 | Technology 59 | ||||
0x10 | Technology 60 | ||||
0x20 | Technology 61 | ||||
0x40 | Technology 62 | ||||
0x80 | Technology 63 | ||||
3048 + 3348N | Byte | 0x01 | Technology 64 | ||
0x02 | Technology 65 | ||||
0x04 | Technology 66 | ||||
0x08 | Technology 67 | ||||
0x10 | Technology 68 | ||||
0x20 | Technology 69 | ||||
0x40 | Technology 70 | ||||
0x80 | Technology 71 | ||||
3049 + 3348N | Byte | 0x01 | Technology 72 | ||
0x02 | Technology 73 | ||||
0x04 | Technology 74 | ||||
0x08 | Technology 75 | ||||
0x10 | Technology 76 | ||||
0x20 | Technology 77 | ||||
0x40 | Technology 78 | ||||
0x80 | Technology 79 | ||||
3050 + 3348N | Byte | 0x01 | Technology 80 | ||
0x02 | Technology 81 | ||||
0x04 | Technology 82 | ||||
0x08 | Technology 83 | ||||
0x10 | Technology 84 | ||||
0x20 | Technology 85 | ||||
0x40 | Technology 86 | ||||
0x80 | Technology 87 | ||||
3051 + 3348N | Byte | 0x01 | Technology 88 | ||
0x02 | Technology 89 | ||||
0x04 | Technology 90 | ||||
0x08 | Technology 91 | ||||
0x10 | Technology 92 | ||||
0x20 | Technology 93 | ||||
0x40 | Technology 94 | ||||
0x80 | Technology 95 | ||||
3052 + 3348N | Byte | 0x01 | Technology 96 | ||
0x02 | Technology 97 | ||||
0x04 | Technology 98 | ||||
0x08 | Technology 99 | ||||
1 | 3053 + 3348N | Byte | unknown | ||
2 | 3054-3055 + 3348N | Short | 0x0000 - | Total number of military units | |
2 | 3056-3057 + 3348N | Short | 0x0000 - 0x00FF | Total number of cities | |
2 | 3058-3059 + 3348N | Bytes | unknown | ||
2 | 3060-3061 + 3348N | Short | 0x0000 - 0xFFFF | Sum of the city sizes | |
6 | 3062-3067 + 3348N | Bytes | unknown | ||
100 x 1 | 3068-3167 + 3348N | Byte | Associated with which tribe was the first to discover each technology | ||
0x00 | Tribe was the first to discover the technology | ||||
0xFF | Tribe not the first to discover the technology. May include any values greater than 0. | ||||
80 x 1 | 3168-3247 + 3348N | Byte | 0x00 - 0xFF | Number of active units of each type (for the Defence Minister's screen) | |
80 x 1 | 3248-3327 + 3348N | Byte | 0x00 - 0xFF | Casualty lists for the Defence Minister's screen (each of the 80 possible units) | |
80 x 1 | 3328-3407 + 3348N | Byte | 0x00 - 0xFF | Number of units of each type in production (for the Defence Minister's screen) | |
2320 | 3408-5727 + 3348N | Bytes | unknown | ||
16 (8 x 2) | 5728-5743 + 3348N | Shorts | Last contact with the 8 tribes, beginning with tribe 0, barbarians (can't confirm) | ||
0x0001 - 0x7FFF | Turn number of last contact | ||||
0xFFFF | No contact (-1) | ||||
14 | 5744-5757 + 3348N | Bytes | unknown | ||
2 | 5758-5759 + 3348N | Short | Space race variables | ||
0x0000 | Tribe has yet to begin the space race | ||||
0x0001 | Tribe has begun the space race | ||||
0x0008 | unknown | ||||
2 | 5760-5761 + 3348N | Short | 0x0000 - 0x7FFF | Space Ship - Estimated Arrival (Year) | |
2 | 5762-5763 + 3348N | Short | 0x0000 - 0x7FFF | Space Ship - Ready/Launch (Year) | |
2 | 5764-5765 + 3348N | Short | unknown | ||
2 | 5766-5767 + 3348N | Short | 0x0000 - 0x0027 | Space Ship Structural | |
2 | 5768-5769 + 3348N | Short | 0x0000 - 0x0008 | Space Ship Components - Propulsion | |
2 | 5770-5771 + 3348N | Short | 0x0000 - 0x0008 | Space Ship Components - Fuel | |
2 | 5772-5773 + 3348N | Short | 0x0000 - 0x0004 | Space Ship Modules - Habitation | |
2 | 5774-5775 + 3348N | Short | 0x0000 - 0x0004 | Space Ship Modules - Life Support | |
2 | 5776-5777 + 3348N | Short | 0x0000 - 0x0004 | Space Ship Modules - Solar Panel | |
512 (64 x 8) | 5778-6289 + 3348N | A list of up to 64 tile co-ordinates (for what reason? AI goals?) | |||
1st-2nd | Short | 0x0000 - 0x03FF | Horizontal map co-ordinate | ||
3rd-4th | Short | 0x0000 - 0x01FF | Vertical map co-ordinate | ||
5th-6th | Short | 0x0000 - 0x0003 | Map number | ||
7th | Byte | AI action? | |||
0x00 | Attack? | ||||
0x01 | Defend? | ||||
0x02 - 0x14 | unknown | ||||
0x15 | Improve terrain? | ||||
0xFF | Expired? | ||||
8th | Byte | unknown | |||
0x00 | unknown | ||||
0xF0 - 0xFF | unknown | ||||
2 | 6290-6291 + 3348N | Bytes | unknown | ||
Leaders2 Table | 168 | 29728 - 29895 | @Leaders2 table from Rules.txt (21 tribes x 8 groups x 1 rules) | ||
168 x 1 | 29728 - 29895 | Byte | 0x00 | Technologies can be researched, traded, stolen or obtained by conquest | |
0x01 | Technologies cannot be researched, but can be traded, stolen or obtained by conquest | ||||
0x02 | Technologies can only be obtained by events | ||||
Transporters | 4 + T x 14 | 29896- | T = Number of transporters (list includes pillaged and deleted ones) | ||
2 | 29896-29897 | Short | 0x0000 - | Total number of transporters (each consists of a pair of sites on 2 different maps) | |
2 | 29898-29899 | Bytes | unknown | ||
T x 14 | 29900- | Map co-ordinates of each transporter pair (site A and site B) | |||
1st-2nd | Short | 0x0000 - 0x03FF | Horizontal map co-ordinate of site A | ||
3rd-4th | Short | 0x0000 - 0x01FF | Vertical map co-ordinate of site A | ||
5th | Byte | 0x00 - 0x03 | Map number of site A | ||
6th | Byte | 0x00 | unknown | ||
7th-8th | Short | 0x0000 - 0x03FF | Horizontal map co-ordinate of site B | ||
9th-10th | Short | 0x0000 - 0x01FF | Vertical map co-ordinate of site B | ||
11th | Byte | 0x00 - 0x03 | Map number of site B | ||
12th | Byte | 0x00 - 0x02 | Art type (cities.bmp) | ||
13th-14th | Bytes | 0x00 | unknown | ||
Map Header | 16 | ||||
2 | Short | 0x0028 - 0x0400 | Map width (number of tiles x 2) | ||
2 | Short | 0x0014 - 0x0200 | Map height (number of tiles) | ||
2 | Short | 0x03E8 - 0x7FFF | Map area (number of tiles) | ||
2 | Short | Map shape | |||
0x0000 | Round | ||||
0x0001 | Flat | ||||
2 | Short | 0x0000 - 0x7FFF | Resource seed (64 patterns, repeated with higher values). Doesn't appear to be used by the game. See the resource seed for individual maps. | ||
2 | Short | 0x000A - 0x0100 | Map width (number of tiles x 2) / 4 (rounded up) | ||
2 | Short | 0x0005 - 0x0080 | Map height (number of tiles) / 4 (rounded up) | ||
2 | Short | 0x0000 - 0x0003 | Number of secondary maps | ||
Visible Tile Improvements | 7 x t | 7 blocks (one for each tribe) x t (number of map tiles, row by row) | |||
1 | Byte | Condition of the map when it was last explored by the tribe | |||
0x00 | Nothing | ||||
0x01 | Unit Present | ||||
0x02 | City Present | ||||
0x04 | Irrigation | ||||
0x08 | Mining | ||||
0x10 | Road | ||||
0x30 | Railroad (+ Road) | ||||
0x40 | Fortress | ||||
0x80 | Pollution | ||||
0x82 | Transporter | ||||
Map Data | t x 6 | t = number of map tiles, row by row | |||
1 | 1st | Byte | Terrain Type | ||
0x00 | Desert | ||||
0x01 | Plains | ||||
0x02 | Grassland | ||||
0x03 | Forest | ||||
0x04 | Hills | ||||
0x05 | Mountains | ||||
0x06 | Tundra | ||||
0x07 | Glacier | ||||
0x08 | Swamp | ||||
0x09 | Jungle | ||||
0x0A | Ocean | ||||
0x20 | Only used for resource tiles. Indicates that the tile was being animated when the game was saved - no apparent effect. | ||||
0x40 | No resource | ||||
0x80 | River | ||||
1 | 2nd | Byte | Tile Improvements | ||
0x00 | Nothing | ||||
0x01 | Unit Present | ||||
0x02 | City Present | ||||
0x04 | Irrigation | ||||
0x08 | Mining | ||||
0x0C | Farmland | ||||
0x10 | Road | ||||
0x30 | Railroad (+ Road) | ||||
0x40 | Fortress | ||||
0x42 | Airbase | ||||
0x80 | Pollution | ||||
0x82 | Transporter | ||||
1 | 3rd | Byte | City radii | ||
0x00 | Tile does not lie within a city radius or else lies within the radius of a barbarian city | ||||
0x20 | Lies within the radius of a city belonging to tribe 1 | ||||
0x40 | Lies within the radius of a city belonging to tribe 2 | ||||
0x60 | Lies within the radius of a city belonging to tribe 3 | ||||
0x80 | Lies within the radius of a city belonging to tribe 4 | ||||
0xA0 | Lies within the radius of a city belonging to tribe 5 | ||||
0xC0 | Lies within the radius of a city belonging to tribe 6 | ||||
0xE0 | Lies within the radius of a city belonging to tribe 7 | ||||
1 | 4th | Byte | Land Mass Index | ||
0x01 - 0xFF | |||||
1 | 5th | Byte | Tile visibility | ||
0x00 | Unexplored by all | ||||
0x01 | Visible to tribe 0 (barbarians) | ||||
0x02 | Visible to tribe 1 | ||||
0x04 | Visible to tribe 2 | ||||
0x08 | Visible to tribe 3 | ||||
0x10 | Visible to tribe 4 | ||||
0x20 | Visible to tribe 5 | ||||
0x40 | Visible to tribe 6 | ||||
0x80 | Visible to tribe 7 | ||||
1 | 6th | Byte | Tile fertility/ownership (first 4 bits are ownership, second 4 bits are fertility) | ||
0x00 - 0x0F | Tile fertility as determined by the AI (values > 0 are always grassland/plains terrain) | ||||
0x00 | Owned by tribe 0 (barbarians) | ||||
0x10 | Owned by tribe 1 | ||||
0x20 | Owned by tribe 2 | ||||
0x30 | Owned by tribe 3 | ||||
0x40 | Owned by tribe 4 | ||||
0x50 | Owned by tribe 5 | ||||
0x60 | Owned by tribe 6 | ||||
0x70 | Owned by tribe 7 | ||||
0xF0 | No ownership | ||||
Resource Seed | 2 | ||||
2 | Short | 0x0000 - 0x7FFF | Resource seed for this map (64 patterns, repeated with higher values) | ||
Unknown Map Block | W/2 x H/4 x 2 | W/2 = Map width/2, rounded up; H/4 = Map height/4, rounded up | |||
unknown | |||||
Unknown Block 2 | 10240 | ||||
unknown | |||||
Units Data | U x 40 | U = Number of units | |||
2 | 1st-2nd | Short | 0x0000 - 0x03FF | Horizontal map co-ordinate (negative values for units no longer in play) | |
2 | 3rd-4th | Short | 0x0000 - 0x01FF | Vertical map co-ordinate (negative values for units no longer in play) | |
2 | 5th-6th | Short | 0x0000 - 0x0003 | Map number (negative values for units no longer in play) | |
1 | 7th | Byte | unknown | ||
0x20 | unknown | ||||
0x40 | unknown | ||||
0x80 | unknown | ||||
1 | 8th | Byte | Unit attributes | ||
0x01 | unknown | ||||
0x02 | unknown | ||||
0x04 | unknown | ||||
0x08 | unknown | ||||
0x20 | Veteran status | ||||
0x40 | Unit issued with the 'wait' order | ||||
1 | 9th | Byte | 0x00 - 0x4F | Unit type (0-79) | |
1 | 10th | Byte | 0x00 - 0x07 | Owning tribe (0x00 = barbarian) | |
1 | 11th | Byte | 0x00 - 0xFF | Movement points expended (move x road multiplier) | |
1 | 12th | Byte | Visibility to other tribes | ||
0x00 | Visible only to owner | ||||
0x01 | Visible to tribe 0 (barbarians) | ||||
0x02 | Visible to tribe 1 | ||||
0x04 | Visible to tribe 2 | ||||
0x08 | Visible to tribe 3 | ||||
0x10 | Visible to tribe 4 | ||||
0x20 | Visible to tribe 5 | ||||
0x40 | Visible to tribe 6 | ||||
0x80 | Visible to tribe 7 | ||||
1 | 13th | Byte | 0x00 - 0x32 | Number of hit points lost (on a scale of 0-50) | |
1 | 14th | Byte | 0x01 - 0xFF | Starts off at FF and then drops following movement | |
1 | 15th | Byte | AI role/domain-specific counter: caravan commodity for trade units, turns in the air for flying units, accumulated workload for settlers/engineers | ||
2 | 16th-17th | Bytes | unknown | ||
1 | 18th | Byte | Orders | ||
0x01 | Fortify | ||||
0x02 | Fortified | ||||
0x03 | Sleep | ||||
0x04 | Build fortress | ||||
0x05 | Build road/railroad | ||||
0x06 | Build irrigation | ||||
0x07 | Build mine | ||||
0x08 | Transform terrain | ||||
0x09 | Clean up pollution | ||||
0x0A | Build airbase | ||||
0x0B | Build transporter | ||||
0x0C | Go to (0B in earlier versions of the game - source of error in CivConverter) | ||||
0xFF | No orders | ||||
2 | 19th-20th | Short | Home city | ||
0x0000 - 0x00FE | City number | ||||
0x00FF | None | ||||
2 | 21st-22nd | Short | 0x0000 - 0x03FF | Horizontal map co-ordinate of 'Go to' command | |
2 | 23rd-24th | Short | 0x0000 - 0x01FF | Vertical map co-ordinate of 'Go to' command | |
2 | 25th-26th | Short | 0x0000 - 0x0003 | Map number of 'Go to' command | |
2 | 27th-28th | Short | Stacking order on terrain square (ID of unit that precedes current unit) | ||
0x0001 - 0x??FF | Unit ID number | ||||
0xFFFF | No unit present | ||||
2 | 29th-30th | Short | Stacking order on terrain square (ID of unit that follows current unit) | ||
0x0001 - 0x??FF | Unit ID number | ||||
0xFFFF | No unit present | ||||
2 | 31st-32nd | Short | Dynamic unit ID (continually reset by game) | ||
0x0000 | Deleted or destroyed units | ||||
0x0001 - 0x??FF | Unit ID number | ||||
2 | 33rd-34th | Short | unknown | ||
2 | 35th-36th | Short | Unit animation | ||
0x0000 | Attack | ||||
0x0001 | Die | ||||
0x0002 | Idle (default) | ||||
0x0003 | Move | ||||
2 | 37th-38th | Short | Unit orientation | ||
0x0000 | Facing N | ||||
0x0001 | Facing NE | ||||
0x0002 | Facing E (default) | ||||
0x0003 | Facing SE | ||||
0x0004 | Facing S | ||||
0x0005 | Facing SW | ||||
0x0006 | Facing W | ||||
0x0007 | Facing NW | ||||
2 | 39th-40th | Short | unknown | ||
Cities Data | C x 92 | C = Number of cities | |||
2 | 1st-2nd | Short | 0x0000 - 0x03FF | Horizontal map co-ordinate | |
2 | 3rd-4th | Short | 0x0000 - 0x01FF | Vertical map co-ordinate | |
2 | 5th-6th | Short | 0x0000 - 0x0003 | Map number | |
1 | 7th | Byte | City attributes I | ||
0x01 | Civil disorder | ||||
0x02 | We Love the King | ||||
0x04 | Improvement sold | ||||
0x08 | Technology stolen | ||||
0x10 | Auto-build (refer to attributes IV) | ||||
0x80 | Can build coastal improvements | ||||
1 | 8th | Byte | City attributes II | ||
0x02 | unknown | ||||
0x04 | unknown | ||||
0x08 | Can build hydro plants | ||||
0x10 | unknown | ||||
0x40 | unknown | ||||
0x80 | unknown | ||||
1 | 9th | Byte | City attributes III | ||
0x08 | unknown | ||||
0x20 | Can build ships (only if coastal flag is checked) | ||||
1 | 10th | Byte | City attributes IV | ||
0x01 | Military advisor build | ||||
0x02 | Domestic advisor build | ||||
0x04 | x1 Objective | ||||
0x10 | x3 Objective (ignored in ToT) | ||||
1 | 11th | Byte | 0x00 - 0x07 | Owning tribe (0x00 = barbarians) | |
1 | 12th | Byte | 0x01 - 0xFF | City size | |
1 | 13th | Byte | 0x00 - 0x07 | Tribe which founded the city (0x00 = barbarians) | |
1 | 14th | Byte | 0x00 - 0xFF | Number of turns expired since the city was captured | |
1 | 15th | Byte | A tribe's knowledge of the city's existence | ||
0x01 | Known to tribe 0 (barbarians) | ||||
0x02 | Known to tribe 1 | ||||
0x04 | Known to tribe 2 | ||||
0x08 | Known to tribe 3 | ||||
0x10 | Known to tribe 4 | ||||
0x20 | Known to tribe 5 | ||||
0x40 | Known to tribe 6 | ||||
0x80 | Known to tribe 7 | ||||
1 | 16th | Byte | 0x00 - 0xFF | Last city size revealed to tribe 0 (barbarians) | |
1 | 17th | Byte | 0x00 - 0xFF | Last city size revealed to tribe 1 | |
1 | 18th | Byte | 0x00 - 0xFF | Last city size revealed to tribe 2 | |
1 | 19th | Byte | 0x00 - 0xFF | Last city size revealed to tribe 3 | |
1 | 20th | Byte | 0x00 - 0xFF | Last city size revealed to tribe 4 | |
1 | 21st | Byte | 0x00 - 0xFF | Last city size revealed to tribe 5 | |
1 | 22nd | Byte | 0x00 - 0xFF | Last city size revealed to tribe 6 | |
1 | 23rd | Byte | 0x00 - 0xFF | Last city size revealed to tribe 7 | |
1 | 24th | Byte | 0x00 | unknown | |
4 | 25th-28th | Bytes | Specialists (first 16 specialists only). 16 x 2 bits (i.e. 16 base 4 numbers). | ||
0b00 | No specialist | ||||
0b01 | Entertainer | ||||
0b10 | Taxman | ||||
0b11 | Scientist | ||||
2 | 29th-30th | Short | 0x0000 - 0x7FFF | Food storage | |
2 | 31st-32nd | Short | 0x0000 - 0x7FFF | Shields in shield box | |
2 | 33rd-34th | Short | 0x0000 - 0x7FFF | Base trade (number of trade arrows generated by terrain - trade routes excluded) | |
16 | 35th-50th | String | City name (last byte is a null terminator) | ||
1 | 51st | Byte | 0x00 - 0xFF | Number of workers in the inner circle (each bit = 1 of the 8 squares) | |
2 | 52nd-53rd | Short | 0x1000 - 0x1FFF | Number of workers in the outer circle (each bit = 1 of the 12 squares + the city square itself is always represented by the 4th bit?) | |
1 | 54th | Byte | 0x00 - 0xFF | Number of specialists x 4 | |
1 | 55th | Byte | City Improvements I | ||
0x02 | Palace | ||||
0x04 | Barracks | ||||
0x08 | Granary | ||||
0x10 | Temple | ||||
0x20 | Marketplace | ||||
0x40 | Library | ||||
0x80 | Courthouse | ||||
1 | 56th | Byte | City Improvements II | ||
0x01 | City Walls | ||||
0x02 | Aqueduct | ||||
0x04 | Bank | ||||
0x08 | Cathedral | ||||
0x10 | University | ||||
0x20 | Mass Transit | ||||
0x40 | Colosseum | ||||
0x80 | Factory | ||||
1 | 57th | Byte | City Improvements III | ||
0x01 | Manufacturing Plant | ||||
0x02 | SDI Defence | ||||
0x04 | Recycling Centre | ||||
0x08 | Power Plant | ||||
0x10 | Hydro Plant | ||||
0x20 | Nuclear Plant | ||||
0x40 | Stock Exchange | ||||
0x80 | Sewer System | ||||
1 | 58th | Byte | City Improvements IV | ||
0x01 | Supermarket | ||||
0x02 | Superhighways | ||||
0x04 | Research Lab | ||||
0x08 | SAM Battery | ||||
0x10 | Coastal Fortress | ||||
0x20 | Solar Plant | ||||
0x40 | Harbour | ||||
0x80 | Offshore Platform | ||||
1 | 59th | Byte | City Improvements V | ||
0x01 | Airport | ||||
0x02 | Police Station | ||||
0x04 | Port Facility | ||||
0x08 | Transporter | ||||
1 | 60th | Byte | Item in production | ||
0x00 - 0x50 | The list of 80 units | ||||
0xBD - 0xFF | Improvements, wonders and spaceship components (counts down from 255) | ||||
1 | 61st | Byte | 0x00 - 0x03 | Number of trade routes | |
1 | 62nd | Byte | 1st supplied trade item (continually reset by game) | ||
0x00 - 0x0F | The 16 possible trade items - still available for trade | ||||
0xF0 - 0xFF | The 16 possible trade items - trade route taken (counts down from 255) | ||||
1 | 63rd | Byte | 2nd supplied trade item (continually reset by game) | ||
0x00 - 0x0F | The 16 possible trade items - still available for trade | ||||
0xF0 - 0xFF | The 16 possible trade items - trade route taken (counts down from 255) | ||||
1 | 64th | Byte | 3rd supplied trade item (continually reset by game) | ||
0x00 - 0x0F | The 16 possible trade items - still available for trade | ||||
0xF0 - 0xFF | The 16 possible trade items - trade route taken (counts down from 255) | ||||
1 | 65th | Byte | 0x00 - 0x0F | 1st demanded trade item (continually reset by game) | |
1 | 66th | Byte | 0x00 - 0x0F | 2nd demanded trade item (continually reset by game) | |
1 | 67th | Byte | 0x00 - 0x0F | 3rd demanded trade item (continually reset by game) | |
1 | 68th | Byte | Commodity traded with partner 1 | ||
0x00 - 0x0F | Commodity as per @CARAVAN in rules.txt | ||||
0xFF | Food supplies | ||||
1 | 69th | Byte | Commodity traded with partner 2 | ||
0x00 - 0x0F | Commodity as per @CARAVAN in rules.txt | ||||
0xFF | Food supplies | ||||
1 | 70th | Byte | Commodity traded with partner 3 | ||
0x00 - 0x0F | Commodity as per @CARAVAN in rules.txt | ||||
0xFF | Food supplies | ||||
2 | 71st-72nd | Short | 0x0000 - 0x00FF | Trade partner 1 | |
2 | 73rd-74th | Short | 0x0000 - 0x00FF | Trade partner 2 | |
2 | 75th-76th | Short | 0x0000 - 0x00FF | Trade partner 3 | |
2 | 77th-78th | Short | 0x0000 - 0x7FFF | Science | |
2 | 79th-80th | Short | 0x0000 - 0x7FFF | Tax | |
2 | 81st-82nd | Short | 0x0000 - 0x7FFF | Trade (including trade routes) | |
1 | 83rd | Byte | 0x00 - 0xFF | Total food production | |
1 | 84th | Byte | 0x00 - 0xFF | Total shield production | |
1 | 85th | Byte | 0x00 - 0xFF | Happy citizens | |
1 | 86th | Byte | 0x00 - 0xFF | Unhappy citizens | |
2 | 87th-88th | Short | 0x0001 - 0x00FF | Dynamic city ID | |
4 | 89th-92nd | Bytes | unknown | ||
Tribe Cities Data | 63 | 21 (tribes) x 3 (bytes) | |||
1 | 1st | Byte | 0x00 - 0x01 | unknown | |
1 | 2nd | Byte | 0x00 - 0xFE | Number of cities built so far. Determines which city name is selected from city.txt. Resets to 0 when the last city under @EXTRA is reached. | |
1 | 3rd | Byte | 0x00 - 0x01 | unknown | |
Unknown Block 3 | 1390 + H x 60 | H = Number of human players | |||
2 | Short | 0x0000 - 0x03FF | Start game position: Horizontal map co-ordinate | ||
2 | Short | 0x0000 - 0x01FF | Start game position: Vertical map co-ordinate | ||
H x 60 | Bytes | unknown | |||
1310 | Bytes | unknown | |||
2 | Short | 0x0000 - 0x03FF | Start game position: Horizontal map co-ordinate | ||
2 | Short | 0x0000 - 0x01FF | Start game position: Vertical map co-ordinate | ||
2 | Short | Start game zoom level | |||
0x0000 | Standard zoom | ||||
0x0001 - 0x0008 | Zoomed-in levels | ||||
0xFFF9 - 0xFFFF | Zoomed-out levels | ||||
70 | Bytes | unknown | |||
Scenario Parameters | 100 | Only present in scenario (SCN) files or saves derived from them | |||
1 | Byte | ||||
0x01 | Total War Flag | ||||
0x02 | Use Objective Victory Flag | ||||
0x04 | Count wonders as objectives | ||||
0x10 | Forbid government switching | ||||
0x20 | Forbid tech from conquest | ||||
0x40 | Eliminate pollution | ||||
0x80 | Terrain animation lockout | ||||
1 | Byte | ||||
0x01 | Unit animation lockout | ||||
0x02 | .SPR file override | ||||
0x80 | WWII AI | ||||
25 | String | Scenario name (last byte is a null terminator) | |||
55 | Bytes | unknown | |||
2 | Short | 0x0000 - 0x7FFF | Tech paradigm (overrides setting in rules.txt) | ||
2 | Short | Turn year increment | |||
0x0000 - 0x7FFF | Positive values (yearly increments) | ||||
0x8000 - 0xFFFF | Negative values (monthly increments) | ||||
2 | Short | Starting year | |||
0x0000 - 0x7FFF | Year AD | ||||
0x8000 - 0xFFFF | Year BC | ||||
2 | Short | 0x0000 - 0x7FFF | Maximum turns | ||
1 | Byte | 0x00 - 0x07 | Objectives protagonist | ||
1 | Byte | 0x00 | unknown | ||
2 | Short | 0x0000 - 0x7FFF | Decisive victory threshold | ||
2 | Short | 0x0000 - 0x7FFF | Marginal victory threshold | ||
2 | Short | 0x0000 - 0x7FFF | Marginal defeat threshold | ||
2 | Short | 0x0000 - 0x7FFF | Decisive defeat threshold | ||
Destroyed Tribes | 340 | ||||
2 | Short | 0x0000 - 0x000C | Number of tribes destroyed (up to 12 recorded) | ||
12 x 2 | Short | Turn that the tribe was destroyed | |||
12 x 1 | Byte | 0x00 - 0x07 | The number of the tribe that destroyed the other tribe (includes Barbarians) | ||
12 x 1 | Byte | 0x00 - 0x06 | The number of the tribe that was destroyed | ||
12 x 24 | String | Name of the tribe destroyed | |||
2 | Bytes | 0x00 | unknown | ||
Multi-player Data | 1172 | ||||
84.5 | Bytes | unknown | |||
224 (7 x 32) | Bytes | Multi-player passwords. See Yaroslav's notes in section 9 of the Hex-Editing Saved Games document. | |||
863.5 | Bytes | unknown | |||
Events | Many variables share the same offset position | ||||
4 | String | "EVNT" | |||
2 | Short | 0x0001 - ? | Number of events | ||
2 | Bytes | 0x00 | unknown | ||
E x 276 | E = Number of events | ||||
1st-4th | Bytes | Event trigger | |||
0x00000001 | UnitKilled | ||||
0x00000002 | CityTaken | ||||
0x00000004 | Turn | ||||
0x00000008 | TurnInterval | ||||
0x00000010 | Negotiation | ||||
0x00000020 | ScenarioLoaded | ||||
0x00000040 | RandomTurn | ||||
0x00000080 | NoSchism | ||||
0x00000100 | ReceivedTechnology | ||||
0x00000200 | CityProduction | ||||
0x00000400 | AlphaCentauriArrival | ||||
0x00000800 | CityDestroyed | ||||
0x00001000 | BribeUnit | ||||
0x00002000 | CheckFlag | ||||
5th-8th | Bytes | Event action | |||
0x00000001 | Text | ||||
0x00000002 | MoveUnit | ||||
0x00000004 | CreateUnit | ||||
0x00000008 | ChangeMoney | ||||
0x00000010 | PlayWaveFile | ||||
0x00000020 | MakeAggression | ||||
0x00000040 | JustOnce | ||||
0x00000080 | PlayCDTrack | ||||
0x00000100 | DontPlayWonders | ||||
0x00000200 | ChangeTerrain | ||||
0x00000400 | DestroyACivilization | ||||
0x00000800 | GiveTechnology | ||||
0x00001000 | PlayAVIFile | ||||
0x00002000 | EndGameOverride | ||||
0x00004000 | EndGame | ||||
0x00008000 | BestowImprovement | ||||
0x00010000 | Transport | ||||
0x00020000 | TakeTechnology | ||||
0x00040000 | ModifyReputation | ||||
0x00080000 | EnableTechnology | ||||
0x00200000 | Flag | ||||
0x00400000 | Negotiator | ||||
0x20000000 | JustOnce completed | ||||
Modifiers | 9th | Byte | |||
0x01 | Randomize (BestowImprovement, CreateUnit) | ||||
0x02 | Delay | ||||
0x04 | InCapital (CreateUnit) | ||||
0x08 | endscreens=yes (EndGame) | ||||
0x10 | capital=yes (BestowImprovement) | ||||
0x20 | wonders=yes (BestowImprovement) | ||||
0x40 | unittype=Spy (CityTaken) | ||||
0x80 | Continuous (triggers) | ||||
10th | Byte | ||||
0x01 | Indicates FutureTech (ReceivedTechnology). See 49th byte. | ||||
0x02 | state=on or state=set (Flag) | ||||
0x04 | state=on or state=set (CheckFlag) | ||||
0x08 | @INITFLAG. Always the first event when present. | ||||
0x10 | Continuous (Flag) | ||||
0x20 | type=talker (Negotiator) | ||||
0x40 | state=set (Negotiator) | ||||
0x80 | Count used (CheckFlag) | ||||
11th | Byte | ||||
0x01 | Mask used (Flag) | ||||
0x02 | Associated with Negotiation | ||||
0x04 | Technology used (CheckFlag) | ||||
0x08 | Randomize (DelayPerFlag) | ||||
0x10 | DelayPerFlag | ||||
0x20 | Defender Only (UnitKilled) | ||||
0x40 | No Broadcast (Text) | ||||
12th | Byte | ||||
0x01 | map=0 (UnitKilled) | ||||
0x02 | map=1 (UnitKilled) | ||||
0x04 | map=2 (UnitKilled) | ||||
0x08 | map=3 (UnitKilled) | ||||
0x10 | Indicates the first trigger used with an @AND modifier. | ||||
0x20 | First trigger has fired and uses the "continuous" modifier. | ||||
0x40 | Indicates the second trigger used with an @AND modifier. | ||||
0x80 | Second trigger has fired and uses the "continuous" modifier. | ||||
Trigger Parameters | 13th-16th | Bytes | String Pointer: unit= (UnitKilled) | ||
17th-20th | Bytes | String Pointer: city= (CityDestroyed, CityTaken) | |||
21st-24th | Bytes | String Pointer: attacker= (CityTaken, UnitKilled), race= (AlphaCentauriArrival), talker= (Negotiation), who= (BribeUnit, CheckFlag) | |||
25th-28th | Bytes | String Pointer: builder= (CityProduction), defender= (CityTaken, NoSchism, UnitKilled), listener= (Negotiation), owner= (CityDestroyed), receiver= (ReceivedTechnology), whom= (BribeUnit) | |||
29th-32nd | Bytes | attacker= (CityTaken, UnitKilled), race= (AlphaCentauriArrival), talker= (Negotiation), talkermask= (Negotiation), who= (BribeUnit, CheckFlag) | |||
0x00000000 - 0x001FFFFF | |||||
0xFFFFFFFA | EveryBody (CheckFlag) | ||||
0xFFFFFFFB | SomeBody (CheckFlag) | ||||
0xFFFFFFFE | AnyBody | ||||
33rd-36th | Bytes | builder= (CityProduction), defender= (CityTaken, NoSchism, UnitKilled), listener= (Negotiation), listenermask= (Negotiation), owner= (CityDestroyed), receiver= (ReceivedTechnology), whom= (BribeUnit) | |||
0x00000000 - 0x001FFFFF | |||||
0xFFFFFFFE | AnyBody | ||||
37th-40th | Bytes | 0x00000000 - 0xFFFFFFFF | flag=, mask= (CheckFlag) | ||
41st-42nd | Bytes | city= (CityDestroyed), unit= (UnitKilled), unittype= (BribeUnit) | |||
0x0000 - 0x004F | |||||
0xFFFE | AnyUnit | ||||
43rd-44th | Short | interval= (TurnInterval), turn= (Turn) | |||
0x0000 - 0x03E8 | |||||
0xFFFF | Every (Turn) | ||||
45th-46th | Short | 0x0000 - 0x03E8 | denominator= (RandomTurn) | ||
47th | Byte | talkertype= (Negotiation) | |||
0x01 | Human | ||||
0x02 | Computer | ||||
0x04 | HumanOrComputer | ||||
0x08 | Mask used | ||||
48th | Byte | listenertype= (Negotiation) | |||
0x01 | Human | ||||
0x02 | Computer | ||||
0x04 | HumanOrComputer | ||||
0x08 | Mask used | ||||
49th | Byte | 0x00 - 0xFF | technology= (CheckFlag, ReceivedTechnology), futuretech= (ReceivedTechnology). See 10th byte. | ||
50th | Byte | improvement=, unit= (CityProduction) | |||
0x00 - 0x4F | Unit type | ||||
0xBD- 0xFF | Improvement type (counts down from 0xFF) | ||||
51st | Byte | count= (CheckFlag), size= (AlphaCentauriArrival), threshold= (CheckFlag) | |||
0x00 - 0x20 | |||||
0xFE | size=AnySize | ||||
Action Parameters | 52nd | Byte | owner= (MoveUnit) | ||
0x00 - 0x07 | Tribe number | ||||
0xFC | TriggerDefender, TriggerReceiver | ||||
0xFD | TriggerAttacker | ||||
0xFE | AnyBody | ||||
53rd-56th | Bytes | String Pointer: line 1 (Text) | |||
57th-60th | Bytes | String Pointer: line 2 (Text) | |||
61st-64th | Bytes | String Pointer: line 3 (Text) | |||
65th-68th | Bytes | String Pointer: line 4 (Text) | |||
69th-72nd | Bytes | String Pointer: line 5 (Text) | |||
73rd-76th | Bytes | String Pointer: line 6 (Text) | |||
77th-80th | Bytes | String Pointer: line 7 (Text) | |||
81st-84th | Bytes | String Pointer: line 8 (Text) | |||
85th-88th | Bytes | String Pointer: line 9 (Text) | |||
89th-92nd | Bytes | String Pointer: line 10 (Text) | |||
93rd-96th | Bytes | 0x00000000 | unknown | ||
97th-100th | Bytes | String Pointer: unit= (MoveUnit) | |||
101st-104th | Bytes | String Pointer: owner= (MoveUnit) | |||
105th-108th | Bytes | String Pointer: who= (MakeAggression) | |||
109th-112th | Bytes | String Pointer: whom= (MakeAggression) | |||
113th-116th | Bytes | String Pointer: owner= (CreateUnit) | |||
117th-120th | Bytes | String Pointer: unit= (CreateUnit) | |||
121st-124th | Bytes | String Pointer: homecity= (CreateUnit) | |||
125th-128th | Bytes | String Pointer: receiver= (ChangeMoney) | |||
129th-132nd | Bytes | String Pointer: WAV file (PlayWaveFile) | |||
133rd-136th | Bytes | String Pointer: AVI file (PlayAVIFile) | |||
137th | Byte | 0x00 - 0x1F | flag= (Flag) | ||
137th-140th | Bytes | 0x00000000 - 0xFFFFFFFF | mask= (Flag), flags 0-31 for tribe 0 (@INITFLAG) | ||
141st-142nd | Short | 0x0000 - 0x8000 | Transport mask (Transport) | ||
141st-144th | Bytes | 0x00000000 - 0xFFFFFFFF | mask= (DelayPerFlag), flags 0-31 for tribe 1 (@INITFLAG) | ||
144th | Byte | Transport mode (Transport) | |||
0x48 | Native | ||||
0x50 | Build | ||||
0x60 | Use | ||||
145th-146th | Short | 0x0000 - 0x7FFF | maprect x1 (MoveUnit), flags 0-15 for tribe 2 (@INITFLAG) | ||
147th-148th | Short | 0x0000 - 0x7FFF | maprect y1 (MoveUnit), flags 16-31 for tribe 2 (@INITFLAG) | ||
149th-150th | Short | 0x0000 - 0x7FFF | maprect x2 (MoveUnit), flags 0-15 for tribe 3 (@INITFLAG) | ||
151st-152nd | Short | 0x0000 - 0x7FFF | maprect y2 (MoveUnit), flags 16-31 for tribe 3 (@INITFLAG) | ||
153rd-154th | Short | 0x0000 - 0x7FFF | maprect x3 (MoveUnit), flags 0-15 for tribe 4 (@INITFLAG) | ||
155th-156th | Short | 0x0000 - 0x7FFF | maprect y3 (MoveUnit), flags 16-31 for tribe 4 (@INITFLAG) | ||
157th-158th | Short | 0x0000 - 0x7FFF | maprect x4 (MoveUnit), flags 0-15 for tribe 5 (@INITFLAG) | ||
159th-160th | Short | 0x0000 - 0x7FFF | maprect y4 (MoveUnit), flags 16-31 for tribe 5 (@INITFLAG) | ||
161st-162nd | Short | 0x0000 - 0x7FFF | maprect x1 (ChangeTerrain), flags 0-15 for tribe 6 (@INITFLAG) | ||
163rd-164th | Short | 0x0000 - 0x7FFF | maprect y1 (ChangeTerrain), flags 16-31 for tribe 6 (@INITFLAG) | ||
165th-166th | Short | 0x0000 - 0x7FFF | maprect x2 (ChangeTerrain), flags 0-15 for tribe 7 (@INITFLAG) | ||
167th-168th | Short | 0x0000 - 0x7FFF | maprect y2 (ChangeTerrain), flags 16-31 for tribe 7 (@INITFLAG) | ||
169th-170th | Short | 0x0000 - 0x7FFF | maprect x3 (ChangeTerrain) | ||
171st-172nd | Short | 0x0000 - 0x7FFF | maprect y3 (ChangeTerrain) | ||
173rd-174th | Short | 0x0000 - 0x7FFF | maprect x4 (ChangeTerrain) | ||
175th-176th | Short | 0x0000 - 0x7FFF | maprect y4 (ChangeTerrain) | ||
177th-178th | Short | 0x0000 - 0x7FFF | moveto x (MoveUnit), basedelay= (DelayPerFlag) | ||
179th-180th | Short | 0x0000 - 0x7FFF | moveto y (MoveUnit), perflagdelay= (DelayPerFlag) | ||
181st-182nd | Short | numbertomove= (MoveUnit), flags 0-15 for Everybody (@INITFLAG) | |||
0x0000 - 0x7FFF | |||||
0xFFFE | All (MoveUnit) | ||||
183rd-184th | Short | amount= (ChangeMoney), flags 16-31 for Everybody (@INITFLAG) | |||
0x0000 - 0x7FFF | Positive values (ChangeMoney) | ||||
0x8000 - 0xFFFF | Negative values (ChangeMoney) | ||||
185th-186th | Short | 0x0000 - 0x7FFF | locations x1 (CreateUnit) | ||
187th-188th | Short | 0x0000 - 0x7FFF | locations y1 (CreateUnit) | ||
189th-190th | Short | 0x0000 - 0x0003 | locations z1 (CreateUnit) | ||
191st-192nd | Short | 0x0000 - 0x7FFF | locations x2 (CreateUnit) | ||
193rd-194th | Short | 0x0000 - 0x7FFF | locations y2 (CreateUnit) | ||
195th-196th | Short | 0x0000 - 0x0003 | locations z2 (CreateUnit) | ||
197th-198th | Short | 0x0000 - 0x7FFF | locations x3 (CreateUnit) | ||
199th-200th | Short | 0x0000 - 0x7FFF | locations y3 (CreateUnit) | ||
201st-202nd | Short | 0x0000 - 0x0003 | locations z3 (CreateUnit) | ||
203rd-204th | Short | 0x0000 - 0x7FFF | locations x4 (CreateUnit) | ||
205th-206th | Short | 0x0000 - 0x7FFF | locations y4 (CreateUnit) | ||
207th-208th | Short | 0x0000 - 0x0003 | locations z4 (CreateUnit) | ||
209th-210th | Short | 0x0000 - 0x7FFF | locations x5 (CreateUnit) | ||
211th-212th | Short | 0x0000 - 0x7FFF | locations y5 (CreateUnit) | ||
213th-214th | Short | 0x0000 - 0x0003 | locations z5 (CreateUnit) | ||
215th-216th | Short | 0x0000 - 0x7FFF | locations x6 (CreateUnit) | ||
217th-218th | Short | 0x0000 - 0x7FFF | locations y6 (CreateUnit) | ||
219th-220th | Short | 0x0000 - 0x0003 | locations z6 (CreateUnit) | ||
221st-222nd | Short | 0x0000 - 0x7FFF | locations x7 (CreateUnit) | ||
223rd-224th | Short | 0x0000 - 0x7FFF | locations y7 (CreateUnit) | ||
225th-226th | Short | 0x0000 - 0x0003 | locations z7 (CreateUnit) | ||
227th-228th | Short | 0x0000 - 0x7FFF | locations x8 (CreateUnit) | ||
229th-230th | Short | 0x0000 - 0x7FFF | locations y8 (CreateUnit) | ||
231st-232nd | Short | 0x0000 - 0x0003 | locations z8 (CreateUnit) | ||
233rd-234th | Short | 0x0000 - 0x7FFF | locations x9 (CreateUnit) | ||
235th-236th | Short | 0x0000 - 0x7FFF | locations y9 (CreateUnit) | ||
237th-238th | Short | 0x0000 - 0x0003 | locations z9 (CreateUnit) | ||
239th-240th | Short | 0x0000 - 0x7FFF | locations x10 (CreateUnit) | ||
241st-242nd | Short | 0x0000 - 0x7FFF | locations y10 (CreateUnit) | ||
243rd-244th | Short | 0x0000 - 0x0003 | locations z10 (CreateUnit) | ||
245th-246th | Short | 0x0000 - 0x07FF | exceptionmask= (ChangeTerrain) | ||
247th-248th | Short | 0x0000 - 0x03E8 | delay= (Delay). If the randomize modifier is used, a random number from 1 to the delay value specified in events.txt is generated and substituted here. | ||
249th | Byte | unit= (MoveUnit) | |||
0x00 - 0x4F | Unit number | ||||
0xFE | AnyUnit | ||||
250th | Byte | 0x00 - 0x03 | map= (MoveUnit) | ||
251st | Byte | whom= (MakeAggression) | |||
0x00 - 0x07 | Tribe number | ||||
0xFC | TriggerDefender, TriggerReceiver | ||||
0xFD | TriggerAttacker | ||||
252nd | Byte | who= (Make Aggression) | |||
0x00 - 0x07 | Tribe number | ||||
0xFC | TriggerDefender, TriggerReceiver | ||||
0xFD | TriggerAttacker | ||||
253rd | Byte | owner= (CreateUnit) | |||
0x00 - 0x07 | Tribe number | ||||
0xFC | TriggerDefender, TriggerReceiver | ||||
0xFD | TriggerAttacker | ||||
254th | Byte | 0x00 - 0x4F | unit= (CreateUnit) | ||
255th | Byte | 0x00 - 0x0A | Number of locations (CreateUnit) | ||
256th | Byte | veteran= (CreateUnit) | |||
0x00 | False or no | ||||
0x01 | True or yes | ||||
257th | Byte | 0x00 - 0xFF | count= (CreateUnit) | ||
258th | Byte | receiver= (ChangeMoney) | |||
0x00 - 0x07 | Tribe number | ||||
0xFC | TriggerDefender, TriggerReceiver | ||||
0xFD | TriggerAttacker | ||||
259th | Byte | 0x00 - 0x0E | CD track (PlayCDTrack) | ||
260th | Byte | 0x00 - 0x0A | terraintype= (ChangeTerrain) | ||
261st | Byte | 0x00 - 0x03 | map= (ChangeTerrain) | ||
262nd | Byte | whom= (DestroyACivilization) | |||
0x00 - 0x07 | Tribe number | ||||
0xFC | TriggerDefender, TriggerReceiver | ||||
0xFD | TriggerAttacker | ||||
263rd | Byte | 0x00 - 0x63 | technology= (EnableTechnology, GiveTechnology, TakeTechnology) | ||
264th | Byte | receiver= (GiveTechnology), whom= (EnableTechnology, TakeTechnology) | |||
0x00 - 0x07 | Tribe number | ||||
0xFC | TriggerDefender, TriggerReceiver | ||||
0xFD | TriggerAttacker | ||||
265th | Byte | race= (BestowImprovement) | |||
0x00 - 0x07 | Tribe number | ||||
0xFC | TriggerDefender, TriggerReceiver | ||||
0xFD | TriggerAttacker | ||||
266th | Byte | 0x00 - 0x43 | improvement= (BestowImprovement) | ||
267th | Byte | who= (ModifyReputation) | |||
0x00 - 0x07 | Tribe number | ||||
0xFC | TriggerDefender, TriggerReceiver | ||||
0xFD | TriggerAttacker | ||||
268th | Byte | whom= (ModifyReputation) | |||
0x00 - 0x07 | Tribe number | ||||
0xFC | TriggerDefender, TriggerReceiver | ||||
0xFD | TriggerAttacker | ||||
0xFF | Betray used | ||||
269th | Byte | 0x00 - 0x64 | betray= (ModifyReputation), modifier= (ModifyReputation) | ||
270th | Byte | 0x00 - 0x01 | collapse (TakeTechnology) | ||
271st | Byte | 0x00 - 0x02 | value= (EnableTechnology) | ||
272nd | Byte | who= (Flag) | |||
0x00 - 0x07 | Tribe number | ||||
0xFA | who= omitted | ||||
0xFC | TriggerDefender, TriggerReceiver | ||||
0xFD | TriggerAttacker | ||||
273rd | Byte | 0x00 - 0x4F | unit= (Transport) | ||
274th | Byte | who= (Negotiator) | |||
0x00 - 0x07 | Tribe number | ||||
0xFC | TriggerDefender, TriggerReceiver | ||||
0xFD | TriggerAttacker | ||||
275th-276th | Bytes | 0x00 | unknown | ||
Strings | The final section is a list of strings for events, each with a null terminator. The strings are in the same order as the order of the string pointers in the events. |
1. Hexadecimal values use little-endian notation.
Catfish
1/06/2006
(Last updated 27/06/2015.)