| Developers > ABCB5DA4 Resources (NHTG) | ||
| tickleonthetum | ||
Member since: 2005-06-16 From: U.K. Posts: 108 | 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:
8 BYTES: Header? (Always A4 5D CB AB 04 00 00 00) DWORD: Hood Grid size (Always 128) DWORD: Hood Grid Size (Always 128) DWORD Water Table height (Always 00 4C 9C 43) DWORD: (Length of Following text) x BYTES: Terrain type (x = length shown above, EG. Temperate, Desert) 8 BYTES: Header? (Always 43 3B 94 6B 01 00 00 00) 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. 8 BYTES: Header? (Always 43 3B 94 6B 01 00 00 00) 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 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.
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:
A4 5D CB AB 04 00 00 00 <<Always the same
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 01 00 00 00 <<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".
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 01 00 00 00 <<Always the same
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.
If anyone can add to this then please do as I've reached a dead end for now. I will put this up on the Wiki.
| |
| pljones | ||
Member since: 2005-04-02 From: London, UK Posts: 610 | Only one thing I can immediately see I'd want if I were to want to write an editor -- I'd need all the different valid terrain types documented.
What happens about neighbourhood features? (You can tell I don't play either SC4 or Sims2, can't you | |
| tickleonthetum | ||
Member since: 2005-06-16 From: U.K. Posts: 108 | The neighbourhood features such as trees, roads etc. are stored in the NHTR resource. This resource appears to contain only the physical shape of the Hoods terrain.
The Terrain Types are: Temperate Concrete Desert Dirt
Temperate is the internal name for Lush.
| |
| Inge Jones | ||
Member since: 2005-03-06 Posts: 1899 | Does anyone happen to know at what point the seawater "plates" get generated? I was wondering if they were the equivalent of hood decorations that get placed when the terrain gets pulled in to make a sims hood. There is not one water plate, there are several overlapping each other and cutting into the land a little way. So of course if you take the land too low by editing it, you start to see the edges of the water plates! | |
| tickleonthetum | ||
Member since: 2005-06-16 From: U.K. Posts: 108 | The seem to be generated whenever a point of terrain dips below the water table level. | |
| Inge Jones | ||
Member since: 2005-03-06 Posts: 1899 | Do you happen to know how the data in this resource relates to the information about lot positions and sizes? It would be nice to edit boundaries between lots so that if you have dug a river on one (for fishing), and have continued it onto the next, you can edit out the ridge that divides the two lots. | |
| tickleonthetum | ||
Member since: 2005-06-16 From: U.K. Posts: 108 | I'm afraid I don't Inge, sorry.
I've updated the Wiki page as I worked out the header format. That this resource finished. Well apart from the 129 0's array athe end which never change. I suppose Maxis decided not to use them and didn't bother taking it out? | |
Member Controls
| Developers > ABCB5DA4 Resources (NHTG) | ||
| tickleonthetum | ||
Member since: 2005-06-16 From: U.K. Posts: 108 | ||
| pljones | ||
Member since: 2005-04-02 From: London, UK Posts: 610 | ||
| tickleonthetum | ||
Member since: 2005-06-16 From: U.K. Posts: 108 | ||
| Inge Jones | ||
Member since: 2005-03-06 Posts: 1899 | ||
| tickleonthetum | ||
Member since: 2005-06-16 From: U.K. Posts: 108 | ||
| Inge Jones | ||
Member since: 2005-03-06 Posts: 1899 | ||
| tickleonthetum | ||
Member since: 2005-06-16 From: U.K. Posts: 108 | ||
viewpost, 21929, 0
?) Do they appear in the NHTG file? (The editor would have to work on files even after they'd been edited in Sims2.)