Using probabalistic spawning to create rare spawns
If you would like to set up a spawner in which some of the entries appear more frequently than others, then you want to set up probabilistic spawning.
Default is for each spawn entry to have an equal chance of spawning
With multiple entries in an xmlspawner, if MaxCount on the spawner is equal to the total of the individual entry maxcounts (the default condition), then each entry has an equal chance of being spawned.
Simply reduce the spawner MaxCount to bias the chance of spawning for each entry
By reducing the MaxCount of the spawner, you enable probabilistic spawning in which the spawning probability of each entry is now based on the relative ratio of its individual entry maxcount to the sum of all the individual maxcounts.
Example 1:
For example, to implement a rare single mob spawn, simply add multiple mobs to a single spawner in the ratio that you want them to spawn with, and then set the spawner MaxCount to 1.
create an xmlspawner and
1) add a balron, maxcount = 1
2) add a gargoyle, maxcount = 10
3) go to the xmlspawner props or to the Max field in the gump and set maxcount to 1
4) do a respawn and you are done.
this will result in a single spawn that will produce a balron roughly 10% of the time (actually 1 out of 11) and gargoyles the rest of the time.
I use this to put named spawns in as the rare with comparable basic spawns as the common, e.g. a named lich, that spawns rarely instead of a regular lich.
Example 2:
In this example, with the spawner MaxCount set to 1 this will spawn one of the three spawn entries.
ratman, maxcount=15
ratmanarcher, maxcount=30
barracoon, maxcount=1
The summed maxcount in this case is (15+30+1) or 46
This will give you a spawn that will produce a single ratman about 30% of the time (15 out of 46 times), a ratmanarcher about 65% of the time (30 out of 46 times), and barracoon about 2% of the time (1 out of 46 times)
Utiliser le spawning aléatoire pour créer des spawns rare
Si vous voulez configurer un spawner dans lequel certaines des entrées apparaissent plus fréquemment que d'autres, alors vous aller configurer les probabilités du spawner.
Par défaut, chaque entrée a les memes probabilités
Avec plusieurs entrées dans le xmlspawner, si MaxCount sur le spawner est égal au total des entrée individuelles (l'état par défaut), alors chaque entrée a une chance égale d'être spawnée.
Réduisez simplement le MaxCount du spawner pour modifier la chance de spawn de chaque entrée
En réduisant le MaxCount du spawner, vous permettez un spawn aléatoire dans lequel le spawn de chaque entrée est maintenant basé sur le ratio maxcount individuel / somme des maxcount individuels
Exemple 1:
Par exemple, pour mettre en application un spawn simple d'un mob rare, ajoutez simplement plusieurs mobs au meme spawner, avec le ratio désiré pour chaque créature, puis réglez leMaxCount du spawner à 1.
créez un xmlspawner et
1) ajoutent un balron, maxcount = 1
2) ajoutent un gargoyle, maxcount = 10
3) allez dans les props du xmlspawner ou au champ Max dans le gump et reglez le maxcount à 1
4) faites un respawn et c'est parti.
Ceci donnera un spawn qui produira un balron approximativement 10% du temps (réellement 1 sur 11) et des gargoyles le reste du temps.
J'emploie ceci pour créer des spawns avec des mobs rares tandis que des mobs de bases apparaissent normalement, par exemple une liche appelée Bob, alors que le spawn créer normalement des liches normales.
Exemple 2:
Dans cet exemple, avec le MaxCount réglé à 1, on spawnera une des 3 entrée ci dessous:
ratman, maxcount=15
ratmanarcher, maxcount=30
barracoon, maxcount=1
Le maxcount additionné est dans ce cas-ci (15+30+1) ou 46
Ceci vous donneront un spawn qui produira environ un ratman simple 30% du temps (15 sur 46 fois), un ratmanarcher environ 65% du temps (30 sur 46 fois), et barracoon environ 2% du temps (1 sur 46 fois)