Dat Format: Difference between revisions
From Populous Wiki
mNo edit summary |
No edit summary |
||
(3 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
Dat files are stored in the levels directory and contain the land structure and all the initial objects. These are kept in two blocks of data. | Dat files are stored in the levels directory and contain the land structure and all the initial objects. These are kept in two blocks of data. | ||
==Land | ==0x0 - 0x7FFF: Land Heights== | ||
The land data starts at 0x0. Each point of land is a word | The land data starts at 0x0. Each point of land is a signed word (two bytes) one after the other. 0 is the lowest point which is water. 1024 is considered to be the highest as [[brave]]s lower the land to build anything higher than that. 900 is easier for players to see when their resolution is 640 x 480. | ||
Max (walkable) land height is | Max (walkable) land height is 1408. | ||
== | ==0x8000 - 0xBFFF: Land Blocks== | ||
Unused, data is ignored | |||
==0xC000 - 0xFFFF: Land Orients== | |||
Unused, data is ignored | |||
== | ==0x10000 - 0x13FFF: Land No-access Squares== | ||
One byte for each land block, non-zero value sets land block to no-access. | |||
==0x14000 - 0x1403F: Player Save Info== | |||
For saved games, the positions of all four players. Consists of four blocks of 16 bytes with the first two SWords being the coordinates. | |||
==0x14040 - 0x14042: Sunlight Info== | |||
First two bytes are unused/ignored, third is a UByte for sunlight inclination. | |||
==0x14043 - 0x2EDF2 Objects== | |||
Each object is 55 bytes containing the object's information. Most of the block is not used. The next object starts after the first object and so on. The maximum number of objects is 2000. | |||
For more information visit [[Object Data]] | |||
==0x2EDF3 - 0x2EE88: End Padding == | |||
Unused, data is ignored |
Latest revision as of 22:19, 26 November 2016
Dat files are stored in the levels directory and contain the land structure and all the initial objects. These are kept in two blocks of data.
0x0 - 0x7FFF: Land Heights
The land data starts at 0x0. Each point of land is a signed word (two bytes) one after the other. 0 is the lowest point which is water. 1024 is considered to be the highest as braves lower the land to build anything higher than that. 900 is easier for players to see when their resolution is 640 x 480.
Max (walkable) land height is 1408.
0x8000 - 0xBFFF: Land Blocks
Unused, data is ignored
0xC000 - 0xFFFF: Land Orients
Unused, data is ignored
0x10000 - 0x13FFF: Land No-access Squares
One byte for each land block, non-zero value sets land block to no-access.
0x14000 - 0x1403F: Player Save Info
For saved games, the positions of all four players. Consists of four blocks of 16 bytes with the first two SWords being the coordinates.
0x14040 - 0x14042: Sunlight Info
First two bytes are unused/ignored, third is a UByte for sunlight inclination.
0x14043 - 0x2EDF2 Objects
Each object is 55 bytes containing the object's information. Most of the block is not used. The next object starts after the first object and so on. The maximum number of objects is 2000.
For more information visit Object Data
0x2EDF3 - 0x2EE88: End Padding
Unused, data is ignored