Full Version : Areas for spawning
xmlspawner >>XMLSpawner Feature Request's >>Areas for spawning


<< Prev | Next >>

Syznow- 04-03-2007
I was planning on having several quests that would have NPCs randomly placed within certain areas on the map. I can do this currently with conditionals to select an area Brit Crossroad/Brit Farms/Yew graveyard/etc. However I was thinking that it would be really nice to be able to define area names to use in the spawner and let it select a random area and a random spot within that area as the home location for an NPC or MOB.

Would it be possible to have an XML file (maybe the existing config file) where areas could be defined? These area definition would be simple rectangles or perhaps a set of rectangles, and the area name would then be available to use in the spawner to set a home location and currnet location for the spawn entry.

I would like to define sets of regions across all facets and then be able to reuse those definitions whenever I need a randomly placed quest NPC. This might be useful for spawning special MOBs also, but my goal is to have quests be a little harder by having more variety in the locaion of the quest NPCs. This way I can also add random encounters around the shard that could potentially start a player on a quest.
Also, it simplifies changing spawning locations but simply editing one set of coordinates for each area definition instead of making multiple changes across multiple xmlquest files.

Perhaps this could even be simplified as a GLOBAL macro definition of sorts, where you could define a variable similar to SETVAR but the definition would be shared by other spawners.






ArteGordon- 04-03-2007
you can use the #WAYPOINT spawn control keyword to do this.

QUOTE

#WAYPOINT,prefix[,range] - places the spawn at the location of randomly selected waypoint runes that start with the given prefix.

place spawns at the randomly selected named waypoints
user posted image


Just put your named waypoint runes at the various locations and then you can use the range argument to place your npc spawns within an area around those locations.

You could even spawn the named waypoint runes at certain locations (using the #XY keyword for example) instead of manually placing them and have different XML spawn definitions that you xmlload for different rune location configurations.

I think this will do exactly what you want.

Syznow- 04-03-2007
Thanks. I guess I will have to look into the xmlload command. I was doing this with waypoints now, but really wanted a centralized spot to define locations so they could be reused by several different quests or several different spawners.

ArteGordon- 04-04-2007
QUOTE (Syznow @ April 03, 2007 02:46 pm)
Thanks.  I guess I will have to look into the xmlload command.  I was doing this with waypoints now, but really wanted a centralized spot to define locations so they could be reused by several different quests or several different spawners.

I think that something like this would do what you want.

set up a spawner to place your various spawn location waypoints.

CentralizedLocationSpawner
#XY,1500,1000 ; waypoint/name/region1a/map/felucca
#XY,500,254; waypoint/name/region1b/map/malas
#XY,780,178; waypoint/name/region1c
#XY,1200,56 ; waypoint/name/region2a
#XY,800,567 ; waypoint/name/region2b

etc.

and then you would have your various quest spawners that would use those waypoints for spawn placement

QuestSpawner
#WAYPOINT,region1; xmlquestnpc


AnotherQuestSpawner
#WAYPOINT,region1; xmlquestnpc


YetAnotherQuestSpawner
#WAYPOINT,region2; xmlquestnpc


If you wanted to change the locations for all quest spawns that used region1 without editing any of the quest spawners, just change the locations for the region1 waypoints in the centralizedlocationspawner and respawn it.

If you wanted to have some quick pre-loaded configurations that you switched between, just edit the locations in the centralizedlocationspawner to what you wanted and save them with

[xmlsave regionconfig1 CentralizedLocationSpawner

then you could edit the locations in the spawner and save it out to a different file

[xmlsave regionconfig2 CentralizedLocationSpawner

etc.

Then when you wanted to use a particular configuration, just load it with

[xmlload regionconfig1
or
[xmlload regionconfig2

You could also have multiple centralizedlocationspawners with each one handling a different region or any other variation that you wanted.

Another option is to use the Region spawning ability along with one of the custom region scripts
http://www.runuo.com/forums/custom-script-...box-v4-0-a.html
to set up your own custom named regions, and then just specify the RegionName property on a spawner and it will spawn in the areas defined for that region.