Spawning

Spawning stuff

Artifacts and mana can be created during the game (`spawned') by item_spawners, the death of monsters, the destruction of furniture (including tombstones, trees, etc.) and perhaps by other means as yet unkown.

This is done by adding one of the following fields to the item spawner or destructible entity, all of which take numbers as values:

  • bluemana
  • greenmana
  • cnt_torch
  • cnt_h_boost (ordinary health boost)
  • cnt_sh_boost (super health boost = mystic urn)
  • cnt_mana_boost (krater of might)
  • cnt_teleport (chaos device)
  • cnt_tome (tome of power)
  • cnt_summon (stone of summoning)
  • cnt_invisibility (invisibility)
  • cnt_glyph (glyph of the ancients)
  • cnt_haste (boots of speed)
  • cnt_blast (disc of repulsion)
  • cnt_polymorph (ovinimancer)
  • cnt_cubeofforce (force cube)
  • cnt_invincibility (tower of invincibility)
For the mana fields the value is the amount of mana contained, for the other's its the number of items contained. Deadmeat (who is the one who worked this stuff out, for his second H2 editing tutorial for bsp) says that sometimes you get a backpack that then contains the item. He also notes that sometimes you get mana rather than the assigned item upon the death of a monster. This is because some high-level monsters randomly spawn mana or artifacts on death, and if this happens it overrides whatever you specify to be spawned.

Another point is that cnt_flight is listed in the code comments as something that can be spawned, but this wasn't implemented properly (Eric Biessman, in discussion with Speeed). There is more to be found out about this, such as is it possible to spawn combined mana, and is there anything else that can be spawned (No to both is what it looks like six months later). One thing I've found is that if you specify multiple spawn fields, what you seem to get is nothing.

For an example, suppose we want a chest to spawn a Krater of Might. Our chest entity might then look like this:

classnameobj_chest1
origin12 -3 44
angle90
cnt_mana_boost1

When the chest is smashed, the Krater appears in its place.


Back to the list.