37 posts in this topic Last Reply
Highlighted Posts
Equinox 1,209
Decius: Maybe a year or two? Really I dont know, but a long time. And that's assuming we're ever able to do it at all.
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.
GouRou 2
Tropod 144
EDIT: See posts below for attached file, as it contains more upto date info, including what was posted here.
not bad at all ![]()
Nice to see everyones doing work again on the formats after so long hehehe ![]()
Thanks for the info as always. *adds to list and archives for later use*
Tropod 144
Tropod 144
Tropod 144
Tropod 144
City Data file: 89EFA536 [Type ID]
Contains historic/Current data for for various things.
Specs: The below is just a rough outline of the file. Some bits/bytes may be a little off, therefore it's by no means a final format.
Dword - File lenght.
14 Bytes - Unknown
[start Block]
Dword - Data Source ID. These are mostly found in the [Graph/Trend] Exemplars. However, I have come across some other [unknown] ones that exist in the file that are not found anywhere [else] in other files [such as LUA/Exemplar/Cohort/etc].
Dword- unknown
Dword - unknown
3 bytes - Date/Timing I know for fact this has to do with the date/timing, but I am having a bit of trouble deciphering the last 2 bytes of it.
Dword - Data. This is the actual data, for the given data source ID - woohooo bingo@@. The depth of this data though can vary depending on some things it seems. For example, Funds: because it is displayed in the Graph like it is, has the last 3 values truncated [from which its Hex value is then calculated]. Not all data does this though it seems [this may actually be tied in with something else].
[end Block]
and repeat the Block for any subsequent data &/or [different] blocks of data.
Attached is a [very long] list of [currently known] Data Source IDs, and their purpose or what they represent in the game. Also included, is a list of possible data source IDs that are unknown [i.e. not to be found anywhere else]. There may also be others apart from these that exist, but these [both known/unknown] are just ones I've come across so far.
Tropod 144
Specs
File contains historic & current data for a wide range of things.
These specs are much more complete, with only part of the header and a single Dword unknown.
----------------------------------------------------------------------------------
[File Header]
Dword - File lenght.
14 Bytes - Unknown
[End of File Header]
------------------
[Repeating chunks]
Dword - Data Source ID. These are mostly found in the [Graph/Trend] Exemplars. There are other ones that exist though [there's an attached [file] list of IDs to this post].
Dword- unknown -Possibly Data Type?? [i am not sure about this one though, as I have already seen one instance where this isn't true]
Dword = the number of Timing & Data sections below. It's the number of Qwords that follow from here [for the given DataSourceID].
[End of DataSourceID Header]
----
[Start of Timing & Data sections for a given DataSourceID]
Dword - Date/Timing - More on this further below.
Dword - Data. This is the actual data, for the given Date/Timing for the given Data Source ID. More on this below
[End of Timing & Data section-Repeat this section; See the number of Timing & Data sections Dword value above for the number of repeated sections here]
------------------
Repeat 'Repeating Chunk' for Every DataSourceID ID Value [see attached file for a current list of known/unknown IDs].
----------------------------------------------------------------------------------
NOTES:
Date/Timing & Data:
Attached is a [very long] list of [currently known] Data Source IDs, and their purpose or what they represent in the game. Also included, is a list of possible data source IDs that are unknown [i.e. not to be found anywhere else]. There may also be others apart from these that exist, but these [both known/unknown] are just ones I've come across so far.
Tropod 144
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?
Tropod 144
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.
Tropod 144
For those that might be follow this;
Attached is some updated files for sawtooth's SC4 Graph Viewer program. I have also included an updated DataSourceID Names list.
Anyone who downloaded the inital release, these attached file should work [thanks to sawtooth for this].
I have made some really really minor changes to the files [labels]; but I can not stress enough, how much that this is Sawtooth's program, not mine. Much thanks to him for making what we have so far.
Same guidelines apply to the attached files as per Sawtooth's post above; it's not meant for public purposes etc etc etc [you need the mentioned programs installed. Read the README].
Latest update to the City historical specification after a long discussion and brainstorming session with tropod last night....man I need sleep
89EFA536 (299B2D1B 00000000)
City Historical Data file [a save game file]:
Specs
File contains historic & current data for a wide range of things.
This spec is complete with the execption of two Header DWORDS (see Info 2)
----------------------------------------------------------------------------------
[File Header]
Dword - File length.
Dword - Unknown1
Dword - Unknown2
Word - Version of Data Sets (always 2)
Dword - Number of DataSourceID Sets
[End of File Header]
------------------
[Repeating chunks]
[start DataSourceID Header]
Dword - Data Source ID. These are mostly found in the [Graph/Trend] Exemplars. There are other ones that exist though [there's an attached [file] list of IDs to this post].
Dword- Graph Type Flag (See Table 1)
Dword = the number of Timing & Data sections below. It's the number of Qwords that follow from here [for the given DataSourceID].
[End of DataSourceID Header]
----
[start of Timing & Data sections for a given DataSourceID]
Dword - Date/Timing - Date that data is from (See Info 1)
Dword - Data. This is the actual data, for the given Date/Timing for the given Data Source ID. More on this below
[End of Timing & Data section-Repeat this section; See the number of Timing & Data sections Dword value above for the number of repeated sections here]
------------------
Repeat 'Repeating Chunk' for Every DataSourceID ID Value [see tropod's file above for a current list of known/unknown IDs].
----------------------------------------------------------------------------------
Info 1: Date/Timing
Each Data/Timing starts from a base of 59 68 25 00 in hex, or 2451545 which translates to around ~6500 years. This is a buffer length and is how far displayed data can go before the beginning of the City, IE if there was a span of 5000 selectable, instead of the current 500 year span for graphs, this would be able to calculate a value of 0 for it. (Not sure why maxis went this way but oh well). Each integer of 1 over this number is 1 day. Dates with data may be for a day, month, or year depending on the type of graph.
Table 1:
Flag Type Data Timeframe Graph
---------------------------------------------
00000000 Multiyear Data Per Year Line
01000000 Single Current Day Single Value
02000000 DoubleBar Last two Months Bar, IE demand etc. Only last value displayed
0d160000 SingleYear Daily for year Line (I think only line, but not sure)
Info 2:
Unknown1 and Unknown2 appear to be some kind of Timstamp or other Marker, but change too rapidly to be a normal timestamp. They dont APPEAR to be locations, and I really cant see consistency in them
stamp 4
man.. if i could somehow integrate this into SC4LAN/ONLINE... wowzerz that would be cool.![]()
***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
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
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
cogeo 960
You guys who are decoding the file formats, could you please locate a datasource that reports if a lot has been marked as historical? I want to make a dataview that highlights the historical buildings ( https://www.simtropolis.com/idealbb/view.asp?topicID=59351 ), so I need a datasource, but I was not able to find this information in the LUA files. I would greatly appreciate any help.
Unfortunately that's pretty far up in the air =\
Don't suppose me telling you the TypeIDs a9bd882d and c9bd5d4a in the savegames store data relating to buildings would help. That's all we know... This would be more a UI question though and I dont think it relates to savegames unless you plan on decoding those with us
..... We're just too overworked at the moment on Sims2 projects and Real life, so everyone has to take on their own projects and learn to decode. Sorry I cant give a better answer.
Lets see here
-
Recently Browsing 0 members
No registered users viewing this page.



Last Online:
Wen will it be posible to find out wat has caused a savegame to get corrupted...I still got a city i cant load
Share this post
Link to post
Share on other sites