-
Notifications
You must be signed in to change notification settings - Fork 20
Configurable bot cloak detection bonuses #1552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Configurable bot cloak detection bonuses #1552
Conversation
|
I added ConVars for detection bonus values and bot difficulty detection thresholds so that anyone else can watch a bot match and tweak detection factors live. That said, how detection events feel seems like a subjective opinion, but I hope that these numbers can start as a reasonable baseline. My intention with the initially submitted values are based on these intended profiles for the difficulty settings:
Helpful Testing Commands/Scripting: Start TDM Mode on Engage Enable bots considering everyone as always cloaked, and some example tweaking commands: |
| } | ||
|
|
||
| // Even if my weapon is unsuppressed, better than nothing | ||
| me->EnableCloak(3.0f); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The argument for me->EnableCloak(3.0f); is an parameter to only enable cloak if you have that many seconds left. We could definitely set up different cloak reserve time thresholds for different classes and suppressed/unsuppressed weapons.
RE: https://discord.com/channels/1235346473827434517/1244281729036845200/1449801332528513138
| } | ||
|
|
||
| if ( me->IsCombatWeapon( myWeapon ) ) | ||
| if ( myWeapon && me->IsCombatWeapon( myWeapon ) ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To get rid of a warning in proximity to WIP changes.
|
|
||
| // If target is not cloaked, it's not obscured. | ||
| if (!targetPlayer->GetBotPerceivedCloakState()) | ||
| if (!targetPlayer->GetInThermOpticCamo() && !sv_neo_bot_cloak_debug_perceive_always_on.GetBool()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ConVar sv_neo_bot_cloak_debug_perceive_always_on is where we can set up a test where we see if bots would notice each other given certain angles/circumstances/etc. You can usually tell without nb_debug if another player was detected, based on bots returning fire or even turning on cloak.
|
|
||
| if (targetPlayer->GetBotCloakStateDisrupted()) | ||
| { | ||
| flDetectionBonus += sv_neo_bot_cloak_detection_bonus_disruption_effect.GetFloat(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cloak disruption when firing unsuppressed weapons is now a configurable gradient rather than a full visibility flag.
| // thermal vision penalty against cloak | ||
| nSneakPenaltyCount += 5; | ||
| // Penalize Support as if using thermal vision against cloak | ||
| flDetectionBonus += sv_neo_bot_cloak_detection_bonus_non_support.GetFloat(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this value is too high, Supports can look relatively braindead, so don't make this too exaggerated in my opinion.
| constexpr float meleeRangeSq = 50.0f * 50.0f; | ||
| if (targetDistance < meleeRangeSq) { | ||
| nSneakPenaltyCount += 50; | ||
| flDetectionBonus += sv_neo_bot_cloak_detection_bonus_melee_range.GetFloat(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Melee range is about the point where not seeing a cloaked player becomes a little incredulous, but tried to set a value where there's some hesitation from the bots at Hard and Expert difficulty.
| // Lighting Impact | ||
| // NEO JANK: See "FIXMEL4DTOMAINMERGE" for why this doesn't have any effect yet. | ||
| // TODO: Lighting is not yet baked into NavAreas with our current tooling | ||
| if (sv_neo_bot_cloak_detection_bonus_lighting_enabled.GetBool() && TheNavMesh) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even though CNavArea::ComputeLighting does not compute lighting at a CNavArea, decided to include this in case we ever get around to implementing that, without having to recompile. Default weight could use some follow up thought though.
RE: https://discord.com/channels/1235346473827434517/1244281729036845200/1449808464250536097
| } | ||
|
|
||
| if (GetTeamNumber() == targetPlayer->GetTeamNumber()) | ||
| if ( NEORules()->IsTeamplay() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In anticipation of DM for bots being fixed:
#1553
0cae1e5 to
dab088d
Compare
Allows server operators to customize bot cloak detection rates. Debug ConVar for watching bots as if they were cloaked all the time. Also separates out the factor of cloak being turned on versus cloak being disrupted. Bot observers are probably more forgiving about cloak disruption when target is firing unsuppressed weapons.
dab088d to
e676970
Compare
Description
Toolchain