kts.AddMonsterGenerator – enable random monster generation at specific tiles
result = kts.AddMonsterGenerator(monster_type, tile_list, probability)
This function sets up particular tiles as "monster generators". For example, this is used for vampire bats, which are generated at open pit tiles.
The monster_type
must be a valid MonsterType (this would be the vampire bat monster type in our example).
The tile_list
is a list of tiles (e.g. a list of open pit tiles).
probability
is the probability that, during each monster generation cycle, a monster will be generated at the given tile type. (A monster generation cycle is run every monster_interval
milliseconds, see kts.MISC_CONFIG.)
No value is returned.
Errors may be generated if the input parameters are incorrect.
If there is a total monster limit (kts.LimitTotalMonsters), then the probability of generating a monster will automatically reduce, in proportion to how close we are to reaching the total monster limit. (Once the limit is reached, the probability becomes zero.)
Monsters can only be generated within a distance of monster_radius
of any Knight (see kts.MISC_CONFIG).
kts.MISC_CONFIG – in particular, monster_radius
and monster_interval