Map Config File Problems

  • If you're asking a question make sure to set the thread type to be a question!

iamgio

L1: Registered
Sep 7, 2009
6
0
Hello,
I am trying to write a map.cfg file that automatically adds 16 blue bots to the game when the map starts. This should be fairly simple but I keep running into issues. This is the code that I currently have in my map.cfg file:
Code:
tf_bot_kick "all";
mp_autoteambalance "0";
mp_teams_unbalance_limit "0";
mp_waitingforplayers_cancel "1";
tf_bot_difficulty "0";
tf_bot_keep_class_after_death "1";
tf_bot_add "16 blue";
In theory this script should kick all current bots, change the game settings to allow unbalanced teams, set some bot info, then spawn 16 blue bots. In practice this code does nothing except for add 16 random bots to the game. Any ideas on how to fix this? I have a sinking feeling that I am making a noobish syntax error that causes this script to be misinterpreted.
 

skinnynerd

L2: Junior Member
Sep 17, 2010
57
14
I have a sinking feeling that I am making a noobish syntax error that causes this script to be misinterpreted.

Yup.
I believe that the cfg should be:
Code:
tf_bot_kick all
mp_autoteambalance 0
mp_teams_unbalance_limit 0
mp_waitingforplayers_cancel 1
tf_bot_difficulty 0
tf_bot_keep_class_after_death 1
tf_bot_add 16 blue
16 and blue are separate parameters.
Try "tf_bot_add 16 blu" if that doesn't work.
No quotes on numbers.
No semicolons.

I might be wrong, though.
 

iamgio

L1: Registered
Sep 7, 2009
6
0
Thanks for the suggestions but neither of them worked. What I believe is happening is that the bot_add command is being executed before the team balance settings are changed. To fix this I put in a heafty wait command which still did not fix it. What keeps happening is the bots all join the correct team but after the player joins a team all of the bots are kicked and re added to red and blue.
This is odd because if I take the bot_add command out of the script and just manually enter it in game everything works fine.