DO/ARM

From Dark Omen Wiki

< DO(Difference between revisions)
Jump to: navigation, search
(New page: .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...)
(Savegame Header: Coloring all known stuff. Could be wrong if you are unlucky ;))
 
(50 intermediate revisions not shown)
Line 1: Line 1:
-
.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 by Mikademus' DOS WH2EDIT editor or Ghabry's forthcoming multi-platform Wh32Edit.
+
.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 [[user:Mikademus|Mikademus']] DOS [[DO/Modding/Tools/WH2EDIT|WH2EDIT]] editor or [[user:Ghabry|Ghabry's]] multi-platform [[DO/Modding/Tools/Wh32Edit|Wh32Edit]].
__TOC__
__TOC__
 +
 +
==Layout overview==
 +
The .ARM format is a binary format, the layout of which is very simple from a large-scale perspective: It starts with a 192 bytes header, which is followed by several 188-byte regiment records.
==Header==
==Header==
Line 8: Line 11:
<div style="white-space:nowrap; overflow:hidden; font-family:courier;border:2px solid gray; margin:1em; padding:1em; background:black; color:rgb(200,200,200);width:auto;">
<div style="white-space:nowrap; overflow:hidden; font-family:courier;border:2px solid gray; margin:1em; padding:1em; background:black; color:rgb(200,200,200);width:auto;">
-
<p><span style="background:gray;">9E 02 00 00</span> <span style="background:CornflowerBlue">04 00 00 00</span> <span style="background:purple;">BC 00 00 00</span> <span style="background:CadetBlue;">01 00 00 00</span> <span style="margin-left:1em;background:gray;">670</span> <span style="background:CornflowerBlue">No. of Units</span> <span style="background:purple;">Size of Unit (188bytes)</span> <span style="background:CadetBlue;">Race (see below)</span><br />
+
<p>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:rgb(128,128,128); border-bottom:1px solid brown;">00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F</span><br />
-
15 00 <span style="background:GoldenRod;color:black;">00 F8 02 00 E6 83 03 00 65 00 00 00 00 00</span> <span style="margin-left:1em;background:GoldenRod;color:black;">Regiment Name</span><br />
+
<span style="color:rgb(128,128,128); border-right:1px solid brown;">00 </span>&nbsp;<span style="background:gray;">9E 02 00 00</span> <span style="background:CornflowerBlue">04 00 00 00</span> <span style="background:purple;">BC 00 00 00</span> <span style="background:CadetBlue;">01</span> 00 00 00 <span style="margin-left:1em;background:gray;">670</span> <span style="background:CornflowerBlue">No. of Units</span> <span style="background:purple;">Size of Unit (188bytes)</span> <span style="background:CadetBlue;">Race (see below)</span><br />
-
<span style="background:GoldenRod;color:black;">00 00 00 00 90 20 52 F7 35 01 39 01 02 00 79 00</span><br />
+
-
00 00 <span style="background:DarkGreen;">5B 42 4F 4F 4B 53 5D 5C 68 73 68 69 65 6C</span> <span style="margin-left:1em;background:DarkGreen;">Path+Name of Small Banner Graphics File</span><br />
+
-
<span style="background:DarkGreen;">64 2E 73 70 72</span> 00 00 00 04 00 06 01 00 00 2A 01<br />
+
-
E7 05 <span style="background:DarkBlue;">5B 42 4F 4F 4B 53 5D 5C 68 67 62 61 6E 2E</span> <span style="margin-left:1em;background:DarkBlue;">Path+Name of Small Inactive Banner Graphics File</span><br />
+
-
<span style="background:DarkBlue;">73 70 72</span> 00 F7 11 AC F8 E7 05 42 00 56 16 04 00<br />
+
<span style="color:rgb(128,128,128); border-right:1px solid brown;">10 </span>&nbsp;<span style="background:SaddleBrown;">15 00</span> <span style="background:GoldenRod;color:black;">00 F8 02 00 E6 83 03 00 65 00 00 00 00 00</span> <span style="margin-left:1em;background:SaddleBrown;">Default Name</span> <span style="background:GoldenRod;color:black;">Regiment Name</span><br />
-
C4 84 <span style="background:brown;">5B 42 4F 4F 4B 53 5D 5C 68 6C 62 61 6E 2E</span> <span style="margin-left:1em;background:brown;">Path+Name of Large Banner Graphics File</span><br />
+
-
<span style="background:brown;">73 70 72</span> 00 4E 23 7F 17 08 03 B7 1F 67 1F 0C 05<br />
+
-
44 85 FB 00 <span style="background:Indigo;">64 00</span> <span style="background:DarkRed;">00 00 00 00 00 00 00 00 00 00</span> <span style="margin-left:1em;background:Indigo;">Money</span> <span style="background:DarkRed;">Magic Items</span><br />
+
-
<span style="background:DarkRed;">00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00</span><br />
+
<span style="color:rgb(128,128,128); border-right:1px solid brown;">20 </span>&nbsp;<span style="background:GoldenRod;color:black;">00 00 00 00 90 20 52 F7 35 01 39 01 02 00 79 00</span><br />
-
<span style="background:DarkRed;">00 00 00 00 00 00 00 00 00 00 00 00 00</span> 00 <span style="background:blue;">DC 84</span> <span style="margin-left:1em;background:blue;">End of Header (not in every army file)</span><br />
+
 
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">30 </span>&nbsp;<span style="background:GoldenRod;color:black;">00 00</span> <span style="background:DarkGreen;">5B 42 4F 4F 4B 53 5D 5C 68 73 68 69 65 6C</span> <span style="margin-left:1em;background:DarkGreen;">Path+Name of Small Banner Graphics File</span><br />
 +
 
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">40 </span>&nbsp;<span style="background:DarkGreen;">64 2E 73 70 72 00 00 00 04 00 06 01 00 00 2A 01</span><br />
 +
 
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">50 </span>&nbsp;<span style="background:DarkGreen;">E7 00</span> <span style="background:DarkBlue;">5B 42 4F 4F 4B 53 5D 5C 68 67 62 61 6E 2E</span> <span style="margin-left:1em;background:DarkBlue;">Path+Name of Small Inactive Banner Graphics File</span><br />
 +
 
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">60 </span>&nbsp;<span style="background:DarkBlue;">73 70 72 00 F7 11 AC F8 E7 05 42 00 56 16 04 00</span><br />
 +
 
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">70 </span>&nbsp;<span style="background:DarkBlue;">C4 00</span> <span style="background:brown;">5B 42 4F 4F 4B 53 5D 5C 68 6C 62 61 6E 2E</span> <span style="margin-left:1em;background:brown;">Path+Name of Large Banner Graphics File</span><br />
 +
 
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">80 </span>&nbsp;<span style="background:brown;">73 70 72 00 4E 23 7F 17 08 03 B7 1F 67 1F 0C 05</span><br />
 +
 
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">90 </span>&nbsp;<span style="background:brown;">44 00</span> <span style="background:DarkSlateGray;">FB 00</span> <span style="background:Indigo;">64 00</span> <span style="background:DarkRed;">00 00 00 00 00 00 00 00 00 00</span> <span style="margin-left:1em;background:DarkSlateGray;">Money from Treasures</span> <span style="background:Indigo;">Money</span> <span style="background:DarkRed;">Magic Items</span><br />
 +
 
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">A0 </span>&nbsp;<span style="background:DarkRed;">00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00</span><br />
 +
 
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">B0 </span>&nbsp;<span style="background:DarkRed;">00 00 00 00 00 00 00 00 00 00 00 00 00 00</span> <span style="background:blue;">DC 84</span> <span style="margin-left:1em;background:blue;">End of Header (not in every army file)</span><br />
</p>
</p>
</div>
</div>
-
Races: 0=EMPIRE, 1=EMPIRE MULTIPLAYER; 2=GREENSKIN, 3=GREENSKIN MULTIPLAYER; 4=UNDEAD, 5=UNDEAD MULTIPLAYER
 
 +
{| style="border:1px solid black; margin:1em; float:right;"
 +
|- style="background:CadetBlue; "
 +
|Value || '''Race'''
 +
|-
 +
|0 || Empire
 +
|-
 +
|1 || Empire (Multiplayer)
 +
|-
 +
|2 || Greenskin
 +
|-
 +
|3 || Greenskin (Multiplayer)
 +
|-
 +
|4 || Undead
 +
|-
 +
|5 || Undead (Multiplayer)
 +
|}
 +
 +
{| class="wikitable" style="empty-cells:hide; border-collapse:separate;"
 +
! Data attribute !! Offset !! Byte size !! Notes
 +
|-
 +
| File ID || 0 || 4 || Always 9E 02 00 00  for Dark Omen .ARM files
 +
|-
 +
| # regiments blocks || 4 || 4 || &nbsp;
 +
|-
 +
| Regiment block size || 8 || 4 || Always 188 in Dark Omen .ARM files
 +
|-
 +
| Race || 12 || 1 || &nbsp;
 +
|-
 +
| Unknown || 13 || 3 || '''Unknown data'''
 +
|-
 +
| Default Name || 16 || 2 || Used by the included Demo Armies, "Army Name" must be empty.
 +
|-
 +
| Army name || 18 || 32 || 0-term string
 +
|-
 +
| Small banner bitmap file || 50 || 32 || 0-term string (path + filename)
 +
|-
 +
| Small inactive banner bitmap || 82 || 32 || 0-term string (path + filename)
 +
|-
 +
| Large banner bitmap file || 114 || 32 ||  0-term string (path + filename)
 +
|-
 +
| Money from Treasures || 146 || 2 || Used for "You collected x gold"-Text at summary screen
 +
|-
 +
| Gold in coffers || 148 || 2 || Available Gold
 +
|-
 +
| Magic items || 150 || 40 || One byte per item
 +
|-
 +
| Unknown || 190 || 2 || Often either DC 84 or 00 00
 +
|}
 +
 +
