Actions

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 attrubutes.
The Header (.hdr) is a [[Populous]] Level File which contains the level's attributes.


==Spells==
==Spells==


These 3 bytes starting at byte 0 contain the spells blue starts off with. If you convert one of these bytes into binary then you can see all the spells it holds and there on or off value.
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===


If you convert 27 from hex to binary then you will get these values. The last two bytes do not contain anything, leave at 1.
In this example (Hex 27), [[Blast]] and [[Swarm]] are available.  
[[Blast]] and [[Swarm]] should be on.


     00100111
     00100111
     ||||||
     ||||||||--Leave on
     ||||||
     |||||||---Leave on
     ||||||----[[Blast]]
     ||||||----[[Blast]]
     |||||-----[[Lightning]]
     |||||-----[[Lightning]]
Line 22: Line 21:
===Byte 2===
===Byte 2===


If you convert 54 from hex to binary then you will get these values.
In this example (Hex 54), [[Earthquake]], [[Land Bridge]] and [[Erode]] are available.
[[Earthquake]], [[Land Bridge]] and [[Erode]] should be on.


     01010100
     01010100
Line 37: Line 35:
===Byte 3===
===Byte 3===


If you convert F4 from hex to binary then you will get these values. The bytes that contain nothing should be left at 1.
In this example (Hex F4), no spells are available. The other bits should be left unchanged.
Nothing should be on.


     11110100
     11110100
Line 48: Line 45:
==Buildings==
==Buildings==


Buildings are just like spells. But they are kept in two bytes starting at byte 5.
Building availability is handled in the same way as spells, but are kept in two bytes starting at byte 5.


===Byte 1===
===Byte 5===


If you convert 0D from hex to binary then you will get these values. The bytes that contain nothing should be left at 1.
In this example (Hex 0D), [[Hut]] and [[Guard Tower]] are available. Leave other bits unchanged.
[[Hut]] and [[Guard Tower]] should be on.


     00001101
     00001101
Line 65: Line 61:
     |-----------[[Warrior Training Hut|Warrior Hut]]
     |-----------[[Warrior Training Hut|Warrior Hut]]


===Byte 2===
===Byte 6===


If you convert FF from hex to binary then you will get these values. The bytes that contain nothing should be left at 1.
In this example (Hex FF), [[Firewarrior Hut]], [[Boat Hut]] and [[Balloon Hut]] are available.
[[Firewarrior Hut]], [[Boat Hut]] and [[Balloon Hut]] should be on.


     11111111
     11111111
Line 86: Line 81:
==Fog of War and God Mode==
==Fog of War and God Mode==


This is kept in 1 byte stating at byte 98.
Fog of War and God Mode are stored in Byte 98.
 
===Byte 98===


00 - Nothing
    00001101
01 - Fog of War
          ||----Fog of War
02 - God Mode
          |-----God Mode
03 - Fog of War and 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 it goes 00, 03, 04, 05, 06.
===Byte 97===
 
There are 5 tree styles. In hex, they are 00, 03, 04, 05, 06.


==Max Tribes==
==Max Tribes==


Maximum Tribes sets what tribes should appear on the level. In [[Single Player]] you must set this to the last colour on your level or 03. (Blue, Red, Yellow, Green). In [[Multiplayer]] you set this to how many players the level is. It is 1 byte long and starts at byte 88.
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 19: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

...