Known global variables

From sc2k-reverse
Revision as of 02:44, 6 March 2025 by Araxestroy (talk | contribs) (Created page with "{{Heavy construction}} 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). {| class="wikitable sortable" |+ Uncategorized variables |- ! {{tooltip|Address|The address of the va...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
1195
1195
SimCopter One reporting heavy traffic!
This page or section is under significant construction. It may be a large repository of data that's constantly being updated, or there may be a large rework in progress. There is a good chance the contents of this page will have dramatically changed next time you look at it.
Please check the history before making any edits to ensure any changes you make won't conflict with anyone else's.


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).

Uncategorized variables
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
Map data pointers
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)