MAPINFO/Spawn number definition

From ZDoom Wiki
(Redirected from Spawn number definition)
Jump to navigation Jump to search

A spawn number definition begins with the keyword “SpawnNums”, followed by a list of actor names and their assigned spawn numbers. The syntax is as follows:

SpawnNums
{
  <number> = <class>
}

Spawn number assignments through this method are overridden by the DECORATE one. Actors can be assigned multiple spawn numbers, and already-assigned spawn numbers can be mapped to nothing by passing None instead of an actor class name. They can also be mapped to other actors.

Examples

In this example, actor BerserkImp is given spawn number 3001 and actor GoldenMug is given two spawn numbers; 4489 and 22594.

SpawnNums
{
  3001 = BerserkImp
  4489 = GoldenMug
  22594 = GoldenMug
}


This example clears spawn numbers 3 and 113, which are used in Doom by the hell knight and baron of hell, respectively, and effectively preventing any of those monsters from being spawned via spawn functions or specials which take spawn numbers to identify the actor class to spawn, such as Thing_Spawn. This is done by mapping their spawn numbers to None.

SpawnNums
{
  3 = None
  113 = None
}


This one remaps spawn numbers 25 and 132, which are used in Doom by the soul sphere and megasphere, respectively, to the revenant and archvile.

SpawnNums
{
  25 = Revenant
  132 = Archvile
}