DD2
The doodads placed on the map, as objects an editor can select and remove. Only editors
read it: the game sees a doodad as its tiles in MTXM and its sprite in
THG2.
| Name | DD2␠ (44 44 32 20) |
|---|---|
| Size | 8 bytes per doodad. |
| Read by | Editors only. The game skips it. |
| Required | No. |
| More than one copy | Every copy counts: the records of all of them, in file order. |
| In scmJS | Read, and written again when you change what it holds. |
Each doodad:
| Offset | Type | Holds |
|---|---|---|
| 0 | u16 | Doodad number in the tileset's list of doodads |
| 2 | u16 | X of the middle of the doodad, in pixels |
| 4 | u16 | Y of the middle of the doodad, in pixels |
| 6 | u8 | Owner |
| 7 | u8 | 1 if disabled, else 0 |
Example#
0 2B 00 doodad 43 of the tileset's list
2 10 04 x 1040 px, the middle of the doodad
4 F0 02 y 752 px
6 0B owner: Player 12
7 00 enabled
This record is all an editor has to say a doodad is there. What the game shows comes from
elsewhere: the doodad's tiles are written into MTXM, where the game draws them,
while TILE keeps the ground they cover so an editor can put it back when the
doodad is removed. A doodad with a sprite, such as a tree top, also has a
THG2 record, and so does one that is a unit, such as a door. The tileset's CV5
says how big the doodad is and which tiles it uses (see
what a tile number points at). Deleting the DD2 record
alone leaves the doodad on the map for the game, just no longer selectable in an editor.