Map Editor · Entity IDs
Entity IDs in DSMapStudio Explained
Entity IDs in DSMapStudio Explained
An entity ID is the unique number that lets a game's event scripts point at one specific thing in a map. When a fog gate opens after you kill a boss, a script said "when entity 1000800 dies, open the gate" — 1000800 is that boss's entity ID. Without one, an object exists in the map but is invisible to the logic layer: no script can detect it, target it, or react to it. Entity IDs are the bridge between where things are (the MSB) and what happens (the EMEVD scripts).
Most people meet entity IDs through a problem — they duplicated an enemy, and now two things share an ID and the game misbehaves. The fix is one reflex, covered below.
What an entity ID actually is
Inside a map's MSB, many objects — enemies, certain assets, regions — have an entity ID field. It's a number that functions as a stable handle. The event system (EMEVD) is a separate layer of scripts that runs the map's logic: spawning enemies, opening doors, triggering cutscenes, awarding items. Those scripts don't know positions or models — they know entity IDs. An object's entity ID is the name events use to talk about it.
Two consequences: an object no script needs to reference doesn't strictly need an entity ID (decorative scenery, say); and any object you do want a script to react to — a boss whose death unlocks something, a trigger region — must carry a unique entity ID the script targets.
Entity ID vs row ID vs map ID
DSMapStudio surfaces several kinds of "ID," and mixing them up causes real mistakes:
| ID type | Where it lives | What it identifies | Example |
|---|---|---|---|
| Entity ID | MSB (Map Editor) | One object instance in one map | "When entity X dies, open a gate" |
| Row ID | A param table (Param Editor) | One row in a param | EquipParamWeapon row for the Uchigatana |
| Param reference ID | A field inside a param row | A link to a row in another param | An enemy's NpcParam ID |
| Map ID | The map list | Which map you're editing | m10_00_00_00 = a specific area |
The key line: a row ID names a type (a weapon definition, an enemy's stat block); an entity ID names a specific placed instance. Ten copies of the same enemy share one NpcParam row ID but each needs its own entity ID.
How they're formatted
Entity IDs follow per-map conventions, not one global rule. They're typically structured so the number reflects the map the object is in, with separate numeric ranges reserved for different object kinds — enemies in one range, objects/assets in another, regions in another. The exact scheme varies by game and map, but three practical rules hold everywhere: a new ID should fit the map's existing pattern, stay inside the range used for that object type, and above all be unique within the map. When you assign one, look at neighboring objects of the same type and pick an unused number in their range.
Entity group IDs
To make one event affect several objects at once — open three gates together, treat a pack of enemies as a single trigger — use entity group IDs. On top of its individual entity ID, an object can be tagged with one or more group IDs, and an event referencing the group affects every member. This is how "kill all enemies in the room to proceed" is wired without listing each enemy. Group IDs share the uniqueness discipline: a group ID must stay distinct from individual entity IDs so the systems don't collide.
The duplicate entity ID trap
This is the one most modders actually hit. When you duplicate an object with Ctrl + D, the copy inherits everything — including the original's entity ID. Now two objects claim the same handle, and:
- Scripts referencing that ID may fire on the wrong object, fire twice, or behave unpredictably.
- DSMapStudio detects and warns about duplicate entity IDs, because they're almost always a mistake.
The fix: assign the copy a new, unique entity ID immediately — which is why it's a mandatory step in the place enemies workflow. Make "duplicate, then re-ID" a single reflex and the problem disappears.
How entity IDs connect to event scripts
Entity IDs only matter because of EMEVD, the game's compiled event scripts — the if this, then that logic layer. Both sides of that logic are usually expressed in entity IDs: "if entity 1000800 (a boss) is dead, then activate entity 1000810 (a fog wall)." The Map Editor places objects and gives them IDs; EMEVD references those IDs to make the map do things. That's why adding one meaningful element spans layers — placing a boss (Map Editor) can mean giving it an entity ID, defining NpcParam stats (Param Editor), and editing EMEVD so its death triggers the result.
Assigning a new entity ID
- Select the object and find the entity ID field in the properties panel.
- Check nearby objects of the same type to learn the map's range and pattern.
- Enter an unused number that fits that range.
- Confirm no duplicate-ID warning, then save.
If you're hooking into existing logic, the ID has to match what the script references — otherwise the object and the script aren't talking about the same thing.
Put it to work in the place enemies guide, or step back to the Map Editor hub. For the stats side of an enemy you place, the Param Editor hub covers NpcParam.