Add link event trigger node.#449
Draft
Hoikas wants to merge 13 commits into
Draft
Conversation
0dc2b48 to
c69c4e4
Compare
c69c4e4 to
89d0fa5
Compare
322f824 to
843c32c
Compare
This is a helper node to abstract away the oddities of dealing with Python File Mods triggering logic. It's hopefully the first of many higher level logic nodes.
This adds a new node for changing an SDL variable by drawing connections from conditions to SDL variable nodes. I initially wanted to use a logic thunk here just link in the link event node, but I found that plAACO doesn't forward the "whodoneit" information that some scripts use. So, this just forwards the attached condition.
This adds q node for responding to SDL boolean events. The SDL Bool Trigger node is designed to fire off a Responder when an SDL variable is in the expected boolean state (true or false). Optionally, the Responder can be gated on another SDL variable. The node swaps between xAgeSDLBoolRespond and xAgeSDLBoolAndRespond as needed.
This adds an SDL Boolean Condition node that triggers an attached Responder if a condition becomes true while an SDL boolean variable is true. The underlying script is xAgeSDLBoolCondResp, which was added in MOUL. The script also exists in the Offline KI, so it's a pretty safe one to bet on.
The "trigger multistage" node was a generic this-player-triggered-it message anyway. We now have some pretty generic SDL setting stuff, and it would be nice to fire those from responders. This is the tool we'll use for that.
This implements a real SDL boolean logic gate node. Some good future work here would be to force a minimum of two input node sockets to be visible at all times.
This allows a socket definition to spawn a minimum number of sockets on a node. This is most useful for the SDL Boolean Gate node where there should always be a minimum of two input variables. Showing a minimum of two sockets is a good way to convey that requirement.
The old socket and node type validation is useful most of the time, but some nodes will need to have more complex validation logic, so allow them to do so.
This will be a bit niche, but some nodes may need to expose a key for themselves and keys that they want notified. For notify messages, we want to notify the former and not the latter. Sometimes those buckets are the same, sometimes not.
This node enable/disables the clickable hotspot based on the value of the attached SDL variable. When this node is linked to a clickable, it takes ownership of the clickable and all downstream nodes triggered by the clickable must be linked to it instead of the clickable itself. I did attempt to allow simultaneous access to the clickable and the conditional clickable, but I found that engine limitation made that impractical without modifying plActivatorActivatorConditionalObject.
This is basically a fancy lookup table, except for SDL.
843c32c to
8fa9f55
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is a higher level use case of the xLinkEventTrigger.py file introduced in H-uru/Plasma#1821. RIght now, this is just an example. I still have some iteration to do here, and I would like to add some more high level logic nodes to improve the workflow where Python has to get involved.
Python File nodes are tricky because the attributes are inputs to the script but function logically as outputs. For example, responders appear as an input to a Python file node, but Python file nodes can trigger responders. The inverse is also true. In the case of
xLinkEventTrigger.py, we see the same thing - normally an activator is an input/trigger for a Python file node, but, in this case, the Python script is triggering the activator so that the responder or other things connected under "satisfies" can proceed.