==Savegame Header==
 +
 +
A savegame is in short an army file with an additional header located before the army header (and with lots of unknown data after the regiment data)
 +
 +
The Save files (*.[0-9]{3}) header has a size of 504-byte. Most parts of it are unknown.
 +
 +
At least the following things must be in the Save file (if you find out where they are please mark them in the example):
 +
* Your current progress
 +
* Your success in defeating Manfred von Carstein (defines if Black Pyramide MB5_01 or MB5_01B are loaded at the end), the Hand of Nagash or the Black Grail (they will help the Dread King when you lose) - OT: Looks like CTL scripts can read savegame data or is this just a special parameter passed by the engine when loading the map?
 +
* Path you've choosen e.g. in Chapter 3 (Hand of Nagash): If you help Munz or Ragnar you will lose time and more undeads will attack you in the Hand of Nagash mission (is this confirmed? At least Matthias and Klaus say this)
 +
* Used/Killed/Lost Units (for the stats page displayed after the battle)
 +
* Play Time (maybe ^^)
 +
* ...
 +
 +
Example (Endgame Save (Dread King defeated)):
 +
<div style="white-space:nowrap; overflow:hidden; font-family:courier;border:2px solid gray; margin:1em; padding:1em; background:black; color:rgb(200,200,200);width:auto;">
 +
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:rgb(128,128,128); border-bottom:1px solid brown;">00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F</span><br />
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">000 </span>&nbsp;
 +
<span style="background:gray;">44 65 72 20 44 72 65 61 64 20 4B 69 6E 67 20 69</span> <span style="margin-left:1em;background:gray;">Save Game Name</span><br />
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">010 </span>&nbsp;
 +
<span style="background:gray;">73 74 20 62 65 73 69 65 67 74 20 2D 20 38 33 31</span><br />
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">020 </span>&nbsp;
 +
<span style="background:gray;">34 67 63 00 00 00 00 00</span> 00 00 00 00 00 00 00 00<br />
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">030 </span>&nbsp;
 +
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00<br />
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">040 </span>&nbsp;
 +
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00<br />
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">050 </span>&nbsp;
 +
