source-sdk-2013 icon indicating copy to clipboard operation
source-sdk-2013 copied to clipboard

[TF2] tf_bots work up to 100 players

Open megascatterbomb opened this issue 1 day ago • 0 comments

Modifies tf_bots so they work all the way up to 100 players without failing to spawn in or causing significant class imbalances.

Implementation Details:

  • CTFBot::m_didReselectClass
    • Added a Getter so that CTFBotMainAction::Update can avoid unnecessarily triggering class reevaluations.
    • Moved false assignment to CTFBot::Event_Killed to prevent an infinite loop of class reevalulation.
  • CVars:
    • tf_bot_reevaluate_class_in_spawnroom: Now FCVAR_NONE (was FCVAR_CHEATS).
    • tf_bot_spawn_use_preset_roster: Now FCVAR_NONE (was FCVAR_CHEATS). Now defaults to 0 (was 1).
  • Preset Roster (tf_bot_spawn_use_preset_roster 1):
    • If team size > 12, the preset roster will be reused for bots 13-24, 25-36, etc.
    • Prevents bots from failing to spawn, but may still result in imbalanced class counts. Still only intended for 12v12.
  • Dynamic roster (tf_bot_spawn_use_preset_roster 0):
    • Now the default, as it is more dynamic and responsive to gamestate.
    • Class limits specified in rosters scale according to team size. Roster definitions assume team size of 12. Team sizes under 12 unaffected.
    • Team composition levels out with larger team sizes (prevents massive class stacks).
  • Added more bot names so there's a pool of at least 100 to choose from.

megascatterbomb avatar Feb 26 '25 04:02 megascatterbomb