Bot cfg headache

Discussion in 'Server Discussion' started by brokenshadows, Mar 18, 2011.

  1. brokenshadows

    brokenshadows L1: Registered

    Messages:
    5
    Positive Ratings:
    0
    [SOLVED] Bot cfg headache

    I've recently setup a server for my son, and everything was fairly straightforward until he asked me to add bots for him. Two of the maps he plays on the most are custom maps he had asked me to install, and one of them had bots working in it.

    Long story short (hopefully), I looked to see what the difference between the two maps were, and one of them had a cfg file, while the other did not. When i looked at the cfg file, the whole thing had to do with adding bots to the map. So, i copied the contents of the cfg file, and made a new cfg file for the other map. Yay! i now have bots on the map...except one of them keeps joining the wrong team...and shooting everyone... D:

    Below is the contents of the cfg file. I suspect that the problem has something to do with the tf_bot_add line, but when i take that line out, no bots load at all...

    Code:
    sv_cheats 1 
    mp_teams_unbalance_limit 0 
    tf_bot_add medic red
    
    bot -team blue -class spy -name [B.S.]/SPY 
    bot -team blue -class scout -name [B.S.]/SCOUT
    bot -team blue -class heavyweapons -name [B.S.]/HEAVY
    bot -team blue -class sniper -name [B.S.]/SNIPER
    bot -team blue -class pyro -name [B.S.]/PYRO
    bot -team blue -class medic -name [B.S.]/MEDIC
    bot -team blue -class demoman -name [B.S.]/DEMOMAN
    bot -team blue -class soldier -name [B.S.]/SOLDIER
    bot -team blue -class engineer -name [B.S.]/ENGI
    
    bot_forceattack2 1
    
    alias "+11a" "alias 13a +12a; +12a"
    alias "+12a" "bot_forceattack 1; wait 800; -12a"
    alias "-12a" "bot_forceattack 0; wait 700; 13a"
    alias "13a" "+12a"
    
    +11a
    
    sv_cheats 0 
    
    Again, i didn't write the cfg, it came with the map...i simply copied the contents to a new cfg file for another map...

    If anybody can tell me the proper way to have a map only load stationary blu bots that use secondary fire, i would appreciate it...
     
    Last edited: Mar 18, 2011
  2. Jeremy

    Jeremy L11: Posh Member

    Messages:
    829
    Positive Ratings:
    251
    To spawn bots in a map, use the console command tf_bot_add. Alternatively, you can use tf_bot_quota <number> to add a fixed number of bots. No custom cfg file will be needed, although you will need to create a navigation mesh, so activate sv_cheats and type in nav_generate. A mesh will be generated, and when the map reloads, you'll be able to play against bots - without needing to use cheats.

    Note: Bots don't worm on ctf_ maps.
     
    Last edited: Mar 18, 2011
  3. brokenshadows

    brokenshadows L1: Registered

    Messages:
    5
    Positive Ratings:
    0
    well, that would work if i only wanted to add a fixed number of bots...however, what i'm wanting to do is add a fixed number of stationary bots who repeatedly use secondary fire...
     
  4. brokenshadows

    brokenshadows L1: Registered

    Messages:
    5
    Positive Ratings:
    0
    [Solved]

    removing the "tf_bot_add medic red" line would make it so that no bots spawned at all. However, by adding "tf_bot_kick all" to the bottom, just before the "sv_cheats 0" line, no red bots spawn, all blu bots spawn as stationary "puppet" bots, all blu bots use the secondary fire function, and all blu bots respawn on death...

    the cfg file now looks like:

    Code:
    sv_cheats 1 
    mp_teams_unbalance_limit 0 
    tf_bot_add medic red
    
    bot -team blue -class spy -name [B.S.]/SPY 
    bot -team blue -class scout -name [B.S.]/SCOUT
    bot -team blue -class heavyweapons -name [B.S.]/HEAVY
    bot -team blue -class sniper -name [B.S.]/SNIPER
    bot -team blue -class pyro -name [B.S.]/PYRO
    bot -team blue -class medic -name [B.S.]/MEDIC
    bot -team blue -class demoman -name [B.S.]/DEMOMAN
    bot -team blue -class soldier -name [B.S.]/SOLDIER
    bot -team blue -class engineer -name [B.S.]/ENGI
    
    bot_forceattack2 1
    
    alias "+11a" "alias 13a +12a; +12a"
    alias "+12a" "bot_forceattack 1; wait 800; -12a"
    alias "-12a" "bot_forceattack 0; wait 700; 13a"
    alias "13a" "+12a"
    
    +11a
    tf_bot_kick all
    
    sv_cheats 0