00 00 00 00 00 00 00 00 00 00 <span style="background:CornflowerBlue">44 69 65 20 73 63</span> <span style="margin-left:1em;background:CornflowerBlue">Suggested Save Name</span><br />
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">060 </span>&nbsp;
 +
<span style="background:CornflowerBlue">68 77 61 72 7A 65 20 50 79 72 61 6D 69 64 65 00</span><br />
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">070 </span>&nbsp;
 +
<span style="background:CornflowerBlue">00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00</span><br />
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">080 </span>&nbsp;
 +
<span style="background:CornflowerBlue">00 00</span> 00 00 00 00 00 00 00 00 00 00 00 00 00 00<br />
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">090 </span>&nbsp;
 +
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00<br />
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">0A0 </span>&nbsp;
 +
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00<br />
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">0B0 </span>&nbsp;
 +
00 00 00 00 00 00 00 00 01 00 00 00 <span style="background:purple;">3A 00 00 00</span> <span style="margin-left:1em;background:purple;">WHMTG Program Counter</span><br />
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">0C0 </span>&nbsp;
 +
48 00 00 00 <span style="background:CadetBlue;">90 3D 4C 00</span> <span style="background:DarkGreen;">70 CE 4C 00</span> <span style="background:DarkBlue;">01 00 00 00</span> <span style="margin-left:1em;background:CadetBlue;">Entrypoint</span> <span style="background:DarkGreen;">Selected Choice</span> <span style="background:DarkBlue;">LV?</span><br />
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">0D0 </span>&nbsp;
 +
01 00 00 00 <span style="background:brown;">10 00 00 00</span> 00 00 00 00 00 00 00 00 <span style="margin-left:1em;background:brown;">Stack Pointer</span><br />
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">0E0 </span>&nbsp;
 +
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00<br />
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">0F0 </span>&nbsp;
 +
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00<br />
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">100 </span>&nbsp;
 +
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00<br />
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">110 </span>&nbsp;
 +
00 00 00 00 07 00 00 00 2E 00 00 00 01 00 00 00<br />
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">120 </span>&nbsp;
 +
25 0A 00 00 55 00 00 00 <span style="background:DarkSlateGray;">01 00 00 00</span> <span style="background:GoldenRod;color:black;">02 00 00 00</span> <span style="margin-left:1em;background:DarkSlateGray;">WHMTG If Nestlevel</span> <span style="background:GoldenRod;color:black;">GoSub Nestlevel</span><br />
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">130 </span>&nbsp;
 +
<span style="background:Indigo;">01 00 00 00</span> 00 00 00 00 CA 94 47 02 39 00 00 00 <span style="margin-left:1em;background:Indigo;">Loop Nestlevel</span><br />
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">140 </span>&nbsp;
 +
01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00<br />
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">150 </span>&nbsp;
 +
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00<br />
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">160 </span>&nbsp;
 +
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00<br />
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">170 </span>&nbsp;
 +
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00<br />
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">180 </span>&nbsp;
 +
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00<br />
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">190 </span>&nbsp;
 +
00 00 00 00 00 00 00 00 <span style="background:DarkRed;">01 00 00 00</span> <span style="background:SteelBlue;color:white;">01 00 00 00</span> <span style="margin-left:1em;background:DarkRed;">Bogenhafen</span> <span style="background:SteelBlue;color:white;">Goblin or Ragnar</span><br />
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">1A0 </span>&nbsp;
 +
<span style="background:green;">01 00 00 00</span> <span style="background:RoyalBlue;">01 00 00 00</span> <span style="background:DarkSlateGray;color:White;">01 00 00 00</span> <span style="background:Gainsboro;color:black;">00 00 00 00</span> <span style="margin-left:1em;background:green;">Goblin Camp</span> <span style="background:RoyalBlue;">Pre-Ragnar</span> <span style="background:DarkSlateGray;color:White;">Ving. or Treeman</span> <span style="background:Gainsboro;color:black;">Ving.</span><br />
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">1B0 </span>&nbsp;
 +
<span style="background:blue;">01 00 00 00</span> <span style="background:Orange;color:black;">01 00 00 00</span> <span style="background:Pink;color:black;">01 00 00 00</span> <span style="background:DarkKhaki;color:white;">01 00 00 00</span> <span style="margin-left:1em;background:blue;">Treeman</span> <span style="background:Orange;color:black;">Carstein</span> <span style="background:Pink;color:black;">Nagash</span> <span style="background:DarkKhaki;color:white;">Grail Killed</span><br />
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">1C0 </span>&nbsp;
 +
00 00 00 00 <span style="background:Green;">01 00 00 00</span> <span style="background:CornflowerBlue;">01 00 00 00</span> <span style="background:purple;">01 00 00 00</span> <span style="margin-left:1em;background:Green;">Helmgart</span> <span style="background:CornflowerBlue;">Ragnar</span> <span style="background:purple;">Loren King met</span><br />
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">1D0 </span>&nbsp;
 +
<span style="background:CadetBlue;">01 00 00 00</span> 00 00 00 00 00 00 00 00 00 00 00 00 <span style="margin-left:1em;background:CadetBlue;">Axebite Mission</span><br />
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">1E0 </span>&nbsp;
 +
00 00 00 00 00 00 00 00 00 00 00 00 <span style="background:DarkGreen;">01 00 00 00</span> <span style="margin-left:1em;background:DarkGreen;">Related to Mission result</span><br />
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">1F0 </span>&nbsp;
 +
<span style="background:DarkGreen;">01 00 00 00 01 00 00 00</span><br />
 +
</p>
 +
</div>
 +
 +
It looks like the savegame header uses "32bit Booleans" to determine what kind of events happened.
 +
 +
From 0xBC to 0x198 is a 220 Byte copy of the internal struct of the WHMTG-Scriptengine. It's directly followed by a struct I call Game Progress, it fills the rest (60 bytes) of the Savegame header and contains the variables referenced by the WHMTG-Script.
 +
 +
==Savegame Footer==
 +
 +
The footer has a size of 13788 Bytes (Trivia: A larger footer will prevent Dark Omen from detecting the file as a savegame)
 +
 +
It contains information where the animated objects (like burning torches) are placed on the last talk screen.
==Regiment data==
==Regiment data==
 +
 +
