DDB
Description
.ddb files are definition database files used by the game runtime and
LevelEdit tooling.
In OpenW3D, .ddb is written/read through the shared SaveLoad framework and
stores definition data plus preset data.
References
Specification
Container model
.ddb uses the same chunk container used by the SaveLoad system:
Chunk header:
uint32 ChunkType+uint32 ChunkSize.ChunkSizeMSB indicates sub-chunks.Micro-chunks use 1-byte type + 1-byte size.
SaveLoad writes one top-level chunk per subsystem using that subsystem’s
Chunk_ID().
Top-level content in OpenW3D
LevelEdit preset save calls write two main subsystems:
_TheDefinitionMgr(chunk idCHUNKID_SAVELOAD_DEFMGRfromsaveloadids.h)._ThePresetMgr(chunk idCHUNKID_PRESETMGRfromEditorChunkIDs.h).
Within PresetMgrClass
PresetMgrClass stores:
CHUNKID_PRESETS: each preset saved under its persist factory chunk id.CHUNKID_EMBEDDED_NODE_DATA: *CHUNKID_PRESET_ID*CHUNKID_NODE_LIST
PresetClass payloads include:
CHUNKID_COMMENTSstring chunk.CHUNKID_VARIABLESmicro-chunks such as definition ID, temporary flag, parent ID, and manual dependency strings.
Typical file locations and usage
Global editor DB:
presets\\objects.ddb.Temp editor DB:
Presets\\temps20.ddb.Exported per-map DB:
<map>.ddb.Runtime load path derives
<map>.ddbfrom map name and loads definitions before level data.