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