Difference between revisions of "Region View Subfiles"

From SC4D Encyclopaedia
Jump to navigation Jump to search
(Original edited by whatevermind and CasperVg)
 
 
Line 12: Line 12:
  
 
<pre>                 
 
<pre>                 
WORD Version Major
+
WORD   Version Major
WORD Version Minor
+
WORD   Version Minor
DWORD Tile X Location
+
DWORD   Tile X Location
DWORD Tile Y Location
+
DWORD   Tile Y Location
DWORD City Size X
+
DWORD   City Size X
DWORD City Size Y
+
DWORD   City Size Y
DWORD Residential Population
+
DWORD   Residential Population
DWORD Commercial Population
+
DWORD   Commercial Population
DWORD Industrial Population
+
DWORD   Industrial Population
FLOAT Unknown1 (Not Present in version 1.9 or earlier)
+
FLOAT   Unknown1 (Not Present in version 1.9 or earlier)
BYTE Mayor Rating (Bars/12 bars max) (not in version 1.10 or earlier)
+
BYTE   Mayor Rating (Bars/12 bars max) (not in version 1.10 or earlier)
BYTE Star Count (As seen when looking at a city in region view) (0=1,1=2,2=3)
+
BYTE   Star Count (As seen when looking at a city in region view) (0=1,1=2,2=3)
BYTE Tutorial Flag (If 1, map is a tutorial)
+
BYTE   Tutorial Flag (If 1, map is a tutorial)
 
DWORD  City GUID (Present in Mayor View also at offset 20)
 
DWORD  City GUID (Present in Mayor View also at offset 20)
        (Getting Started tutorial has "EXIT".. inside joke?)
+
                (Getting Started tutorial has "EXIT".. inside joke?)
DWORD Unknown5 (Only seen 0's)
+
DWORD   Unknown5 (Only seen 0's)
DWORD Unknown6 (Only seen 0's)
+
DWORD   Unknown6 (Only seen 0's)
DWORD Unknown7 (Only seen 0's)
+
DWORD   Unknown7 (Only seen 0's)
DWORD Unknown8 (Only seen 0's)
+
DWORD   Unknown8 (Only seen 0's)
DWORD Unknown9 (Only seen 0's)
+
DWORD   Unknown9 (Only seen 0's)
BYTE Mode Flag (1 = Mayor Mode, 0 = God Mode)
+
BYTE   Mode Flag (1 = Mayor Mode, 0 = God Mode)      
DWORD City Name Length
+
DWORD   City Name Length
PRIOR City Name (String)
+
PRIOR   City Name (String)
DWORD Former Name Length
+
DWORD   Former Name Length
PRIOR City Former Name (Non-existent in Region View, Mayor View has "New City")
+
PRIOR   City Former Name (Non-existent in Region View, Mayor View has "New City")
DWORD Mayor Name Length
+
DWORD   Mayor Name Length
PRIOR Mayor Name (String)
+
PRIOR   Mayor Name (String)
DWORD Internal Description Length (Only differs in Mayor View for tutorials)
+
DWORD   Internal Description Length (Only differs in Mayor View for tutorials)
PRIOR Internal Description (String - non-existent in region, name of city/tut in mayor view)
+
PRIOR   Internal Description (String - non-existent in region, name of city/tut in mayor view)
 
DWORD  Length
 
DWORD  Length
PRIOR "Jonas Sparks" (Default mayor?)(Unused)
+
PRIOR   "Jonas Sparks" (Default mayor?)(Unused)
  
 
-More Zeroes-
 
-More Zeroes-
DWORD Unknown
+
DWORD   Unknown
DWORD Unknown
+
DWORD   Unknown
DWORD Unknown
+
DWORD   Unknown
DWORD Unknown
+
DWORD   Unknown
DWORD Unknown
+
DWORD   Unknown
DWORD Unknown (Should be 0xFFFFFFFF)
+
DWORD   Unknown  (Should be 0xFFFFFFFF)
  
 
(Occupant Group Information)
 
(Occupant Group Information)
 
(There are three sets in all, item listing below.)
 
(There are three sets in all, item listing below.)
  
DWORD Occupant Group 1 count (Current Info)
+
DWORD Occupant Group 1 count (Current Info)
 
LOOP
 
LOOP
DWORD Occupant Group
+
    DWORD Occupant Group
DWORD Population
+
    DWORD Population
 
ENDLOOP
 
ENDLOOP
  
DWORD Occupant Group 2 count (Max Info)
+
DWORD Occupant Group 2 count (Max Info)
 
LOOP
 
LOOP
DWORD Occupant Group
+
    DWORD Occupant Group
DWORD Population
+
    DWORD Population
 
ENDLOOP
 
ENDLOOP
  
DWORD Occupant Group 3 count (Limits)
+
DWORD Occupant Group 3 count (Limits)
 
LOOP
 
LOOP
DWORD Occupant Group
+
    DWORD Occupant Group
DWORD Population
+
    DWORD Population
 
ENDLOOP
 
ENDLOOP
  
DWORD Count (Always 12)
+
DWORD Count (Always 12)
 
LOOP
 
LOOP
FLOAT Unknown (Values are normally the same. Half integer range between 7 and 9.5)
+
    FLOAT Unknown  (Values are normally the same. Half integer range between 7 and 9.5)
 
ENDLOOP
 
ENDLOOP
  
DWORD Neighbor Connection Count
+
DWORD Neighbor Connection Count
  
LOOP Neighbor Connection Count
+
LOOP Neighbor Connection Count
Begin Neighbor Connection Data
+
    Begin Neighbor Connection Data
  
WORD Version
+
    WORD Version
DWORD Network Type
+
    DWORD Network Type
DWORD Connection X
+
    DWORD Connection X
DWORD Connection Y
+
    DWORD Connection Y
DWORD Destination Tile X  (FFFF (-1) for places off the region top and left)
+
    DWORD Destination Tile X  (FFFF (-1) for places off the region top and left)
DWORD Destination Tile Y  (Same as above)
+
    DWORD Destination Tile Y  (Same as above)
WORD Unknown            (Usually 512)
+
    WORD Unknown            (Usually 512)
BYTE Unknown
+
    BYTE Unknown
DWORD Exemplar Count      (If this is zero, information for the next connection starts.)
 
  
LOOP Exemplar Count
+
    DWORD Exemplar property count  (If this is zero, information for the next connection starts.)
+
       
DWORD Parent Cohort Type
+
        ; Below follows a structure that resembles the Exemplar Property structure,
DWORD Parent Cohort Group
+
        ; though it is not completely the same. The property ids are apparently unknown
DWORD Parent Cohort Instance
+
        ; but, I have seen 0x8a0b4100 for example, which is very close to the known
;I bet Maxis reads the next 4 bytes as a DWORD and picks it apart...
+
        ; 0x8a0b4103 property, being "FreightReceivingCapacity".
;Known data types are:
+
        DWORD Property id
; 0x02 WORD
+
        DWORD Property id repeated (for some reason?)
; 0x03 DWORD
+
        DWORD Unknown (0x00000000)
; 0x09 FLOAT
+
        BYTE Data Type
BYTE Data Type
+
        WORD Key type (0x00 or 0x80)
WORD Repeat1
+
        BYTE Unknown
BYTE Repeat2
+
 
IF (Repeat1)  
+
        IF (Key type = 0x00)
count = Repeat1
+
            TYPE  Value type depends on data type (0x02 = WORD, 0x03 = DWORD, 0x09 = FLOAT), see exemplar properties
ELSEIF (Repeat2)
+
        ELSEIF (Key type = 0x80)
count = Repeat2 (Untested, didn't come across this in the connections)
+
            DWORD  Number of reps to follow
ELSE
+
                TYPE Value type depends on data type (0x02 = WORD, 0x03 = DWORD, 0x09 = FLOAT), see exemplar properties
count = 1 (No repeats, only one item of data)
+
 
LOOP count
+
    ENDLOOP (Exemplar count)
if Data Type == 0x02
+
ENDLOOP (Network connection count)
WORD Data
 
if Data Type == 0x03
 
DWORD Data
 
if Data Type == 0x09
 
FLOAT Data
 
ENDLOOP (Count)
 
ENDLOOP (Exemplar count)
 
ENDLOOP (Network connection count)
 
  
 
DWORD          Unknown count
 
DWORD          Unknown count
  DWORD        Unknown
+
    DWORD        Unknown
  DWORD        Unknown
+
    DWORD        Unknown
  5 BYTES
+
    5 BYTES  
  
DWORD Unknown
+
DWORD   Unknown
FLOAT Unknown
+
FLOAT   Unknown
DWORD Unknown
+
DWORD   Unknown
FLOAT Unknown
+
FLOAT   Unknown
  
DWORD Unknown count
+
DWORD   Unknown count
   DWORD Unknown (Incremental 1-3)
+
    DWORD   Unknown (Incremental 1-3)
  (following has 5 repeats)
+
    (following has 5 repeats)
    DWORD      Unknown
+
        DWORD      Unknown
    FLOAT      Unknown
+
        FLOAT      Unknown
  
DWORD         Unknown count (76 byte sections)
+
DWORD           Unknown count (76 byte sections)
  WORD          Unknown (5)
+
    WORD          Unknown (5)
  FLOAT        Unknown
+
    FLOAT        Unknown
  DWORD        Unknown (set1)
+
    DWORD        Unknown (set1)
  DWORD        Unknown (set1)
+
    DWORD        Unknown (set1)
  DWORD       Unknown (set1)
+
    DWORD         Unknown (set1)
  DWORD       Unknown (set1)
+
    DWORD         Unknown (set1)
  DWORD       Unknown
+
    DWORD         Unknown
  DWORD       Unknown
+
    DWORD         Unknown
  DWORD       Unknown (set1.5)
+
    DWORD         Unknown (set1.5)
  DWORD       Unknown (set1.5)
+
    DWORD         Unknown (set1.5)
  DWORD       Unknown (set2)
+
    DWORD         Unknown (set2)
  DWORD         Unknown (set2)
+
    DWORD        Unknown (set2)
  DWORD       Unknown (set2)
+
    DWORD         Unknown (set2)
  DWORD       Unknown (set2)
+
    DWORD         Unknown (set2)
  DWORD         Unknown (set3)
+
    DWORD        Unknown (set3)
  DWORD         Unknown (set3)
+
    DWORD        Unknown (set3)
  DWORD       Unknown (set3)
+
    DWORD         Unknown (set3)
  WORD         Unknown (2)
+
    WORD         Unknown (2)
  DWORD       Unknown
+
    DWORD         Unknown
  DWORD       Unknown
+
    DWORD         Unknown
  
DWORD         Unknown count (76 byte sections)
+
DWORD           Unknown count (76 byte sections)
  WORD         Unknown (5)
+
    WORD         Unknown (5)
  FLOAT         Unknown
+
    FLOAT        Unknown
  DWORD         Unknown (set1)
+
    DWORD        Unknown (set1)
  DWORD         Unknown (set1)
+
    DWORD        Unknown (set1)
  DWORD       Unknown (set1)
+
    DWORD         Unknown (set1)
  DWORD       Unknown (set1)
+
    DWORD         Unknown (set1)
  DWORD         Unknown
+
    DWORD        Unknown
  DWORD         Unknown
+
    DWORD        Unknown
  DWORD         Unknown (set1.5)
+
    DWORD        Unknown (set1.5)
  DWORD         Unknown (set1.5)
+
    DWORD        Unknown (set1.5)
  DWORD         Unknown (set2)
+
    DWORD        Unknown (set2)
  DWORD         Unknown (set2)
+
    DWORD        Unknown (set2)
  DWORD       Unknown (set2)
+
    DWORD         Unknown (set2)
  DWORD         Unknown (set2)
+
    DWORD        Unknown (set2)
  DWORD         Unknown (set3)
+
    DWORD        Unknown (set3)
  DWORD       Unknown (set3)
+
    DWORD         Unknown (set3)
  DWORD       Unknown (set3)
+
    DWORD         Unknown (set3)
  WORD         Unknown (2)
+
    WORD         Unknown (2)
  DWORD         Unknown
+
    DWORD        Unknown
  DWORD       Unknown
+
    DWORD         Unknown
  
 
DWORD          Item Count (Typically 0 in unused cities, 2 in used (Version 1.10 and up))
 
DWORD          Item Count (Typically 0 in unused cities, 2 in used (Version 1.10 and up))
  DWORD        Unknown    (Incremental Value)
+
    DWORD        Unknown    (Incremental Value)
  DWORD        Set Count  (Only seen in active cities)
+
    DWORD        Set Count  (Only seen in active cities)
    FLOAT      Unknown
+
        FLOAT      Unknown
    FLOAT      Unknown
+
        FLOAT      Unknown
    FLOAT      Unknown
+
        FLOAT      Unknown
 
</pre>
 
</pre>
  

Latest revision as of 05:40, 18 December 2024


This page pertains to the format of the Region View file within Savegame files. The TGI for this file is 0xCA027EDB, 0xCA027EE1, 0x00000000.

The Region View file has three possible versions:

  • v1.9 - Pre-release
  • v1.10 - Release version
  • v1.13 - Rush Hour

Specification

The Region View file has the following specification, written out for version 1.13 type files.

                 
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
FLOAT   Unknown1 (Not Present in version 1.9 or earlier)
BYTE    Mayor Rating (Bars/12 bars max) (not in version 1.10 or earlier)
BYTE    Star Count (As seen when looking at a city in region view) (0=1,1=2,2=3)
BYTE    Tutorial Flag (If 1, map is a tutorial)
DWORD   City GUID (Present in Mayor View also at offset 20)
                (Getting Started tutorial has "EXIT".. inside joke?)
DWORD   Unknown5 (Only seen 0's)
DWORD   Unknown6 (Only seen 0's)
DWORD   Unknown7 (Only seen 0's)
DWORD   Unknown8 (Only seen 0's)
DWORD   Unknown9 (Only seen 0's)
BYTE    Mode Flag (1 = Mayor Mode, 0 = God Mode)        
DWORD   City Name Length
PRIOR   City Name (String)
DWORD   Former Name Length
PRIOR   City Former Name (Non-existent in Region View, Mayor View has "New City")
DWORD   Mayor Name Length
PRIOR   Mayor Name (String)
DWORD   Internal Description Length (Only differs in Mayor View for tutorials)
PRIOR   Internal Description (String - non-existent in region, name of city/tut in mayor view)
DWORD   Length
PRIOR   "Jonas Sparks" (Default mayor?)(Unused)

-More Zeroes-
DWORD   Unknown
DWORD   Unknown
DWORD   Unknown
DWORD   Unknown
DWORD   Unknown
DWORD   Unknown  (Should be 0xFFFFFFFF)

(Occupant Group Information)
(There are three sets in all, item listing below.)

DWORD Occupant Group 1 count (Current Info)
LOOP
    DWORD Occupant Group
    DWORD Population
ENDLOOP

DWORD Occupant Group 2 count (Max Info)
LOOP
    DWORD Occupant Group
    DWORD Population
ENDLOOP

DWORD Occupant Group 3 count (Limits)
LOOP
    DWORD Occupant Group
    DWORD Population
ENDLOOP

DWORD Count (Always 12)
LOOP
    FLOAT Unknown  (Values are normally the same. Half integer range between 7 and 9.5)
ENDLOOP

DWORD Neighbor Connection Count

LOOP  Neighbor Connection Count
    Begin Neighbor Connection Data

    WORD  Version
    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)
    BYTE  Unknown

    DWORD Exemplar property count   (If this is zero, information for the next connection starts.)
        
        ; Below follows a structure that resembles the Exemplar Property structure,
        ; though it is not completely the same. The property ids are apparently unknown
        ; but, I have seen 0x8a0b4100 for example, which is very close to the known
        ; 0x8a0b4103 property, being "FreightReceivingCapacity".
        DWORD Property id
        DWORD Property id repeated (for some reason?)
        DWORD Unknown (0x00000000)
        BYTE  Data Type
        WORD  Key type (0x00 or 0x80)
        BYTE  Unknown

        IF (Key type = 0x00)
            TYPE  Value type depends on data type (0x02 = WORD, 0x03 = DWORD, 0x09 = FLOAT), see exemplar properties
        ELSEIF (Key type = 0x80)
            DWORD  Number of reps to follow
                TYPE Value type depends on data type (0x02 = WORD, 0x03 = DWORD, 0x09 = FLOAT), see exemplar properties

    ENDLOOP (Exemplar count)
ENDLOOP (Network connection count)

DWORD           Unknown count
    DWORD         Unknown
    DWORD         Unknown
    5 BYTES 

DWORD   Unknown
FLOAT   Unknown
DWORD   Unknown
FLOAT   Unknown

DWORD   Unknown count
    DWORD   Unknown (Incremental 1-3)
    (following has 5 repeats)
        DWORD       Unknown
        FLOAT       Unknown

DWORD           Unknown count (76 byte sections)
    WORD          Unknown (5)
    FLOAT         Unknown
    DWORD         Unknown (set1)
    DWORD         Unknown (set1)
    DWORD         Unknown (set1)
    DWORD         Unknown (set1)
    DWORD         Unknown
    DWORD         Unknown
    DWORD         Unknown (set1.5)
    DWORD         Unknown (set1.5)
    DWORD         Unknown (set2)
    DWORD         Unknown (set2)
    DWORD         Unknown (set2)
    DWORD         Unknown (set2)
    DWORD         Unknown (set3)
    DWORD         Unknown (set3)
    DWORD         Unknown (set3)
    WORD          Unknown (2)
    DWORD         Unknown
    DWORD         Unknown

DWORD           Unknown count (76 byte sections)
    WORD          Unknown (5)
    FLOAT         Unknown
    DWORD         Unknown (set1)
    DWORD         Unknown (set1)
    DWORD         Unknown (set1)
    DWORD         Unknown (set1)
    DWORD         Unknown
    DWORD         Unknown
    DWORD         Unknown (set1.5)
    DWORD         Unknown (set1.5)
    DWORD         Unknown (set2)
    DWORD         Unknown (set2)
    DWORD         Unknown (set2)
    DWORD         Unknown (set2)
    DWORD         Unknown (set3)
    DWORD         Unknown (set3)
    DWORD         Unknown (set3)
    WORD          Unknown (2)
    DWORD         Unknown
    DWORD         Unknown

DWORD           Item Count (Typically 0 in unused cities, 2 in used (Version 1.10 and up))
    DWORD         Unknown    (Incremental Value)
    DWORD         Set Count  (Only seen in active cities)
        FLOAT       Unknown
        FLOAT       Unknown
        FLOAT       Unknown

Occupant Group List

Max Res Pop
R$ Max Pop
R$ Cur Pop
R$$ Max Pop
R$$ Cur Pop
R$$$ Max Pop
R$$$ Cur Pop
R$ Jobs
R$$ Jobs
R$$$ Jobs
R$ Workforce EQ1
R$ Workforce EQ2
R$ Workforce EQ3
R$ Workforce EQ4
R$$ Workforce EQ1
R$$ Workforce EQ2
R$$ Workforce EQ3
R$$ Workforce EQ4
R$$$ Workforce EQ1
R$$$ Workforce EQ2
R$$$ Workforce EQ3
R$$$ Workforce EQ4
CS$ Max Jobs
CS$ Cur Jobs
CS$$ Max Jobs
CS$$ Cur Jobs
CS$$$ Max Jobs
CS$$$ Cur Jobs
CO$$ Max Jobs
CO$$ Cur Jobs
CO$$$ Max Jobs
CO$$$ Cur Jobs
IA Max Jobs
IA Cur Jobs
ID Max Jobs
ID Cur Jobs
IM Max Jobs
IM Cur Jobs
IH Max Jobs
IH Cur Jobs