Something went wrong. Try again later

IncredibleBulk92

This user has not updated recently.

948 -1 26 20
Forum Posts Wiki Points Following Followers

Replace your TF2 menu screen with a bot match

  
First of all, FULL credit for this blog goes to Coded One on ubercharged.net for coming up with this wonderfull idea.  I'm merely a guy who's tried it, thought it was awesome and decided to pass it on.  This blog post contains a method for replacing the standard wallpaper used as the menu screen for Team Fortress 2 with an observer's view of a battle between two AI teams.  The battle is completely random, unscripted chaos and is a hell of a lot more fun than the wallpaper.  This is very easy to set up and shouldn't take 10 minutes to get working. 
 

 
 


  1. First thing's first, you'll need to install a mod that add's bots to TF2.  Download the mod from the RcBots website (I'm using version 0.51b but I don't think it matters that much) and install it following their instructions.  It's pretty simple and the mod is less that a megabyte so it won't take long either.
  2. Next find the TF2 file on your computer, typically it's at C:\Program Files\Steam\steamapps\*YOUR USERNAME HERE\team fortress 2 and then click on tf and then cfg.
  3. Inside You shold find a file called "autoexec.cfg", if not don't panic.  Open up Notepad, click Save As... and then use the filename "autoexec.cfg", make sure the" Save as Type..." field is set to all types

Open your autoexec.cfg and paste the following code inside

plugin_load ../bin/HPB_Bot2
sv_cheats 1
cl_drawhud 0
map_background ctf_turbine
wait 1000; rcbot addbot 3 2; wait 10; rcbot addbot 3 2; wait 10; rcbot addbot 1 2; wait 10; rcbot addbot 4 2; wait 10; rcbot addbot 4 2; wait 10; rcbot addbot 6 2; wait 10; rcbot addbot 6 2; wait 10; rcbot addbot 1 2; wait 10; rcbot addbot 7 2; wait 10; rcbot addbot 3 2; wait 10; rcbot addbot 3 3; wait 10; rcbot addbot 3 3; wait 10; rcbot addbot 1 3; wait 10; rcbot addbot 4 3; wait 10; rcbot addbot 4 3; wait 10; rcbot addbot 6 3; wait 10; rcbot addbot 6 3; wait 10; rcbot addbot 1 3; wait 10; rcbot addbot 7 3;  wait 10; rcbot addbot 3 3;

Save the file and load up TF2.  If you don't notice any difference go into your options menu and under the advanced section of the keyboard customisation enable developers console.  Restart Tf2 and you should have something resembling the screenshot shown below.  If you don't PM me and I'll have a look at your code.
  

 
 

Customise Your Firefight  

Change the Map

There are a number of ways to can change your new menu to your liking.  The easiest one is to change which level loads up.  To do this change the line that reads 

map_background ctf_turbine

You can change the second half of this line to the name of any level in TF2 and at the very least the level will load fine.  Unfortunately the bots aren't programmed to use every map and some maps are just too big for much to happen.  For example the bots will simply stand idle in the spawn room on Payload maps and on some of the multi stage Control Point maps yo'll be observing a part of the map where there are no bots.  Capture The Flag levels work best for this, ctf_turbine and ctf_well are pretty good.
   

Change the Teams

It's possible to also change what classes show up in which team.  What you need to do is make changes to the section of the code that says:

wait 1000; rcbot addbot 3 2; wait 10; rcbot addbot 3 2; wait 10; rcbot addbot 1 2; wait 10; rcbot addbot 4 2; wait 10; rcbot addbot 4 2; wait 10; rcbot addbot 6 2; wait 10; rcbot addbot 6 2; wait 10; rcbot addbot 1 2; wait 10; rcbot addbot 7 2; wait 10; rcbot addbot 3 2; wait 10; rcbot addbot 3 3; wait 10; rcbot addbot 3 3; wait 10; rcbot addbot 1 3; wait 10; rcbot addbot 4 3; wait 10; rcbot addbot 4 3; wait 10; rcbot addbot 6 3; wait 10; rcbot addbot 6 3; wait 10; rcbot addbot 1 3; wait 10; rcbot addbot 7 3;  wait 10; rcbot addbot 3 3;


The part of the code that actually determines which classes are on which teams are the "rcbot addbot x y" parts.  Changing the numbers will add a single bot of the specified class to the specified team using the number codes below

Class numbers:
1 = scout
2 = sniper
3 = soldier
4 = demoman
5 = medic ( Bugs )
6 = hwguy
7 = pyro ( Bugs )
8 = Spy
9 = Engineer

Team Numbers:
2 = red
3 = blue

So the line "rcbot addbot 3 2" adds a Soldier to Red.  If you want to go really crazy you can name the bots yourself.  "rcbot addbot 3 2 Marc" will add a Soldier to Red called Marc.
 

Show the HUD

It's also possible to show the HUD so you can see the scores and kills by removing the line "cl_drawhud 0" from the code.  Unfortunately this will show player x joined the game as soon as the game loads right under the menu options which can make it hard to tell what you're clicking on so I tend to keep it off.

Important Notes

  • If customising the code make sure you do not change the "wait x;" parts.  Any reduction in these will cause the bots to load while the game is still loading the level meaning that the bots won't load into the background.
2Fort in Progress
2Fort in Progress
  • Do not put spaces or new lines in the section of the code that loads the bots.  This can cause only the first line to be read and so the game will only load a single bot, which is thoroughly underwhelming to be honest.
  • The bots that I've added to my example code are all combat classes (Demomen, Soldiers, Heavies ect).  This is just because I'm not sure how the other bots will behave, if Spies and Engineers just run at each other shooting it's going to look a tad crap.  I'll test the other classes later and update this post.
  • To remove the map from th main menu and go back to the normal TF2 menu screen simply remove the autoexec.cfg file from the cfg folder.  Either move it or delete it, switching developer console off again should also work.
  • Using this as your menu screen does slightly increase the game's initial load time and the frame rate might be lower than what you might be used to in standard play.  Once you join a game, everything will be straight back to normal. 
  • If you just want an empty level as your background you can just use the "map_background ctf_2fort" part of the code putting whatever level name you want there.  This also works for other source games such as Portal and Half Life 2 but you'll have to work that out for yourself.
8 Comments