Project Phoenix 2 Boss Spawners
Welcome
The boss spawner is my way of creating a ultima online champion style spawn setup. This system is flexible in what it allows you to do with the spawn. It is also designed to allow easy modification for features you want to add.
Files
Below is a list of all the files that involve the merchant system or where the core structure is.
- scripts\spawning\boss_spawner\boss_spawner.lua
- scripts\spawning\boss_spawner\boss_spawner_tables.lua
Example Spawn
below is the example spawn that comes with project phoenix.
- Stages - this is a table of stages, with each stage containing variables to control that stage
- StartingStage - this is the stage key to start on when the boss spawner starts up, or returns from sleeping.
- MonsterList - this is a table consisting of template strings to randomly choose from for spawning
- TotalWaves - this is the amount of waves to spawn during the stage
- MonstersPerWave - this holds 2 table values of Base and Bonus. Base being the amount to always spawn, Bonus is the amount to add per spawn wave
- Range - this holds 2 table values Min and Max. Min being the minimum range from the boss spawner to spawn an object, Max being the maximum rnage to spawn from the boss spawner object
- StartWaveMessage - a string of text to tell the players they have started the current stage. this plays to anybody within a default range of 30 from the boss spawner
- NextStage = a string value to let the boss spawner know which stage key is next. For the last stage always set this value to "EndStage
BossSpawner.Mogus = { --- the starting stage of the boss spawner StartingStage = "Stage1", --- table containing the stages of the spawn Stages = { --- a stage entry which contains information needed by the boss spawner --- this is to allow you to tweak settings. Stage1 = { --- a list of template strings to randomly pick from and spawn during this stages waves MonsterList = {"mogus_skeleton_warrior","mogus_skeleton_mage","mogus_skeleton_archer",}, --- a numeric value that controls how many waves are in this stage TotalWaves = 1, --- a table to control the amount of monsters to spawn every wave --- Base is the minimum amount to spawn each round --- Bonus is amount to add per wave. MonstersPerWave = {Base = 5, Bonus=1}, --- min and max range to spawn objects --- if range is not supplied the system uses 5 as default Range = {Min = 1, Max = 7}, --- system message to aleart players the waves have begun StartWaveMessage = "Mogus's minions grow stronger.", --- when this stage is done, what is the next stage to move too. NextStage = "Stage2", }, Stage2 = { MonsterList = {"mogus_skeleton_warrior","mogus_skeleton_mage","mogus_skeleton_archer",}, TotalWaves = 1, MonstersPerWave = {Base = 1, Bonus=1}, Range = {Min = 1, Max = 7}, StartWaveMessage = "Mogus's minions grow stronger.", NextStage = "Stage3", }, Stage3 = { MonsterList = {"mogus_skeleton_warrior","mogus_skeleton_mage","mogus_skeleton_archer",}, TotalWaves = 1, MonstersPerWave = {Base = 1, Bonus=1}, Range = {Min = 1, Max = 7}, StartWaveMessage = "Mogus's minions grow stronger.", NextStage = "Stage4", }, Stage4 = { MonsterList = {"mogus_skeleton_warrior","mogus_skeleton_mage","mogus_skeleton_archer",}, TotalWaves = 1, MonstersPerWave = {Base = 1, Bonus=1}, Range = {Min = 1, Max = 7}, StartWaveMessage = "Mogus's minions grow stronger.", NextStage = "Stage5", }, Stage5 = { MonsterList = {"mogus_boss",}, TotalWaves = 1, MonstersPerWave = {Base = 1, Bonus=0}, Range = {Min = 1, Max = 1}, StartWaveMessage = "[FF7700]Mogus:[-] Death to all who challange me.", --- the last stage must have NextStage being "EndStage" so the system knows to shut down --- and wait till the next spawn cycle. NextStage = "EndStage" }, } }