Difference between revisions of "ABCB5DA4"

From SimsWiki
Jump to: navigation, search
 
(8 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
}}
 
}}
  
I have just finished doing all I can to decode this section of  a Hood file, I'm hopeless with maths but with a lot of experimenting I have got this:  
+
I have just finished doing all I can to decode this section of  a Hood file, I'm hopeless with maths but with a lot of experimenting I have got this:
 +
 
 +
==Description==
 +
This resource stores the physical shape of a neighbourhood's terrain, I.E. it's hills and valleys.  It also specifies the level of the water table and the terrain type Eg. Desert, dirt, etc.
  
 
==Format==
 
==Format==
;8 BYTES
+
;DWORD
:Header? (Always A4 5D CB AB 04 00 00 00)
+
:Block ID (Always A4 5D CB AB)
 +
 
 +
;DWORD
 +
:Version number
  
 
;DWORD:
 
;DWORD:
Line 17: Line 23:
  
 
;DWORD
 
;DWORD
:Water Table height (Always 00 4C 9C 43)
+
:Water Table Elevation (Always 00 4C 9C 43 = 312.5 single float)
  
 
;DWORD
 
;DWORD
Line 25: Line 31:
 
:Terrain type (x = length shown above, EG. Temperate, Desert)
 
:Terrain type (x = length shown above, EG. Temperate, Desert)
  
;8 BYTES
+
;DWORD
:Header? (Always 43 3B 94 6B 01 00 00 00)
+
:Block ID (Always 43 3B 94 6B)
 +
 
 +
;DWORD
 +
:Version number
  
 
;DWORD
 
;DWORD
Line 43: Line 52:
 
:The Array containing the height of the terrain at a given point on the grid.  Each Element of the array is made up of a DWORD and represents a point on the Hoods grid starting in the top left and going down, where the DWORD is the height of the terrain at that grid point.  There are 16641 DWORDS or 66564 BYTES in this array.
 
:The Array containing the height of the terrain at a given point on the grid.  Each Element of the array is made up of a DWORD and represents a point on the Hoods grid starting in the top left and going down, where the DWORD is the height of the terrain at that grid point.  There are 16641 DWORDS or 66564 BYTES in this array.
  
;8 BYTES
+
;DWORD
:Header? (Always 43 3B 94 6B 01 00 00 00)
+
:Block ID (Always 43 3B 94 6B)
 +
 
 +
;DWORD
 +
:Version number
  
 
;DWORD
 
;DWORD
Line 64: Line 76:
 
==Notes==
 
==Notes==
 
The 00 00 00 00 point for the terrain hight value is effectively at the core of the Sims 2 planet.
 
The 00 00 00 00 point for the terrain hight value is effectively at the core of the Sims 2 planet.
 +
 +
The Terrain Types (up to and including Season) are: Temperate, Dirt, Desert, Concrete.
  
 
The water is set at a height of 43 9C 40 00.
 
The water is set at a height of 43 9C 40 00.
Line 79: Line 93:
 
   
 
   
 
==Overview of format==
 
==Overview of format==
Here is a sample of an actual Hood, that I made.  It was completely falt with nothing on it at all.  I used a blank default SC4 City to generate it so all values are at their defaults:
+
Here is a sample of an actual Hood, that I made.  It was completely flat with nothing on it at all.  I used a blank default SC4 City to generate it so all values are at their defaults:
  
   A4 5D CB AB 04 00 00 00    <<Always the same
+
   A4 5D CB AB     <<Block ID
 +
  04 00 00 00    <<Version number
 
   80 00 00 00    <<Hood Grid Size. Always the same, 00 00 00 80 = 128.
 
   80 00 00 00    <<Hood Grid Size. Always the same, 00 00 00 80 = 128.
 
   80 00 00 00    <<Hood Grid Size. Always the same, 00 00 00 80 = 128.
 
   80 00 00 00    <<Hood Grid Size. Always the same, 00 00 00 80 = 128.
Line 87: Line 102:
 
   09 00 00 00    <<Length of following text
 
   09 00 00 00    <<Length of following text
 
   54 65 6D 70 65 72 61 74 65    << The Terrain Type, spelt out, in this case  "Temperate".
 
   54 65 6D 70 65 72 61 74 65    << The Terrain Type, spelt out, in this case  "Temperate".
   43 3B 94 6B 01 00 00 00   <<Always the same.
+
   43 3B 94 6B     <<Block ID
 +
  01 00 00 00     <<Version number
 
   08 00 00 00    <<Length of following text. Always the same.
 
   08 00 00 00    <<Length of following text. Always the same.
 
   63 32 44 41 72 72 61 79      <<Always the same, spelt out, "c2DArray".
 
   63 32 44 41 72 72 61 79      <<Always the same, spelt out, "c2DArray".
Line 108: Line 124:
 
   00 C0 A8 43  00 C0 A8 43  00 C0 A8 43    <<There are 129 blocks like this Each 4 bytes make up a DWORD.  In a "real"
 
   00 C0 A8 43  00 C0 A8 43  00 C0 A8 43    <<There are 129 blocks like this Each 4 bytes make up a DWORD.  In a "real"
 
                                               Hood these values are all different representing the various terrain heights.
 
                                               Hood these values are all different representing the various terrain heights.
   43 3B 94 6B 01 00 00 00   <<Always the same