:'''For a complete list of all Dark Omen regiments, see [http://dev.dark-omen.org/regimentdata.html Regiment List]'''
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:
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:
-
<div style="white-space:nowrap; overflow:hidden; font-family:courier;border:2px solid gray; margin:1em; padding:1em; background:black; color:rgb(200,200,200);width:auto;">
 
-
<p><span style="background:gray;">10 00</span> 00 00 <span style="background:CornflowerBlue">81 00</span> 00 00 <span style="background:purple;">00</span> <span style="background:CadetBlue;">00</span> <span style="background:DarkGreen;">00 00</span>  <span style="background:DarkBlue;">D5</span> 00 00 00 <span style="margin-left:1em;background:gray;">regiment status</span> <span style="background:CornflowerBlue">Unique Unit ID</span> <span style="background:purple;">Mage type</span> <span style="background:CadetBlue;">armour</span> <span style="background:DarkGreen;">cost</span> <span style="background:DarkBlue;">banner</span><br />
 
-
<span style="background:brown;">20 00 00 00</span> <span style="background:DarkSlateGray;">30</span> 00 <span style="background:GoldenRod;color:black;">4E 69 67 68 74 20 47 6F 62 6C</span> <span style="margin-left:1em;background:brown;">Regiment attributes</span> <span style="background:DarkSlateGray;">sprite</span> <span style="background:GoldenRod;color:black;">Unit name</span><br />
+
<div style="white-space:nowrap; overflow:hidden; font-family:courier;border:2px solid olive; margin:1em; padding:1em; background:black; color:rgb(200,200,200);width:auto;">
-
<span style="background:GoldenRod;color:black;">69 6E 73 20 23 31 00 00 00 00 00 00 00 00 00 00<br />
+
<p>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:rgb(128,128,128); border-bottom:1px solid brown;">00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F</span><br />
-
00 00 00</span> 00 00 00 <span style="background:Indigo;">21</span> 00 <span style="background:DarkRed;">80</span> <span style="background:SteelBlue;"><span style="color:white;">1B</span> <span style="color:yellow;">1B</span> <span style="color:Cyan;">05</span></span> 00 00 00 00 <span style="margin-left:1em;background:Indigo;">name ID</span> <span style="background:DarkRed;">alignment</span> <span style="background:SteelBlue;"><span style="color:white;">max units</span> <span style="color:yellow;">alive units</span> <span style="color:Cyan;">ranks</span></span><br />
+
<span style="color:rgb(128,128,128); border-right:1px solid brown;">00 </span>&nbsp;<span style="background:gray;">10 00</span> 00 00 <span style="background:CornflowerBlue">81 00</span> 00 00 <span style="background:purple;">00</span> <span style="background:CadetBlue;">00</span> <span style="background:DarkGreen;">00 00</span>  <span style="background:DarkBlue;">D5 00</span> 00 00 <span style="margin-left:1em;background:gray;">regiment status</span> <span style="background:CornflowerBlue">Unique Unit ID</span> <span style="background:purple;">Mage type</span> <span style="background:CadetBlue;">max armour</span> <span style="background:DarkGreen;">cost</span> <span style="background:DarkBlue;">banner</span><br />
 +
 
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">10 </span>&nbsp;<span style="background:brown;">20 00 00 00</span> <span style="background:DarkSlateGray;">30 00</span> <span style="background:GoldenRod;color:black;">4E 69 67 68 74 20 47 6F 62 6C</span> <span style="margin-left:1em;background:brown;">Regiment attributes</span> <span style="background:DarkSlateGray;">sprite</span> <span style="background:GoldenRod;color:black;">Unit name</span><br />
 +
 
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">20 </span>&nbsp;<span style="background:GoldenRod;color:black;">69 6E 73 20 23 31 00 00 00 00 00 00 00 00 00 00<br />
 +
 
 +
<span style="background:black;"> <span style="color:rgb(128,128,128); border-right:1px solid brown;">30 </span>&nbsp;</span>00 00 00 00 00 00</span> <span style="background:Indigo;">21 00</span> <span style="background:DarkRed;">80</span> <span style="background:SteelBlue;"><span style="color:white;">1B</span> <span style="color:yellow;">1B</span> <span style="color:Cyan;">05</span></span> 00 00 00 00 <span style="margin-left:1em;background:Indigo;">name ID</span> <span style="background:DarkRed;">alignment</span> <span style="background:SteelBlue;"><span style="color:white;">max units</span> <span style="color:yellow;">alive units</span> <span style="color:Cyan;">ranks</span></span><br />
 +
 
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">40 </span>&nbsp;<span style="background:green;">04 02 03 03 03 01 02 01 05</span> <span style="background:RoyalBlue;"><span style="color:white;">00</span> <span style="color:LightGray;">01</span> <span style="color:yellow;">01</span> <span style="color:Gold;">0B</span> <span style="color:LightCyan;">04</span> <span style="color:Cyan;">00</span></span> <span style="outline:2px dotted pink;">00</span> <span style="margin-left:1em;background:green;">Sldr attr</span> <span style="background:RoyalBlue;"><span style="color:white;">mount</span> <span style="color:LightGray;">armour</span> <span style="color:yellow;">weapon</span> <span style="color:Gold;">unit type</span> <span style="color:LightCyan;">point value</span> <span style="color:Cyan;">missile</span></span><br />
 +
 
 +
<span style="color:rgb(128,128,128); border-right:1px solid brown;">50 </span>&nbsp;<span style="outline:2px dotted pink;"><span style="outline:1px solid red;">01</span> 00 00 00</span> <span style="background:DarkSlateGray;color:White;">30 00</span> <span style="background:Gainsboro;color:black;">78 00 00 00 00 00 00 00 00 00</span> <span style="margin-left:1em;background:DarkSlateGray;color:White;">leader sprite</span> <span style="background:Gainsboro;color:black;">leader name</span> <span style="outline:1px dotted pink;"><b>5 byte filler</b></span><br />
-
<span style="background:green;">04 02 03 03 03 01 02 01 05</span> <span style="background:RoyalBlue;"><span style="color:white;">00</span> <span style="color:LightGray;">01</span> <span style="color:yellow;">01</span> <span style="color:Gold;">0B</span> <span style="color:LightCyan;">04</span> <span style="color:Cyan;">00</span></span> 00 <span style="margin-left:1em;background:green;">Sldr attr</span> <span style="background:RoyalBlue;"><span style="color:white;">mount</span> <span style="color:LightGray;">armour</span> <span style="color:yellow;">weapon</span> <span style="color:Gold;">unit type</span> <span style="color:LightCyan;">point value</span> <span style="color:Cyan;">missile</span></span><br />
+
<span style="color:rgb(128,128,128); border-right:1px solid brown;">60 </span>&nbsp;<span style="background:Gainsboro;color:black;">00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00</span><br />
-
<span style="outline:1px solid red;">01</span> 00 00 00 <span style="background:DarkSlateGray;color:White;">30</span> 00 <span style="background:Gainsboro;color:black;">78 00 00 00 00 00 00 00 00 00</span> <span style="margin-left:1em;background:DarkSlateGray;color:White;">leader sprite</span> <span style="background:Gainsboro;color:black;">leader name</span><br />
+
<span style="color:rgb(128,128,128); border-right:1px solid brown;">70 </span>&nbsp;<span style="background:Gainsboro;color:black;">00 00 00 00 00 00</span> 00 00 00 00 00 00 00 00 00 <span style="background:blue;">04</span> <span style="margin-left:1em;background:blue;">Leader attributes</span><br />
-
<span style="background:Gainsboro;color:black;">00 00 00 00 00 00 00 00 00 00 00</span> 00 00 00 00 00 <br />
+
-
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 <span style="background:blue;">04</span> <span style="margin-left:1em;background:blue;">Leader attributes</span><br />
+
-
<span style="background:blue;">03 04 04 03 01 03 02 05</span> <span style="background:RoyalBlue;"><span style="color:black;">00</span> <span style="color:White;">01</span> <span style="color:LightGray;">01</span> <span style="color:black;">00</span> <span style="color:black;">00</span> <span style="color:LightCyan;">00</span></span> 00 00 <span style="margin-left:1em;background:RoyalBlue;"><span style="color:black;">ld.mnt</span> <span style="color:White;">ld.armr</span> <span style="color:LightGray;">ld.wpn</span> <span style="color:black;">ld.tpe</span> <span style="color:black;">ld.pnt</span> <span style="color:LightCyan;">ld.mssl</span></span><br />
+
<span style="color:rgb(128,128,128); border-right:1px solid brown;">80 </span>&nbsp;<span style="background:blue;">03 04 04 03 01 03 02 05</span> <span style="background:RoyalBlue;"><span style="color:black;">00</span> <span style="color:White;">01</span> <span style="color:LightGray;">01</span> <span style="color:black;">00</span> <span style="color:black;">00</span> <span style="color:LightCyan;">00</span></span> <span style="outline:2px dotted pink;">00 00</span> <span style="margin-left:1em;background:RoyalBlue;"><span style="color:black;">ld.mnt</span> <span style="color:White;">ld.armr</span> <span style="color:LightGray;">ld.wpn</span> <span style="color:black;">ld.tpe</span> <span style="color:black;">ld.pnt</span> <span style="color:LightCyan;">ld.mssl</span></span> <span style="outline:1px dotted pink;"><b>4 byte filler</b></span><br />
-
<span style="outline:1px solid red;">00</span> 00 <span style="background:SaddleBrown;">89</span> 00 <span style="background:DarkKhaki;color:white;">00 00 00 00</span> <span style="background:DarkKhaki;color:yellow;">00 00 00 00</span> <span style="background:DarkGreen;">B8 0B</span> <span style="background:Orange;color:black;">00</span> <span style="background:Pink;color:black;">00</span> <span style="margin-left:1em;background:SaddleBrown;">Leader 3D head</span> <span style="background:DarkKhaki;color:white;">X position</span> <span style="background:DarkKhaki;color:yellow;">Z position</span> <span style="background:DarkGreen;">XP</span> <span style="background:Orange;color:black;">Dupl ID</span> <span style="background:Pink;color:black;">Min armour</span><br />
+
<span style="color:rgb(128,128,128); border-right:1px solid brown;">90 </span>&nbsp;<span style="outline:2px dotted pink;"><span style="outline:1px solid red;">00</span> 00</span> <span style="background:SaddleBrown;">89 00</span> <span style="background:DarkKhaki;color:white;">00 00 <span style="color:yellow;">00 00</span> 00 00 <span style="color:yellow;">00 00</span></span> <span style="background:DarkGreen;">B8 0B</span> <span style="background:Orange;color:black;">00</span> <span style="background:Pink;color:black;">00</span> <span style="margin-left:1em;background:SaddleBrown;">Leader 3D head</span> <span style="background:DarkKhaki;color:white;">Lost units <span style="color:yellow">Unk.</span> Killed <span style="color:yellow">Exp.</span></span> <span style="background:DarkGreen;">XP</span> <span style="background:Orange;color:black;">Dupl ID</span> <span style="background:Pink;color:black;">Min armour</span><br />
-
<span style="background:DarkGoldenRod;">FF FF</span> <span style="outline:1px solid green;background:DarkGreen;"><span style="background:Green;">FF FF</span> FF FF <span style="background:Green;">FF FF</span> FF FF <span style="background:Green;">FF FF</span> FF FF <span style="background:Green;">FF FF</span></span> <span style="margin-left:1em;background:DarkGoldenRod;">magic book</span> <span style="outline:1px solid green;background:DarkGreen;">item slots</span> <br />
+
<span style="color:rgb(128,128,128); border-right:1px solid brown;">A0 </span>&nbsp;<span style="background:DarkGoldenRod;">FF FF</span> <span style="outline:1px solid green;background:DarkGreen;"><span style="background:Green;">FF FF</span> FF FF <span style="background:Green;">FF FF</span> FF FF <span style="background:Green;">FF FF</span> FF FF <span style="background:Green;">FF FF</span></span> <span style="margin-left:1em;background:DarkGoldenRod;">magic book</span> <span style="outline:1px solid green;background:DarkGreen;">item slots</span> <br />
-
<span style="outline:1px solid green;background:DarkGreen;">FF FF</span> 00 00 <span style="outline:1px solid red;">00</span> 00 <span style="outline:1px solid red;">00</span> <span style="background:blue;">00</span> 00 00 00 00 .. .. .. .. <span style="margin-left:1em;background:blue;">Book profile</span><br />
+
<span style="color:rgb(128,128,128); border-right:1px solid brown;">B0 </span>&nbsp;<span style="outline:1px solid green;background:DarkGreen;">FF FF</span> 00 00 <span style="outline:1px solid red;">00</span> 00 <span style="outline:1px solid red;">00</span> 00 <span style="background:blue;">00 00 00 00</span> .. .. .. .. <span style="margin-left:1em;background:blue;">Book profile</span><br />
</p>
</p>
</div>
</div>
-
: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 <a href="/do/Sprites" title="Sprites">Sprites</a>.
+
: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" style="empty-cells:hide; border-collapse:separate;"
 +
