[FAQ] MvM, problems, solutions and tips

Freyja

aa
Jul 31, 2009
2,994
5,813
yyler asked me to compile a FAQ of common problems and their solutions. Being one of the first to make a MvM map after it's release, I ran into a lot of problems and had to figure out most of the solutions on my own as I was the only one encountering them.

So here's a list of problems, solutions and tips I've learned from making paradigm.

I will of course continue to update this, and I hope I can answer questions asked if I forgot something on this list.

- Common problems and solutions

My bots aren't spawning at their spawn points!

This can be caused by a few problems. The first and easiest one to fix, is the same as broken spawns on any normal map - spawns being blocked by geometry, stuck inside displacements or the floor. Make sure your spawns are hovering a few units above the floor, and the flag too.

The second problem, one I ran into a lot, is when you have your map set up similar to the official ones with a "cliff" for the bots to drop down from after they spawn. The problem is when your bots don't spawn up there, but instead spawn right at the base of the cliff.

This happens because your nav mesh hasn't generated properly to the top of the cliff. Bots can only spawn where there's a nav mesh, and usually the cliff is too high for the simple nav_generate to propagate it's sampling too. The way to fix this is quite simple, use nav_mark_walkable on all the levels of your map (the main map and the top of the cliff) before doing nav_generate, and it will generate and automatically connect the two levels.

My tank is spawning at the hatch!

This is a problem that I ran into a lot as well. It's caused by the population file referring to a path_track for the tank to spawn at, and that path track either doesn't exist or doesn't follow along a path to the hatch. If the final path node of the track that the pop_file is referring to isn't in the hatch area, then the tank will just spawn on the hatch and drop it's bomb immediately. It may also be caused by loops in the track.

Make sure your starting path node is correctly referenced in the population file, and that the path_track continues properly all the way to the hatch.

Another thing that may be causing this is the nav mesh. The tank doesn't actually follow the path like a payload cart does, for example. It uses them as a guide on where to go, but in fact uses the nav mesh for it's movement. You can have the path tracks placed at random heights, and the tank will properly angle itself to the incline below, no matter the angle, and drive directly along the surface. This means if the nav file is broken - such as there being no nav data where the tank spawns, it will teleport to the hatch.

The bots are hugging the walls, trying to pass through solid geometry!

This is caused by having jump (or other) connections to the other side of the wall in the nav mesh that the bots try to take but can't. Use nav_edit 1 too see the connections. nav_mark to select the first cell, aim at the second and nav_disconnect to break the connection. Make sure to do nav_analyse at the end of this editing or your nav mesh won't work!




- Basic tips

Learn your nav commands, they help a lot debugging problems. The most useful I found were;

- nav_edit. This command allows you to physically see the nav mesh, which is for obvious reasons extremely useful. It's also needed for a lot of other nav-related commands.

- nav_mark_walkable. As I mentioned before, this marks another area (apart from where the player is standing) for the nav mesh to start generation from. Multiple of these means you can generate two nav meshes that are normally not connected, such as the bot dropdown.

- nav_mark. This marks a cell of the nav mesh under the cursor, useful for the next command.

- nav_connect. This connects the area under your cursor with the area marked using the last command. This means you can manually assign a dropdown point between a low and high nav cell if the game doesn't originally connect them.



The pop file supports custom wave end/start output firing. You can use this in creative ways. An example, not nearly the best use however, is the forward upgrade station in Paradigm that only opens in the downtime between waves.


tf_mvm_jump_to_wave allows you to jump to a specific wave number without having to go through the previous ones. This is very useful for testing if tanks are broken or not.

- Pop File

This is half your MvM map, so it easily deserves it's own section. I'm not the best on pop files, and I don't know the more complex side of them, but I can try to get down the basics of one.

The pop file is what decides what bots spawn, where they spawn, when they spawn and how they act. It also dictates the currency and some of the entity logic.

Missions

You can generally leave missions alone unless you intend on doing something very special and unique with your bots. They basically spawn bots under more unique conditions than the general waves - for example, the sentry buster spawning when X damage is dealt by sentries, or spies spawning with custom behaviour. I haven't delved into missions much, so I can't tell you much more.

Wave

A wave is, well, a wave. They are read by the game in the order they're written in the pop file, and the number of waves you have depends on the number of separate Wave {}'s you have. Everything surrounded by the { }'s will be executed before the game saves a checkpoint and the players are given the opportunity to ready up.

Wavespawn

Wavespawn is the meat of your pop file. These go inside a corresponding Wave {}, and a wavespawn contains the information about the bots themselves.

The barebones of a wavespawn is;

Code:
Wavespawn {
Where spawnbot   //this tells the game where to spawn the bots in this group. It referres to names of named info_team_spawns

TotalCount 50 //this is the number of bots to spawn in this group. Not necessarily all at once, but all the bots inside this group will be the same.

MaxActive 10 //the maximum number of bots part of this group that can be alive at the same time. When some die, more are spawned so there's always 10 in the map (to a max of 50 total spawned, obviously)

SpawnCount 5 // The number of bots spawned per spawn

WaitBetweenSpawns 5 //The time in seconds between SpawnCount spawns a new set of bots, as long as MaxActive isn't reached.

WaitBeforeStarting 0 // The time from the start of the wave before bots in this group starts to spawn

TotalCurrency 200 // The total currency dropped from this group. This is yours to balance, but if your total currency is 200, and you have 50 bots, each bot will drop 4 cash.

Support 1 // This is if you want your wave to be a support wave. TotalCount has no bearing if this is set to 1, they will keep spawning (still heeds MaxActive and SpawnCount) until the non-support wavespawns in this wave {} have been killed.

TFBot {
Class Scout
Skill Easy
} // This is the part where you enter information about your bots. It should be self-explanatory. Refer to the example pop file for more info on what you can stick here.
}


That's essentially the makings of a pop file. They're quite simple, just a bunch of waves with nested wavespawns. There are some more complex parts, such as squads , which I recommend you refer to the dev wiki or the example pop file for.

Until you get further into your map, I recommend copying an official pop file, such as decoy or coaltown, and working from that rather than writing a whole new one.
 
Last edited:

tyler

aa
Sep 11, 2013
5,102
4,621
Thanks! This helps me a lot and I bet it will help others a lot too!

I want to remind everyone that the SDK has an example map with lots of comments that explain what the entities are and how they work (mvm_example.vmf) and there's an example pop file in tf/scripts/population. I found the example pop file to be overwhelming, but looking at one of Coaltown's at the same time helped me figure it all out. It's mostly just learning new vocabulary.

The pop file should be packed with the relative path scripts/population/mvm_yourmap_a1.pop. PackBSP will make this for you, I don't know how to do it with PakRat.

Also, for easy testing, turn on cheats (you probably have them on already for building a nav) and type into console
Code:
addcond 5
addcond 11
addcond 32
This gives you an ubercharge, a kritz, and the Disciplinary Action's speed boost effect. They wear off after a while, so be careful, but not as fast as a regular uber/kritz/boost.

You can also use the command currency_give 1000000 to quickly max out all your upgrades. I tend to use pyro when testing waves.

Finally, if you know your tank works but don't want to bother, you can kill it by entering ent_fire tankboss kill in the console after it spawns. "tankboss" is the default name of the tank in the Coaltown pop files, it might vary on the map. In the example map, for instance, the tank is named Sherman.
 
Last edited by a moderator:

Trotim

aa
Jul 14, 2009
1,195
1,045
Also in the mvm_example.txt are my 2 favorite commands that haven't been mentioned yet:

nb_blind 1 - makes bots ignore you
tf_bot_flag_kill_on_touch 1 - instantly kills whoever picks up the flag
 

Vaconcovat

L3: Member
Jan 15, 2012
116
188
Some things i found:

If bots aren't invuln in their spawnroom, make sure the func_respawnroom brush is actually touching the surface that the bots will be walking on. Mine was accidentally 2 HU above and it did not work, moved it down and now it does. Not sure if this is confirmed, but it fixed my problem.

//Comments in pop files are double slash, not a single slash.

Another useful command, hurtme -10000 gives you plenty of health, basically godmode but you still can explosive jump.
 

Turbo Lover

Fight me under Glasgow Central Station
aa
Feb 15, 2011
333
344
This gives you an ubercharge, a kritz, and the Disciplinary Action's speed boost effect. They wear off after a while, so be careful, but not as fast as a regular uber/kritz/boost.

Kritz will wear off at the end of each wave, Ubercharge and the Disciplinary Action effect will remain. Everything will be reset if you die or fail the wave.
 

jestemfajny

L1: Registered
Jan 10, 2015
4
0
MY problem

yyler asked me to compile a FAQ of common problems and their solutions. Being one of the first to make a MvM map after it's release, I ran into a lot of problems and had to figure out most of the solutions on my own as I was the only one encountering them.

So here's a list of problems, solutions and tips I've learned from making paradigm.

I will of course continue to update this, and I hope I can answer questions asked if I forgot something on this list.

- Common problems and solutions

My bots aren't spawning at their spawn points!

This can be caused by a few problems. The first and easiest one to fix, is the same as broken spawns on any normal map - spawns being blocked by geometry, stuck inside displacements or the floor. Make sure your spawns are hovering a few units above the floor, and the flag too.

The second problem, one I ran into a lot, is when you have your map set up similar to the official ones with a "cliff" for the bots to drop down from after they spawn. The problem is when your bots don't spawn up there, but instead spawn right at the base of the cliff.

This happens because your nav mesh hasn't generated properly to the top of the cliff. Bots can only spawn where there's a nav mesh, and usually the cliff is too high for the simple nav_generate to propagate it's sampling too. The way to fix this is quite simple, use nav_mark_walkable on all the levels of your map (the main map and the top of the cliff) before doing nav_generate, and it will generate and automatically connect the two levels.

My tank is spawning at the hatch!

This is a problem that I ran into a lot as well. It's caused by the population file referring to a path_track for the tank to spawn at, and that path track either doesn't exist or doesn't follow along a path to the hatch. If the final path node of the track that the pop_file is referring to isn't in the hatch area, then the tank will just spawn on the hatch and drop it's bomb immediately. It may also be caused by loops in the track.

Make sure your starting path node is correctly referenced in the population file, and that the path_track continues properly all the way to the hatch.

Another thing that may be causing this is the nav mesh. The tank doesn't actually follow the path like a payload cart does, for example. It uses them as a guide on where to go, but in fact uses the nav mesh for it's movement. You can have the path tracks placed at random heights, and the tank will properly angle itself to the incline below, no matter the angle, and drive directly along the surface. This means if the nav file is broken - such as there being no nav data where the tank spawns, it will teleport to the hatch.

The bots are hugging the walls, trying to pass through solid geometry!

I haven't found WHAT exactly causes this, probably just a quirk in the nav generation algorithim. I find it mostly happens with func_detail brushes. The main way I fix this is by creating a thin trigger brush around the aforementioned solid, tie it to a func_nav_avoid for team blue. The bots avoid this area, and players and projectiles still traverse it fine.




- Basic tips

Learn your nav commands, they help a lot debugging problems. The most useful I found were;

- nav_edit. This command allows you to physically see the nav mesh, which is for obvious reasons extremely useful. It's also needed for a lot of other nav-related commands.

- nav_mark_walkable. As I mentioned before, this marks another area (apart from where the player is standing) for the nav mesh to start generation from. Multiple of these means you can generate two nav meshes that are normally not connected, such as the bot dropdown.

- nav_mark. This marks a cell of the nav mesh under the cursor, useful for the next command.

- nav_connect. This connects the area under your cursor with the area marked using the last command. This means you can manually assign a dropdown point between a low and high nav cell if the game doesn't originally connect them.



The pop file supports custom wave end/start output firing. You can use this in creative ways. An example, not nearly the best use however, is the forward upgrade station in Paradigm that only opens in the downtime between waves.


tf_mvm_jump_to_wave allows you to jump to a specific wave number without having to go through the previous ones. This is very useful for testing if tanks are broken or not.

- Pop File

This is half your MvM map, so it easily deserves it's own section. I'm not the best on pop files, and I don't know the more complex side of them, but I can try to get down the basics of one.

The pop file is what decides what bots spawn, where they spawn, when they spawn and how they act. It also dictates the currency and some of the entity logic.

Missions

You can generally leave missions alone unless you intend on doing something very special and unique with your bots. They basically spawn bots under more unique conditions than the general waves - for example, the sentry buster spawning when X damage is dealt by sentries, or spies spawning with custom behaviour. I haven't delved into missions much, so I can't tell you much more.

Wave

A wave is, well, a wave. They are read by the game in the order they're written in the pop file, and the number of waves you have depends on the number of separate Wave {}'s you have. Everything surrounded by the { }'s will be executed before the game saves a checkpoint and the players are given the opportunity to ready up.

Wavespawn

Wavespawn is the meat of your pop file. These go inside a corresponding Wave {}, and a wavespawn contains the information about the bots themselves.

The barebones of a wavespawn is;

Code:
Wavespawn { 
Where spawnbot   //this tells the game where to spawn the bots in this group. It referres to names of named info_team_spawns

TotalCount 50 //this is the number of bots to spawn in this group. Not necessarily all at once, but all the bots inside this group will be the same.

MaxActive 10 //the maximum number of bots part of this group that can be alive at the same time. When some die, more are spawned so there's always 10 in the map (to a max of 50 total spawned, obviously)

SpawnCount 5 // The number of bots spawned per spawn

WaitBetweenSpawns 5 //The time in seconds between SpawnCount spawns a new set of bots, as long as MaxActive isn't reached.

WaitBeforeStarting 0 // The time from the start of the wave before bots in this group starts to spawn

TotalCurrency 200 // The total currency dropped from this group. This is yours to balance, but if your total currency is 200, and you have 50 bots, each bot will drop 4 cash.

Support 1 // This is if you want your wave to be a support wave. TotalCount has no bearing if this is set to 1, they will keep spawning (still heeds MaxActive and SpawnCount) until the non-support wavespawns in this wave {} have been killed.

TFBot {
Class Scout
Skill Easy
} // This is the part where you enter information about your bots. It should be self-explanatory. Refer to the example pop file for more info on what you can stick here.
}


That's essentially the makings of a pop file. They're quite simple, just a bunch of waves with nested wavespawns. There are some more complex parts, such as squads , which I recommend you refer to the dev wiki or the example pop file for.

Until you get further into your map, I recommend copying an official pop file, such as decoy or coaltown, and working from that rather than writing a whole new one.


It's good but i have other problem.



For first :
When i loaded popfile (mvm_Tower_King.pop) to my map (mvm_Tower_King) its loaded succsesfully but wave is 0 (wave 0),when press f4 it start count down'when its finished wave 0 is in progress but this wave dont have robots in program.


PS. im from poland and my english can be not fully correct. :)
 

PyroDevil

L3: Member
Sep 19, 2014
123
141
It's good but i have other problem.
For first :
When i loaded popfile (mvm_Tower_King.pop) to my map (mvm_Tower_King) its loaded succsesfully but wave is 0 (wave 0),when press f4 it start count down'when its finished wave 0 is in progress but this wave dont have robots in program.

This is probably because you don't have a navigation mesh for the bots. Just open the console, type sv_cheats 1, then nav_generate. Your computer will lag a bit (it's calculating the walkable paths of the robots) and will reload.
 

jestemfajny

L1: Registered
Jan 10, 2015
4
0
This is probably because you don't have a navigation mesh for the bots. Just open the console, type sv_cheats 1, then nav_generate. Your computer will lag a bit (it's calculating the walkable paths of the robots) and will reload.

Sorry i forgot say: i maked nav_generate :(



AND wave 0 dont have bots in program when wave is starting wave is finished.
But new round is no start.



Link for this problem (its no my video): https://www.youtube.com/watch?v=q7kN75mfvHk
 
Last edited:

UKCS-Alias

Mann vs Machine... or... Mapper vs Meta?
aa
Sep 8, 2008
1,264
816
Missions

You can generally leave missions alone unless you intend on doing something very special and unique with your bots. They basically spawn bots under more unique conditions than the general waves - for example, the sentry buster spawning when X damage is dealt by sentries, or spies spawning with custom behaviour. I haven't delved into missions much, so I can't tell you much more.
Missions have a few side effects that normal wavespawns dont have:
They dont have money drops, they dont have the ability to pick up the bomb, and there is no requirement to kill them.
Missions have tasks coupled with them which change the AI where its needed.
Snipers for example will not focus on attacking in a normal wavespawn, which is a primary part on why a sniper must be in a mission. I dont know if the ignore bomb flag which they added during 2 cities will do the same, but originaly a sniper outside a mission wouldnt be shooting you with a scope (and originaly wouldnt shoot at all with a sniper rifle - other weapons worked fine in behaviour though which is why a huntsman would still attack).
Its also the only place where you can spawn sentry busters in. This is due to the mission task
However, for engineers and spies there isnt realy a big change. They can pick up the bomb in a wavespawn but thats something you can easily remove. The way they play while not having the bomb will be the same as the mission behaviour.


Another important nav command to add is nav_split. This is essential for prefer and avoid sections. Each of those brushes will have to cover a full nav square to apply that tag to it. As the generating might sometimes not split the nav parts well splitting them manualy is a good way to solve that. Even though you will have to do it every time you regenerate the mesh (each version of the map basicly).

And another important thing. Only the respawnroom they initialy touch will apply the invuln effect. Having 6 seperate entities is able to break the spawnroom (they will be shooting out of it. and in some cases still remain invulnerable). The respawnroom should be 1 entity on its own.

Clipping brushes do not work for tanks, func_brush does not work for a tank. The only thing that works is a func_detail. This is important when the tank reaches the hatch at an angle, otherwise it will just fall though the floor. The tank collision height is also decided by its center, even though its wheels align itself seperately, the center decides the height of the tank.

Regardless of the end node of the tank path, once the tank reaches it, it will start dropping the bomb. Even if it doesnt touch the capture area, once the bomb is dropped it does trigger the capture.

Bots falling outside a respawnroom will not take fall damage. This is why the first drop in decoy doesnt deal damage even though it is normaly too high.

When bots get stuck a few things can happen:
- They collided inside an object and got stuck.
- They see a nav connection which is obstructed by an object (brush or prop). They will just try to walk there and stand still.
- The nav itself is broken, if they cant get further they just walk to its nearest end section and expect the game to solve its issue (aka, you teleport them, you make them drop down, or its the capture area which they try to defend).

And a few tricks on fixing nav issues:
- Split the nav sections in such way they are forced to be fully around the corner. Essentialy just telling them they cant get through. (best method since it doesnt involve entity work and also gives the bots the best behaviour - but also painful for alpha versions as it could take alot of work)
- As aly already mentioned, you can enforce them a nav_avoid. But if this works there already is a broken nav part in the first place. Fixing the nav is a better thing to do as there are cases where this solution wouldnt work.
- If possible, clip the area (in the bot spawn this is a fine thing to do, in most of the map it isnt)
- As alternative, use a respawnroom visualizer. It behaves as clipping and automaticly also marks the nav section as an avoid. It could require a nav_split action to reduce the nav section itself though. But this is what valve used in mannhattan to prevent them going under the bridge near the death pit.
- Even without a nav section you can still make the bots walk over it using a push trigger. Instead of pushing it and sending it flying it will just walk over it in the direction of the push. This is what valve used in rottenburg to make the bots walk back from the barrier since it doesnt have a nav section on top of it. And this could also be used to fix areas where bots get stuck by simply forcing them to walk away from it. Its the least neat way to solve it, but its very effective and predictable. In alpha stages of the map its the best method since it doesnt require any nav editing.
 
Last edited:

Freyja

aa
Jul 31, 2009
2,994
5,813
Sorry i forgot say: i maked nav_generate :(



AND wave 0 dont have bots in program when wave is starting wave is finished.
But new round is no start.



Link for this problem (its no my video): https://www.youtube.com/watch?v=q7kN75mfvHk


If your popfile loaded successfully then it probably has a formatting problem. Usually these are spewed into the console when the popfile loads, you might be missing a curly bracket somewhere or something.
 

jestemfajny

L1: Registered
Jan 10, 2015
4
0
If your popfile loaded successfully then it probably has a formatting problem. Usually these are spewed into the console when the popfile loads, you might be missing a curly bracket somewhere or something.

whats next?
what now?
what to do?
[and more qestions with root "what"]

can u send me pop file without tanks (no track for tank) to my mail?
Ps. my map have control points.
 

PyroDevil

L3: Member
Sep 19, 2014
123
141
whats next?
what now?
what to do?
[and more qestions with root "what"]

can u send me pop file without tanks (no track for tank) to my mail?
Ps. my map have control points.

You can find the pop file for mannhattan and use it for your map, just make sure you have the same names for spawn points as the ones in mannhattan. Just make sure you name the file as mvm_Tower_King.pop
 
Last edited:

jestemfajny

L1: Registered
Jan 10, 2015
4
0
You can find the pop file for mannhattan and use it for your map, just make sure you have the same names for spawn points as the ones in mannhattan. Just make sure you name the file as mvm_Tower_King.pop

THX
Now wave is 1/6 have bots but they aren't spawning.


What now?
 

Haze33E

L1: Registered
Nov 20, 2015
3
0
Having an issue with bots not leaving spawn on rottenburg they spawn walk like half way down the spawn ramps then just get stuck. I've tried both spawn locations and they do it on both. Also for some reason the bot carrying the bomb doesn't seem to be spawning. I'm just doing a simple mass scout spawn for the pitting 100 enemies achievement.

Here is the code I'm using not of my own design I adapted it from something someone else made.

#base robot_standard.pop
WaveSchedule{
StartingCurrency 30000
RespawnWaveTime 1
CanBotsAttackWhileInSpawnRoom no
Wave{
StartWaveOutput{
Target wave_start_relay
Action Trigger}
DoneOutput{
Target wave_finished_relay
Action trigger}
WaveSpawn{
Where spawnbot
TotalCount 200
MaxActive 15
SpawnCount 1
WaitBeforeStarting 0
WaitBetweenSpawns 0
TFBot{
Class Scout
Skill Normal
Health 1
WeaponRestrictions MeleeOnly
MaxVisionRange 1}}}}

I have no idea what is wrong with the coding I'm super new to MvM customizing.
 
Last edited:

Fantaboi

Gone and one day forgotten
aa
Mar 11, 2013
892
1,050
Look at the NAV file, use some of the commands to debug it.
 

Haze33E

L1: Registered
Nov 20, 2015
3
0
No idea what you meant by that like I said at the bottom of my post I'm new to this stuff. I know next to nothing for console commands and I don't even know what a NAV file is. Also I'm using Ubuntu and not windows cause my comp is older. So if I need a third party program for messing with this stuff sadly it probably doesn't exist for Linux users. I wouldn't mind figuring it out myself but I'm over my head. I couldn't even find a default pop file for rottenburg to compare the code to. So I could trial and error a solution to the problem. I'm pretty much just guessing what things do in the pop files.
 

Fantaboi

Gone and one day forgotten
aa
Mar 11, 2013
892
1,050
Ok, so basically.

Bots don't move based on POP files, they move based on a navigation mesh. (basically a bunch of invisible tiles, that say which invisible tiles they're connected to.)
https://developer.valvesoftware.com/wiki/Navigation_Meshes
This goes for ALL bots, MVM or not.
To create a nav mesh, load your map in TF2 or whatever game the map is for, go to the console and write nav_generate
The game should stutter for a bit, but it should create a navigation mesh, and bots will be able to move.
However the mesh is never perfect and edits may have to be made, so make sure to read that link as it has all the details you need!
 

Haze33E

L1: Registered
Nov 20, 2015
3
0
Ok but I'm using the default rottenburg map just with a custom pop file. I've used some custom pop files on other maps already and this hasn't happened before. The map is acting like it doesn't have a nav file which it should since it's a default MvM map. I guess I'll take a look at the nav mesh.

UPDATE: Well I went and looked at the nav mesh it looked fine to me. I even went into no clip as pyro and airblasted some of the bots down off the cliff. They just stand there like they have no idea where they're supposed to go. I don't know what's wrong, I'm guessing the bots I'm using are incompatible with the map somehow?
 
Last edited:

Freyja

aa
Jul 31, 2009
2,994
5,813
I updated this with the stuff I've learned in the last 5 years. Let me know if you think there's anything I should add to it since I'm pretty well versed on mvm now.