Full Version : Addspawn question
xmlspawner >>Q&A >>Addspawn question


<< Prev | Next >>

Dusk- 10-17-2007
Another probably simple question..

I can't figure out a way to access the spawn string when I spawn a new xmlspawner and do addspawn on it.

For example

xmlspawner/addspawn/ogre/

What syntax would I use if I wanted the spawned ogre on the new spawner to be renamed? This way:

xmlspawner/addspawn/<ogre/name/Big Bad Ogre>

Seems most logical to me but doesn't work.

ArteGordon- 10-17-2007
addspawn will just add a new entry. Use the SETONSPAWNENTRY keyword to modify existing entries.

from xmlspawner2.txt
QUOTE

- added the new "SETONSPAWNENTRY[,spawnername],entrystring/prop/value/..." keyword, that allows you to modify the individual spawn entry properties on a spawner. (thanks to Todo for the suggestion) The entrystring argument will be used to find all spawn entries containing the specified string.  If the spawnername argument is omitted, then the current spawner will be used.  If the entrystring is a numeric value, then it will be used as a zero-based index into the spawn entry list rather than as a string match.

For example, the entry

SETONSPAWNENTRY,testspawner,orc/maxcount/5/subgroup/1

would find all entries containing the string 'orc' on the spawner named 'testspawner', and set the maxcount of those spawn entries to 5 and their subgroup to 1

SETONSPAWNENTRY,testspawner,0/maxcount/5/subgroup/1

would find entry number 0 (the first entry) on the spawner named 'testspawner', and set the maxcount of that entry to 5 and its subgroup to 1


Spawn entry properties that are accessible to this keyword include:

string TypeName
int MaxCount
int SubGroup
int SpawnsPerTick
int SequentialResetTo
int KillsNeeded
bool RestrictKillsToSubgroup
bool ClearOnAdvance
double MinDelay
double MaxDelay.

Note that these are all properties that can also be seen and set in the expanded spawner gump.

- added the example spawnerspawner.xml that demonstrates the use of the new SETONSPAWNENTRY keyword by spawning an xmlspawner with specified spawn entries.


TypeName is the field that you are interested in.

Dusk- 10-17-2007
Ah ha. Thank you, must have missed that when going over the keywords.