Skip to content

Fix bots repeatedly roaming nearby spawn points in roaming game modes like JGR - #2318

Open
sunzenshen wants to merge 5 commits into
NeotokyoRebuild:masterfrom
sunzenshen:bot-roam-goals-pr
Open

sunzenshen wants to merge 5 commits into
NeotokyoRebuild:masterfrom
sunzenshen:bot-roam-goals-pr

Conversation

@sunzenshen

Copy link
Copy Markdown
Contributor

Description

Bots in JGR switch to the juggernaut behavior only during the pre-round freeze, so a bot that respawns mid-round never goes for the juggernaut and roams instead. Roaming picks random spawn points, and on maps like ntre_terminal_jgr, where one team's spawns sit in one room and the other team's raised spawn can't be entered, bots walk spawn to spawn in that room for minutes.

This PR switches respawned JGR bots to the juggernaut behavior. Roaming now skips goals the bot can already potentially see, falls back to a random nav area when a spawn pick has no route, and no longer picks info_player_start.

Toolchain

  • Linux GCC Distro Native (Linux Mint 22.3, GCC 13.3.0)

Linked Issues

A bot switched to the juggernaut behavior only during the pre-round
freeze. JGR respawns players mid-round, and a respawned bot restarts its
behavior tree, so it roamed spawn points for the rest of its life: it
never went for the juggernaut item, never attacked the enemy juggernaut
and never escorted a friendly one. Switch whenever the game type is JGR.
A roaming bot picked random spawn points. On maps whose spawns stand
in one room, a bot in that room picked the next spawn there and walked
spawn to spawn for minutes. A protected spawn room that no route
reaches made it worse: each failed pick was re-rolled, so the picks
piled onto the reachable room.

Refuse a roam goal the bot can already potentially see, wander to a
random nav area once a spawn pick has no route, and exclude
info_player_start by classname (the old test compared the
targetname).
The view check counts a spawn point on the floor below as hidden, so a
bot on a two-floor spawn cluster kept picking the spawn under it and
had to take a ladder to get there. Skip a roam goal closer than
sv_neo_bot_seek_and_destroy_roam_min_dist horizontally, like one in
view. The last wander try still takes any point.
A goal on another floor right above or below the bot is a legitimate
place to look around: skipping it threw away an unseen area to
explore. Remove the horizontal distance check and its ConVar; the
ladder stuck spot it targeted on ntre_bullet_tdm is a separate fix.
Expose the number of random roam goals to try as
sv_neo_bot_seek_and_destroy_roam_goal_tries (cheat, default 10) and
reword the roam comments.
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