Skip to content
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

Smooth out npc fear based on player strength #65151

Merged
merged 1 commit into from
Apr 18, 2023

Conversation

sparr
Copy link
Member

@sparr sparr commented Apr 18, 2023

Summary

None

Purpose of change

The effect of player strength on NPC fear is weirdly granular, with a jump from -1 to -3, and different range size for each value.

Describe the solution

Replace the list of conditions with simple arithmetic. High strength effects are mostly unchanged. Low strength effects are changed slightly.

Describe alternatives you've considered

Testing

ran test suite, talked to some NPCs with different characters and didn't see unusual fear responses

Additional context

str  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
old -3 -3 -3 -3 -1 -1 +0 +0 +0 +0 +0 +0 +1 +1 +1 +1 +2 +2 +2 +2 +2
new -2 -2 -2 -2 -1 -1 -1 -1 +0 +0 +0 +0 +1 +1 +1 +1 +2 +2 +2 +2 +3

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` NPC / Factions NPCs, AI, Speech, Factions, Ownership json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Apr 18, 2023
@dseguin dseguin merged commit 2b4112e into CleverRaven:master Apr 18, 2023
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Apr 18, 2023
@sparr sparr deleted the smooth_str_fear branch April 18, 2023 23:48
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` json-styled JSON lint passed, label assigned by github actions NPC / Factions NPCs, AI, Speech, Factions, Ownership
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants