Skip to content

Conversation

@sunzenshen
Copy link
Contributor

Description

  • When a commander of bots has no primary and looks at one of their subordinates, that subordinate will throw their weapon at the commander as as donation.
  • Can also be used to trade weapons if a commander throws their weapon at the subordinate, as the subordinate will collect the nearest weapon after throwing their weapon.

Toolchain

  • Windows MSVC VS2022

@sunzenshen sunzenshen requested a review from a team January 25, 2026 00:29
@sunzenshen
Copy link
Contributor Author

sunzenshen commented Jan 25, 2026

Testing ideas:

Remember to enable the bot command feature (this is an FCVAR_ARCHIVE ConVar, so you only need to do this once)

sv_neo_bot_cmdr_enable 1;

To trigger the core behavior, collect some followers using the +use button, then drop your primary, and then look at one of your followers to request their primary:

bot-cmd-trade-weapons.mp4

Prior to this PR, because the bot command behavior was transitioned from neo_bot_tactical_monitor, any other tactical monitor behaviors were actually suspended indefinitely in favor of the bot command behavior.

The fix this PR introduces was to move the bot command behavior transition to the Scenario Monitor, which has the following test implications:

  • By throwing your weapon farther from a bot you want to trade with, this will test the previously blocked weapon scavenging behavior.
  • Also blocked was the grenade avoidance behavior, so that can be tested by throwing a grenade at your subordinate bots:
bot-cmd-grenade-avoidance-sanity-check.mp4
  • Incidentally, this unblocks non-commanded paused enemies from dodging grenades, but I think this is acceptable for my use case of the uncommanded pause cheat ConVar, as I mostly intended sv_neo_bot_cmdr_debug_pause_uncommanded 1; to prevent the enemy team from interrupting testing of features like navmeshes/etc.
bot-cmd-grenade-avoidance-paused-enemies.mp4

{
if (me->m_hLeadingPlayer.Get() || me->m_hCommandingPlayer.Get())
{
return SuspendFor(new CNEOBotCommandFollow, "Following commander");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It turns out that launching into the bot commander following behavior was blocking other tactical monitor behaviors, so I moved this behavior launch point into neo_bot_scenario_monitor.

{
if (me->m_hLeadingPlayer.Get() || me->m_hCommandingPlayer.Get())
{
return SuspendFor(new CNEOBotCommandFollow, "Following commander");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved from neo_bot_tactical_monitor, to unblock other tactical monitor behaviors.

@sunzenshen sunzenshen added the Bots Related to bot players label Jan 25, 2026
@sunzenshen sunzenshen force-pushed the bot-cmd-trade-weapon branch from 234d52c to 1f608d0 Compare January 28, 2026 04:34
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