SPAWN

From SphereWiki
Revision as of 19:31, 21 February 2010 by MrSugarCube (talk | contribs) (Created page with '__FORCETOC__ Instead of setting the MORE1 property of a spawn to a single character defname, a spawn group can be used instead so that a random character is spawne...')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Instead of setting the MORE1 property of a spawn to a single character defname, a spawn group can be used instead so that a random character is spawned. A spawn group contains a set of character defnames, with optional weights to affect their chances of spawning.


Syntax

The syntax for defining a spawn group is:


[SPAWN defname]
ID=character_defname_1 weight
ID=character_defname_2 weight
ID=character_defname_3 weight
etc..

The weight parameter can be used to make a defname more likely to be selected than the other defnames in the group. With a weight of 10 for example, a defname would be 10 times more likely to be selected.


Properties

The following properties are available when defining a spawn group:

Name Read/Write Description
DEFNAME W Sets the spawn group's defname.
ID defname weight W Adds a defname to the spawn group with the specified weight.


Examples

//
// Undead spawn from default script pack.
//
[SPAWN 08001]
DEFNAME=SPAWN_Undead_Weak
ID=c_spectre,2
ID=c_skeleton_w_axe
ID=c_skeleton_w_sword
ID=c_skeleton,5
ID=c_zombie,10