Bots?

Discussion in 'Mapping Questions & Discussion' started by Flaffy, Oct 19, 2017.

  1. Flaffy

    Flaffy L1: Registered

    Messages:
    34
    Positive Ratings:
    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
     
  2. Dr. Orange

    Dr. Orange L6: Sharp Member

    Messages:
    369
    Positive Ratings:
    278
    You have to generate a navigation mesh for the bots to use. You can do this by loading up your map, then typing the command "nav_generate" into the developer console.
     
    • Like Like x 1
  3. Flaffy

    Flaffy L1: Registered

    Messages:
    34
    Positive Ratings:
    0
    They dont want to leave the spawn area
     
  4. Crowbar

    aa Crowbar perfektoberfest

    Messages:
    1,441
    Positive Ratings:
    1,196
    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...
     
  5. Flaffy

    Flaffy L1: Registered

    Messages:
    34
    Positive Ratings:
    0
    My gamemode is arena, not sure
     
  6. Crowbar

    aa Crowbar perfektoberfest

    Messages:
    1,441
    Positive Ratings:
    1,196
    There's your answer. Bots don't support arena.
     
    • Thanks Thanks x 1
    • Agree Agree x 1
  7. Digaag Wa Riz

    Digaag Wa Riz L3: Member

    Messages:
    121
    Positive Ratings:
    93
    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.
     
    • Agree Agree x 1
  8. Da Spud Lord

    aa Da Spud Lord L0: Crappy Member

    Messages:
    880
    Positive Ratings:
    598
    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.
     
  9. iiboharz

    aa iiboharz Meme Queen

    Messages:
    734
    Positive Ratings:
    1,071
    Worth mentioning beyond all this, by the way, don't rely on just bots for testing your map!
     
    • Agree Agree x 3
  10. henke37

    aa henke37

    Messages:
    1,955
    Positive Ratings:
    465
    Or just convert the map to koth, which the bots do understand.
     
  11. Powerlord

    Powerlord L3: Member

    Messages:
    124
    Positive Ratings:
    59
    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.
     
  12. Da Spud Lord

    aa Da Spud Lord L0: Crappy Member

    Messages:
    880
    Positive Ratings:
    598
    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.
     
  13. Powerlord

    Powerlord L3: Member

    Messages:
    124
    Positive Ratings:
    59
    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.
     
Tags: