Difference between revisions of "GizmosBossSpawner"
(→Example BossSpawner GameObject) |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 15: | Line 15: | ||
<youtube>veHtB4QH0Ps</youtube> | <youtube>veHtB4QH0Ps</youtube> | ||
− | ==Example BossSpawner Table | + | ==Example BossSpawner Table== |
+ | example_bossapwner_undead.lua | ||
+ | <syntaxhighlight lang="Lua"> | ||
+ | require 'boss_spawner.boss_spawner' | ||
− | ==Example BossSpawner GameObject | + | -- restart after 7200 seconds (2 hours) |
+ | -- this overrides the boss_spawner_config TimerRestartDelay | ||
+ | BossSpawner.Config.TimerRestartDelay = 7200 | ||
+ | |||
+ | -- custom BossSpawner table to hold our spawn information | ||
+ | BossSpawner.ExampleBossSpawnerUndead = | ||
+ | { | ||
+ | -- the stage to start with when turning on or restarting | ||
+ | StartingStage = "Stage1", | ||
+ | Stages = | ||
+ | { | ||
+ | Stage1 = | ||
+ | { | ||
+ | MonsterList = {"skeleton","zombie",}, | ||
+ | TotalWaves = 4, | ||
+ | MonstersPerWave = {Base = 1, Bonus = 1}, | ||
+ | Range = {Min = 4, Max = 8}, | ||
+ | StartWaveMessage = "Undead appear around you.", | ||
+ | NextStage = "Stage2", | ||
+ | }, | ||
+ | Stage2 = | ||
+ | { | ||
+ | MonsterList = {"skeleton","zombie","skeleton_archer",}, | ||
+ | TotalWaves = 3, | ||
+ | MonstersPerWave = {Base = 1, Bonus=2}, | ||
+ | Range = {Min = 4, Max = 8}, | ||
+ | StartWaveMessage = "An undead presence begins to fill the air.", | ||
+ | NextStage = "Stage3", | ||
+ | }, | ||
+ | Stage3 = | ||
+ | { | ||
+ | MonsterList = {"skeleton","zombie","skeleton_archer","skeleton_mage",}, | ||
+ | TotalWaves = 2, | ||
+ | MonstersPerWave = {Base = 2, Bonus=3}, | ||
+ | Range = {Min = 4, Max = 8}, | ||
+ | StartWaveMessage = "You feel something approaching from the world of the dead.", | ||
+ | NextStage = "Stage4" | ||
+ | }, | ||
+ | Stage4 = | ||
+ | { | ||
+ | MonsterList = {"skeleton_hq",}, | ||
+ | TotalWaves = 1, | ||
+ | MonstersPerWave = {Base = 1, Bonus=0}, | ||
+ | Range = {Min = 4, Max = 8}, | ||
+ | StartWaveMessage = "An undead champiion appears to destroy you.", | ||
+ | NextStage = "EndStage" | ||
+ | }, | ||
+ | } | ||
+ | }</syntaxhighlight> | ||
+ | |||
+ | ==Example BossSpawner GameObject== | ||
+ | example_bossapwner_undead.xml | ||
+ | <syntaxhighlight lang="Xml"> | ||
+ | <ObjectTemplate> | ||
+ | <Name>[959555]Example BossSpawner Undead</Name> | ||
+ | <Color>CDEDCD</Color> | ||
+ | <ObjectVariableComponent> | ||
+ | <StringVariable Name="Data.BossKey">ExampleBossSpawnerUndead</StringVariable> | ||
+ | </ObjectVariableComponent> | ||
+ | <ClientId>2</ClientId> | ||
+ | <ScriptEngineComponent> | ||
+ | <LuaModule Name="example_bossspawner_undead" /> | ||
+ | </ScriptEngineComponent> | ||
+ | </ObjectTemplate> | ||
+ | </syntaxhighlight> |
Latest revision as of 18:15, 8 March 2022
Contents
Download Merchant System
- Download the file here
- Version 1.0
- Release for public use
- Get your version 1.0 release here:Media:Boss_Spawner.zip
- Version 1.0
- simply unzip the scripts and template folder over as this is all independent from citadels code.
Intro To Boss Spawner
Core Files of Boss Spawner
Tables of the Boss Spawner
Example BossSpawner Table
example_bossapwner_undead.lua
require 'boss_spawner.boss_spawner'
-- restart after 7200 seconds (2 hours)
-- this overrides the boss_spawner_config TimerRestartDelay
BossSpawner.Config.TimerRestartDelay = 7200
-- custom BossSpawner table to hold our spawn information
BossSpawner.ExampleBossSpawnerUndead =
{
-- the stage to start with when turning on or restarting
StartingStage = "Stage1",
Stages =
{
Stage1 =
{
MonsterList = {"skeleton","zombie",},
TotalWaves = 4,
MonstersPerWave = {Base = 1, Bonus = 1},
Range = {Min = 4, Max = 8},
StartWaveMessage = "Undead appear around you.",
NextStage = "Stage2",
},
Stage2 =
{
MonsterList = {"skeleton","zombie","skeleton_archer",},
TotalWaves = 3,
MonstersPerWave = {Base = 1, Bonus=2},
Range = {Min = 4, Max = 8},
StartWaveMessage = "An undead presence begins to fill the air.",
NextStage = "Stage3",
},
Stage3 =
{
MonsterList = {"skeleton","zombie","skeleton_archer","skeleton_mage",},
TotalWaves = 2,
MonstersPerWave = {Base = 2, Bonus=3},
Range = {Min = 4, Max = 8},
StartWaveMessage = "You feel something approaching from the world of the dead.",
NextStage = "Stage4"
},
Stage4 =
{
MonsterList = {"skeleton_hq",},
TotalWaves = 1,
MonstersPerWave = {Base = 1, Bonus=0},
Range = {Min = 4, Max = 8},
StartWaveMessage = "An undead champiion appears to destroy you.",
NextStage = "EndStage"
},
}
}
Example BossSpawner GameObject
example_bossapwner_undead.xml
<ObjectTemplate>
<Name>[959555]Example BossSpawner Undead</Name>
<Color>CDEDCD</Color>
<ObjectVariableComponent>
<StringVariable Name="Data.BossKey">ExampleBossSpawnerUndead</StringVariable>
</ObjectVariableComponent>
<ClientId>2</ClientId>
<ScriptEngineComponent>
<LuaModule Name="example_bossspawner_undead" />
</ScriptEngineComponent>
</ObjectTemplate>