DO/ARM
From Dark Omen Wiki
(Increased size of all strings to 31. Problem: DO uses strcpy() without checking string length: overflow! -> Solution: Set byte after string to 00 so that our example dump causes no overflows ;)) |
(→Regiment data: Added offset tabulation) |
||
Line 71: | Line 71: | ||
:For an explanation of values for <span style="color:rgb(200,200,200);background:DarkSlateGray;">sprite</span> and <span style="background:DarkSlateGray;color:White;">leader sprite</span>, see [[DO/Sprites|Sprites]]. | :For an explanation of values for <span style="color:rgb(200,200,200);background:DarkSlateGray;">sprite</span> and <span style="background:DarkSlateGray;color:White;">leader sprite</span>, see [[DO/Sprites|Sprites]]. | ||
+ | |||
+ | {| class="wikitable" | ||
+ | ! Data attribute !! Offset !! Byte size | ||
+ | |- | ||
+ | | Status || 0 || 2 | ||
+ | |- style="color:gray" | ||
+ | | ''unknown'' || 2 || 2 || Seems to be unused | ||
+ | |- | ||
+ | | Unique Unit ID || 4 || 2 | ||
+ | |- style="color:gray" | ||
+ | | ''unknown'' || 6 || 2 || Seems to be unused | ||
+ | |- | ||
+ | | Wizard type || 8 || 1 | ||
+ | |- | ||
+ | | Armour || 9 || 1 | ||
+ | |- | ||
+ | | Cost || 10 || 2 | ||
+ | |- | ||
+ | | Banner || 12 || 1 | ||
+ | |- style="color:gray" | ||
+ | | ''unknown'' || 13 || 3 || Seems to be unused | ||
+ | |- | ||
+ | | Regiment attributes || 16 || 4 | ||
+ | |- | ||
+ | | Sprite || 20 || 1 | ||
+ | |- style="color:gray" | ||
+ | | ''unknown'' || 21 || 1 || Seems to be unused | ||
+ | |- | ||
+ | | Regiment Name || 22 || 32 || Zero-terminated (or DO crashes) | ||
+ | |- | ||
+ | | Name ID || 54 || 1 | ||
+ | |- style="color:gray" | ||
+ | | ''unknown'' || 55 || 1 || Seems to be unused | ||
+ | |- | ||
+ | | Alignment || 56 || 1 | ||
+ | |- | ||
+ | | Max units || 57 || 1 | ||
+ | |- | ||
+ | | Alive units || 58 || 1 | ||
+ | |- | ||
+ | | Ranks || 59 || 1 | ||
+ | |- style="color:gray" | ||
+ | | ''unknown'' || 60 || 4 || Seems to be unused | ||
+ | |- | ||
+ | | Rank-and-file stats || 64 || 9 | ||
+ | |- | ||
+ | | Mount || 73 || 1 | ||
+ | |- | ||
+ | | Armour || 74 || 1 | ||
+ | |- | ||
+ | | Weapon || 75 || 1 | ||
+ | |- | ||
+ | | Unit type || 76 || 1 | ||
+ | |- | ||
+ | | Point value || 77 || 1 | ||
+ | |- | ||
+ | | Missile weapon || 78 || 1 | ||
+ | |- | ||
+ | | ''unknown'' || 79 || 1 || '''Unknown data''' | ||
+ | |- style="color:gray" | ||
+ | | ''unknown'' || 80 || 3 || Seems to be unused | ||
+ | |- | ||
+ | | Leader sprite || 84 || 1 | ||
+ | |- style="color:gray" | ||
+ | | ''unknown'' || 85 || 1 || Seems to be unused | ||
+ | |- | ||
+ | | Leader name || 86 || 32 || Zero-terminated (or DO crashes) | ||
+ | |- | ||
+ | | ''block of zeroes'' || 108 || 19 | ||
+ | |- | ||
+ | | Leader stats || 127 || 9 | ||
+ | |- | ||
+ | | Mount || 136 || 1 || Unused == 0 for leader | ||
+ | |- | ||
+ | | Armour || 137 || 1 | ||
+ | |- | ||
+ | | Weapon || 138 || 1 | ||
+ | |- | ||
+ | | Unit type || 139 || 1 || Unused == 0 | ||
+ | |- | ||
+ | | Point value || 140 || 1 || Unused == 0 | ||
+ | |- | ||
+ | | Missile weapon || 141 || 1 | ||
+ | |- style="color:gray" | ||
+ | | ''unknown'' || 142 || 2 || Seems to be unused | ||
+ | |- | ||
+ | | ''unknown'' || 144 || 1 || '''Unknown data''' | ||
+ | |- style="color:gray" | ||
+ | | ''unknown'' || 145 || 1 || Seems to be unused | ||
+ | |- | ||
+ | | Leader 3D Head ID || 146 || 1 | ||
+ | |- style="color:gray" | ||
+ | | ''unknown'' || 147 || 1 || Seems to be unused | ||
+ | |- | ||
+ | | X-Pos || 148 || 4 | ||
+ | |- | ||
+ | | Y-Pos || 152 || 4 | ||
+ | |- | ||
+ | | Experience || 156 || 2 | ||
+ | |- | ||
+ | | Duplicate ID || 158 || 1 | ||
+ | |- | ||
+ | | Base (minimum) armour || 159 || 1 | ||
+ | |- | ||
+ | | Magic book || 160 || 2 | ||
+ | |- | ||
+ | | Magic item slots || 162 || 6 || 3 slots á 2 bytes | ||
+ | |- | ||
+ | | ''reserved space'' || 168 || || Five unusable item slots | ||
+ | |- | ||
+ | | Book profile || 183 || 1 | ||
+ | |- style="color:gray" | ||
+ | | ''unknown'' || 184 || 4 || Seems to be unused | ||
+ | |- | ||
+ | |} | ||
==Soldier and leader Character Attributes== | ==Soldier and leader Character Attributes== |
Revision as of 00:57, 3 May 2009
.ARM (army) files contains a list of regiments, their status, and some army data and statistics. The same format is used for multiplayer armies, single player mission enemy armies and save games. Edit with Mikademus' DOS WH2EDIT editor or Ghabry's forthcoming multi-platform Wh32Edit.
Contents |
Header
The header of a army-file has a size of 192 bytes. Example (Allied1.arm):
Value | Race |
0 | Empire |
1 | Empire (Multiplayer) |
2 | Greenskin |
3 | Greenskin (Multiplayer) |
4 | Undead |
5 | Undead (Multiplayer) |
Regiment data
Regiment data starts at offset 192 (in savegames offset 696). Every regiment block has a size of 188 bytes. Example first regiment from B403NME.ARM:
- For an explanation of values for sprite and leader sprite, see Sprites.
Data attribute | Offset | Byte size | |
---|---|---|---|
Status | 0 | 2 | |
unknown | 2 | 2 | Seems to be unused |
Unique Unit ID | 4 | 2 | |
unknown | 6 | 2 | Seems to be unused |
Wizard type | 8 | 1 | |
Armour | 9 | 1 | |
Cost | 10 | 2 | |
Banner | 12 | 1 | |
unknown | 13 | 3 | Seems to be unused |
Regiment attributes | 16 | 4 | |
Sprite | 20 | 1 | |
unknown | 21 | 1 | Seems to be unused |
Regiment Name | 22 | 32 | Zero-terminated (or DO crashes) |
Name ID | 54 | 1 | |
unknown | 55 | 1 | Seems to be unused |
Alignment | 56 | 1 | |
Max units | 57 | 1 | |
Alive units | 58 | 1 | |
Ranks | 59 | 1 | |
unknown | 60 | 4 | Seems to be unused |
Rank-and-file stats | 64 | 9 | |
Mount | 73 | 1 | |
Armour | 74 | 1 | |
Weapon | 75 | 1 | |
Unit type | 76 | 1 | |
Point value | 77 | 1 | |
Missile weapon | 78 | 1 | |
unknown | 79 | 1 | Unknown data |
unknown | 80 | 3 | Seems to be unused |
Leader sprite | 84 | 1 | |
unknown | 85 | 1 | Seems to be unused |
Leader name | 86 | 32 | Zero-terminated (or DO crashes) |
block of zeroes | 108 | 19 | |
Leader stats | 127 | 9 | |
Mount | 136 | 1 | Unused == 0 for leader |
Armour | 137 | 1 | |
Weapon | 138 | 1 | |
Unit type | 139 | 1 | Unused == 0 |
Point value | 140 | 1 | Unused == 0 |
Missile weapon | 141 | 1 | |
unknown | 142 | 2 | Seems to be unused |
unknown | 144 | 1 | Unknown data |
unknown | 145 | 1 | Seems to be unused |
Leader 3D Head ID | 146 | 1 | |
unknown | 147 | 1 | Seems to be unused |
X-Pos | 148 | 4 | |
Y-Pos | 152 | 4 | |
Experience | 156 | 2 | |
Duplicate ID | 158 | 1 | |
Base (minimum) armour | 159 | 1 | |
Magic book | 160 | 2 | |
Magic item slots | 162 | 6 | 3 slots á 2 bytes |
reserved space | 168 | Five unusable item slots | |
Book profile | 183 | 1 | |
unknown | 184 | 4 | Seems to be unused |
Soldier and leader Character Attributes
- Further information: The Warhammer Attributes
Movement, Weapon Skill, Ballistic Skill, Strength, Toughness, Wounds, Initiative, Attacks, Leadership
Unit | Character attributes | Regiment attributes | |||||||||||||||||||||||
Mv | WS | BS | S | T | W | I | A | Ld | A1 | A2 | A3 | A4 | B1 | B2 | B3 | B4 | C1 | C2 | C3 | C4 | D1 | D2 | D3 | D4 | |
Mercenary cavalry |
Regiment attributes
Regiment attributes are physical and psychological abilities or disadvantages of entire regiments. Attributes are stored in the regiment block at bytes 16-19. The different values are flags mapped to bits in four bytes (thus 32 unique attributes are possible).
Transcluded from DO/ARM/Regiment attributes
Note: The Bits in this table are going from lowest to highest bit. So the lowest bit is 1 and the highest 8.
Bit | BYTE 1 | BYTE 2 | BYTE 3 | BYTE 4 |
---|---|---|---|---|
1 | Will never rout Flagellants, steam tank and most undead have this
| Immune to fear, can be routed Most undead have this
| Inflicting casualty causes fear Screaming skull, undead chariot and Nagash has this
| Goblin Flag (Trading Post Map only) Only Night Goblins in B1_01 have this
|
2 | Unused
| Regenerates wounds Only trolls have this
| Cowardly Only ghouls have this
| Impervious to Magic Only necromancer in B1_03 has this
|
3 | Cause fear Most undead have this
| Never rally/regroup Villagers and B1_04 Mage has this. When a regiment has been broken it will get the white flag immediately
| Destroyed if routed Wights, wraiths, zombies, Carstein and dummies have this
| No retreat, no surrender! No regiment uses this. Unit will never rout, retreat button without any use. Banner of Defiance and cheat code DONTMESSWITHME and Ctrl+C+I have the exact same effect
|
4 | Cause terror Black Grail, Dread King, Hand of Nagash and Wraiths have this
| Always Pursue No regiment has this; Regiment will follow retreating enemy until it is defeated
| Flammable Treeman and mummies have this
| No Item slots Treeman, scorpion, spider, and wraiths have this
|
5 | Elf racial flag Only elves have this
| "Engine of War" Rule Steam tank and goblin fanatics have this
| 360 Degree Vision Only giant spider has this
| Can't be selected Only goblin fanatics have this
|
6 | Goblin racial flag Goblins and goblin fanatics have this
| Indestructible Only necromancer in B1_03 has this
| Unit contains fanatics Only goblin with fanatics has this
| Fear Elves Which unit has this- Goblins?
|
7 | Hate Greenskins Elves and treeman has this
| Unused
| Aetherial "racial" flag Only wraiths have this
| Unused
|
8 | Unimpeded by difficult terrain Elves, treeman, spider, black grail, skel horsemen and wraith
| Suffer additional wounds Only skeletons and training dummy have this.
| Giant Only Treeman has this
| Unused
|
Certain and tested
Highly likely but not tested
Function basically undeterminable... :(
Guess and/or untested
|
- I changed "psychology" to "attribute". I originally used the term psychology when I started mapping out the .arm files, and I thought that only the Warhammer psychology stuff (like hatred, saga animosity, fearless, etc) were stored there. But as also physical stuff like terrain striding etc are represented here "attributes" is a more descriptive term. Mikademus 23:24, 18 September 2008 (UTC)
I have started colour-coding the above table. Since it has been a while I am not certain which attributes I definitely determined and which I merely surmised. Ghabry is the the current authority on unit attributes, and I hope he will be able to complete the chart. Mikademus 12:43, 19 September 2008 (UTC)
Certain or likely flags
Flag #9 (byte 2 bit 1): In DO only skeletons have this set. It seems to be the undead army list rule that skeletons (which are immune to fear and don't take rout tests) take additional wounds from being pushed back
Flag #24 (byte 3 bit 8): This is an adaptation of Warhammer's special Screaming Skull Catapult rule. The Screaming Skulls fired by the catapult cause fear, so if even one casualty is dealt the receiving unit must take a rout test. Since Hand of Nagash also has this is is surmised that is is also used to give extra oomph to his attacks, and in extension, to the attack of any unit with this flag.
Uncertain flags
Flag #3 (byte 1 bit 3): Only goblins have this set. It could simply to indicate race, or it could be to indicate goblins' racial traits. The WHTTv4 rules about goblins are:
Relevant WHFB TT goblinoid rules v4. Goblins
- have animosity toward other goblinoids
- hate dwarves (and gnomes)
- fear elves (of numbers > half the goblins)
- and some special stuff about being led by snotlings and substituting spells.
Flag #4 (byte 1 bit 4): Only elves have this set. It could simply to indicate race, or it could be to indicate elves' racial traits. The WHTTv4 rules about elves are:
Relevant WHFB TT v4 elves rules. Elves
- are feared by Goblins if less than twice the numbers
- have double encumbrance from armour
Wood elves
- Suffer no movement or manoeuvre penalties in wooden areas
- have 6" longer range with bows
- and some special stuff about being substituting spells.
Are elves equipped with the same longbow (missile weapon type) as f.i. Helmgard Longbowmen? If so then we know that at least the additional distance rule applies.
Flag #18 (byte 3 bit 2): Only wraiths have this set. It could simply to indicate race, or it could be to indicate wraiths' special traits. The WHTTv4 rules about wraiths are:
Relevant WHFB TT v4 wraith rules. Wraiths
- are immune to all psychology (seems not to be true in DO)
- cause fear 12" +2 in all living creatures regardless of size
- can only be damaged by magic, magic weapons, daemons, or undead chill attacks
- have chill attacks that automatically cause 1 wound, no save and no armour
- are bound to a particular place and dematerialise if they leave this zone or the thing they're attached to is destroyed
- can pass through any material obstacle unhindered
Flag #12 (byte 2 bit 4): This units can't fight in Closed Combat and can drive over other regiments while charging.