-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Many small logic adjustments and bugfixes for NPC targeting / threat assessment #69840
Merged
Maleclypse
merged 23 commits into
CleverRaven:master
from
I-am-Erk:npc-ai-changes-cleanup-and-small-fixes
Dec 2, 2023
Merged
Many small logic adjustments and bugfixes for NPC targeting / threat assessment #69840
Maleclypse
merged 23 commits into
CleverRaven:master
from
I-am-Erk:npc-ai-changes-cleanup-and-small-fixes
Dec 2, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rename memory function to match other caches fix a small oversight with melee engagement Adjust swarming range to use weapon ranges instead of arbitrary numbers
added armour calculations added some special attack calculations
We can return here later but I want this PR done.
set tests to use a flag that's less likely to change. It is unlikely we'll set "forbid engagement" to default to on.
try disabling this line of the test because I have a headache
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
I-am-Erk
commented
Nov 30, 2023
Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
astyled
astyled PR, label is assigned by github actions
BasicBuildPassed
This PR builds correctly, label assigned by github actions
[C++]
Changes (can be) made in C++. Previously named `Code`
Code: Tests
Measurement, self-control, statistics, balancing.
<Enhancement / Feature>
New features, or enhancements on existing
[JSON]
Changes (can be) made in JSON
json-styled
JSON lint passed, label assigned by github actions
Monsters
Monsters both friendly and unfriendly.
NPC / Factions
NPCs, AI, Speech, Factions, Ownership
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Features "Several more small adjustments to NPC logic and bugfixes from reports"
Purpose of change
This is mostly another small cleanup of my code, which also takes the time to fix a few omissions or errors I've made along the way.
Edit: swap that, now it's a lot of small changes and a little bit of code cleanup. All of these are individually small, bases on error reports and player feedback.
Describe the solution
I also added a method to try to calculate the effect of their special attacks a bit; this will need some testing as the numbers are kind of arbitrary, but it should help with underrating ferals and other monsters that have a lot of special attacks.This all turned out to be unnecessary because the real issue was that I had made a math mistake when calculating difficulty, and the code was making bugs so I took it out for now.I also flipped several NPC follower default behaviour switches that I think should be flipped by default:
Describe alternatives you've considered
I'm not sure if I like the way I've solved the melee problem. I may instead check if the enemy is closer to the ranged ally, but I'm not totally sure how that would work.
Testing
As far as I can tell these seem to be working as advertised. I'm sure there are some things I messed up, it's going to be a few dozen hours of playtesting to capture all the corner cases. On playtests, I was really impressed at how much easier and more natural it feels to sneak through a city with a follower, and I didn't ahve to give them orders to keep them from running into a fight.
Additional context
One tiny math error on my own part led to me doing a largish overhaul of monster difficulty calculations before I found the mistake. At least the work seems to be ok.