Skip to content

Conversation

@sunzenshen
Copy link
Contributor

Description

Bot behaviors for playing CTG mode.

Toolchain

  • Windows MSVC VS2022

// Intended for use by ghost carrier team, to emulate a team that knows where enemies are likely to ambush
// Compensates for bots' lack of meta knowledge by making them prefer routes not reserved by enemies
// Adheres to cheat against bots but not against humans philosophy by not considering human players' positions
cost += CNEOBotPathReservations()->GetPredictedFriendlyPathCount(area->GetID(), GetEnemyTeam(m_me->GetTeamNumber())) * neo_bot_path_reservation_penalty.GetFloat() * 2;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is why I changed the SAFEST_ROUTE parameters for other path calculations not related to the ghost. There wasn't any existing handling with this case beyond some stubs related to combat areas, so this was the cleanest way I could think of for choosing paths as a ghoster team.

m_isGoalCharger = m_healthKit->ClassMatches( "*charger*" );

if (!CNEOBotPathCompute(me, m_path, m_healthKit->WorldSpaceCenter(), SAFEST_ROUTE))
if (!CNEOBotPathCompute(me, m_path, m_healthKit->WorldSpaceCenter(), DEFAULT_ROUTE))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See neo_bot_path_cost.cpp for why these route type changes.

@sunzenshen sunzenshen added the Bots Related to bot players label Jan 12, 2026
@sunzenshen sunzenshen marked this pull request as ready for review January 13, 2026 01:38
@sunzenshen sunzenshen requested a review from a team January 13, 2026 01:38
@sunzenshen
Copy link
Contributor Author

sunzenshen commented Jan 20, 2026

Rebased on top of the bot command branch, so now the following debug commands are available:

sv_neo_bot_cmdr_enable 1;
sv_neo_bot_cmdr_debug_pause_uncommanded 1;
neo_ctg_round_timelimit 99;

This PR doesn't really need bot commands for testing, but might be worth thinking of test scenarios where the CTG behaviors and bot commands may interact.

I guess one possible interaction to look into after a first pass of feedback is that a bot holding the ghost will not report enemy positions to teammates, as they will be in the follow behavior. Maybe I should move the enemy reporting code into neo_bot_tactical_monitor and make it a general behavior to report ghoster targets (if the bot has the ghost equipped), instead of making it limited to the ghost carrier behavior.

@sunzenshen
Copy link
Contributor Author

I guess one possible interaction to look into after a first pass of feedback is that a bot holding the ghost will not report enemy positions to teammates, as they will be in the follow behavior. Maybe I should move the enemy reporting code into neo_bot_tactical_monitor and make it a general behavior to report ghoster targets (if the bot has the ghost equipped), instead of making it limited to the ghost carrier behavior.

I ended up refactoring the ghost callout logic into a publicly accessible helper function so that the bot commands follower behavior can reuse the same routines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bots Related to bot players

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant