Team Fortress 2

Team Fortress 2

236 ratings
Changing Your Main Menu to Fighting Bots (Upd. May 6th, 2020)
By Asteur
This will detail the specifics about how to change the default image background to a map filled with bots fighting each other to the death!
2
   
Award
Favorite
Favorited
Unfavorite
Getting Started
Introduction

You know that pesky image you see every single time you boot up Team Fortress 2? Perhaps it's an engineer, maybe demoman, maybe heavy. Oh, and maybe the background is a picture of upward!... But, you know, it's not really that interesting. It gets the job done, but there's nothing about it that catches your eye. That's what we're here to fix!

Soon, we'll be having your game look just like this!



Commands (+explanation)

These are the commands that we'll be using today, and I'll give a brief overview of what they do so you know what you're going to be using and modify it in any way that you need.

  • map_background (map)

This command is different than the "map" command, as it specifically makes the menu screen's background as the map of whichever map you choose. By default, the map has no players, and many features are disabled, such as capping (though flag capturing is doable).

Interestingly, loading a background map counts as running a server, allowing someone on your LAN to be able to join using your local IP address.

  • tf_bot_quota (number)

If you've dealt with TF2 bots before, you've likely seen this command (or a command like it) before. However, if you haven't, it essentially creates working AI bots for the map. Generally, the limit of bots you can have per server is 31.

  • tf_bot_difficulty (0-3)

This command functions along with "tf_bot_add", as it affects any bots added After this command is used. The command itself changes the difficulty level of the bots, making them smarter and have a slightly wider range of classes to choose from.

OPTIONAL COMMANDS

  • nav_generate - [Do Not Add To Launch Options]

When used, this command will create navigation mesh, essentially a connection of points together to form a path for bots to walk along. Basically, it allows bots to work on maps that don't already have navigation mesh on it. If you're unsure if a map needs it, try adding bots on that map using the "tf_bot_quota" command. If the bots move, the map has nav mesh, if not, it will require the nav_generate command.

  • tf_flag_caps_per_round

When used with a number, it will set the amount of flags that must be captured in a CTF map to the number set.
Setup
Console Method

If you wish to bind this command to a key or simply test it out, you can use this example below:

For King of the Hill Maps
  • map_background koth_viaduct; tf_bot_difficulty 3; tf_bot_quota 12
This will load koth_viaduct as the background map with 12 expert bots.

For Capture the Flag Maps
  • map_background ctf_doublecross; tf_bot_difficulty 3; tf_bot_quota 12; tf_flag_caps_per_round 1000
This will load ctf_doublecross as the background map with 12 expert bots.

Launch Option Method

If you'd like for your game to start with the command every time, you can add this to your launch options. To access your launch options, right click Team Fortress 2 in your library and click Properties. Then, click "SET LAUNCH OPTIONS..." and add the following example:

For King of the Hill Maps
  • +map_background koth_viaduct +tf_bot_difficulty 3 +tf_bot_quota 12
On startup, this will load koth_viaduct as the background map with 12 expert bots.

For Capture the Flag Maps
  • +map_background ctf_doublecross +tf_bot_difficulty 3 +tf_bot_quota 12 +tf_flag_caps_per_round 1000
On startup, this will load ctf_doublecross as the background map with 12 expert bots.
Map Options
I've currently found that only two gamemodes work for bots in map_background maps, those being KOTH and CTF. I've compiled a list of maps I've tried and rated them according to how they look based on visibility.

Official (w/ Nav Mesh)

These are maps that have Navigation Mesh pre-made.
  • koth_viaduct (9/10)
  • koth_sawmill (8/10)
  • koth_badlands (7/10)
  • koth_lakeside_final (6/10)

Unofficial (w/o Nav Mesh)

These are maps that don't have Navigation Mesh and require the nav_generate command.
  • ctf_doublecross (9/10)
  • ctf_turbine (7/10)
  • ctf_sawmill (7/10)
  • ctf_well (7/10)
  • ctf_2fort_invasion (3/10)
  • ctf_2fort (3/10)

Pre-Made NAV Mesh
You can download a pre-made navigation mesh pack created and fixed by yours truly!
https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=2195597269
Customization
If you wish to customize any of your settings, you can refer to this section for help.

Changing background map

For reference, a list of map names can be found in the "Map Options" section. If you wish to change the map that gets set as the background, simply change the map listed after "map_background".

For example, if you wished to change your map from Viaduct to Double Cross, you would change the command

from
  • map_background koth_viaduct
to
  • map_background ctf_doublecross

Adding main menu music

Using map_background disables any main menu music that would play, but this will show you how to get it back (at least in some way). You can follow this guide for a more complete list of menu musics.

IF you are using Launch Options
  • +map_background koth_viaduct +tf_bot_difficulty 3+tf_bot_quota 12 +play /ui/gamestartup1.mp3

IF you are using Console Commands
  • map_background koth_viaduct; tf_bot_difficulty 3; tf_bot_quota 12; play /ui/gamestartup1.mp3

Changing bot amount

Changing the amount of bots that spawn is quite simple. To do so, simply change the number at the end of "tf_bot_quota" to a number below 32.

For example, if you wish to change the number of bots from 12 to 31, you would change the command

from
  • tf_bot_quota 12
to
  • tf_bot_quota 31

Changing bot difficulty

To change the difficulty of the bots that spawn, you will need to edit the number beside the command "tf_bot_difficulty". Each number, 0-3 represents a difficulty that gets higher as the number does.

0 = easy
1 = normal
2 = hard
3 = expert

For example, if you wish to change the difficulty of your bots from expert to easy, you would change the command

from
  • tf_bot_difficulty 3
to
  • tf_bot_difficulty 1

Randomizing the Maps

Personally, it's a complicated process to randomize the maps. However, Mr. Stork has created a video detailing how to do exactly that! If you'd like to see it, feel free to check it out here:

https://www.youtube.com/watch?v=v74g5gFEavY
Troubleshooting
If you're having any issues with... well, anything. I suggest looking here for some easy fixes!

Known Issues

  • Every time it finishes loading, I'm stuck in first person instead of one of the map cameras, why?

A: For some reason, it seems that if the map finishes loading and the bots spawn at the same/similar time, it will put your perspective into first person mode. The easiest way I found to counter this is to increase the first "wait" in your command from, for example "750" to "1000", you can increase it more if you're still not getting the desired effect.

NOTE: If you're fine with this happening on each load, you can press the power icon at the top right and press disconnect, now, while the disconnect alert is on screen, if you press on the game screen, the camera will switch, this will allow you to switch to a map camera.

  • The bots are just standing still!

A: If the bots have spawned but aren't moving, this could very likely be an issue with the map's navigational mesh, as it probably doesn't have any. To fix this, type "sv_cheats 1", then "nav_generate". The map will reload into a normal view. To fix this, you can either restart your game, or simply type "map_background (mapname)", as it will keep your previously inputted settings after the game session has launched.

  • What does nav_generate do, and how do I use it?

A: Essentially, "nav_generate" is a command within the Source Engine that generates a 3D mesh around the game world to allow NPCs to move and interact inside of it. This allows bots inside of TF2 to move, as they use the same process as bots in other Source titles such as CS:GO and Garry's Mod. To use "nav_generate", go onto a local server with the map you wish to add navigational mesh to, for ex. type "map ctf_doublecross" into console. Once in game, type "sv_cheats 1" and then "nav_generate" into console. You will see messages appear in console detailing it's current progress generating the mesh. Once done, the map will reload. From there, you can either reboot your game, or use the console command directly to load the "map_background" map you want.
Ending
Thanks for reading this guide! If you found any errors, have any suggestions or have questions, be sure to put a comment, as I'll get notified when you do!

Big thank you to "the game" for sending a gift just for the fact they liked my guide!

Written by Asteur.
63 Comments
bluem0nkey 6 Feb @ 2:50pm 
if anyone is wondering how to get a map like 2fort working, use mp_tournament 1
warrior5000 9 Jan, 2024 @ 6:17pm 
nvm i fixed it
warrior5000 8 Jan, 2024 @ 12:56pm 
Hey, im using a preload and it seems to not work when it tries to put the map on game launch
Salacious B Crumb 4 Aug, 2023 @ 5:45pm 
It turns out I had a kid forcing it, do not know which mod though
Salacious B Crumb 23 Jul, 2023 @ 1:04pm 
I have even tried adding commands, but there are not any (other than -secure, +fps_max 60, +sv_pure-1)
Asteur  [author] 23 Jul, 2023 @ 10:18am 
If it loads each time you start your game, you'll have to remove the command from your launch options. In your Library, right-click Team Fortress 2 and select "Properties...", under the General tab, scroll until you can see your Launch Options, then remove commands.
Salacious B Crumb 22 Jul, 2023 @ 7:09pm 
it just started happening for me and I cannot disable it help
Salacious B Crumb 21 Jul, 2023 @ 2:32am 
I play via potato, how do you disable this please
Festivized Killstreak Idiot 19 Jun, 2023 @ 9:25pm 
right now it looks like bots will continuously rename themselves, from what I've found a mod like "bot overhaul" fixes it. I don't know how you would fix it otherwise
Elevated Overseer 4 Aug, 2022 @ 9:58am 
Hey, I have a question about this method. Is there any way to change the spectator camera, like on a map like 2fort?