Skip to content

Improve Responder Workflow#456

Open
Hoikas wants to merge 7 commits into
H-uru:masterfrom
Hoikas:resp_node_simplify
Open

Improve Responder Workflow#456
Hoikas wants to merge 7 commits into
H-uru:masterfrom
Hoikas:resp_node_simplify

Conversation

@Hoikas

@Hoikas Hoikas commented Jul 5, 2026

Copy link
Copy Markdown
Member

This PR improves the Responder node workflow by adding a new node - the Basic Responder. The basic Responder allows artists to more simply graph trivial, single state Responders with fewer nodes. The Basic Responder node accepts a condition, a PFM reference, and a list of messages to send.

While I was here, I added the ability to explicitly trigger the referenced PFM using a new Notify Triggerer message node, which matches the behavior of PlasmaMax. The old "automatically notify any referenced PFMs when a state completes" is now an opt-in behavior exposed on the Responder State node. Existing Responder State nodes attached to Responder nodes with PFMs attached will default to this being ON. Newly created Responder State nodes will default to this being OFF. Basic Responders will require manual additions of Notify Trigger message nodes. I also fixed the auto notify messages to send the eventType of 1 instead of 0, matching the behavior of PlasmaMax.

An illustration of the changes:
image

I'm going to leave this open for feedback for a time, then merge. I have a set of SDL helper nodes that I'm curating that will need to be slightly updated for basic responders, so I'd like to go ahead and get this in.

Hoikas added 7 commits July 5, 2026 16:57
In my experience, Responders generally have only a single state and
fire on trigger. It's really just a means to fire some messages,
sometimes with waits in the middle. That means the artist has quite a
bit of overhead that they don't need.

Enter the basic Responder. It links to a condition that fires it and
directly sends messages. Under the hood, it creates the single state at
export time and only fires on "trigger" (state==1.0). This should make
life easier moving forward.
This adds the "Notify Triggerer" node and allows the artist to manually
choose when to notify a Python script. This matches the UX of PlasmaMax
and also allows exposing the event ID that will be returned to the
triggerer. I actually used this ability when fixing the BlueSpiral doors
in Eder Delin and Eder Tsogal, but that was done manually.

Previously, the artist had no control over when the notification was
sent - always at the end of the Responder. Further, there was a bug in
that the event ID was left at 0 instead of the expected default of 1.

The old behavior will be retained on old Responders with each Responder
state node gaining a checkbox to enable/disable the feature. Old nodes
will default to having the "auto notify" turned on if the Responder is
linked to a PFM. If the user attaches a "Notify Triggerer" and links it
to a state, auto notifies are disabled for that Responder state. Newly
created nodes default the "auto notify" feature to off.

This is a good time to make this change because I'm able to add these
backwards compatibility mitigations *now*. The new basic Responder node
does not link to states, so it will *never* send auto notifies.
This should be safe. When the Responder code was originally written,
there were quite a few logic errors whereby we could get stuck waiting
on things or messages would be sent out of order. Since then, I've
tightened the logic up, and, in theory, only one branch of a Responder
tree should be able to wait. So, overriding the `waitOn` local should be
fine - there was no need to retain the previous value from what I could
tell. Having a secondary `childWaitOn` opened us up to an
`UnboundLocalError` when a callback message did not have any linked
callbacks. I'm kind of surprised we never got any bug reports about
this.
This improves the text for the PFM reference socket and the "detect
(un)trigger" checkboxes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant