-
Notifications
You must be signed in to change notification settings - Fork 146
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
New Interaction System #733
New Interaction System #733
Conversation
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Signed-off-by: Mnemotechnican <[email protected]>
This is mostly ready for review now. I still have yet to implement more unique interactions (and I could use some ideas for that). Additionally, I'm keeping InteractionPopupComponents on simple mobs since those are very minor. |
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.
test fail VALID
Don't request changes to say "fix the tests"
I'm requesting the test fail to be fixed? |
Oops, that's my own test that failed. Easy fix... |
Signed-off-by: Mnemotechnican <[email protected]>
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.
i'm gonna be real i couldn't really wrap my head around most of this; maybe i'm just tired but this definitely needs another maintainer thorough review
Content.IntegrationTests/Tests/InteractionVerbs/InteractionPrototypesTest.cs
Show resolved
Hide resolved
Ugh, the new test fail doesn't seem like it's caused by my PR... unless it's something obscure. |
Is this going to interact with the mood system or will that be in a separate PR? |
uh, I don't know how to interact with the mood system yet. |
Very simple, interaction raises an event, declaring a string that must match to a moodlet ID. Whoever receives the event will receive the moodlet. The behavior of said moodlet is declared in yml. However I'm not really going to ask you to do mood integrations in this PR. |
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.
This is nice.
- type: Interaction | ||
id: Hug | ||
parent: [BaseGlobal, BaseHands] | ||
priority: 2 | ||
#icon: /Textures/Interface/Actions/hug.png | ||
delay: 0.7 | ||
range: {max: 1} | ||
hideByRequirement: true | ||
requirement: | ||
!type:MobStateRequirement | ||
inverted: true | ||
action: | ||
# TODO: this should pull the target closer or sumth, but I need to code that action first | ||
!type:NoOpAction | ||
|
||
- type: Interaction | ||
id: Pet | ||
parent: [BaseGlobal, BaseHands] | ||
priority: 1 | ||
#icon: /Textures/Interface/Actions/hug.png | ||
delay: 0.4 | ||
range: {max: 1} | ||
hideByRequirement: true | ||
requirement: | ||
!type:MobStateRequirement | ||
inverted: true | ||
action: | ||
!type:NoOpAction |
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.
We should make those two affected by the mood system.
Hug/Pet give mood, pehaps pet gives only mood to vulp, ect...
Hugs to tall, traits for that, ect...
# Description Something that was omitted in #733. Hugging and petting now give positive moodlets. The petting interaction was split into two: one for animals and one for humanoids. The one for animals improves both your own mood and the mood of the animal, whereas petting a humanoid only improves their own mood. In addition to all that, being hugged and being pet do not stack. <details><summary><h1>Media</h1></summary> <p> https://github.com/user-attachments/assets/47e8f722-44ee-4d03-a580-65a2946a1920 </p> </details> # Changelog :cl: - tweak: Hugging and petting interactions now influence mood, just like the old hugging. --------- Signed-off-by: Mnemotechnican <[email protected]> Co-authored-by: DEATHB4DEFEAT <[email protected]>
# Description Grrrr, I may have forgotten to remove it as a part of #733. Signed-off-by: Mnemotechnican <[email protected]>
Description
This implements the New Interaction Verb System™©, designed to allow defining verbs using yml and make adding new verbs way easier than it was before. This was initially designed just to bring back generic no-op interactions like hugging, but can now be used to create way more unique interactions for all the different entities.
In the core of the system lies InteractionVerbPrototype. Besides defining the obvious qualities of the verb itself, such as the name, description, interaction constraints, it also has several important properties:
Verbs can be global or local. Global verbs are added to any entity should it meet the prerequisites and pass all the necessary checks (which are also designed to be highly configurable). Local verbs are defined in OwnInteractionVerbsComponent and InteractionVerbsComponent of the user and target respectfully.
At the moment of writing there are 8 built-in global verbs and 1 non-global verb, not including abstract verbs:
Local actions include:
More are to be added to this list as the progress continues.
TODO
Add more, way more actions. Possible ideas include: [slapping/kicking someone, hugging toys/plushies, pressing random buttons on a computer, ... ]. I could use some ideas for that.- skipping for now, we can do it in follow-up prs to clutter this one less.Media
Note: this video was made before a few important fixes were made.
8mb.video-jPY-sQDrEIQu.mp4
Newer video - demonstrates various actions and shows that chat logs cannot be seen if the source of the logged popup is outside the view.
8mb.video-HpL-WUOsUdKk.mp4
Changelog
🆑