Editor number

From ZDoom Wiki
Jump to navigation Jump to search

The editor number aka DoomEdNum is a value between 1 and 32767 that is used by level editors to identify things placed in a map. Editor numbers should not be confused with SpawnID.

The only purpose of an editor number is to allow an actor to be visible in the level editor, so that the author could place it on their map. All actors that should be directly placeable on the map need a unique editor number. However, actors that are only supposed to be dynamically spawnable (with functions like Spawn or similar in ACS or Spawn/A_SpawnItemEx and similar in ZScript/Decorate) do not need editor numbers since they're not placed on the map directly.

Actors should be given editor numbers in MAPINFO, through the editor number definition block. In the DECORATE format specification they can also be given directly in the code, at the end of an actor's declaration, but the MAPINFO method is highly recommended due to better visibility. ZScript only allows giving editor numbers via MAPINFO. Internally, a value of -1 for the editor number means that the actor cannot be placed in a map.

In DECORATE, the editor number is, along with the SpawnID, filtered through the Game property to avoid conflicts.

There is a list of standard editor numbers for reference, giving the editor numbers of all standard actors. If custom actors are created and given one of the existing editor numbers, they will replace the original actor using that number on the map. If this is not desired, new actors need unique editor numbers.