Skip to content

Bots silent walk to ping waypoints if commander had +walk engaged#1937

Open
sunzenshen wants to merge 3 commits into
NeotokyoRebuild:masterfrom
sunzenshen:bot-cmd-walk-silently
Open

Bots silent walk to ping waypoints if commander had +walk engaged#1937
sunzenshen wants to merge 3 commits into
NeotokyoRebuild:masterfrom
sunzenshen:bot-cmd-walk-silently

Conversation

@sunzenshen

Copy link
Copy Markdown
Contributor

Description

Bots check the commander's walk state to determine if they should walk while following their commander or a waypoint ping

Toolchain

  • Windows MSVC VS2022

@sunzenshen sunzenshen requested a review from a team April 9, 2026 03:43
@sunzenshen

Copy link
Copy Markdown
Contributor Author

Demo:

bot-cmd-walk-silent.mp4

(Needs to be unmuted to make any sense)

Can collect bot followers in a normal match by pressing use on them.

To test in peace, the following script may be useful:

sv_neo_preround_freeze_time 2; mp_chattime 2;
sv_neo_bot_cmdr_enable 1;
sv_neo_bot_cmdr_debug_pause_uncommanded 1;
neo_ctg_round_timelimit 99;

@sunzenshen sunzenshen added the Bots Related to bot players label Apr 9, 2026
@sunzenshen sunzenshen force-pushed the bot-cmd-walk-silently branch from a425c79 to 182472a Compare May 28, 2026 01:27
@sunzenshen sunzenshen force-pushed the bot-cmd-walk-silently branch 2 times, most recently from 142d39e to 36c4173 Compare June 12, 2026 01:39
@sunzenshen sunzenshen force-pushed the bot-cmd-walk-silently branch from 36c4173 to 52cb590 Compare June 18, 2026 04:27
@sunzenshen sunzenshen force-pushed the bot-cmd-walk-silently branch from 52cb590 to 7492056 Compare June 27, 2026 04:19
@Rainyan Rainyan self-requested a review July 1, 2026 17:53
Rainyan

This comment was marked as resolved.

@Rainyan Rainyan requested a review from a team July 1, 2026 18:51
@sunzenshen

sunzenshen commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Maybe it would be more robust if the bot mimiced whether their commander is moving in such a way that can produce footsteps, so for example standing still would be considered as a sneaky commander?

I like this idea enough that I went ahead and made a commit to make bots base their stealthiness on the commander's current behavior.

168cb25

I removed the mimicking of crouch and walk from the snake line leader to save cycles, since the behavior cascaded down from commanders to leaders to followers anyway. The main side effect is that bots will instantly crouch and walk based on their commander's current behavior, which could probably be detected by observant players. But for now I want to keep the code simple to preserve cycles instead of worrying about how to make the behavior less predictable.

Also, at the risk of being too clever, I intentionally made the check such that even if you're standing still, by pressing the sprint key, you can urge your bot followers to follow a waypoint at a running pace.

I also bundled in a check to match the commander's current crouch behavior. I think at this point if this PR goes in as is, we don't need #1930. My thinking is that just matching the commander's current crouch behavior is enough as it resolves this concern I had in that discussion:

This might cause an awkward situation when a commander is pinned down behind cover while crouching and if they wanted to have their followers run to a ping waypoint they would need to stand up. Otherwise the bots would move to the waypoint while crouch walking.

In combination with #2000, bots would move at a faster pace when they start attacking the enemy or retreating from gunfire, so I don't think we need to worry about bots getting stuck crouch walking to their destination.

Regarding:

Another place where I could see this footstep audibility stuff being useful is for un-controlled bots in the vicinity of human players, since again it could be annoying to have your sneak ruined by a clomping bot alerting enemies to your area, but possibly out of scope for this PR.

This point I would prefer to discuss outside of this PR, because while the pointer to the commander is readily available, my impression is that it would take more calculations to figure out which friendly players are nearby to the bot.

@sunzenshen sunzenshen requested a review from Rainyan July 2, 2026 05:10
Rainyan
Rainyan previously approved these changes Jul 2, 2026

@Rainyan Rainyan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Cool, seems to work nicely (and the implementation is much cleaner than my suggestion 😄)

Comment thread src/game/server/neo/bot/behavior/neo_bot_command_follow.cpp
@Rainyan Rainyan requested a review from a team July 2, 2026 06:11
@Rainyan Rainyan requested a review from a team July 2, 2026 09:15
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.

2 participants