-
Notifications
You must be signed in to change notification settings - Fork 281
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
feat(content,port): AGGRO_CHARACTER
flag for enemies
#5846
base: main
Are you sure you want to change the base?
Conversation
Co-Authored-By: Venera3 <72006894+Venera3@users.noreply.github.com>
Autofix has formatted code style violation in this PR. I edit commits locally (e.g: git, github desktop) and want to keep autofix
I do not want the automated commit
If you don't do this, your following commits will be based on the old commit, and cause MERGE CONFLICT. |
AGGRO_CHARACTER
flag for enemies
the aggression issues may be mitigated by this DDA PR: |
the save/load aggro behavior should be fixed by this PR: |
…_character tracking Co-Authored-By: Eric <52087122+Ramza13@users.noreply.github.com> Co-Authored-By: Venera3 <72006894+Venera3@users.noreply.github.com>
Checklist
Required
main
so it won't cause conflict when updatingmain
branch later.Optional
please remove sections irrelevant to this PR.
Co-Authored-By
in the commit message.doc/
folder.Purpose of change
ports change
CleverRaven/Cataclysm-DDA#59795
Additionally, to allow for the creation of enemies with high aggression that wont attack player until triggered by a flag, which otherwise always would. Enemies which do not have
AGGRO_CHARACTER
set to false should behave the same as they did before. Monsters that have this tag, when fighting, should now focus on whatever enemy they were already fighting and redirect their anger to the player less often.also ports the following:
CleverRaven/Cataclysm-DDA#60352
CleverRaven/Cataclysm-DDA#62346
(the above are for fixing bugs with quadrupeds, but will extend to enemies that we implement with similar features, so these commits are being included)
CleverRaven/Cataclysm-DDA#70938
Describe the solution
Geese are also now more territorial, and won't like when you get near.
Describe alternatives you've considered
Testing
Spawned a 5x5 grid of moose to fight a 5x5 grid of zombie dogs. They fought and the moose eventually started fleeing once enough friends died. They seem to behave exactly the same as they did before the change.
Spawned bee, beaver, and giant jumping spider. All seem to behave the same as before.
Created a civilian monster that has high aggression and a high melee attack. Spawned it in a city, and it fought zombies until dying but did not target the player. The civilian will not be included in the PR.
Changed "mongrel" to have 99 aggression. Mongrel instantly attacks player. When
aggro_character
is set to false, mongrel no longer attacks player, however follows the player around very closely for a long time. I don't think this following behavior is a result of this change, but rather how aggression already worked.I spawned a group of civilians with 100 aggression in a city. They fought the zombies around until the zombies died. The civilians then attacked me. A group of civilians with 50 aggression do not attack. This is odd, as the DDA equivalent does not seem to have this issue. This should be fixed.
I spawned a group of civilians with 100 aggression in a field. Saved and reloaded. Civilians are now aggressive, and won't give up on killing the player. A group spawned with 50 aggression quickly loses interest and goes back to neutral and the expected behavior. This is probably related to the issue above.
As you can see, there is still some unexpected behavior that needs to be sorted out before being merged. These issues most likely wont affect the current player experience as (i think) there are no monsters that would get aggro_character = false and need 100 aggression for some reason, but would prevent a 1:1 port of certain monsters from DDA (namely the civilians) and should be fixed anyways.
After the commits made to implement 70983 and 60352 these issues should all be ironed out. I retested a few of these scenarios and got the expected results this time, which I had not before. Saving and reloading as well as monsters with high aggression attacking the player after a non-monster fight work correctly now from my testing.
Additional context
We probably need to apply this to more monsters as well, as I only ported what DDA animals had aggro_character set to false.
CleverRaven/Cataclysm-DDA#59565 is also relevant to DDA's version of this change
if implemented #1879 would be fixed
This PR will make the moose less likely to attack the player randomly. Should we keep the killer moose?