! Data attribute !! Offset !! Byte size !! Notes !!
 +
|-
 +
| Status || 0 || 2 || &nbsp; ||
 +
|- style="color:gray"
 +
| ''unknown'' || 2 || 2 || Seems to be unused ||
 +
|-
 +
| Unique Unit ID || 4 || 2 || see [[DO/List_of_UUIDs]] & [[DO/List_of_Multiplayer_UUIDs]] ||
 +
|- style="color:gray"
 +
| ''unknown'' || 6 || 2 || Seems to be unused ||
 +
|-
 +
| Wizard type || 8 || 1 || &nbsp; ||
 +
|-
 +
| Max Armour || 9 || 1 || &nbsp; ||
 +
|-
 +
| Cost || 10 || 2 || &nbsp; ||
 +
|-
 +
| Banner || 12 || 2 || &nbsp; ||
 +
|- style="color:gray"
 +
| ''unknown'' || 13 || 2 || Seems to be unused ||
 +
|-
 +
| Regiment attributes || 16 || 4 || &nbsp; ||
 +
|- style="border-top:2px solid darkgreen; background:rgb(200,225,200);"
 +
| Sprite || 20 || 2 || &nbsp; || rowspan="15" style="background:darkgreen; color:yellow; outline: 2px solid green; text-align:center;" | Unit sub-record for rank-and-file <br>59 bytes
 +
|- style="background:rgb(200,225,200);"
 +
| Regiment Name || 22 || 32 || Zero-terminated (or DO crashes)
 +
|- style="background:rgb(200,225,200);"
 +
| Name ID || 54 || 2 || &nbsp;
 +
|- style="background:rgb(200,225,200);"
 +
| Alignment || 56 || 1 ||  &nbsp;
 +
|- style="background:rgb(200,225,200);"
 +
| Max units || 57 || 1 ||  &nbsp;
 +
|- style="background:rgb(200,225,200);"
 +
| Alive units || 58 || 1 ||  &nbsp;
 +
|- style="background:rgb(200,225,200);"
 +
| Ranks || 59 || 1 ||  &nbsp;
 +
|- style="color:gray; background:rgb(200,225,200);"
 +
| ''unknown'' || 60 || 4 || Seems to be unused
 +
|- style="background:rgb(200,225,200);"
 +
| Rank-and-file stats || 64 || 9 ||  &nbsp;
 +
|- style="background:rgb(200,225,200);"
 +
| Mount || 73 || 1 ||  &nbsp;
 +
|- style="background:rgb(200,225,200);"
 +
| Armour || 74 || 1 || &nbsp;
 +
|- style="background:rgb(200,225,200);"
 +
| Weapon || 75 || 1 ||  &nbsp;
 +
|- style="background:rgb(200,225,200);"
 +
| Unit type || 76 || 1 ||  &nbsp;
 +
|- style="background:rgb(200,225,200);"
 +
| Point value || 77 || 1 ||  &nbsp;
 +
|- style="border-bottom:2px solid darkgreen; background:rgb(200,225,200);"
 +
| Missile weapon || 78 || 1 ||  &nbsp;
 +
|-
 +
| ''unknown'' || 79 || 1 || '''Unknown data''' ||
 +
|- style="color:gray"
 +
| ''unknown'' || 80 || 3 || Seems to be unused ||
 +
|- style="border-top:2px solid darkred; background:rgb(225,215,205);"
 +
| Leader sprite || 84 || 2 || &nbsp; || rowspan="10" style="background:darkred; color:yellow; outline:2px solid red; text-align:center;" | Unit sub-record for regiment leader<br>59 bytes
 +
|- style="background:rgb(225,215,205);"
 +
| Leader name || 86 || 32 || Zero-terminated (or DO crashes)
 +
|- style="background:rgb(225,215,205);"
 +
| ''block of zeroes'' || 118 || 9 || Covers the name ID, align, ranks etc regiment data
 +
|- style="background:rgb(225,215,205);"
 +
| Leader stats || 127 || 9 ||  &nbsp;
 +
|- style="background:rgb(225,215,205);"
 +
| Mount || 136 || 1 || Unused == 0 for leader
 +
|- style="background:rgb(225,215,205);"
 +
| Armour || 137 || 1 ||  &nbsp;
 +
|- style="background:rgb(225,215,205);"
 +
| Weapon || 138 || 1  ||  &nbsp;
 +
|- style="background:rgb(225,215,205);"
 +
| Unit type || 139 || 1 || Only used for fanatics
 +
|- style="background:rgb(225,215,205);"
 +
| Point value || 140 || 1 || Only used for fanatics
 +
|- style="border-bottom:2px solid darkred; background:rgb(225,215,205);"
 +
| Missile weapon || 141 || 1 ||  &nbsp;
 +
|- 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 ||
 +
|- style="background:rgb(205,215,225);"
 +
| Leader 3D Head ID || 146 || 2 || &nbsp; || rowspan="3" style="outline:2px solid blue; background:rgb(128,128,172); color:yellow;"| Unit leader 3D head data
 +
