Bots?

Flaffy

L1: Registered
Jul 31, 2015
34
0
I want to test how the bots play on my map. But i don't know how to make them move, only how to make them spawn.
Do I have to make routes for them or?

Any ideas?

Thanks in advance
 

Crowbar

aa
Dec 19, 2015
1,455
1,298
Are you sure the bots support the current gamemode? There are only so many that they do. From the top of my head, A/D CP, PL, KotH, maybe one more...
 
D

Digaag Wa Riz

When you add bots you use "tf_bot_add" in the console not just "bot" right?

EDIT: Also arena doesn't support bots apparently. Just had to Google to make sure.
 

Da Spud Lord

Occasionally I make maps
aa
Mar 23, 2017
1,339
994
If you really have your heart set on playing with bots, then you can trick the bots into thinking it's CTF (which is supported) by spawning item_teamflag entities in game (don't put these in your map in Hammer, otherwise it will override all your arena gamemode logic). Use this cheat command in-game to spawn two flags at wherever you're aiming, one for each team:
Code:
ent_create item_teamflag teamnum 2; ent_create item_teamflag teamnum 3
(You can put that all in as one command.)
The bots will attempt to retrieve these flags. If you put them somewhere inaccessible above or below your control point, such as on a roof, bots will accidentally capture the point while attempting to secure the flags (and they'll also fight each other). It will take a few seconds for the bots to realize the flags have been spawned in. You will need to do this at the beginning of every round, as (I believe) manually spawned entities are removed after a round ends.

Alternatively, you can just replace your arena logic with KOTH logic.
 

iiboharz

eternally tired
aa
Nov 5, 2014
858
1,292
Worth mentioning beyond all this, by the way, don't rely on just bots for testing your map!
 

henke37

aa
Sep 23, 2011
2,075
515
Or just convert the map to koth, which the bots do understand.
 

Powerlord

L3: Member
May 8, 2010
127
60
spawning item_teamflag entities in game (don't put these in your map in Hammer, otherwise it will override all your arena gamemode logic).
That's odd. I would have thought the tf_logic_arena entity would take precedence.

Having said that, if it's a HUD issue, you can force specific HUD types using the tf_gamerules entity, although I don't think Arena is one of the options.
 

Da Spud Lord

Occasionally I make maps
aa
Mar 23, 2017
1,339
994
That's odd. I would have thought the tf_logic_arena entity would take precedence.

Having said that, if it's a HUD issue, you can force specific HUD types using the tf_gamerules entity, although I don't think Arena is one of the options.
Nope, apparently item_teamflag has higher priority, and it's not just the HUD, but also the gamemode logic (preventing respawns, etc). I once experimented with a version of arena_sawmill that was supposed to support bots using that method, only it didn't work for the listed reasons. But I'm not an expert on setting up logic for custom gamemodes, so maybe I did something wrong.
 

Powerlord

L3: Member
May 8, 2010
127
60
Nope, apparently item_teamflag has higher priority, and it's not just the HUD, but also the gamemode logic (preventing respawns, etc). I once experimented with a version of arena_sawmill that was supposed to support bots using that method, only it didn't work for the listed reasons. But I'm not an expert on setting up logic for custom gamemodes, so maybe I did something wrong.

TF2 is probably looking for map variations based on the 4 major gamemodes, which are:

1. CTF
2. CP
3. Payload
4. Arena

Which means it probably sees an item_teamflag and says "Oh, this is a CTF map"

Since the map controls the goals in the first 3 map types, you just need the HUD override to change the map type.

Also, as weird as it sounds, all game modes except Training are classified as one of the 4 basic types above internally. MvM is a CTF variant, KOTH is a CP variant, etc... The game classifies them more specifically from there. (Player Destruction may be an exception, I'd have to use a server plugin to check if they used game mode 5 for it)

Control Points is even weirder as only KOTH has an entity to tell the game which type you're playing. To the game A/D CP, 5CP, TC, and Domination are all the same game mode. And yes, this means you can make TC with any symmetric game mode and not just 5CP rules; see tc_meridian to see how it works with item_teamflags. Although, do note that it might take a bit of work to get it working with PLR.