Full Version : Spawning a Spawner with relative location to first
xmlspawner >>Q&A >>Spawning a Spawner with relative location to first
<< Prev | Next >>
Slighter- 05-25-2006
I have managed to get a spawner to spawn a saved spawner. Yay for me. I can't seem to find out how to get it to spawn in a location near the first spawner. I've searched but either can't find it or understand it.
I am guessing it has something to do with the x,y location in the spawn file. I want the created spawner to spawn realative to the spawning spawner not at the location the spawn file was made at. If that makes any sense.
example..spawn 1 spawns spawn 2. I want it close to where ever I put spawn 1. Right now spawn 2 spawns at the location I first created that spawner regardless of where I put spawn 1.
The effect I want is to be able to easily deploy camps I make quickly. Set the main spawner up with a range big enough to cover the area I want and have them spawn somewhere in that area.
ArteGordon- 05-25-2006
there are a couple of ways of positioning spawns relative to other spawns.
If you use the Pack Range setting on the spawn entry (Rng field in the extended spawner gump), and put the spawns into the same subgroup, then the spawns will be placed relative to the other spawns in that subgroup within the specified range from each other. They will be spawned as a "pack".
subgroup 1: spawn1 -> Rng set to 1
subgroup 1: spawn2 -> Rng set to 1
these two spawns will always be spawned together since they are in the same subgroup. They will be placed randmly within 1 tile of other spawns in subgroup 1.
You can also forget about pack spawning and use the new #RELXY,x,y spawn control keyword at the beginning of the entry if you have the latest version of xmlspawner (v3.10). So having spawner entries like
subgroup 1: spawn1
subgroup 1: #RELXY,1,1 ; spawn2
these two spawns will always be spawned together since they are in the same subgroup. They will be spawned in the order listed (spawn1 first), and when spawn2 is spawned, it will be placed relative to the most recent spawn at a relative location of +1 tile in x and +1 tile in y.
This approach gives you the most precise relative positioning control.
Note that if you added another entry to the subgroup and used another #RELXY keyword, the position would be relative to the most recent spawn, not the first one.
Slighter- 05-26-2006
Nope not working. Even with the #REL the file still spawns in the location in the spawnfile.
Here's what im doing. I created a spawn with 3 orc, and 1 orc capt. Saved it.
I then create another spawner to spawn that spawner.
I use:
xmlspawner/configfile/all.xml/loadconfig/true
just a test file.
the spawner then spawns the spawnfile but at the location the spawner that made the spawnfile was made..not anywhere close to where I put the spawner that calls that file later.It's always at the x,y location in the spawnfile.
I am trying to get it so I can easily put a group of mobs together into a spawnfile. Then later drop a spawner that will pop out a saved spawner randomly in the spawnrange set.
So far spawner 1 always spawns the loaded spawner at the original location.
I couldnt find what what you were talking about for the rng field unless you meant spawnrange.
ArteGordon- 05-26-2006
You just need to go into your all.xml file and remove these xml entries
<CentreX>5443</CentreX>
<CentreY>1159</CentreY>
<CentreZ>0</CentreZ>
those specify an absolute location of the spawner. If you remove them, then it will allow the location to be determined at spawn time.
When those entries are left in the config file what happens is, the spawner is created, it is placed into the world, and then the property assignments are processed (that is the normal processing sequence for all spawn entries).
In your case processing the property assignments will load the xml config file, it will find those X,Y,Z values and then assign them to the spawner, overriding the previous placement.
When you remove them, the same thing happens, but the X,Y,Z values dont get assigned from the config file, and so the spawner stays where it was placed.
You can find the Rng field if you open up the extended spawner gump by pressing the little arrow button in the lower right corner of the regular gump. That also allows you to set things on individual entries like the subgroup.
Slighter- 05-26-2006
Yep that was it. haha yeah Im missing some hair now but least it working. Thanks for the quick help.
ArteGordon- 05-26-2006
oh, and you might also want to remove the Map entry if you want to place it on arbitrary maps.
<Map>Felucca</Map>
Slighter- 05-26-2006
ah thanks for the tip. I would never have thought of it I'm sure.