|- style="background:rgb(205,215,225);"
 +
| X-Pos || 148 || 4 || Tested - Not working
 +
|- style="background:rgb(205,215,225);"
 +
| Y-Pos || 152 || 4 || Tested - Not working
 +
|-
 +
| Experience || 156 || 2 || &nbsp; ||
 +
|-
 +
| Duplicate ID || 158 || 1 || &nbsp; ||
 +
|-
 +
| Base (minimum) armour || 159 || 1 || &nbsp; ||
 +
|-
 +
| Magic book || 160 || 2 || &nbsp; ||
 +
|-
 +
| Magic item slots || 162 || 6 || 3 slots á 2 bytes ||
 +
|-
 +
| ''reserved space'' || 168 || 10 || Five unusable item slots.<br>It's likely that they are used during the battle<br> to store the spells of a mage.||
 +
|-
 +
| Bought Armor || 180 || 1 || Temporary used in Army Editor: Contains number of new bought (red) armor
 +
|-
 +
| Max Buyable Armor || 181 || 1 || Temporary used in Army Editor: Contains Max Armor - Current Armor
 +
|-
 +
| Rebought Troops || 182 || 1 || Temporary used in Army Editor: Contains number of rebought troops
 +
|-
 +
| Max Buyable Troops || 183 || 1 || Temporary used in Army Editor: Contains Max - Current Troops
 +
|-
 +
| Book profile || 184 || 4 || &nbsp; ||
 +
|-
 +
|}
-
==Soldier and leader attributes==
+
==Soldier and leader Character Attributes==
 +
{{see|The Warhammer Attributes}}
 +
The attributes for rank-and-file and leader units are nine bytes in the following order:
 +
# Movement
 +
# Weapon Skill
 +
# Ballistic Skill
 +
# Strength
 +
# Toughness
 +
# Wounds
 +
# Initiative
 +
# Attacks
 +
# Leadership
-
Mv WS BS S T W I A Ld (Movement, Weapon Skill, Ballistic Skill, Strength, Toughness, Wounds, Initiative, Attacks, Leadership)
+
For a complete listing of all data of every single unit in Dark Omen, see '''[http://dev.dark-omen.org/regimentdata.html this big honking list]''' (Warning! 800KB of pure table madness!).
==Regiment attributes==
==Regiment attributes==
Line 70: Line 355:
-
[[Category: Modifications]]
+
[[Category: Modifications|ARM]]
 +
[[Category: File Formats]]

Current revision as of 22:19, 19 July 2011

.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 multi-platform Wh32Edit.

Contents


Layout overview

The .ARM format is a binary format, the layout of which is very simple from a large-scale perspective: It starts with a 192 bytes header, which is followed by several 188-byte regiment records.

Header

The header of a army-file has a size of 192 bytes. Example (Allied1.arm):

    00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00  9E 02 00 00 04 00 00 00 BC 00 00 00 01 00 00 00 670 No. of Units Size of Unit (188bytes) Race (see below)
10  15 00 00 F8 02 00 E6 83 03 00 65 00 00 00 00 00 Default Name Regiment Name
20  00 00 00 00 90 20 52 F7 35 01 39 01 02 00 79 00
30  00 00 5B 42 4F 4F 4B 53 5D 5C 68 73 68 69 65 6C Path+Name of Small Banner Graphics File
40  64 2E 73 70 72 00 00 00 04 00 06 01 00 00 2A 01
50  E7 00 5B 42 4F 4F 4B 53 5D 5C 68 67 62 61 6E 2E Path+Name of Small Inactive Banner Graphics File
60  73 70 72 00 F7 11 AC F8 E7 05 42 00 56 16 04 00
70  C4 00 5B 42 4F 4F 4B 53 5D 5C 68 6C 62 61 6E 2E Path+Name of Large Banner Graphics File
80  73 70 72 00 4E 23 7F 17 08 03 B7 1F 67 1F 0C 05
90  44 00 FB 00 64 00 00 00 00 00 00 00 00 00 00 00 Money from Treasures Money Magic Items
A0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
B0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 DC 84 End of Header (not in every army file)

Value Race
0 Empire
1 Empire (Multiplayer)
2 Greenskin
3 Greenskin (Multiplayer)
4 Undead
5 Undead (Multiplayer)
Data attribute Offset Byte size Notes
File ID 0 4 Always 9E 02 00 00 for Dark Omen .ARM files
# regiments blocks 4 4  
Regiment block size 8 4 Always 188 in Dark Omen .ARM files
Race 12 1  
Unknown 13 3 Unknown data
Default Name 16 2 Used by the included Demo Armies, "Army Name" must be empty.
Army name 18 32 0-term string
Small banner bitmap file 50 32 0-term string (path + filename)
Small inactive banner bitmap 82 32 0-term string (path + filename)
Large banner bitmap file 114 32 0-term string (path + filename)
Money from Treasures 146 2 Used for "You collected x gold"-Text at summary screen
Gold in coffers 148 2 Available Gold
Magic items 150 40 One byte per item
Unknown 190 2 Often either DC 84 or 00 00

Savegame Header

A savegame is in short an army file with an additional header located before the army header (and with lots of unknown data after the regiment data)

The Save files (*.[0-9]{3}) header has a size of 504-byte. Most parts of it are unknown.

At least the following things must be in the Save file (if you find out where they are please mark them in the example):

  • Your current progress
  • Your success in defeating Manfred von Carstein (defines if Black Pyramide MB5_01 or MB5_01B are loaded at the end), the Hand of Nagash or the Black Grail (they will help the Dread King when you lose) - OT: Looks like CTL scripts can read savegame data or is this just a special parameter passed by the engine when loading the map?
  • Path you've choosen e.g. in Chapter 3 (Hand of Nagash): If you help Munz or Ragnar you will lose time and more undeads will attack you in the Hand of Nagash mission (is this confirmed? At least Matthias and Klaus say this)
  • Used/Killed/Lost Units (for the stats page displayed after the battle)
  • Play Time (maybe ^^)
  • ...

Example (Endgame Save (Dread King defeated)):

      00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