+
  ...
 +
  ...
 +
   43 3B 94 6B     <<Block ID
 +
  01 00 00 00     <<Version number
 
   08 00 00 00    <<Length of following text:
 
   08 00 00 00    <<Length of following text:
 
   63 32 44 41 72 72 61 79      <<Always the same, spelt out, "c2DArray".
 
   63 32 44 41 72 72 61 79      <<Always the same, spelt out, "c2DArray".
Line 117: Line 136:
 
   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 
   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 
   00 00 00 00 00 00 00 00 00 00 00 00 <<There are 129 blocks like this. Always the same, 00.
 
   00 00 00 00 00 00 00 00 00 00 00 00 <<There are 129 blocks like this. Always the same, 00.
 +
  ...
 +
  ...
  
[[Category:Modding]]
+
[[Category:Sims 2 Modding]]
 
[[Category:InternalFormats]]
 
[[Category:InternalFormats]]
 
[[Category:FormatsByTGI]]
 
[[Category:FormatsByTGI]]

Latest revision as of 18:03, 17 September 2012

ABCB5DA4
Short name: NHTG
Long name: Neighborhood terrain geometry

I have just finished doing all I can to decode this section of a Hood file, I'm hopeless with maths but with a lot of experimenting I have got this:

Contents

[edit] Description

This resource stores the physical shape of a neighbourhood's terrain, I.E. it's hills and valleys. It also specifies the level of the water table and the terrain type Eg. Desert, dirt, etc.

[edit] Format

DWORD
Block ID (Always A4 5D CB AB)
DWORD
Version number
DWORD
Hood Grid size (Always 128)
DWORD
Hood Grid Size (Always 128)
DWORD
Water Table Elevation (Always 00 4C 9C 43 = 312.5 single float)
DWORD
(Length of Following text)
x BYTES
Terrain type (x = length shown above, EG. Temperate, Desert)
DWORD
Block ID (Always 43 3B 94 6B)
DWORD
Version number
DWORD
(Length of Following text, always 8)
x BYTES
Section type (x = length shown above. always c2DArray)
DWORD
First Array Element range (Always 129, X)
DWORD
Second Array Element range (Always 129, Y)
ARRAY[X,Y] = 16641 DWORD
The Array containing the height of the terrain at a given point on the grid. Each Element of the array is made up of a DWORD and represents a point on the Hoods grid starting in the top left and going down, where the DWORD is the height of the terrain at that grid point. There are 16641 DWORDS or 66564 BYTES in this array.
DWORD
Block ID (Always 43 3B 94 6B)
DWORD
Version number
DWORD
(Length of Following text, always 8)
x BYTES
Section type (x = length shown above. always c2DArray)
DWORD
First Array Element range (Always 129, X)
DWORD
Second Array Element range (Always 129, Y)
ARRAY[X,Y] = 16641 BYTE
Each Element of the array is made up of [BYTE] and represents a point on the Hoods grid starting in the top left and going down. There are 16641 BYTES in this array. These values are always 0.


[edit] Notes

The 00 00 00 00 point for the terrain hight value is effectively at the core of the Sims 2 planet.

The Terrain Types (up to and including Season) are: Temperate, Dirt, Desert, Concrete.

The water is set at a height of 43 9C 40 00.

The default terrain level is 43 A8 C0 00.

The minimum level for the terrain to dip to is approx. 40 10 C0 00.

The Sims 2 Hood is made up of 128 rows and columns, which yields 129 x 129 control points.

When you load a freshly created Hood the first element in the DWORD array points to the Top left point (corner of the square). The second element points to the next one down towards you. When you get to the bottom (element 129) you go back to the top and start coming down the second coloumn.



[edit] Overview of format

Here is a sample of an actual Hood, that I made. It was completely flat with nothing on it at all. I used a blank default SC4 City to generate it so all values are at their defaults:

  A4 5D CB AB     <<Block ID
  04 00 00 00     <<Version number
  80 00 00 00     <<Hood Grid Size. Always the same, 00 00 00 80 = 128.
  80 00 00 00     <<Hood Grid Size. Always the same, 00 00 00 80 = 128.
  00 40 9C 43     <<The water table height. Always the same
  09 00 00 00     <<Length of following text
  54 65 6D 70 65 72 61 74 65    << The Terrain Type, spelt out, in this case  "Temperate".
  43 3B 94 6B     <<Block ID 
  01 00 00 00     <<Version number
  08 00 00 00     <<Length of following text. Always the same.
  63 32 44 41 72 72 61 79       <<Always the same, spelt out, "c2DArray".
  81 00 00 00     <<Array size X, Always the same, 00 00 00 81 = 129.
  81 00 00 00     <<Array size Y, Always the same, 00 00 00 81 = 129.
  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43
  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43
  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43
  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43
  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43
  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43
  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43
  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43
  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43
  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43
  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43
  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43
  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43
  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43
  00 C0 A8 43  00 C0 A8 43  00 C0 A8 43     <<There are 129 blocks like this Each 4 bytes make up a DWORD.  In a "real"
                                              Hood these values are all different representing the various terrain heights.
  ...
  ...
  43 3B 94 6B     <<Block ID 
  01 00 00 00     <<Version number
  08 00 00 00     <<Length of following text:
  63 32 44 41 72 72 61 79      <<Always the same, spelt out, "c2DArray".
  81 00 00 00     <<Array size X, Always the same, 00 00 00 81 = 129.
  81 00 00 00     <<Array size Y, Always the same, 00 00 00 81 = 129.
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 <<There are 129 blocks like this. Always the same, 00.
  ...
  ...
Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox