Eternal vs Dark Ages
This page covers the critical differences between Eternal and Dark Ages entities files.
It is you have some experience with editing Doom Eternal entities files. While important differences do exist between the files, there are substantial similarities to Eternal. Check out the book on Eternal Level Modding if this subject is new to you. Most of the knowledge you'll gain there is applicable to Dark Ages.
Serialization
In Doom Eternal, entities files are plaintext and serialized by the game at runtime. In Dark Ages, they are already serialized. See Serialization and Atlan Mod Packager for the rules and restrictions they follow, compared to regular decls.
Submaps
The first difference you'll notice in a Dark Ages entities file, is that every entity has a number assigned to it. This value is it's submap index.
entity 3 {
<entity data>
}
entity 4 {
<entity data>
}
entity 4 {
<entity data>
}
Doom Eternal entity files were a single, long, uninterrupted list of entities. In Dark Ages, entities are split into multiple lists based on the submap they're located in. Each list starts with it's own idWorldSpawn entity named world.
idTech8 a "World Composition" no longer loads every entity simultaneously. It only loads entities from the active submaps. The submaps that are active depend on your location in the level.
Submap 0
Entities in most submaps will be loaded/unloaded based on where you are in the level. But Submap 0 functions as the "persistent level". Entities placed in submap 0 will always be loaded and active.
Multi-Level Entities
As a consequence of this enhanced loading system, levels are a lot bigger. So big, that sometimes two different levels' entities are contained in the same file! For example:
- Siege Part 1 and Siege Part 2 are both part of
mapentities/maps/game/sp/m4_siege/m4_siege.mapentities. - Abyssal Forest and Ancestral Forge are both part of
mapentities/maps/game/sp/m5_forge/m5_forge.mapentities
Layers
DOOM Eternal made constant use of the layer's system. It still exists in Dark Ages, but only for specific purposes.
If an entity has a layer, it will look something like this:
entity 14 {
layerIndex = 1;
layers = {
"spawn_target_layer"
}
entityDef some_entity { ... }
}
Dark Ages entities can only be added to ONE layer. The layerIndex property is important. You may think of it as the "ID" for a layer. It must be included when specifying a layer. The same layer may have a different layerIndex value across different submaps. The consequences of using a layer whose layerIndex is not already defined in the submap, is unknown.
End-of-File Data
If you scroll down to the bottom of a mapentities file, you'll see a massive blob of encoded data:
headerchunk {
<massive amount of alphabetical data>
}
This is the header chunk of the original file. It is there intentionally, and you must not touch it. This data is critical for correctly serializing the file.