Go Back   Steam Users' Forums > Steam Game Discussions > T - Z > Team Fortress 2

Reply
 
Thread Tools Display Modes
Old 08-17-2012, 08:09 AM   #1
Bowtie
 
 
 
Join Date: May 2012
Reputation: 85
Posts: 22
Make your own robot waves!

Hey guys, last night I was messing up with GCFScape so that I could edit my HUD and I somehow figured how to edit the MvM waves to be easier or more difficult and if you're making a MvM map this will be you useful a lot.
  • Download this zip
  • Extract with the same name inside the "scripts" folder.
    (ex. C:\Program Files\Steam\steamapps\USERNAME\team fortress 2\tf\scripts\population)
  • Open one of the .pop files with a text editor and edit has you like it
Explaining some values:

StartingCurrency, this is the money value that you start when you load up the map before any wave starts, it goes to a limit of 30000 but if you grab money from the robots it can pass that limit.

RespawnWaveTime, makes the robot waves respawn times bigger or lower, depends of the defined number.

CanBotsAttackWhileInSpawnRoom, its a variable of two values "yes" or "no", if "yes" is defined the bots will attack before they jump of the cliffs.

You can check the example.pop inside the example folder in the zip for a better explanation of how to edit the robot waves.

Code:
// This .pop file defines a Population, and is usually owned and
// controlled by the tf_populator entity.
//
// Populations consist of one or more Populators.  
// All Populators in a .pop file run simultaneously unless stated otherwise. 
// For example, if you have three PeriodicSpawn populators, all three
// will be spawning entities according to their parameters.
// 
// In general, Populators contain one Spawner.  When a Spawner is invoked,
// it actually spawns one or more entities into the world. 

// NOTE: This particular .pop file is for documentation purposes, and
// tries to show all available features, not necessarily a useful population.
//

// Available Global Options (specified outside Populators):
//
// StartingCurrency	<amount>
//		Specifies the amount of currency that players should start with
//

// Templates are specified in a separate block of Templates, and then referenced 
// inside WaveSpawn or TFBot entries. 

// Available Populators:
//
// RandomPlacement
//		A RandomPlacement Populator is invoked once at the start
//		of each round, and spawns entities at random locations
//		throughout the map. For example, a RandomPlacement might
//		place random Sentry guns throughout a map.
//
// PeriodicSpawn
//		A PeriodicSpawn Populator invokes its Spawner periodically.
//		For example, a PeriodicSpawn might spawn a TFBot every 30 seconds.
//
// WaveSpawn
//		A WaveSpawn Populator spawns a "wave" of N entities, and has
//		the special property that only ONE WaveSpawn at a time in a
//		.pop file is active - the first one. Once that WaveSpawn is
//		finished, it shuts off and the next WaveSpawn in the file
//		becomes active, and so on.
// 


// Available Spawners:
//
// TFBot 
//		Spawns TFBots of a specified class and skill.
//
// SentryGun
//		Spawns unowned Sentry guns at a specified upgrade level.
//
// RandomChoice
//		Contains a set of spawners and invokes one at random.
//
// Squad
//		Contains a set of spawners, all are invoked and collected into a "squad".
//
// Mob
//		Spawns N instances of the spawner it contains, ie: 15 TFBots.
//


ExamplePopulation
{
	// Global options
	StartingCurrency				100		// Players start with 100 bucks
	RespawnWaveTime					12		// Override default respawn time as if it was being set with entity i/o
	CanBotsAttackWhileInSpawnRoom	no		// Default if omitted is "yes".  Set to "no" to prevent bots from attacking while invulnerable in their spawn rooms
	AddSentryBusterWhenDamageDealtExceeds 3000 // Default is ommited is 3000 points of damage inflicted by your sentry gun. Set this to override the threshold at which a Sentry Buster will be dispatched.
	AddSentryBusterWhenKillCountExceeds 15	// Default is ommited is 15 kills inflicted by your sentry gun. Set this to override the threshold at which a Sentry Buster will be dispatched.
	Advanced	1							// Flags this experienced as difficult.  Things like achievements look for this.
	
	Templates
	{
		// A template for a TFBot entry that creates a Natascha wielding Heavy.
		T_TFBot_NataschaHeavy
		{
			Class HeavyWeapons
			Skill Easy
			Attributes RemoveOnDeath
			Item "Natascha"
			Item "Football Helmet"
		}
	
		// A template for a WaveSpawn creates 5 Natascha wielding Heavies. 
		//	- Note that you can reference other templates inside templates.
		//	- In this example, the wave spawn template overrides the skill of the Heavies to be Normal (which the Template has initialized as Easy)
		T_WaveSpawn_Heavies
		{
			TotalCount 5
			MaxActive 1
			WaveDoneWhen AllDead		

			TFBot
			{
				Template T_TFBot_NataschaHeavy
				Skill Normal   
			}
		}
		
		// A template for a WaveSpawn that creates Pyros, and drops lots of money. 
		T_WaveSpawn_MoneyPyros
		{
			Template T_WaveSpawn_Heavies
			
			TotalCurrency 2000
			
			// WARNING NOTE: This block overrides the entire TFBot block in T_WaveSpawn_Heavies.
			// i.e. this will NOT result in Pyros wielding natachas & helmets & being restricted to melee only.
			TFBot
			{
				Class Pyro
			}
		}
	}

	// A "mission" defines a set of TFBots that the "AI Director" can send in to accomplish certain context-specific goals	
	Mission
	{
		Objective Sniper							// The mission objective. Available missions: "Sniper" (add harassing snipers), "Spy" (add harassing spies), and "DestroySentries" (send in bots who focus on killing overly successful sentry guns)

		Where spawn_sniper_mission					// Where the mission bots will spawn

		BeginAtWave 4								// The wave number (1 to N) at which this mission becomes active
		RunForThisManyWaves 3						// How many waves this mission is active. This example would have snipers active for waves 4, 5, and 6
		
		CooldownTime 90								// The minimum time between spawning mission sorties
		DesiredCount 2								// How many copies of the spawner should be sent in

		TFBot										// The mission payload
		{
			Class Sniper
			Skill Hard
			Name Sniper
		}
	}

	
	// this populator places 30 idling, bat-wielding Scouts scattered throughout the map
	RandomPlacement
	{
		Count 30				// the number of times to invoke the given spawner
		
		MinimumSeparation 750	// the minimum distance between entities spawned
		
		TFBot					// a Spawner that spawns a TFBot
		{
			Name "Badass Bot"				// (player) name, which will be displayed in-game.  will default to the class name if not specified.
			Class Scout						// class can be: Scout, Soldier, Demoman, Heavyweapons, Pyro, Medic, Sniper, Spy, Engineer
			Skill Easy						// skill can be: Easy, Normal, Hard, or Expert
			Health <value>					// if specified, overrides the normal starting health of this bot
			Scale <value>					// if specified, sets the model scale of this bot (overrides the default scale for minibosses)
			Item <item definition name>		// if specified, gives the bot the item. Multiple items can be listed. Each item will remove any
											// existing item in its loadout slot, so if you specify multiple items in the same loadout slot, 
											// only the last one will be left on the bot.
			Attributes RemoveOnDeath		// attributes can be:
											//		RemoveOnDeath (kick this bot from the game when it dies)
											//		Aggressive (make this bot "aggressive" - behavior dependant)
											//		SuppressFire (don't allow this bot to fire its weapon)
											//		DisableDodge (don't allow this bot to dodge left/right in combat)
											//		BecomeSpectatorOnDeath (send this bot to the spectator team when it dies)
											//		RetainBuildings (any buildings built by this bot should not blow up if this bot is removed)
											//		SpawnWithFullCharge (any weapons that build up a charge over time will spawn fully charged)
											//		AlwaysCrit (all shots will be critical hits)
											//		HoldFireUntilFullReload (dont fire until our weapon is fully reloaded after a barrage - for rocket launchers, grenade launchers, shotguns, etc)
											
			WeaponRestrictions MeleeOnly	// if specified, restricts the weapons this bot is allowed to use. Restrictions can be: MeleeOnly, PrimaryOnly, or SecondaryOnly
			BehaviorModifiers Idler			// if specified, sets this bot's initial behavior. Allowed values:
											//		Idler (stands around idle until a player gets close or injures them)
											//		Mobber	(picks a random player and chases them down, regardless of where they run)
			CharacterAttributes				// same attributes as those listed in items_master.txt
			{
				"move speed bonus"			"3"
				"dmg from sentry reduced"	"0.8"
			}											
			Tag <custom tag>				// if specified, adds the given custom tag (no internal spaces) to the bot's set of tags. Bots will pay attention to func_nav_avoid or func_nav_prefer entities with matching tags.
			MaxVisionRange <range>			// if specified, sets the farthest range at which this bot can see enemies
		}
	}


	// this populator places 10 level three sentry guns scattered throughout the map, but only on navigation areas marked as SENTRY_SPOT
	RandomPlacement
	{
		Count 10
		
		MinimumSeparation 750
		
		NavAreaFilter SENTRY_SPOT			// when collecting potential nav areas to spawn, only consider areas that have the SENTRY_SPOT flag
		
		SentryGun							// a Spawner that spawns a Sentry gun
		{
			Level 3							// ... a level 3 Sentry gun (can be 1 or 2 as well)
		}
	}

	
	// every 60 to 90 seconds, spawn either a melee-only mob of TFBots that chase down the players
	// or spawn a squad of 4 TFBots that move together and attack the players
	PeriodicSpawn
	{
		Where Behind						// find a nearby hidden spot behind the players to spawn

		When								// specify how often our Spawner is invoked. In this case, we pick a random
		{									// interval between 60 and 90 seconds.  Alternatively, we could also say
			MinInterval 60					// "When 30" to invoke our Spawner every 30 seconds.
			MaxInterval 90
		}
		
		// our Spawner is a RandomChoice, which picks at random from the Spawners it contains
		RandomChoice
		{
			Squad		// choice 1: a Squad Spawner which, in this case, creates a squad of 4 TFBots: Soldier, Pyro, Demoman, and Heavyweapons
			{
				TFBot
				{
					Class Soldier
					Skill Easy
				}

				TFBot
				{
					Class Pyro
					Skill Easy
				}

				TFBot
				{
					Class Demoman
					Skill Easy
				}

				TFBot
				{
					Class HeavyWeapons
					Skill Easy
				}
			}

			Mob		// choice 2: a Mob Spawner which will create a mob of 15 bat-wielding Scout mobbers
			{
				Count 15

				TFBot
				{
					Class Scout
					WeaponRestrictions MeleeOnly				
					BehaviorModifiers Mobber
				}
			}
			
			Mob		// choice 3: a Mob Spawner which will create a mob of 15 fist-wielding Heavy mobbers
			{
				Count 15

				TFBot
				{
					Class HeavyWeapons
					WeaponRestrictions MeleeOnly				
					BehaviorModifiers Mobber
				}
			}
			
			Mob		// choice 4: a Mob Spawner which will create a mob of 15 axe-wielding Pyro mobbers
			{
				Count 15

				TFBot
				{
					Class Pyro
					WeaponRestrictions MeleeOnly				
					BehaviorModifiers Mobber
				}
			}
			
			Mob		// choice 5: a Mob Spawner which will create a mob of 15 knife-wielding Spy mobbers
			{
				Count 15

				TFBot
				{
					Class Spy
					WeaponRestrictions MeleeOnly
					BehaviorModifiers Mobber
				}
			}
		}
	}


	// every 30 seconds, throw in a Spy or a Sniper to keep the players on their toes
	PeriodicSpawn
	{
		Where Anywhere						// find a nearby hidden spot spawn

		When 30								// spawn every 30 seconds

		RandomChoice
		{		
			TFBot
			{
				Class Sniper
				Skill Normal
				Attributes RemoveOnDeath			
			}

			TFBot
			{
				Class Spy
				Skill Normal
				Attributes RemoveOnDeath			
			}
		}
	}
	
	// a single wave can contain multiple WaveSpawns
	Wave
	{
		Description "Lots of bad guys in this wave!"	// the given description text will be displayed in the HUD when the prior Wave is counting down its 'WaitWhenDone' timer, and thereafter.
		Sound "Announcer.IncomingMob"			// the given sound will be played when this Wave starts
		WaitWhenDone 25					// specifies a delay, in seconds, to wait after this wave is "done" 

		StartWaveOutput					// when this Wave becomes active, fire an output to the given target entity
		{
			Target MyNamedEntity			// the mapper-specified name of an entity
			Action OnTrigger			// the action to send to the entity
		}

		DoneOutput					// when this Wave is done, after the WaitWhenDone timer elapses
		{
			Target MyNamedEntity
			Action OnTrigger
		}

		WaveSpawn
		{
			Name "FIRST WAVE"					// Name of the wave. Not required, but if another wave is waiting for this wave, this wave needs a name.
			Where wave_spawn_here				// Defines where this wave will spawn into the environment.
												// In this case, an entity name of "wave_spawn_here" was given.
												// All entities in the map with that name will be collected
												// and one picked at random as the location to spawn from.
												// Alternatively, these special Where locations can be used:
												// AHEAD	(spawns wave somewhere nearby ahead of the players, just out of sight)
												// BEHIND	(spawns wave somewhere nearby behind the players, just out of sight)
												// ANYWHERE (spawns wave somewhere nearby the players, just out of sight)
			
			TotalCount 16						// defines the total number of times the Spawner will be invoked in this wave
			MaxActive 8							// defines the maximum number of entities from this WaveSpawn that can be alive at the same time
			SpawnCount 4						// defines the number of entities to spawn at a time as a group. Default is 1.	
			TotalCurrency 200					// Total amount of currency dropped by this wave. Should be cleanly divisible by TotalCount, so bots all drop the same amount.
	
			WaitBeforeStarting 5				// specifies the duration in seconds to wait once this WaveSpawn becomes active 
												// and the first time its Spawner is invoked
												
			Support 1							// Marks this WaveSpawn as a Support wave. Support waves will keep running until all 
												// non-Support waves are finished, even after the TotalCount is reached. Support waves
												// will not drop any more currency after TotalCurrency is reached.
												
			RandomSpawn 1						// Marks the WaveSpawn as wanting to select a new "Where" spawn location for every bot that spawns.
												// The default is 0, which spawns the entire SpawnCount group at the same location.
												// The next group will pick a random "Where" spawn location for the entire group to use.
												
			WaitBetweenSpawns 0					// specifies a delay, in seconds, between spawning SpawnCount groups of entities
			
			// ***NOTE: Any of the sound and text warnings as well as the outputs below can be omitted. They are all listed here for completeness.
			
			StartWaveWarningSound "Player.YouAreIt"				// when this WaveSpawn becomes active (which might be before it starts spawning), emit this sound to all players
			StartWaveOutput										// when this WaveSpawn becomes active, fire an output to the given target entity
			{
				Target MyNamedEntity			// the mapper-specified name of an entity
				Action OnTrigger				// the action to send to the entity
			}
			
			FirstSpawnWarningSound "Player.YouAreIt"			// when this WaveSpawn first invokes its Spawner, emit this sound to all players
			FirstSpawnOutput									// when this WaveSpawn first invokes its Spawner, fire an output to the given target entity
			{
				Target MyNamedEntity
				Action OnTrigger
			}
	
			LastSpawnWarningSound "Player.YouAreIt"				// when this WaveSpawn invokes its Spawner for the last time, emit this sound to all players
			LastSpawnOutput										// when this WaveSpawn invokes its Spawner for the last time, fire an output to the given target entity
			{
				Target MyNamedEntity
				Action OnTrigger
			}
	
			DoneWarningSound "Player.YouAreIt"					// when this WaveSpawn relinquishes control to the next WaveSpawn, emit this sound to all players
			DoneOutput											// when this WaveSpawn relinquishes control to the next WaveSpawn, fire an output to the given target entity
			{
				Target MyNamedEntity
				Action OnTrigger
			}
	
			// the Spawner for this WaveSpawn will pick one of three TFBots at random each time it is invoked
			RandomChoice
			{
				TFBot
				{
					Class Medic
					Skill Easy
					Attributes RemoveOnDeath
				}
				TFBot
				{
					Class Soldier
					Skill Easy
					Attributes RemoveOnDeath
				}
				TFBot
				{
					Class Demoman
					Skill Easy
					Attributes RemoveOnDeath
				}
			}
		}
		
		// the next wave spits out 10 Heavies and waits for them to all die
		WaveSpawn 
		{
			Name "HEAVY WAVE"
			Where wave_spawn_here
			
			TotalCount 10
			MaxActive 10
			WaitForAllSpawned "FIRST WAVE"								// waits for the wave spawn named "FIRST WAVE" to say it is done spawning all of its TFBots before starting
	
			TFBot
			{
				Class Heavyweapons
				Skill Easy
				Attributes RemoveOnDeath
			}
		}
		
		// the last wave brings a horde of Pyros that come out in groups of 10
		WaveSpawn
		{
			Where wave_spawn_here
			
			TotalCount 30
			MaxActive 10
	
			TFBot
			{
				Class Pyro
				Skill Normal
				Attributes RemoveOnDeath
			}
		}

		WaveSpawn
		{
			TotalCurrency 25		// the total amount of currency dropped by all the Tanks in this wave
			TotalCount 1

			Tank
			{
				Health 50000
				Speed 75
				Name "Sherman"
				Skin 0									// 0 - normal skin, 1 - final wave skin
				StartingPathTrackNode "boss_path_1"		// if this is omitted, the Tank will find the path_track with no previous node and start there

				OnKilledOutput							// output sent when the Tank is killed
				{
					Target tank_died_relay
					Action Trigger                         
				}

				OnBombDroppedOutput						// output sent when the Tank drops its bomb once it reaches the end of its path
				{
					Target bomb_dropped_relay
					Action Trigger                         
				}
			}
		}

	} // end Wave
}
example.pop file

Loading custom population files:

You can actually make your own population files and add them to your folder, to load them you can use the developer console command: tf_mvm_popfile name, where name is the name of the .pop file (ex. if I had a file called gray.pop I would type tf_mvm_popfile gray to load the robot waves).

Last edited by Bowtie: 08-17-2012 at 08:11 AM.
Bowtie is offline  
Reply With Quote
Old 08-17-2012, 08:19 AM   #2
Cheesebot.exe
 
Join Date: Jul 2012
Reputation: 101
Posts: 107
isn't tinkering with code that isn't scripting banned by VAC?
Cheesebot.exe is offline   Reply With Quote
Old 08-17-2012, 08:31 AM   #3
Bowtie
 
 
 
Join Date: May 2012
Reputation: 85
Posts: 22
Quote:
Originally Posted by Cheesebot.exe View Post
isn't tinkering with code that isn't scripting banned by VAC?
Those are scripts?

If I'm wrong someone please correct me.
Bowtie is offline   Reply With Quote
Old 08-17-2012, 08:33 AM   #4
Fancypanther
 
Banned
Join Date: Aug 2012
Reputation: 126
Posts: 651
First post on the forum.
Totally legit.
Fancypanther is offline   Reply With Quote
Old 08-17-2012, 08:34 AM   #5
fefobiz
 
 
 
Join Date: Nov 2010
Reputation: 137
Posts: 729
Interesting.

Will take a look when I get home.
fefobiz is offline   Reply With Quote
Old 08-17-2012, 08:36 AM   #6
Sisaroth
 
Join Date: Jun 2011
Reputation: 8
Posts: 196
Quote:
Originally Posted by Cheesebot.exe View Post
isn't tinkering with code that isn't scripting banned by VAC?
You run on your own server whatever you want afaik.
Sisaroth is offline   Reply With Quote
Old 08-17-2012, 08:38 AM   #7
t-Lol
 
 
 
Banned
Join Date: Jun 2012
Reputation: 166
Posts: 513
Quote:
Originally Posted by Fancypanther View Post
First post on the forum.
Totally legit.
Yeah, because the entire TF2 community uses the forum.

What if he decided to make an account here to share this with people? Many times I made an account on many forums to share something about the game.
t-Lol is offline   Reply With Quote
Old 08-17-2012, 08:42 AM   #8
Trotim
 
Join Date: May 2010
Reputation: 1590
Posts: 6,877
Of course this is legit. Valve provided an example map and a commented example .pop file. You can make your own MvM maps and missions, and you can change the "mission" i.e. bot waves without making a new map.
Trotim is offline   Reply With Quote
Old 08-17-2012, 09:03 AM   #9
Sisaroth
 
Join Date: Jun 2011
Reputation: 8
Posts: 196
hmm, just made an "improved" version of coaltown. Final wave with 360 scouts 16 super pyros and a tank with 500k HP (default 33k).

Now gonna try it out to see if it works. (im already giggling as i type this)
Sisaroth is offline   Reply With Quote
Old 08-17-2012, 09:04 AM   #10
Cheesebot.exe
 
Join Date: Jul 2012
Reputation: 101
Posts: 107
Quote:
Originally Posted by Bowtie View Post
Those are scripts?

If I'm wrong someone please correct me.
I'm not very experienced but I'm pretty sure that scripting has to be done in .cfg

read this
http://wiki.teamfortress.com/wiki/Scripting
Cheesebot.exe is offline   Reply With Quote
Old 08-17-2012, 09:05 AM   #11
The Red Pyro
 
Banned
Join Date: Aug 2012
Reputation: 123
Posts: 500
Oh wow
Everyone rep this man go go go
Pyro commands you
The Red Pyro is offline   Reply With Quote
Old 08-17-2012, 09:06 AM   #12
itsfocus
 
 
 
Join Date: Oct 2011
Reputation: 53
Posts: 293
Quote:
Originally Posted by Cheesebot.exe View Post
isn't tinkering with code that isn't scripting banned by VAC?
No, it's fine. You're allowed to take files from the GCF and edit them as long as you put them in your TF folder and don't somehow alter the GCF.
itsfocus is offline   Reply With Quote
Old 08-17-2012, 09:24 AM   #13
Sisaroth
 
