Full Version : Spawn regions group / Population purcentage
xmlspawner >>Q&A >>Spawn regions group / Population purcentage
<< Prev | Next >>
Alambik- 08-01-2006
Hi all,
I have 2 questions I try to solve:
- I want to know if there is a way to set a group of regions attached to a uniq spawner: It's to define a non-rectangle global area for spawns.
- Is it possible to set a population purcentage ? That is to say: to define a poupation to a spawner, but assign a population purcentage to spawn: I would like to define a basic spawner with for example 100 dogs, 20 cats, if my region is large, but only 50 dogs, 10 cats when the region is medium, but I don't want to compute how many Mobiles I should put for each region.
Thx
ArteGordon- 08-01-2006

QUOTE (Alambik @ August 01, 2006 03:10 pm)
Hi all, I have 2 questions I try to solve: - I want to know if there is a way to set a group of regions attached to a uniq spawner: It's to define a non-rectangle global area for spawns. - Is it possible to set a population purcentage ? That is to say: to define a poupation to a spawner, but assign a population purcentage to spawn: I would like to define a basic spawner with for example 100 dogs, 20 cats, if my region is large, but only 50 dogs, 10 cats when the region is medium, but I don't want to compute how many Mobiles I should put for each region.
Thx

You can set the RegionName property on the spawner to the name of an existing region and it will then ignore the spawnrange and X1Y1_X2Y2 settings and randomly place spawns in the region.
The spawners will not automatically calculate the area of a region, but if you manually change the MaxCount of the spawner to a value that is less than the sum of the individual maxcounts of the spawn entries, then you will still maintain the relative counts of the individual spawns even though the total count will change.
For example, with your spawner set to 100 dogs and 20 cats, if you set the MaxCount of the spawner to 10, then you will still get roughly 83% dogs (100/120) and 17% cats (20/120) even though the total number of dogs and cats will never go above 10. So you would end up with around 8 dogs and 2 cats.
If you change the MaxCount to 100, then you would end up with 80 dogs and 20 cats.
Alambik- 08-02-2006
Thank you for your fast answer.
Those solutions are working fine for me.
And thank's also for that powerful tools.