Known global variables
From sc2k-reverse
This is a table of global variables in SimCity 2000 that have been at least partially reverse engineered and given names. It is probably going to be unpleasant to update, but at least it looks nice and you can sort it.
Data about where in the MISC chunk certain variables are located is from dfloer's sc2k-docs repository on GitHub (CC BY-SA 4.0).
Address | Type | Name | MISC offset | Notes |
---|---|---|---|---|
0x4C702C | CWnd* | pCwndMainWindow | Pointer to the MFC CWnd class for the "root window" | |
0x4C7104 | BOOL | bPriscillaActivated | Whether or not the debug menu has been activated | |
0x4C71F0 | BOOL | bOptionsMusicEnabled | 0x0FFC | Whether or not music is enabled |
0x4C7318 | WORD | wSimulationSpeed | 0x0FEC | 1-5 for Paused through African Swallow |
0x4C942C | WORD | wViewRotation | 0x0008 | 0 = north, 1 = west, 2 = south, 3 = east |
0x4C94C0 | BOOL | bCityHasOcean | 0x0E44 | Whether or not the city was generated with an ocean |
0x4C94C4 | DWORD | dwArcologyPopulation | 0x1020 | Population of the city specifically in arcologies |
0x4CA1A0 | char* | pszCityName | Pointer to the city name, loaded/saved as the CNAM chunk | |
0x4CA1BC | WORD | wNationalEconomyTrend | 0x005C | Affects interest rates, apparently |
0x4CA3F0 | WORD | wCityNeighborConnections1500 | Count of all $1500 (industrial) neighbor connections | |
0x4CA41C | WORD | wSubwayXUNDCount | 0x0FE8 | Seems to be mostly used for budget calculations |
0x4CA420 | WORD | wDisasterType | 0x0070 | The ID of the next disaster to occur |
0x4CA42C | WORD | wCityMode | 0x0004 | 0 = map editor, 1 = regular gameplay, 2 = scenario mode |
0x4CA440 | int | dwCityLandValue | 0x0028 | Sum of all values in XVAL |
0x4CA444 | int | dwCityFunds | 0x0014 | How much money the city has |
0x4CA4C8 | WORD* | dwTileCount | Pointer to an array of tile counts for every valid iTileID |
Address | Type | Name | MISC offset | Notes |
---|---|---|---|---|
0x4C9430 | void* | dwMapXPLC | Pointer to a 32x32 "minimap" for police coverage (1 byte per 4x4 block) | |
0x4C9F58 | void* | dwMapXTER | Pointer to a 128x128 map of terrain data (1 byte of type map_XTER_t per tile) | |
0x4CA1F0 | void* | dwMapXZON | Pointer to a 128x128 map of zone and corner info (1 byte of type map_XZON_t per tile) | |
0x4CA434 | void* | dwMapXTHG | Pointer to an array of type map_XTHG_t[256] | |
0x4CA448 | void* | dwMapXPOP | Pointer to a 32x32 "minimap" for population density (1 byte per 4x4 block) |