Join Date: Jun 2011
Reputation: 8
Posts: 196
working xD http://imgur.com/k2htg
Sisaroth is offline   Reply With Quote
Old 08-17-2012, 10:22 AM   #14
lostprophetpunk
 
 
 
Join Date: Jun 2011
Reputation: 1094
Posts: 2,835
Heya there,

Thanks for lovely tutorial etc. The only thing is when I test the custom file I have on a dedicated server...it shows the wave number as 0/0 and nothing shows.

What am I doing wrong...or what am I missing?

Code:
StartingCurrency 30000

WaveSchedule
{
	StartingCurrency		30000
	RespawnWaveTime 		5
	CanBotsAttackWhileInSpawnRoom no
	AddSentryBusterWhenDamageDealtExceeds 3000
	AddSentryBusterWhenKillCountExceeds 15
}

////////////////
/////Wave 1/////
////////////////

Wave
{
	Description "Just a warm up"
	Sound "Announcer.IncomingMob"
	WaitWhenDone 25
	Checkpoint Yes
		
	StartWaveOutput
		{
			Target wave_start_relay
			Action Trigger
		}
	DoneOutput					
		{
			Target wave_finished_relay
			Action trigger
		}
	
	WaveSpawn
	{
		Name "HeavyWave"
		Where AHEAD
		TotalCount 8
		MaxActive 4
		SpawnCount 4
		TotalCurrency 480
		WaitBeforeStarting 5
		WaitBetweenSpawns 0	
		
		TFBot
		{
			Class Heavyweapons
			Skill Normal
			Attributes RemoveOnDeath
			Item "Natascha"
			Item "Football Helmet"
		}
	}
	
	WaveSpawn 
	{
		Name "ScoutWave"
		Where AHEAD
			
		TotalCount 20
		MaxActive 10
		TotalCurrency 200
		WaitForAllSpawned "HeavyWave"
	
		TFBot
		{
			Class Heavyweapons
			Skill Easy
		}
	}
}
lostprophetpunk is offline   Reply With Quote
Old 08-17-2012, 10:24 AM   #15
DarkDXZ
 
 
 
Join Date: Sep 2011
Reputation: 404
Posts: 2,912
CHALLENGE!
5 tanks + 5 (Octo)Deflector Heavies + 40 Medics + 5 RF Soldiers/Demos + general cannon fodder

Lol, u mad bros?
But tbh, nice find/share/whatever, mister!
DarkDXZ is offline   Reply With Quote
Reply

Go Back   Steam Users' Forums > Steam Game Discussions > T - Z > Team Fortress 2


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -7. The time now is 02:45 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site Content Copyright Valve Corporation 1998-2014, All Rights Reserved.