-
Content Count
7 -
Joined
-
Last Visited
Community Reputation
0 Clean SlateAbout sawtooth-
-
Rank
Freshman
-
Sorry, but this cannot be done. One can edit the config.bmp and choose different city sizes from the small-medium-large sizes but the large city tiles are as big as they come in sc4.
-
DISCOVERY: File Formats, The Savegame Formats (Terrain,Trees, etc.)
sawtooth- replied to Karybdis's topic in SC4 Modding - Open Discussion
Freshly updated spec for reading neighbor connection information blocks as well. There's still a bit of data left in this file that I'll try to figure out. The length of this leftover block is variable, so it's not a fixed structure as far as I can tell. ;Region View Data Structure ; TGI (0xCA027EDB, 0xCA027EE1, 0x00000000) WORD Version Major WORD Version Minor DWORD Tile X Location DWORD Tile Y Location DWORD City Size X DWORD City Size Y DWORD Residential Population DWORD Commercial Population DWORD Industrial Population DWORD Unknown1 ;I've seen zeros in these spots... DWORD Unknown2 ;might be unused population data DWORD Unknown3 DWORD Unknown4 DWORD Unknown5 DWORD Unknown6 DWORD Unknown7 DWORD Unknown8 ;I think this was where early version files were different ;only had 3 bytes here instead of 4. This needs testing though. DWORD City Name Length PRIOR City Name ;string DWORD Unknown ;zeros DWORD Mayor Name Length PRIOR Mayor Name ;string DWORD Unknown ;zeros ;Seemingly unused City & Mayor Names next DWORD Unused City Name Length PRIOR Unused City Name DWORD Unknown DWORD Unused Mayor Name Length PRIOR Unused Mayor Name DWORD Unknown ;More zeros DWORD Unknown DWORD Unknown DWORD Unknown DWORD Unknown DWORD Unknown DWORD Unknown ;Should be 0xFFFFFFFF ;Occupant group information. Three sets in all. DWORD Occupant Group 1 count LOOP DWORD Occupant Group DWORD Population ENDLOOP DWORD Occupant Group 2 count LOOP DWORD Occupant Group DWORD Population ENDLOOP DWORD Occupant Group 3 count LOOP DWORD Occupant Group DWORD Population ENDLOOP DWORD Count LOOP DWORD Unknown ;Values are normally the same. ENDLOOP DWORD Neighbor Connection Count LOOP ;Neighbor Connection Count ;Begin Neighbor Connection Data WORD Unknown ;Version Tag? DWORD Network Type DWORD Connection X DWORD Connection Y DWORD Destination Tile X ;FFFF (-1) for places off the region top and left DWORD Destination Tile Y ;same as above WORD Unknown ;usually 512 why? who knows! BYTE Unknown DWORD Exemplar Count ;If this is zero, information for the next connection starts LOOP ;Exemplar Count DWORD Parent Cohort Type DWORD Parent Cohort Group DWORD Parent Cohort Instance ;I bet Maxis reads the next 4 bytes as a DWORD and picks it apart... ;Known data types are: ; 0x02 WORD ; 0x03 DWORD ; 0x09 FLOAT BYTE Data Type WORD Repeat1 BYTE Repeat2 IF (Repeat1 > 0) count = Repeat1 ELSEIF (Repeat2 > 0) count = Repeat2 ;Untested...didn't come across this in the connections ELSE count = 1 ;no repeats, only one item of data LOOP count if Data Type == 0x02 WORD Data if Data Type == 0x03 DWORD Data if Data Type == 0x09 FLOAT Data ENDLOOP ;count ENDLOOP ;exemplar count ENDLOOP ;network connection count -
DISCOVERY: File Formats, The Savegame Formats (Terrain,Trees, etc.)
sawtooth- replied to Karybdis's topic in SC4 Modding - Open Discussion
This is the lookup table for the Occupant group section to actual names that I have used in my own program. 0x1001:Maximum Res. pop., 0x1010:R$ Maximum pop., 0x1011:R$ Current pop., 0x1020:R$$ Maximum pop., 0x1021:R$$ Current pop., 0x1030:R$$$ Maximum pop., 0x1031:R$$$ Current pop., 0x2010:R$ Jobs, 0x2020:R$$ Jobs, 0x2030:R$$$ Jobs, 0x2111:R$ Workforce EQ1, 0x2112:R$ Workforce EQ2, 0x2113:R$ Workforce EQ3, 0x2114:R$ Workforce EQ4, 0x2121:R$$ Workforce EQ1, 0x2122:R$$ Workforce EQ2, 0x2123:R$$ Workforce EQ3, 0x2124:R$$ Workforce EQ4, 0x2131:R$$$ Workforce EQ1, 0x2132:R$$$ Workforce EQ2, 0x2133:R$$$ Workforce EQ3, 0x2134:R$$$ Workforce EQ4, 0x3110:CS$ Maximum Jobs, 0x3111:CS$ Current Jobs, 0x3120:CS$$ Maximum Jobs, 0x3121:CS$$ Current Jobs, 0x3130:CS$$$ Maximum Jobs, 0x3131:CS$$$ Current Jobs, 0x3320:CO$$ Maximum Jobs, 0x3321:CO$$ Current Jobs, 0x3330:CO$$$ Maximum Jobs, 0x3331:CO$$$ Current Jobs, 0x4100:IA Maximum Jobs, 0x4101:IA Current Jobs, 0x4200:ID Maximum Jobs, 0x4201:ID Current Jobs, 0x4300:IM Maximum Jobs, 0x4301:IM Current Jobs, 0x4400:IH Maximum Jobs, 0x4401:IH Current Jobs -
DISCOVERY: File Formats, The Savegame Formats (Terrain,Trees, etc.)
sawtooth- replied to Karybdis's topic in SC4 Modding - Open Discussion
***WARNING*** This post has been edited to fix two errors I made in two sections. The .txt file is still incorrect. Attached is a quick rundown of what I have from the Region View file so far. This will be updated with information on the Neighbor connection blocks when they are fully decoded. Here's the text of the file as well... ;Region View Data Structure ; TGI (0xCA027EDB, 0xCA027EE1, 0x00000000) WORD Version Major WORD Version Minor DWORD Tile X Location DWORD Tile Y Location DWORD City Size X DWORD City Size Y DWORD Residential Population DWORD Commercial Population DWORD Industrial Population DWORD Unknown1 ;I've seen zeros in these spots... DWORD Unknown2 ;might be unused population data DWORD Unknown3 DWORD Unknown4 DWORD Unknown5 DWORD Unknown6 DWORD Unknown7 DWORD Unknown8 ;I think this was where early version files were different ;only had 3 bytes here instead of 4. This needs testing though. DWORD City Name Length PRIOR City Name ;string DWORD Unknown ;zeros DWORD Mayor Name Length PRIOR Mayor Name ;string DWORD Unknown ;zeros ;Seemingly unused Mayor Name next DWORD Unused Mayor Name Length PRIOR Unused Mayor Name DWORD Unknown ;More zeros DWORD Unknown DWORD Unknown DWORD Unknown DWORD Unknown DWORD Unknown ;Should be 0xFFFFFFFF ;Occupant group information. Three sets in all. DWORD Occupant Group 1 count LOOP DWORD Occupant Group DWORD Population ENDLOOP DWORD Occupant Group 2 count LOOP DWORD Occupant Group DWORD Population ENDLOOP DWORD Occupant Group 3 count LOOP DWORD Occupant Group DWORD Population ENDLOOP DWORD Count LOOP DWORD Unknown ;Values are normally the same. ENDLOOP DWORD Neighbor Connection Count -
DISCOVERY: File Formats, The Savegame Formats (Terrain,Trees, etc.)
sawtooth- replied to Karybdis's topic in SC4 Modding - Open Discussion
Attached is a python program to look at the graph data in the simcity 4 save game files. This version is not really meant for public use and is mainly a tool to help figure stuff out that exists in the file. Several programs are required to run this application as it is in source form and is not standalone. Programs required are: Python 2.3.4 http://www.python.org wxPython 2.5.1 http://www.wxpython.org Numarray http://www.pfdubois.com/numpy/ Once these are installed and the sc4GraphView.py file is double clicked on the program should run. I hope. The program in its current state is not very user friendly. There is currently no built in way to jump to a particular resource id, or index of any type. Just starting at one and using next thru the 143 or so sets of data in the graph file Graphing functionality is also limited at this point, no zooming or changing any settings on the graphs at present. -
DISCOVERY: File Formats, The Savegame Formats (Terrain,Trees, etc.)
sawtooth- replied to Karybdis's topic in SC4 Modding - Open Discussion
Great work so far, and I'm working on a program that can at least read the values out of that section of the save game file. Do you have information on how to decode the dates used in it? -
DISCOVERY: File Formats, The Savegame Formats (Terrain,Trees, etc.)
sawtooth- replied to Karybdis's topic in SC4 Modding - Open Discussion
Since there seems to be a serious lack of interest or just lack of posting any known information on the savegame files, I'll give one a shot. File in the savegame with TID of 0x0990c005 is related to the power simulator. I havn't studied it a lot yet, but in cities with power plants there are numbers at the beginning with power capacity and usage (some repeated several times for some reason). I have not looked at various combinations of power neighbor deals yet. Following the beginning section of the file are dwords with a width and height of the current map. An array of integer values follows, mapping out power consumption tile by tile. In my small test city adding up each interger on the bitmap totaled the cities power consumption since there were no deals being made. This is the easiest way for the power simulator to track power usage in a city and where the power is being used at. There is also another section at the bottom of the file which seems to be another array which may map out power lines/powered areas of the map. I will try and post a more detailed spec once I try other cases and try and figure out the rest of the file.
