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

NPCs to use ranged weapons against all enemies, and automatic fire against dangerous enemies #40089

Merged
merged 2 commits into from
Jun 17, 2020

Conversation

zachmmeyer
Copy link
Contributor

@zachmmeyer zachmmeyer commented May 3, 2020

Summary

SUMMARY: Balance "NPCs to use ranged weapons against all enemies, and automatic fire against dangerous enemies"

Purpose of change

NPC's currently nearly do not use ranged weapons at all, including bows, unless the situation is dire, in which case, it is too late. Instead, they use ranged weapons as melee weapons.

Describe the solution

Suggested change allows NPCs to use ranged weapons against all enemies, and to use automatic fire against dangerous enemies.

Describe alternatives you've considered

I originally thought it would be useful to revert back to previous conditions, but users did not like NPCs being full automatic at all times.

Testing

Additional context

CleverRaven@3648a54
This changed it, I propose we change it back, which is way more fun. NPC's now just wait until monsters are way too close and beat them with their ranged weapons.
Testing with old values will make NPC's actually fire on enemies during combat if they have rounds or arrows.
@Wishbringer
Copy link
Contributor

Wishbringer commented May 3, 2020

Rather than just reverting the change you'd want to actually come up with better values.
Example thresholds: 1.0 melee and 5.0 for automatic fire.
You'd need to test and find out what values provides the best balance.
There was a reason the change was made to begin with.

@zachmmeyer
Copy link
Contributor Author

@Wishbringer My change has the desired result I was going for.

@Wishbringer
Copy link
Contributor

Wishbringer commented May 3, 2020

@zachmmeyer Just reverting the change undoes what the original PR was intending, find the middle ground, just my two cents. Anyway lets wait and see what the devs think on the matter.

@zachmmeyer
Copy link
Contributor Author

@Wishbringer I agree on waiting. I am not hopeful. I appreciate the feedback.

@kevingranade
Copy link
Member

Need some use cases here, what NPC stats and gear, what enemies, what distances?
As it is there's no way forva maintainer to evaluate this PR except by starting from square one and figuring out all of this themselves, which defeats the purpose of someone foing the PR.

@zachmmeyer
Copy link
Contributor Author

@kevingranade I wish I could help more on this. I am personally trying to get my NPC to use their bow long range, as apposed to using it as a melee weapon at all times. I do not know enough cpp to implement the use cases at this time. I can close this PR if you want.

@codeknave
Copy link

I dug into this a little. I tried giving an NPC archery and marksmanship stats, took her melee skills to zero. She only occasionally shoot an arrow (crude wooden) and would almost always resort to bashing with the shortbow instead. I had her fight fat zombies, other NPCs, zombie children, and decayed zombies.

They seem much more likely to use guns than bows and arrows.

@dissociativity
Copy link
Contributor

dissociativity commented May 4, 2020

I have definitely noticed NPCs being useless since a certain point in time, just beating zombies with their ranged weapons and rarely, if ever firing them.

I totally gave up on giving NPCs ranged weapons after this behavior continued regardless of what I gave them.

Copy link
Contributor

@mlangsdorf mlangsdorf left a comment

Choose a reason for hiding this comment

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

I appreciate the typo fix but entirely reverting the threshold change is not a good solution.

src/npcmove.cpp Outdated Show resolved Hide resolved
@mlangsdorf mlangsdorf added NPC / Factions NPCs, AI, Speech, Factions, Ownership Ranged Ranged (firearms, bows, crossbows, throwing), balance, tactics labels May 4, 2020
applies suggested solution for middleground in NPC ranged combat

Co-authored-by: Mark Langsdorf <[email protected]>
@zachmmeyer zachmmeyer changed the title Reverts back to OG npc shoot style and fixes typo NPCs to use ranged weapons against all enemies, and automatic fire against dangerous enemies May 4, 2020
@zachmmeyer zachmmeyer requested a review from mlangsdorf May 4, 2020 14:56
@kevingranade
Copy link
Member

Just following Mark's suggestion is still not sufficient, you need to outline specific (and repeatable) situations where the current values do the wrong thing and your values do the right thing.

@Dacendeth
Copy link
Contributor

Couldnt this be solved with some kind of dont melee attack unless you have to setting or open fire command?

@zachmmeyer
Copy link
Contributor Author

I'll get my lackey working on that data.

@stale
Copy link

stale bot commented Jun 4, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not 'bump' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

@stale stale bot added the stale Closed for lack of activity, but still valid. label Jun 4, 2020
@stale stale bot removed the stale Closed for lack of activity, but still valid. label Jun 13, 2020
@TobalJackson
Copy link
Contributor

Is it possible to have NPCs swap to a melee weapon when their inclination is to bash things rather than have them bash with their ranged weapon?

@ZhilkinSerg ZhilkinSerg merged commit 32d4bfe into CleverRaven:master Jun 17, 2020
@zachmmeyer zachmmeyer deleted the patch-1 branch November 28, 2020 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NPC / Factions NPCs, AI, Speech, Factions, Ownership Ranged Ranged (firearms, bows, crossbows, throwing), balance, tactics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants