Skip to content

war3map.doo — Doodads (Trees & Destructables)

Stores placed doodads: trees, rocks, barrels, crates, and other destructable/decorative objects.
Not units or items — those are in war3mapUnits.doo.

Doodad type IDs come from doodads.slk inside war3.mpq.

Header [TFT format, versions 8 and 13]

char[4]  file ID          "W3do"
int      version          8 (classic TFT) or 13 (Reforged 3.0+)
int      subversion        0x0000000B  (always 11; purpose unclear)
int      doodad_count      number of doodad records that follow

Doodad record (variable length due to item sets)

char[4]  type ID          doodad type (from doodads.slk)
int      variation        variation index (LE)
float    x                map X coordinate
float    y                map Y coordinate
float    z                map Z coordinate
float    angle            rotation in radians  (degrees = radians * 180 / π)
float    scale_x
float    scale_y
float    scale_z
char[4]  skin_id          version 13 only
int      v13_color        version 13 only; raw value retained
byte     flags            visibility/solidity (see below)
byte     life             HP percentage (0x64 = 100%, 0xAA = 170%)
int      item_table_ptr   random item table index, or -1 for none
                          if >= 0: drop items from that item table (defined in w3i)
                          if -1:  use inline item sets below
int      item_set_count   number of item sets (only > 0 if item_table_ptr == -1)
[item_set_count * item_set]
int      editor_id        unique editor ID for this doodad instance
int[4]   v13_extension    version 13 only; first value is the placement ID in observed maps

Version 13 adds a skin ID and color before flags, then four integers after the editor ID. Some 3.0 maps also interleave zero-rawcode, 36-byte placement slots that are not included in doodad_count; these carry no renderable doodad ID and must be skipped as a whole. OpenRealm's reader handles these slots when loading version 13 maps.

The 36-byte slot was reported for Werewolf Transylvania on Reforged 3.0. The exact editor build is unknown. The generated regression fixture uses version 13, subversion 11 and distinct object and skin IDs. It checks two doodads and two units for alignment, then truncates each final record to verify the loader keeps only complete placements.

Doodad flags

Value Meaning
0 Invisible and non-solid
1 Visible but non-solid
2 Normal (visible and solid)

Item set structure

int      item_count        number of items in this set
[item_count times:]
  char[4]  item_id         item type ID (from ItemData.slk), or random item ID
  int      chance          drop chance in percent (integer)

Random item IDs follow this encoding (4 chars): - Char 1: Y - Char 2: Y = any type; i..o = specific item type (i = charged, then in dropdown order) - Char 3: I - Char 4: / (ASCII 47) = any level; 0+ = level (ASCII 48 + level)

Special doodads section (after all regular doodads)

int      special_version   always 0
int      special_count     number of special doodads (cliffs, etc.)
[special_count * 16 bytes each:]
  char[4]  doodad_id
  int      z               (usually 0)
  int      x               W3E tile coordinate
  int      y               W3E tile coordinate

Special doodads cannot be edited after placement and include cliff geometry.

Worked example (compact layout)

tt tt tt tt   ← type ID (4 chars)
vv vv vv vv   ← variation
xx xx xx xx   ← X
yy yy yy yy   ← Y
zz zz zz zz   ← Z
aa aa aa aa   ← angle
xs xs xs xs   ← scale X
ys ys ys ys   ← scale Y
zs zs zs zs   ← scale Z
ff            ← flags
ll            ← life
bb bb bb bb   ← item table pointer
cc cc cc cc   ← item set count
dd dd dd dd   ← editor ID