Header Format: Difference between revisions
From Populous Wiki
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
The Header (.hdr) is a [[Populous]] Level File which contains the level's | The Header (.hdr) is a [[Populous]] Level File which contains the level's attributes. | ||
==Spells== | ==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=== | ===Byte 1=== | ||
In this example (Hex 27), [[Blast]] and [[Swarm]] are available. | |||
[[Blast]] and [[Swarm]] | |||
00100111 | 00100111 | ||
|||||| | ||||||||--Leave on | ||
|||||| | |||||||---Leave on | ||
||||||----[[Blast]] | ||||||----[[Blast]] | ||
|||||-----[[Lightning]] | |||||-----[[Lightning]] | ||
Line 22: | Line 21: | ||
===Byte 2=== | ===Byte 2=== | ||
In this example (Hex 54), [[Earthquake]], [[Land Bridge]] and [[Erode]] are available. | |||
[[Earthquake]], [[Land Bridge]] and [[Erode]] | |||
01010100 | 01010100 | ||
Line 37: | Line 35: | ||
===Byte 3=== | ===Byte 3=== | ||
In this example (Hex F4), no spells are available. The other bits should be left unchanged. | |||
11110100 | 11110100 | ||
Line 48: | Line 45: | ||
==Buildings== | ==Buildings== | ||
Building availability is handled in the same way as spells, but are kept in two bytes starting at byte 5. | |||
===Byte | ===Byte 5=== | ||
In this example (Hex 0D), [[Hut]] and [[Guard Tower]] are available. Leave other bits unchanged. | |||
[[Hut]] and [[Guard Tower]] | |||
00001101 | 00001101 | ||
Line 65: | Line 61: | ||
|-----------[[Warrior Training Hut|Warrior Hut]] | |-----------[[Warrior Training Hut|Warrior Hut]] | ||
===Byte | ===Byte 6=== | ||
In this example (Hex FF), [[Firewarrior Hut]], [[Boat Hut]] and [[Balloon Hut]] are available. | |||
[[Firewarrior Hut]], [[Boat Hut]] and [[Balloon Hut]] | |||
11111111 | 11111111 | ||
Line 86: | Line 81: | ||
==Fog of War and God Mode== | ==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== | ==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. | 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. | There are 36 landscape styles. In hex that is from 00 to 24. | ||
There are 5 tree styles. In hex | ===Byte 97=== | ||
There are 5 tree styles. In hex, they are 00, 03, 04, 05, 06. | |||
==Max Tribes== | ==Max Tribes== | ||
Maximum Tribes sets | 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 & Red | |||
02 - Blue, Red & Yellow | |||
03 - Blue, Red, Yellow & Green | |||
==AI Scripts== | ==AI Scripts== |
Revision as of 20:06, 13 May 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, Land Bridge and Erode are available.
01010100 ||||||||----Firestorm |||||||-----Ghost Army ||||||------Erode |||||-------Swamp ||||--------Land Bridge |||---------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 & Red 02 - Blue, Red & Yellow 03 - Blue, Red, Yellow & Green
AI Scripts
AI Scripts are 3 bytes long and starts at byte 88. Each byte is for each colour (Red, Yellow, Green). You must type the script number n hex for it to link to that script. (Cpscr010.dat = 010 = 0A)
Allies
Allies are kept in 4 bytes staring at byte 89.
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
...