Skip to content

Comments

Bots can trade/donate their primary weapon with their commander#1629

Merged
sunzenshen merged 2 commits intoNeotokyoRebuild:masterfrom
sunzenshen:bot-cmd-trade-weapon
Feb 22, 2026
Merged

Bots can trade/donate their primary weapon with their commander#1629
sunzenshen merged 2 commits intoNeotokyoRebuild:masterfrom
sunzenshen:bot-cmd-trade-weapon

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

@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
@AdamTadeusz
Copy link
Contributor

I also notice that when the bot is close to me, the bot will throw the weapon past me and then often run to pick up the very weapon they just dropped before I am able to do so

@AdamTadeusz
Copy link
Contributor

It looks like there is no consideration being made for whether the bot can drop their primary weapon (Think juggernaut)

Or whether the commander can pick up the bot's primary weapon (Think recon commander and PZ)

Still this doesn't really cause any issues.

AdamTadeusz
AdamTadeusz previously approved these changes Jan 30, 2026
@sunzenshen
Copy link
Contributor Author

It looks like there is no consideration being made for whether the bot can drop their primary weapon (Think juggernaut)

Or whether the commander can pick up the bot's primary weapon (Think recon commander and PZ)

Added some checks to make sure the bot and the commander can even trade (checking drop and checking pickup):

bot-cmd-trade-weapons-ignore_jgr_balc.mp4

@sunzenshen sunzenshen requested review from a team and AdamTadeusz January 31, 2026 05:53
AdamTadeusz
AdamTadeusz previously approved these changes Jan 31, 2026
@sunzenshen
Copy link
Contributor Author

Rebased on top of the fix all warnings PR.

@Rainyan Rainyan requested review from Rainyan and removed request for a team February 20, 2026 11:25
Rainyan
Rainyan previously approved these changes Feb 20, 2026
@sunzenshen sunzenshen requested a review from Rainyan February 21, 2026 05:17
@AdamTadeusz AdamTadeusz requested a review from a team February 22, 2026 11:36
@sunzenshen sunzenshen merged commit db3536f into NeotokyoRebuild:master Feb 22, 2026
7 checks passed
@sunzenshen sunzenshen deleted the bot-cmd-trade-weapon branch February 23, 2026 01:28
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.

3 participants