--[[ SubWave keywords -Name -Where (can use "_random" for a random location) -WaitBeforeStarting -WaitBetweenSpawns -WaitForAllSpawned -WaitForAllDead -TotalCount -SpawnCount -MaxActive -TotalCurrency -IsSquad -Templates -RandomChoice -RandomChoiceTemplateSets (chosen Templates set will be added into Templates) -SupportInfinite -SupportLimited -SendSpyAnnouncement (enabling will make this subwave cause a spy announcement on spawn) -SendSniperAnnouncement -SpawnIndividualTemplate (if a subwave has multiple Templates, the next spawn wave only happens when all spawned robots of that subwave dies, enabling this will make it a bot spawns the moment one dies, cycling through the template) ]] local testWave1 = { { Name = "1a", Where = "spawnbot", WaitBeforeStarting = 1, WaitBetweenSpawns = 0, TotalCount = 8, SpawnCount = 4, MaxActive = 4, TotalCurrency = 200, IsSquad = true, Templates = { Extend(ROBOT_GIANT.Giant_Soldier_Crit, { Health = 10, }), ROBOT_STANDARD.Medic_QuickUber, ROBOT_STANDARD.Medic_QuickUber, Extend(ROBOT_STANDARD.Heavyweapons_Fist, { Health = 10, }), }, }, { Name = "1inf_support", Where = "spawnbot", WaitBeforeStarting = 5, WaitBetweenSpawns = 0, SupportInfinite = true, SpawnCount = 1, MaxActive = 1, TotalCount = 100, -- $1 per bot TotalCurrency = 100, Templates = {}, RandomChoiceTemplateSets = { { Extend(ROBOT_GIANT.Giant_Boxing_Heavy, { Health = 10, }), }, -- templates 1 { Extend(ROBOT_GIANT.Giant_DemoMan_PrinceTavish, { Health = 10, }), }, -- template 2 }, }, { Name = "1b", Where = "spawnbot", WaitForAllSpawned = "1a", WaitBeforeStarting = 0, WaitBetweenSpawns = 2, TotalCount = 6, SpawnCount = 2, MaxActive = 2, TotalCurrency = 100, RandomChoice = { ROBOT_STANDARD.Scout_Melee, ROBOT_STANDARD.Scout_Fish, -- ROBOT_STANDARD.Scout_SunStick, }, }, { Name = "1c", Where = "spawnbot", WaitForAllSpawned = "1b", WaitBeforeStarting = 0, WaitBetweenSpawns = 2, TotalCount = 2, SpawnCount = 2, MaxActive = 2, TotalCurrency = 50, Templates = { Extend(ROBOT_STANDARD.Scout_SunStick, { Attributes = { BOT_ATTRIBUTES.ALWAYS_CRIT }, }), }, }, } local testWaveCashDistributionOnEnd = { { Name = "1a", Where = "spawnbot", WaitBeforeStarting = 0, WaitBetweenSpawns = 0.1, TotalCount = 1, SpawnCount = 1, MaxActive = 1, TotalCurrency = 0, Templates = { { Class = CLASSES.Scout, Health = 1, ClassIcon = "scout", }, }, }, { Name = "1inf_support", Where = "spawnbot", WaitBeforeStarting = 5, WaitBetweenSpawns = 0, SupportInfinite = true, SpawnCount = 1, MaxActive = 1, TotalCount = 100, -- $1 per bot TotalCurrency = 100, Templates = {}, RandomChoice = { Extend(ROBOT_GIANT.Giant_Boxing_Heavy, { Health = 10, }), Extend(ROBOT_GIANT.Giant_DemoMan_PrinceTavish, { Health = 10, }), }, }, } local testQueueWave = { { Name = "1a", Where = "spawnbot", WaitBeforeStarting = 0, WaitBetweenSpawns = 0.1, TotalCount = 50, SpawnCount = 1, MaxActive = 22, TotalCurrency = 100, Templates = { { Class = CLASSES.Scout, Health = 1, }, }, }, } local testTankWave = { { Name = "tank1", Where = "", TotalCount = 1, SpawnCount = 1, MaxActive = 1, TotalCurrency = 500, Templates = { { IsTank = true, StartingPathTrackNode = "tank_middle_1", Name = "combattank|minigun|rocketpod", Health = 500, Speed = 100, }, }, }, { Name = "tank_support_b", Where = "spawnbot", WaitBeforeStarting = 0, WaitBetweenSpawns = 2, TotalCount = 2, SpawnCount = 2, MaxActive = 2, TotalCurrency = 100, RandomChoice = { Extend(ROBOT_GIANT.Giant_Soldier, { Health = 10, }), Extend(ROBOT_GIANT.Giant_Soldier_Crit, { Health = 10, }), -- ROBOT_STANDARD.Scout_SunStick, }, }, { Name = "tank2", Where = "", SupportInfinite = true, -- WaitForAllDead = "tank1", TotalCount = 1, SpawnCount = 1, MaxActive = 1, TotalCurrency = 500, Templates = { { IsTank = true, StartingPathTrackNode = "tank_left_1", Name = "tankboss", Health = 500, Speed = 100, Skin = 1, }, }, }, } local testMissionWave = { { Name = "tank2", Where = "", -- WaitForAllDead = "tank1", TotalCount = 1, SpawnCount = 1, MaxActive = 1, TotalCurrency = 0, Templates = { { IsTank = true, StartingPathTrackNode = "tank_left_1", Name = "tankboss", Health = 500, Speed = 10, }, }, }, { Name = "teleport_mission", Where = "spawnbot", WaitBeforeStarting = 0, WaitBetweenSpawnsAfterDeath = 20, SupportInfinite = true, IsMission = true, TotalCount = 1, SpawnCount = 1, MaxActive = 1, TotalCurrency = 0, Templates = { Extend(ROBOT_STANDARD.Engineer_Sentry_Tele_Battle, { BuildDisposableSentry = true, Items = { "The Gunslinger" }, CharacterAttributes = { ["move speed bonus"] = 1.5, }, }), }, }, { Name = "teleport_mission2", Where = "spawnbot", WaitBeforeStarting = 0, WaitBetweenSpawnsAfterDeath = 20, SupportInfinite = true, IsMission = true, TotalCount = 1, SpawnCount = 1, MaxActive = 1, TotalCurrency = 0, Templates = { Extend(ROBOT_STANDARD.Engineer_Sentry_Tele_Battle, { BuildDispenser = true, CharacterAttributes = { ["move speed bonus"] = 1.5, }, }), }, }, { Name = "sniper_mission_w6", Where = "spawnbot", WaitBeforeStarting = 3, WaitBetweenSpawnsAfterDeath = 20, SupportInfinite = true, IsMission = true, TotalCount = 2, SpawnCount = 2, MaxActive = 2, TotalCurrency = 0, SendSniperAnnouncement = true, Templates = { Extend(ROBOT_STANDARD.Sniper_Sydney_Sleeper, { Attributes = { BOT_ATTRIBUTES.ALWAYS_CRIT, }, }), }, }, { Name = "spy_mission_w3", Where = "spawnbot", WaitBeforeStarting = 1, WaitBetweenSpawnsAfterDeath = 20, SupportInfinite = true, IsMission = true, TotalCount = 2, SpawnCount = 2, MaxActive = 2, TotalCurrency = 0, SendSpyAnnouncement = true, Templates = { { Class = CLASSES.Spy, Skill = BOT_SKILL.EXPERT, Name = "Spy", }, }, }, } local testIndefinitiveWave = { { Name = "1a", Where = "spawnbot", WaitBeforeStarting = 9999999, WaitBetweenSpawns = 0, TotalCount = 1, SpawnCount = 1, MaxActive = 1, TotalCurrency = 0, Templates = { { Class = CLASSES.Scout, Health = 1, }, }, }, } local allWaves = { [1] = testWave1, [2] = testTankWave, [3] = testQueueWave, [4] = testWaveCashDistributionOnEnd, [5] = testMissionWave, [6] = testIndefinitiveWave, } local missionInfo = { PopfileNameDisplay = "roy bot test", IncludeScripts = { "tankextensions_main", "tankextensions/combattank", "tankextensions/combattank_weapons/minigun", "tankextensions/combattank_weapons/rocketpod", "tankextensions/combattank_weapons/railgun", "tankextensions/combattank_weapons/cannon", "tankextensions/combattank_weapons/fireball", "tankextensions/bannertank", "tankextensions/helicopter", }, SentryBusterWaitBeforeStarting = 15, SentryBusterDamageDealtThreshold = 10, } local function waveStart(wave) util.PrintToChatAll("[TEST-WAVE]: " .. "STARTING TEST WAVE") if allWaves[wave] then RunWave(allWaves[wave]) end end local function waveInit(wave) InitMission(missionInfo) local waveData = allWaves[wave] if waveData then ParseWave(waveData, false) WaveBarGen(waveData) end end if OnWaveStartFuncs then table.insert(OnWaveStartFuncs, waveStart) else function OnWaveStart(wave) waveStart(wave) end end if OnWaveInitFuncs then table.insert(OnWaveInitFuncs, waveInit) else function OnWaveInit(wave) waveInit(wave) end end