Skip to content

Conversation

@sunzenshen
Copy link
Contributor

Description

When bots do not have a primary weapon, usually from trying capture the ghost, search in a radius around the bot for any available primary weapons to scavenge.

Toolchain

  • Windows MSVC VS2022

@sunzenshen
Copy link
Contributor Author

To test, bot_mimic 1 and have the bots drop their primary weapon. After leading them away from their weapons, and setting bot_mimic 0 the bots should route to the nearest weapons to pick them up.

bot-scavenge-primary-weapon.mp4

Example from another branch with CTG related improvements where a bot will drop the ghost if an enemy has caught up with them and then try to arm themselves with a better weapon:

bot-scavenge-primary-weapon-swap-from-ghost.mp4

@sunzenshen sunzenshen requested a review from a team December 30, 2025 10:50
@sunzenshen sunzenshen added the Bots Related to bot players label Dec 30, 2025
@sunzenshen
Copy link
Contributor Author

sunzenshen commented Jan 1, 2026

To record some discussions from Discord:

  • Idea: Potentially have a cooldown timer on weapons dropped by non-bot friendlies, so that bots don't steal your weapon when you want to drop your weapon for the ghost, but then change your mind.

    • A: Currently bots rarely drop their primary weapon, and even with the WIP CTG branch bots rarely drop their weapon unless to pick up the ghost. But that scenario could definitely come into play when we introduce other behaviors related to dropping weapons. That said, I'm shooting for making a minimum viable PR in this scope, with the idea that we can revisit the consequences of other behaviors we introduce in the future. Another reason for limiting the scope of this PR is that I want to keep the calculations lean for the MVP, and timers would add more state that reviewers will need to consider for this PR.
  • Idea: bots swapping guns if there is a better option on the ground

    • A: Also interested in exploring something like this in the future, but this is an example of an idea that would interact with scenarios like the one above where there are more interactions to consider. I'd like to keep this PR simple so that we can review things like the shape of the new files like neo_bot_seek_weapon, so that we don't need to consider that in the scope of a future additional PR.
  • Idea: Trading weapons at the start or even during freeze time.

    • A: This also seems like a good idea for a new behavior that only comes into play when the game is currently in freezetime.
  • Idea: Juggling weapons, such as moving the ghoster's discarded weapon so that they can rearm themselves easily.

    • A: I think we could address this as a separate behavior in a future PR. In my WIP CTG PR, I have ghoster team escorts assigning themselves roles based on their relative distance from the ghost carrier, and it might make sense to introduce a juggler role as a dedicated behavior class. That way we can consider the consequences of introducing that behavior in a controlled scope and known working but simpler weapon pickup commit.
  • Idea: Have bots drop their gun for an unarmed human player if there is no active danger

    • A: I think this could work as an augmentation to Bots follow you and your pings when you press +use on them #1345 once that is merged. My thinking is that as-is you're rarely in a controlled situation where a bot happens to be waiting around and where it's clear that you would like their gun (read: the bots are running all over the place and it would be hard to catch up). But with the bot command feature, my thinking was that you could have a behavior for following bots where if their commander is looking at them and the commander has no primary, the bot could toss their weapon at the commander. This could also work for swapping a ghost with a bot, as you could drop your weapon near your follower, and when they drop the ghost they would pick up your nearby discarded weapon.

@sunzenshen sunzenshen force-pushed the bot-scavenge-primary-weapons branch from 932167a to 461fbe9 Compare January 1, 2026 21:43
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