Header Format: Difference between revisions
From Populous Wiki
No edit summary |
|||
Line 133: | Line 133: | ||
==Markers== | ==Markers== | ||
... | Markers are the first 256*2 offsets. | ||
Offset 0 being the x coordinate of marker 0, and Offset 1 being the y coordinate of marker 0. | |||
This goes in a pattern until all 256 (0 to 255) markers are used up. |
Revision as of 07:19, 31 December 2006
The Header (.hdr) is a Populous Level File which contains the level's attributes.
Spells
The three bytes starting at byte 0 defines which spells are available at the start of the level. Each of the eight bits of the byte represent one spell. If the bit is on the spell is available.
Byte 1
In this example (Hex 27), Blast and Swarm are available.
00100111 ||||||||--Leave on |||||||---Leave on ||||||----Blast |||||-----Lightning ||||------Tornado |||-------Swarm ||--------Invisibility |---------Hypnotise
Byte 2
In this example (Hex 54), Earthquake, Landbridge and Erode are available.
01010100 ||||||||----Firestorm |||||||-----Ghost Army ||||||------Erode |||||-------Swamp ||||--------Landbridge |||---------Angel of Death ||----------Earthquake |-----------Flatten
Byte 3
In this example (Hex F4), no spells are available. The other bits should be left unchanged.
11110100 | ||----Volcano | |-----Convert | |-------Magical Shield
Buildings
Building availability is handled in the same way as spells, but are kept in two bytes starting at byte 5.
Byte 5
In this example (Hex 0D), Hut and Guard Tower are available. Leave other bits unchanged.
00001101 ||||| | ||||| |-----Hut ||||| ||||| ||||--------Guard Tower |||---------Temple ||----------Spy Hut |-----------Warrior Hut
Byte 6
In this example (Hex FF), Firewarrior Hut, Boat Hut and Balloon Hut are available.
11111111 | | |----Firewarrior Hut | | | | | | | | | |---------Boat Hut | |-----------Balloon Hut
Spells Not Charging
...
Fog of War and God Mode
Fog of War and God Mode are stored in Byte 98.
Byte 98
00001101 ||----Fog of War |-----God Mode
Landscape and Tree Style
The Landscape Style is 1 byte starting at byte 96 and the Tree Style is 1 byte starting at byte 97.
Byte 96
There are 36 landscape styles. In hex that is from 00 to 24.
Byte 97
There are 5 tree styles. In hex, they are 00, 03, 04, 05, 06.
Max Tribes
Maximum Tribes sets the number of enemy tribes that will appear on the level. In Single Player you must set this to the last colour on your level or 03 for all of them. Colours go in the order (Blue, Red, Yellow, Green). If you wanted to have only Blue and Yellow on a level, then the number must still be set to 02. In Multiplayer you just set this to how many players the level has minus one as you cannot omit colours. It is 1 byte long and starts at byte 88.
Byte 88
01 - Blue 02 - Blue & Red 03 - Blue, Red & Yellow 04 - Blue, Red, Yellow & Green
AI Scripts
AI Scripts are 3 bytes long and starts at byte 89. Each byte is for each colour (Red, Yellow, Green). You must type the script number in hex for it to link to that script. (Cpscr010.dat = 010 = 0A)
Allies
Allies are kept in 4 bytes staring at byte 92.
Blue = 01 Red = 02 Yellow = 04 Green = 08
An ally equals the two colours together. To make yellow and blue allies you would add Blue(01) and Yellow(04) together which makes 05. Then put 05 for yellow and blue (05 02 05 08).
Level Name
...
Markers
Markers are the first 256*2 offsets. Offset 0 being the x coordinate of marker 0, and Offset 1 being the y coordinate of marker 0.
This goes in a pattern until all 256 (0 to 255) markers are used up.