000   44 65 72 20 44 72 65 61 64 20 4B 69 6E 67 20 69 Save Game Name
010   73 74 20 62 65 73 69 65 67 74 20 2D 20 38 33 31
020   34 67 63 00 00 00 00 00 00 00 00 00 00 00 00 00
030   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
040   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
050   00 00 00 00 00 00 00 00 00 00 44 69 65 20 73 63 Suggested Save Name
060   68 77 61 72 7A 65 20 50 79 72 61 6D 69 64 65 00
070   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
080   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
090   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0A0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0B0   00 00 00 00 00 00 00 00 01 00 00 00 3A 00 00 00 WHMTG Program Counter
0C0   48 00 00 00 90 3D 4C 00 70 CE 4C 00 01 00 00 00 Entrypoint Selected Choice LV?
0D0   01 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 Stack Pointer
0E0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0F0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
100   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
110   00 00 00 00 07 00 00 00 2E 00 00 00 01 00 00 00
120   25 0A 00 00 55 00 00 00 01 00 00 00 02 00 00 00 WHMTG If Nestlevel GoSub Nestlevel
130   01 00 00 00 00 00 00 00 CA 94 47 02 39 00 00 00 Loop Nestlevel
140   01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
150   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
160   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
170   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
180   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
190   00 00 00 00 00 00 00 00 01 00 00 00 01 00 00 00 Bogenhafen Goblin or Ragnar
1A0   01 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 Goblin Camp Pre-Ragnar Ving. or Treeman Ving.
1B0   01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00 Treeman Carstein Nagash Grail Killed
1C0   00 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00 Helmgart Ragnar Loren King met
1D0   01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Axebite Mission
1E0   00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 Related to Mission result
1F0   01 00 00 00 01 00 00 00

It looks like the savegame header uses "32bit Booleans" to determine what kind of events happened.

From 0xBC to 0x198 is a 220 Byte copy of the internal struct of the WHMTG-Scriptengine. It's directly followed by a struct I call Game Progress, it fills the rest (60 bytes) of the Savegame header and contains the variables referenced by the WHMTG-Script.

Savegame Footer

The footer has a size of 13788 Bytes (Trivia: A larger footer will prevent Dark Omen from detecting the file as a savegame)

It contains information where the animated objects (like burning torches) are placed on the last talk screen.

Regiment data

For a complete list of all Dark Omen regiments, see Regiment List

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:


    00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00  10 00 00 00 81 00 00 00 00 00 00 00 D5 00 00 00 regiment status Unique Unit ID Mage type max armour cost banner
10  20 00 00 00 30 00 4E 69 67 68 74 20 47 6F 62 6C Regiment attributes sprite Unit name
20  69 6E 73 20 23 31 00 00 00 00 00 00 00 00 00 00
30  00 00 00 00 00 00
21 00 80 1B 1B 05 00 00 00 00 name ID alignment max units alive units ranks
40  04 02 03 03 03 01 02 01 05 00 01 01 0B 04 00 00 Sldr attr mount armour weapon unit type point value missile
50  01 00 00 00 30 00 78 00 00 00 00 00 00 00 00 00 leader sprite leader name 5 byte filler
60  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 Leader attributes
80  03 04 04 03 01 03 02 05 00 01 01 00 00 00 00 00 ld.mnt ld.armr ld.wpn ld.tpe ld.pnt ld.mssl 4 byte filler
90  00 00 89 00 00 00 00 00 00 00 00 00 B8 0B 00 00 Leader 3D head Lost units Unk. Killed Exp. XP Dupl ID Min armour
A0  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF magic book item slots
B0  FF FF 00 00 00 00 00 00 00 00 00 00 .. .. .. .. Book profile

For an explanation of values for sprite and leader sprite, see Sprites.
Data attribute Offset Byte size Notes
Status 0 2  
unknown 2 2 Seems to be unused
Unique Unit ID 4 2 see DO/List_of_UUIDs & DO/List_of_Multiplayer_UUIDs
unknown 6 2 Seems to be unused
Wizard type 8 1  
Max Armour 9 1  
Cost 10 2  
Banner 12 2  
unknown 13 2 Seems to be unused
Regiment attributes 16 4  
Sprite 20 2   Unit sub-record for rank-and-file
59 bytes
Regiment Name 22 32 Zero-terminated (or DO crashes)
Name ID 54 2  
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 2   Unit sub-record for regiment leader
59 bytes
Leader name 86 32 Zero-terminated (or DO crashes)
block of zeroes 118 9 Covers the name ID, align, ranks etc regiment data
Leader stats 127 9  
Mount 136 1 Unused == 0 for leader
Armour 137 1  
Weapon 138 1  
Unit type 139 1 Only used for fanatics
Point value 140 1 Only used for fanatics
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 2   Unit leader 3D head data
X-Pos 148 4 Tested - Not working
Y-Pos 152 4 Tested - Not working
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 10 Five unusable item slots.
It's likely that they are used during the battle
to store the spells of a mage.
Bought Armor 180 1 Temporary used in Army Editor: Contains number of new bought (red) armor
Max Buyable Armor 181 1 Temporary used in Army Editor: Contains Max Armor - Current Armor
Rebought Troops 182 1 Temporary used in Army Editor: Contains number of rebought troops
Max Buyable Troops 183 1 Temporary used in Army Editor: Contains Max - Current Troops
Book profile 184 4  

Soldier and leader Character Attributes

Further information: The Warhammer Attributes

The attributes for rank-and-file and leader units are nine bytes in the following order:

  1. Movement
  2. Weapon Skill
  3. Ballistic Skill
  4. Strength
  5. Toughness
  6. Wounds
  7. Initiative
  8. Attacks
  9. Leadership

For a complete listing of all data of every single unit in Dark Omen, see this big honking list (Warning! 800KB of pure table madness!).

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:

Races/Warhammer/Goblins/WHTT4

logo4thedminimalrn6.png

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:

Races/Warhammer/Elves/WHTT4

logo4thedminimalrn6.png

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:

Races/Warhammer/Wraiths/WHTT4

logo4thedminimalrn6.png

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.

Personal tools
communication