How can my friend and I play TF2 against bots?

How can I setup TF2 so that two players (myself and someone inexperienced with FPS) can both play in a map against bots, but not people.

I guess I need to hunt through the internet list trying to find servers that are populated and checking namelists to see if they look like bots.

The offline practice probably won't work as that looks like single player.

Any advice on how best to do this, or just tips to make finding a server on the internet list like this a bit easier would be greatly appreciated.

We're on the same LAN, so maybe there's a way of hosting a LAN game that both me & the other person can join?


Solution 1:

Here is an instruction on how to create a server and put bots on it:

  1. Make sure you have the port 27015 accessible for connections.
    How? Look here.
  2. Open the game console.
    How? Options⇨Keyboard⇨Advanced...⇨Enable developer console. Press ~ / ` to open the console at any time.
  3. Optional Type sv_lan 0 if you want the game to be public, or sv_lan 1 for LAN only.
    Public server is recommended
  4. Type map <mapname>, replacing <mapname> with the name of the map you want to play.
    Or press the [+] to the right of BROWSE SERVERS in main menu instead.
  5. Optional If the server is public and you don't want anyone to intrude, you can set a password:
    Type sv_password <pass>, replacing <pass> with some simple password.
    (e.g. sv_password 1234)
  6. Set the bot difficulty: tf_bot_difficulty <x>, where <x> is from 0 (the easiest) to 3.
    (e.g. tf_bot_difficulty 0)
  7. Add bots: tf_bot_add <team> <class>
    <team>: red | blue
    <class>: scout | soldier | pyro | demoman | heavyweapons | engineer | medic | sniper | spy
    (e.g. tf_bot_add blue heavyweapons)
    To remove all bots: tf_bot_kick all

Here are some ways for your friend to connect. If one fails, try the next one.

  • Join the game via Steam.
    In Steam Friends list press ▼ and Join Game.
  • In console: connect <ip>:27015, where <ip> is your (server's) IP address.
    (e.g. connect 11.22.33.44:27015)
  • Try the same thing with your (server's) local IP address (find it in Windows/Linux)

If nothing works, see the step 1 of server creation instruction.

Solution 2:

The offline practice probably won't work as that looks like single player.

It actually runs an actual server on your machine that appears to be joinable to everyone in the world with the proper forwarding setup.

enter image description here

Solution 3:

The TF2 wiki has a page that lists the commands, AI and supported maps that bots can be used on. You do not need cheats to be on to use this type of bot. But puppet bots do.

So you start the server, join a team, say RED. Then type into the console tf_bot_add blue

Your friend joins and selects team RED too. Then type tf_bot_add 13

You will then have 8 people on both teams.

If you wish to change the difficulty of the bots, before adding the first bot, type tf_bot_difficulty.

Followed by the difficulty as a number: 0 = easy, 3 = expert, default 1 = normal.

Solution 4:

This is what I do; it uses a few things from various answers above.

  • Use the fastest LAN machine as your server, and figure out its IP address by typing ipconfig in a command prompt. This local IP address is probably something like 192.168.1.10
  • Make sure hl2.exe is set up as an application that can get through the server's firewall for your network (or if you're not using Windows Firewall, make sure port 27015 UDP traffic can get through)
  • Start a server on the TF2 main menu of this machine
  • In the server's TF2 console, use these commands to fill in bots on the team if there aren't 8 players per team:
    • tf_bot_quota_mode fill
    • tf_bot_quota 16
  • Try to connect to this server from another machine on the LAN by typing connect server_ip in the TF2 console, replacing server_ip with the IP address of the server you identified above
  • If you get a message that the password was not accepted, set the password to blank on the server's TF2 console with sv_password "", and try connecting from the client again
  • When the game starts, if the bots aren't moving, generate a "mesh" for them with these commands on the server's TF2 console:
    • sv_cheats 1
    • nav_generate