Skip to content

Bots that cannot capture ghost will patrol around area#2021

Open
sunzenshen wants to merge 1 commit into
NeotokyoRebuild:masterfrom
sunzenshen:bot-ghost-capture-fail-fallback-search
Open

Bots that cannot capture ghost will patrol around area#2021
sunzenshen wants to merge 1 commit into
NeotokyoRebuild:masterfrom
sunzenshen:bot-ghost-capture-fail-fallback-search

Conversation

@sunzenshen

Copy link
Copy Markdown
Contributor

Description

Bots that cannot capture the ghost will transition into the area patrolling behavior.
This is intended to address situation where the ghost is moved into an awkward area where the bots cannot pick up the ghost.
This prevents the bots from entering a cycle where they fail to pick up the ghost and then immediately retry their attempt.

Toolchain

  • Windows MSVC VS2022

@sunzenshen
sunzenshen requested a review from a team July 16, 2026 05:04
@sunzenshen

sunzenshen commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

The easiest way to reproduce this kind of capture failure scenario is to noclip to pick up the ghost quickly to throw it into an awkward pickup area. One such pickup area is in ntre_oilstain_ctg where the alleyway bike in the corner can block bots if the ghost somehow ends up behind it in the corner:

Screenshot 2026-07-15 224647 Screenshot 2026-07-15 224659

Before, bots could enter a cycle state where they drop their weapon and try to pick up the ghost, fail, and then retry their attempt.

With this PR, when bots fail to capture the ghost, they enter the area patrolling ctgLoneWolfSeek behavior:

Screenshot 2026-07-15 223757

When the ghost is picked up again by either a lucky bot or a more sophisticated human player, the behavior stack is reset in such a way that bots can reevaluate whether than can try capturing the ghost again:
(such as noclipping behind the impassable barrier and dropping the ghost back into a playable area)

Screenshot 2026-07-15 223822

Use noclip to pass through walls, and nb_debug behavior to display the current behavior state of the bots.

@sunzenshen sunzenshen added the Bots Related to bot players label Jul 16, 2026
else
{
return Done("Capture target was not a ghost");
return SuspendFor(new CNEOBotCtgLoneWolf, "Capture target is blocked by some other entity, searching around the nearest areas");

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This case can be reached if the ghost is behind a bike, as the line of sight check hits the bike before the ghost.

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