Mission files
MIS/MISS000.DAT ... MISS040.DAT
One file per campaign mission: scenario settings, the map, facilities, timed actions and deferred map changes.
A campaign mission is one MIS/MISS###.DAT file. A fixed header gives the offsets of five sections: MISS (scenario settings and rule tables), ACTN (the map: terrain, overlay and unit planes), SHOP (facilities and starting cargo), MAP\0 (timed actions: weather, announcements, win and loss rules) and DFxx (map changes applied later). All integers are little-endian. Every byte of the 24 shipped campaign files has a place in the layout; a few fields are still not understood, and the page says which.
File Header
Section offsets
4 fields · 16 bytes
MISS metadata section.
The four section offsets are not stored in file order: the file runs MISS, ACTN, SHOP, MAP, DFxx, back to back with no gaps, in all 24 shipped files.
data
MAP\0 action-record section.
data
SHOP place/facility section.
data
ACTN map-plane section.
data
Deferred layers
3 fields · 258 bytes
DFxx offset/size entries.
Almost every campaign file sets it to 1 (MISS023 uses 2), but a declared block is a real deferred layer only when its size is the 4-byte tag plus a whole number of 8-byte cell records. The other 16 missions point at an identical 114-byte placeholder DF00 block that carries no map change.
data
The value points at the layer's first cell record, just past its 4-byte DFxx tag, so the tag itself starts at value - 4. Only the first dfLayerCount entries are used; the rest of the 32 slots hold stray bytes (not zeros) and are ignored.
data
DFxx layer, tag included, in the same order as dfOffsetsPlus4.
Only the first dfLayerCount entries are used.
data
MISS Section
Identity
3 fields · 6 bytes
ENG/MISS###.TXT.
data
data
It matches the number in the file name MISS###.DAT for every file.
databehaviour
Sides
4 fields · 11 bytes
16, 19, 28 and 31.
Bit n stands for side n, so 16 is side 4 alone, 19 is sides 0, 1 and 4, 28 is sides 2, 3 and 4, and 31 is sides 0 to 4. When the game chooses a side automatically, a candidate side whose bit is set here is kept; otherwise the side from side_or_tail_pair_index is used instead. An explicitly chosen side skips the test. Which game event asks for automatic selection is not identified. It is not the list of sides in the mission: MISS000 has sides 0 and 1 but stores only side 4.
databehaviourrender
| bit | mask | name | meaning |
|---|---|---|---|
| 0 | 0x0001 | side 0 | Blue: the player in campaign missions. |
| 1 | 0x0002 | side 1 | Red. |
| 2 | 0x0004 | side 2 | Orange-yellow. |
| 3 | 0x0008 | side 3 | Olive green. |
| 4 | 0x0010 | side 4 | Grey-green. |
| 5 | 0x0020 | side 5never set in this field | Yellow. Owns units and facilities only in MISS035, 036, 037 and 040, so owner_side_mask sets it there; side_selection_mask never does. |
| 6 | 0x0040 | side 6never set in this field | Neutral (brown-grey): unowned buildings and units. |
| 7–15 | unused | Never set in any record. |
In 23 of the 24 missions it is exactly the set of sides, other than neutral side 6, that own units on the map; MISS037 differs (its units belong to sides 0, 3 and 5, while the mask lists 0, 1 and 3). When the construction list is built for a side whose bit is clear, a candidate is skipped. Other uses are open.
databehaviour
In every shipped mission it equals present_sides_mask with sides 0 and 5 removed, which suggests it lists the sides other than two player slots, though that reading is untested. Side 5 is used: MISS035, 036, 037 and 040 give it units and facilities. The game intersects it with unit and side masks in combat and action code; the exact selection policy depends on the caller.
databehaviour
For example MISS008 stores 0x04 in byte 0 and 0x01 in byte 2, so sides 0 and 2 are allied (each lists the other). Confirmed in play: MISS000 (AMPORGE) and MISS001 (JOGRWAI) have no alliances, and the tables are all zero; in MISS007 (OLARIBU) red (side 1) and green (side 3) are allied; in MISS008 (FITORGE) blue (side 0) and yellow (side 2) are allied, and red (side 1) and green (side 4) are allied. In all 24 files the table is symmetric, no side lists itself, and 14 of the 24 files have at least one alliance. The movement-range calculation compares the byte of the selected side with each unit's owner side when it filters units, and a game option gates part of that test. A MAP action of type 0x07 can change a row during play.
databehaviourplay
Campaign
3 fields · 6 bytes
9999 marks the final mission.
The shipped files form the campaign graph, including branch-style jumps such as MISS008 -> MISS031 and MISS029 -> 9999.
databehaviour
They are read: at mission setup the game hands the first byte to its resource lookup when it loads two kinds of resource, and the second byte for three others. Since every file stores 0, nothing is known about what a nonzero value would pick.
databehaviour
LIB/SNG000..003.LIB.
A long idle wait in a mission started its song once and requested no other.
databehaviour
Indexed pair
3 fields · 11 bytes
indexed_tail_bytes_a and indexed_tail_bytes_b.
It is 0 in 22 missions, 1 in MISS004 and 3 in MISS008. The game reads the entry it selects from each table, but nothing was found that uses the two values. The same byte also acts as a one-based side number in the automatic side choice described under side_selection_mask.
databehaviour
side_or_tail_pair_index.
The game reads the selected byte, but no use of it is established and the read may be vestigial. 22 missions store [0,5,4,2,3]; MISS026 and MISS029 store [6,5,4,2,3].
databehaviour
side_or_tail_pair_index, read like indexed_tail_bytes_a with no established use.
22 missions store [0,2,2,1,1]; MISS026 and MISS029 store [3,3,3,3,3].
databehaviour
Mission result
4 fields · 13 bytes
0x08..0x0e).
In the ordinary nonnegative range, a value above 1 requires at least that many; 0 or 1 requires a positive count. One-condition controls distinguish thresholds 1 and 2. At threshold 2, both live counts 2 and 3 complete successfully, but only count 2 reaches the campaign result panel in the tested controls. A separate failure flag can override the result.
databehaviour
On a gated mission-result path each nonzero byte is queued, in order, after the result report.
databehaviour
Neither its role nor its accepted range is established. Shipped values include numbers above the 54 unit class ids, so it is not a plain class id.
databehaviour
The game queues each nonzero byte in slot order after a mission-data loading step; the three slots are not distinct victory/failure categories. Whether they belong to the completed mission or the selected next mission remains unresolved. Only MISS000 has nonzero values in the shipped files.
databehaviour
Movement
2 fields · 64 bytes
It is indexed by the class bit of a terrain record's entry mask (see Terrain records and "Reference: terrain classes"), and the player-visible movement-range calculation reads it. All 24 shipped missions carry the same row, but because it sits in the mission file it is scenario data.
databehaviour
The game adds its base and overlay entries while building another range or influence map; that map's gameplay role is not named yet.
databehaviour
Combat
2 fields · 64 bytes
The game adds the rounded percentage of the side's current initiative. Fortification class bit 2 selects +90; minor-obstacle overlay bit 4 selects -30. All 24 shipped missions carry the same row. Difficulty can skip the calculation: Training ignores it. The selector tests class bits 0 through 22 from lowest to highest and returns the first match; if none is set it returns 0. Combat reads the overlay map view first and falls back to the base view when that cell is empty; those compact bytes select rows in the mission-local PART table, which weather reloads. See the terrain provenance probe.
databehaviour
Applied with the same rounding and gates as the initiative row. Fortification bit 2 selects +50; minor-obstacle overlay bit 4 selects +40. It changes weapon damage, while this routine leaves armour unchanged. All 24 shipped missions carry the same row. The selector tests class bits 0 through 22 from lowest to highest. Combat reads the overlay map view first and falls back to the base view when that cell is empty; those compact bytes select rows in the mission-local PART table, which weather reloads. See the terrain provenance probe.
databehaviour
Production
1 field · 128 bytes
Bit 0 admits a class to the generic factory construction list; bit 1 is additionally required when the construction list's side-mask condition is active. The words equal the game's own per-class flag field byte for byte.
databehaviour
| bit | mask | name | meaning |
|---|---|---|---|
| 0 | 0x0001 | factory list | The class may appear in the generic construction list. |
| 1 | 0x0002 | side condition | Also required when the construction list's side-mask condition is active. OLARIBU sets it for unit ids 3, 4, 6, 8, 10, 11, 12, 52. |
| 2–31 | not listed | No name recorded. |
Unknown / reserved
3 fields · 25 bytes
The game does not copy it with the seven bytes before it, and no use has been found.
databehaviour
data
No read or purpose has been established; reserved or padding is a possibility only.
data
ACTN Section
Header
2 fields · 4 bytes
databehaviour
databehaviour
Planes
3 fields
cell_count = width * height; row-major terrain tile ids.
datarender
width * height overlay tile ids; values < 1 are empty.
datarender
width * height unit words, row-major; 0xffff (-1) marks an empty cell.
A non-empty word packs the owning side and the unit class as (side_mask << 8) + unit_id: side_mask is a single bit (1 = side 0 ... 64 = side 6, neutral) and unit_id indexes the unit class table (see Unit class table). The word carries only class and owner, not strength, experience or ammunition.
datarenderbehaviour
SHOP Section
Header
1 field · 2 bytes
data
Records
1 field
Two record types share this layout; see ShopRecord.
datarender
ShopRecord
Type and place
6 fields · 12 bytes
1 and 2 occur in the 1,081 records.
Bit 0 selects the facility/carrier creation path (463 records); bit 1 selects the per-unit extension initialization path (618 records). This is not a unit-class id.
databehaviour
x + y * factor.
The factor is 64, or 256 when the map is wider or taller than 64.
data
0, 1, 2, 4, 8, 16, 32.
Zero occurs in all 618 type-2 unit annotations. On type-1 records the values read as facility kinds. These roles follow the map and the contents; whether the game accepts other values is not established.
datarenderbehaviour
| bit | mask | name | meaning |
|---|---|---|---|
| 0 | 0x0001 | HQ | Headquarters (33). |
| 1 | 0x0002 | airport or harbour | Where aircraft or ships are built and enter (135). |
| 2 | 0x0004 | depot | (14). |
| 3 | 0x0008 | academy | (38). |
| 4 | 0x0010 | city or village | (221). |
| 5 | 0x0020 | loaded transport | A carrier already holding cargo, not a building (22). |
| 6–15 | unused | Never set in any record. |
SHOP records.
The game passes it as a separate argument when it creates a facility; its meaning is open.
databehaviour
packed_position in all 465 base-game records whose last contents word is -1, and is zero in all 616 whose last word is 0.
Two of the 465 are type-2 records. This is a correlation, not evidence that the last contents word selects a record kind.
databehaviour
shop_mask; a unit may enter only when its mask has the matching bit.
One city in MISS036 stores zero. On the 22 loaded-transport records the high byte is zero and 13 have a nonzero low byte (1, 2, 32, 64, 128) whose purpose is not verified.
databehaviour
| bit | mask | name | meaning |
|---|---|---|---|
| 0 | 0x0001 | unnamed | Meaning unknown. Set in 1 of 1081. |
| 1 | 0x0002 | unnamed | Meaning unknown. Set in 1 of 1081. |
| 5 | 0x0020 | unnamed | Meaning unknown. Set in 1 of 1081. |
| 6 | 0x0040 | unnamed | Meaning unknown. Set in 9 of 1081. |
| 7 | 0x0080 | unnamed | Meaning unknown. Set in 1 of 1081. |
| 8 | 0x0100 | HQ | Headquarters. |
| 9 | 0x0200 | airport | |
| 10 | 0x0400 | harbour | |
| 11 | 0x0800 | factory | |
| 12 | 0x1000 | depot | |
| 13 | 0x2000 | city | |
| 14 | 0x4000 | academy | |
| 15 | 0x8000 | special facility | |
| 2–4 | unused | Never set in any record. |
Name and owner
2 fields · 4 bytes
ENG/MISS###.TXT.
data
On 461 of 463 type-1 facility/carrier records exactly one bit is set. Two exceptions use 0 (MISS036 city) and 192 (MISS035 record 14); their behaviour is unverified. All 618 type-2 unit annotations store zero here and take their owner from ACTN. The owner sets the building's palette tint.
datarender
| bit | mask | name | meaning |
|---|---|---|---|
| 0 | 0x0001 | side 0 | Blue: the player in campaign missions. |
| 1 | 0x0002 | side 1 | Red. |
| 2 | 0x0004 | side 2 | Orange-yellow. |
| 3 | 0x0008 | side 3 | Olive green. |
| 4 | 0x0010 | side 4 | Grey-green. |
| 5 | 0x0020 | side 5 | Yellow. Owns units and facilities only in MISS035, 036, 037 and 040, so owner_side_mask sets it there; side_selection_mask never does. |
| 6 | 0x0040 | side 6 | Neutral (brown-grey): unowned buildings and units. |
| 7 | 0x0080 | unnamed | Meaning unknown. Set in 1 of 1081. |
| 8–15 | unused | Never set in any record. |
Economy
6 fields · 10 bytes
The value can change during play; nonzero in 423 of 465 facility/cargo records.
databehaviour
The value can change during play; nonzero in 420 of 465 facility/cargo records.
databehaviour
That total is then copied to eligible buildings' energy mirrors. A normal owner1→owner2→owner1→owner2 sequence confirms repeated income at the owner's incoming turn.
databehaviour
A played turn on OLARIBU raised a factory's material from 16 to 20 with this byte at 4.
databehaviour
A capacity or state role is unverified.
databehaviour
There are 86 observed values from 0 to 940; 22 records have values not divisible by ten, including 45, 431, 835 and 896. No use of the word has been found. The owner is owner_side_mask at 0x40.
databehaviour
Contents
2 fields · 40 bytes
-1 marks an empty position and does not end the list. A facility reads all 16 positions, a loaded transport only the first eight. Position 16 (+0x30) is -1 in all 463 shipped type-1 records.
databehaviour
Zero entries are skipped, the normal side and energy/material checks still apply, and duplicates are not removed.
databehaviour
Unit extension (type 2)
4 fields · 8 bytes
0, 1, 2, 4, 8, 9, 12, 17, 18.
All 618 type-2 records point at occupied ACTN unit cells. The game copies the word into per-unit state; its later use is open.
databehaviour
0, 5, 6, 7, 10, 20; 10 occurs in 596 records.
The game stores it multiplied by 10 in per-unit state; its later use is open.
databehaviour
0, 105, 137, 342, 793, 1556, 1808, 2327, 2331.
Only eight records are nonzero. The game copies the word into per-unit state; its later use is open.
databehaviour
0, 4, 7, 794, 1350.
Only eleven records are nonzero. The game copies the word into per-unit state; its later use is open.
databehaviour
Unknown / reserved
1 field · 6 bytes
Reserved or padding is possible but not shown.
databehaviour
MAP Section
Records
1 field
action_record_count = (firstDfOffset - mapOffset - 4) / 40; the section ends where the first DFxx section begins.
Weather (type 0x02), announcement (type 0x03) and the terminal-rule types are confirmed in play. See "Reference: MAP action types and selectors".
databehaviour
MapActionRecord
Condition
3 fields · 6 bytes
0, 0x30, and 0x50.
On verified terminal records, 0x30 is a success condition and 0x50 is a failure condition.
databehaviour
+0x0c; second-pass scheduling requires signed entry turn <= signed manager turn +0x12.
Displayed turn conversion and request placement need a scenario binding. It is not equality scheduling or the hard turn limit.
databehaviour
+0x0a; second-pass scheduling requires signed entry event <= signed manager event +0x10.
Gameplay forecasts show zero at turn start and positive values deferred until action. Native event advances/resets separately from manager turn and web action history; not a side id or a Move count. Exact web request binding remains required.
databehaviour
Action
3 fields · 4 bytes
+0x0e.
The complete 41-byte helper returns the first set bit among 0..6 or signed -1; second-pass scheduling requires normalized stored selector <= normalized current owner mask. Combined masks choose their lowest bit. Corpus values are 0, 1, 2, 4 and 0x20. Terminal scanning ignores it.
databehaviour
Observed campaign types are 0x02, 0x03, 0x04, 0x07, 0x08, 0x09, 0x0a and 0x0c. See "Reference: MAP action types and selectors".
databehaviour
+0x06, the unsigned low sequence ceiling; entry +0x08 is its signed high word.
High < manager high, or equal high with low <= manager low, is the exact comparison. Value 100 occurs on 12 reports, zero elsewhere; it is not proved a duration. Automatic event/display binding remains separate.
databehaviour
Operands
4 fields · 8 bytes
Copied to entry +0x08, the signed high word of the sequence ceiling whose low word is entry +0x06. See the exact flow contract for the mixed signed/unsigned comparison.
databehaviour
0x04 DF index, 0x05/06/07 side number, 0x0d returned request word; type 0x02 weather state; type 0x03 ASCR scene id; type 0x07 side whose alliance row changes; type 0x08 target side; type 0x09 requested facility-owner side; type 0x0a maximum mission turn count; type 0x0c target unit class id.
databehaviourrender
0x05 signed energy delta, 0x06 native facility ordinal; 0x0900 native facility ordinal (not a universal SHOP-array index); 0x0c00 target unit side id.
For type 0x07, its low byte names the side bit to add to the first operand side's alliance row.
databehaviour
1, in MISS003.DAT MAP record 4 (0x0704).
For type 0x07, its low byte names the side bit to clear from the first operand side's movement-relation row; the original writer clears then adds. Type 0x06 uses the whole word as a facility-material addition. See the Q15 writer contract.
databehaviour
Unknown / reserved
2 fields · 22 bytes
The game copies them along with the rest of the record, so they may have a use; a nonzero test has not been run.
databehaviour
Padding is likely but not proven.
databehaviour
DFxx Layers
Header
1 field · 4 bytes
DF00, DF01 and so on.
data
Records
1 field
df_record_count = (df_size - 4) / 8.
datarender
DfCellRecord
Cell patch
4 fields · 8 bytes
Records run sequentially, including duplicate cells. The bounded at-most-64×64 profile binds x+y*64; arbitrary native dimensions remain separate.
databehaviour
No match keeps the current base byte; ffff normally has no row.
databehaviour
ff when no row matches.
-1 clears overlay. There is no all-minus-one special case.
databehaviour
ffff requests no creation.
Otherwise low byte is class and high byte is owner mask. Create through ordinary first-free 400-slot constructor only when occupancy saved before queued removal/facility cleanup was ffff; occupied cells skip creation. Successful return is stored as a full occupancy word.
databehaviour
Reference: terrain classes
Bit n of a terrain record's entry mask names a terrain class (see Terrain records). The four per-class rows in the MISS section (terrain_cost_table, auxiliary_terrain_cost_table, combat_initiative_percent_by_terrain_class and combat_damage_percent_by_terrain_class) are indexed by that bit. The values below are the row every shipped mission carries.
| Bit | Terrain class | Main cost | Auxiliary cost | Combat initiative % | Combat damage % |
|---|---|---|---|---|---|
| 0 | road | 0 | 0 | +50 | 0 |
| 1 | path | 8 | 0 | +30 | 0 |
| 2 | ditch | 20 | 4 | +90 | +50 |
| 3 | rail | 10 | 0 | 0 | 0 |
| 4 | minor obstacle | 16 | 4 | −30 | +40 |
| 5 | major obstacle | 20 | 16 | −10 | +30 |
| 6 | hill | 24 | 24 | −20 | +50 |
| 7 | mountain | 38 | 32 | −40 | +60 |
| 8 | slope | 26 | 8 | −15 | +25 |
| 9 | grassland | 12 | 0 | 0 | 0 |
| 10 | forest | 16 | 16 | −20 | +40 |
| 11 | hazard | 120 | 4 | −95 | −20 |
| 12 | water basin | 30 | 0 | −60 | −10 |
| 13 | mud | 32 | 0 | −40 | −30 |
| 14 | snow | 20 | 0 | −10 | −20 |
| 15 | rock in water | 16 | 4 | −10 | −10 |
| 16 | shallow water | 0 | 0 | 0 | 0 |
| 17 | medium water | 0 | 0 | 0 | 0 |
| 18 | deep water | 0 | 0 | 0 | 0 |
| 19 | unnamed | 8 | 0 | +40 | −10 |
| 20 | building | 120 | 16 | 0 | 0 |
| 21 | building (enterable) | 16 | 8 | 0 | +30 |
| 22 | building entrance | 0 | 16 | 0 | 0 |
| 23..31 | unused in shipped entry masks | 0 | 0 | 0 | 0 |
The class names describe common base-tile uses of each bit; they are not exclusive. The two cost columns are local threshold values, not amounts summed along a route. The two percentage columns are the raw mission values; difficulty decides whether they are applied.
Reference: MAP action types and selectors
The stored word 0xTTSS at bytes 0x06..0x07 of a MapActionRecord is the action type TT and the selector SS; 0x0201 and 0x0202 are the same type with different selectors, not separate subtypes. In the table, word[n] is the n-th 16-bit word of the 40-byte record: word[1] is turn, word[6] is action_param_b, word[7] is action_param_c and word[8] is action_param_d.
| Stored word | Count | Current role | Evidence in play | Notes |
|---|---|---|---|---|
0x0201 | 90 | global weather change, selector 1 | confirmed in play | word[6] selects the weather: 0 clear, 1 light rain, 2 heavy rain, 3 light snow, 4 heavy snow. All five states were seen in AMPORGE. Value 5 occurs three times in ULUARGE, but the game's weather routine rejects values outside 0..4 and leaves the weather unchanged. |
0x0202 | 3 | global weather change, selector 2 | type confirmed in play; selector 2 untested | WAGOPAY uses selector 2 with weather values 1, 2 and 0. Selector 2 has not been tested against selector 1 in play. |
0x0301 | 155 | mission announcement/report | confirmed in play | word[6] selects the animation script ASCR###; the script's write(...) calls select the ATXT### text archives. |
0x0320 | 13 | mission announcement/report, selector 0x20 | same shape as 0x0301; selector difference untested | The same script-selection field as selector 1; the difference between the selectors has not been tested. |
0x0401 | 7 | deferred DF-layer activation, selector 1 | original executable bytes | Activates a DFxx layer: word[1] is the turn and word[6] the layer index. These 7 actions cover 7 of the 9 genuine layers; ULUARGE and DAFATWA have a layer with no activation record. No placeholder-layer mission has one. |
0x0704 | 1 | alliance change for one side, selector 4 | not tested in play | Seen once, in MISS003.DAT record 4 at turn 16. Type 0x07 selects the side row from word[6], clears the bit for word[8] and adds the bit for word[7] in the table at alliances. The stored values 2, 0, 1 therefore take side 1 out of side 2's row and add side 0 (already there): side 2 stops being allied with side 1 and stays with side 0. A player-visible test is open. |
0x0800 | 14 | side-elimination terminal condition | confirmed in play | word[6] is the target side; true when no active unit of that side has class bit 29 clear. Contained units count; strength is not tested. Category 0x30 is success, category 0x50 is failure. |
0x0900 | 56 | facility-ownership terminal condition | confirmed in play | word[6] is the requested owner side and word[7] the SHOP record index; the condition tests plain ownership of any facility. Category 0x30 is success, category 0x50 is failure. |
0x0a00 | 19 | mission turn-limit failure condition | confirmed in play | Category 0x50. word[6] is the maximum mission turn count (campaign values 15..60) and word[7] is zero. The exact predicate is signed native manager turn >= signed B. Visible-turn conversion needs a counted-turn/context binding. |
0x0a01 | 1 | mission turn-limit failure condition, selector 1 | confirmed in play | Category 0x50. The same dispatched type as 0x0a00; the only one is in MISS015.DAT with word[6] = 35. |
0x0c00 | 5 | matching-unit terminal condition | confirmed in play; polarity depends on the category | word[6] is a unit class and word[7] its side. Category 0x30 is a destroy-all-matching-units success rule, and repeated blocks are separate one-shot counted conditions; mission threshold controls the aggregate result. Category 0x50 reads as a protect rule that fails when the matching units die; it still needs a normal-combat replay. |
Example: an announcement in AMPORGE
MIS/MISS000.DAT is the first campaign mission, AMPORGE. Its MAP\0 section starts at the offset in the header word mapOffset (0x0c60 in this file), and each action record is 40 bytes after the 4-byte tag. Record 3 is the fourth: it starts at 0x0c60 + 4 + 3 x 40. Each line is one field: its offset in the record, its bytes as stored, and the value they decode to.
0x00 00 00 category_or_scope = 0
0x02 00 00 turn = 0
0x04 00 00 trigger_group_or_side = 0
0x06 01 action_selector = 1
0x07 03 action_type = 0x03: announcement
0x08 64 00 duration_or_count = 100
0x0a 00 00 action_param_a = 0
0x0c 11 00 action_param_b = 17: animation script ASCR017
0x0e 00 00 action_param_c = 0
0x10 00 00 action_param_d = 0
0x12 00 00 00 00 00 00 copied_zero_action_words = 0, 0, 0
0x18 00 00 00 00 00 00 00 00 00 00 00 00 ... unread_map_record_tail = 0 (16 bytes)
The stored word at 0x06 reads 0x0301: type 0x03, selector 1. The record fires at turn 0, so the announcement plays as the mission opens. It names script ASCR017 in action_param_b; that script shows General Odan's contact message. Record 4 has the same shape with script ASCR019, the objective briefing. A condition record such as record 1 (50 00 ... 08 00) has category 0x50 and type 0x08; it is a failure rule that names side 0, the player.
Example: a neutral city in AMPORGE
The same mission's SHOP section holds three records. Record 0 starts at shopOffset + 6 and is 80 bytes long. It is a type-1 record: a facility, here a city.
0x00 01 00 record_type_flags = 1: facility
0x02 d5 00 packed_position = 213: x 21, y 3
0x04 10 00 shopFunction = 0x0010: city or village
0x06 00 00 facility_creation_arg = 0
0x08 02 00 nameId = 2
0x0a d5 00 active_packed_position_copy = 213
0x0c 14 00 initial_energy = 20
0x0e 1e 00 initial_material = 30
0x10 08 facility_energy_increment = 8
0x11 04 facility_material_increment = 4
0x12 ff ff ff ff ff ff ff ff ff ff ff ff ... contents_slots = -1 x 16 (empty)
0x32 00 20 facility_or_carrier_category = 0x2000: city
0x34 00 00 00 00 00 00 00 00 construction_unit_ids = 0, 0, 0, 0
0x3c 00 00 capacity_state = 0
0x3e 2c 01 unidentified_facility_word_3e = 300
0x40 40 00 owner_side_mask = 0x0040: side 6, neutral
0x42 00 00 00 00 00 00 zero_extension_words = 0, 0, 0
0x48 00 00 type2_extension_word_0 = 0
0x4a 00 00 type2_extension_word_1 = 0
0x4c 00 00 type2_extension_word_2 = 0
0x4e 00 00 type2_extension_word_3 = 0
The position 213 is 3 x 64 + 21, since the map is no wider or taller than 64. Nobody owns the city, so its side is the neutral side 6, and a plain city builds nothing: all four extra unit ids are zero and all sixteen contents positions are empty. It still produces: each turn it adds 8 energy and 4 material. The three type-2 words are unused here because they apply only to type-2 records, which annotate units already on the map.
Still to investigate
Every field marked unknown or partial above, and every bit that is set without a name or named without ever being set.
- side_selection_mask◐A mask over sides, shipped as
16,19,28and31. Bit 5 (side 5), Bit 6 (side 6) are named but never set. MISS Section - side_or_tail_pair_index◐Selects an entry from each of the five-byte tables
indexed_tail_bytes_aandindexed_tail_bytes_b. MISS Section - present_sides_mask◐A mask over sides: the sides that take part. MISS Section
- mission_side_mask◐A mask over sides. MISS Section
- resource_selector_pair◐Both bytes are zero in all 24 shipped missions. MISS Section
- intro_byte_1b○Zero in all 24 shipped missions. MISS Section
- auxiliary_terrain_cost_table◐A second per-terrain-class cost row. MISS Section
- indexed_tail_bytes_a◐Five bytes, one per value of
side_or_tail_pair_index. MISS Section - tail_byte_129◐Passed to a lookup in a later step. MISS Section
- indexed_tail_bytes_b◐Five bytes, one per value of
side_or_tail_pair_index, read likeindexed_tail_bytes_awith no established use. MISS Section - tail_script_ids_b◐Three optional animation-script ids. MISS Section
- unknown_tail_payload○Zero in all 24 shipped missions. MISS Section
- facility_records◐40 signed words per record. SHOP Section
- shopFunction◐Observed values are
0, 1, 2, 4, 8, 16, 32. ShopRecord - facility_creation_arg◐Zero in all 1,081 nonempty campaign
SHOPrecords. ShopRecord - active_packed_position_copy◐A second copy of the position: it equals
packed_positionin all 465 base-game records whose last contents word is-1, and is zero in all 616 whose last word is0. ShopRecord - initial_energy◐The facility's starting energy limit, read when the construction list is built. ShopRecord
- initial_material◐The facility's starting material limit, read when the construction list is built. ShopRecord
- facility_or_carrier_category◐On 440 of 441 building records the high byte is one facility-category bit, the same vocabulary as the unit class
shop_mask; a unit may enter only when its mask has the matching bit. Bits 0–1, 5–7 are set but unnamed. ShopRecord - capacity_state◐Zero in all 1,081 nonempty campaign records. ShopRecord
- unidentified_facility_word_3e◐An unidentified word that is not the owner. ShopRecord
- owner_side_mask◐The owning side as a single bit. Bit 7 is set but unnamed. ShopRecord
- zero_extension_words○All three words are zero in every shipped record, and nothing is known to read them. ShopRecord
- type2_extension_word_0◐Observed values:
0, 1, 2, 4, 8, 9, 12, 17, 18. ShopRecord - type2_extension_word_1◐Observed values:
0, 5, 6, 7, 10, 20;10occurs in 596 records. ShopRecord - type2_extension_word_2◐Observed values:
0, 105, 137, 342, 793, 1556, 1808, 2327, 2331. ShopRecord - type2_extension_word_3◐Observed values:
0, 4, 7, 794, 1350. ShopRecord - action_records◐
action_record_count = (firstDfOffset - mapOffset - 4) / 40; the section ends where the firstDFxxsection begins. MAP Section - category_or_scope◐Corpus values are
0,0x30, and0x50. MapActionRecord - action_param_b◐Family-specific operand: type
0x04DF index,0x05/06/07side number,0x0dreturned request word; type0x02weather state; type0x03ASCR scene id; type0x07side whose alliance row changes; type0x08target side; type0x09requested facility-owner side; type0x0amaximum mission turn count; type0x0ctarget unit class id. MapActionRecord - action_param_c◐Family-specific operand:
0x05signed energy delta,0x06native facility ordinal;0x0900native facility ordinal (not a universal SHOP-array index);0x0c00target unit side id. MapActionRecord - action_param_d◐Usually zero; the only nonzero shipped value is
1, inMISS003.DATMAP record 4 (0x0704). MapActionRecord - copied_zero_action_words◐All three words are zero in the shipped records. MapActionRecord
- unread_map_record_tail○All eight words are zero in the shipped records, and the game never reads this part of the record. MapActionRecord
- deferred_cells◐Sparse map edits. DFxx Layers