Reaction Set Editor
Documentation Unreal Engine AI Reactions Debugging
Lay an enemy's answers out as cards, draw an arrow from each rule to the reactions it may pick, and watch a live enemy answer.
One canvas for a whole defensive kit: a card for each event the enemy answers, a card for each answer, and an arrow saying which rule may pick which reaction.
Set it up
60 seconds- 1
Open a Reaction Set on its canvas
Double-click theDA_ReactionSet_Gruntyou created on the Reaction System page and it opens as cards, under a tab called Triggers and Reactions.Double-click to openDA_ReactionSet_GruntThis is the canvas that opens, not a details panel: a blue Trigger card for each event the enemy answers, wired to the purple Reaction cards it may pick.TRIGGERGuardFrontalon SEC.Stimulus.DamageTakenpriority 10answers with 2limited to SEC.Reaction1 condition(s)OutREACTIONBlockruns Ability: GA_SEC_Reactionpriority 1, weight 1.00in SEC.Reactioncooldown 3.0sInTRIGGERGuardSideson SEC.Stimulus.AttackTelegraphedpriority 5answers with 1limited to SEC.Reaction20% of the time1 condition(s)OutREACTIONDodgeruns Ability: GA_SEC_DodgeBackpriority 0, weight 1.00in SEC.Reactioncooldown 15.0sInThe Reaction Set editor's own canvas: a Trigger card's Out pin wired to every Reaction its rule may pick. GuardFrontal can answer with Block or Dodge; GuardSides only ever reaches for Dodge. - 2
Add the answer
Right-click the empty canvas and choose Add Reaction. A card lands where you clicked, namedReaction_1, already carrying a Gameplay Ability execution method.Select it, press F2, and rename itParry. In the panel on the right, set Ability Class to GA_SEC_MontageAbility and set the Montage on the payload that appears under it.DA_ReactionSet_Grunt▾ExecutionAbility ClassNoneMontageNone▾One card selected, one reaction in the panel. - 3
Add the rule
Right-click the canvas again and choose Add Trigger. That card arrives asTrigger_1. Rename itParryFrontaland set its On Stimulus toSEC.Stimulus.AttackTelegraphed. - 4
Draw the arrow
Drag from the pin on the right of the trigger card to the pin on the left of the Parry card. The arrow reads: when an attack winds up nearby, answer with Parry. - 5
Press Play and watch it answer
The Watching picker above the canvas lists every enemy running this Reaction Set and latches onto the first one it finds. The line beside it readsRunning Parrythe moment the enemy answers, andNothing answering right nowthe rest of the time.
An attack that does not announce itself reaches no rule, so the canvas has nothing to report however the cards are wired. Add the SEC Attack Telegraph notify to the attacker's montage where the wind-up starts; without it the picker still names an enemy while the line beside it never leaves Nothing answering right now. The Watching picker fills from AI whose active Reaction Set is this asset, which they reach through a runtime override, an equipped weapon, their Enemy AI Config, or Default Reaction Set on their SEC Reaction Set Component, so a picker stuck on None while the game runs means none of those routes landed on this asset. See Attack Telegraphs and Reaction System.
Reading a Card
The canvas holds two families of card, and everything on either comes from the entry behind it.
A blue Trigger card is one rule, the event it answers and the conditions on it:
| Row | Shows |
|---|---|
| Title | The rule's Rule ID. |
| Event line | The On Stimulus tag it answers, or answers nothing yet when none is set. |
| Priority | Its Rule Priority. |
| Answers with | How many arrows leave the card. |
| Limited to | Its Reaction Category, when it has one. |
| Chance | How often it fires, when Chance is below 1. |
| Interval | Its Min Interval in seconds, when one is set. |
| Conditions | How many gates sit on it. |
A purple Reaction card is one answer, what it runs and how it scores:
| Row | Shows |
|---|---|
| Title | The reaction's Reaction ID. |
| Runs | Its execution method by name, runs nothing yet when none is set, or (incomplete) when the method is missing a field it needs. |
| Priority, weight | Its Priority and Selection Weight. |
| In | Its Reaction Category, when it has one. |
| Cooldown | Its Cooldown Duration in seconds, when it is above 0. |
Rows appear only when they have something to say, so a plain parry card stays short. Hover a card for the same figures as sentences, plus one line per arrow naming the reaction it points at and the multiplier that arrow carries.
A card greys out when Enabled is unticked. A warning triangle and a red border appear when something would stop the entry working, and hovering the triangle names what.
Selecting a card puts that entry alone in the panel on the right, so the whole rule is editable without hunting through an array:
Trigger
Enabled
Rule ID
ParryFrontal
On Stimulus
SEC.Stimulus.AttackTelegraphed
Require Context Tags
0 Gameplay Tags
Block Context Tags
1 Gameplay Tag
SEC.Attack.Unblockable
Conditions
1 Array element
Index [ 0 ]
Incoming Angle Gate
Incoming Angle Gate
Half Angle Degrees
60.0
Pass Without Direction
Invert
Answers
Reaction Links
2 Array elements
Reaction Category
SEC.Reaction.Defensive
Rule Priority
20
Chance
0.60
Min Interval
1.5
Adding and Removing
Right-click empty canvas and choose Add Trigger or Add Reaction. A card appears where you clicked and a matching entry is added to the asset. A fresh reaction arrives with an ability execution method already on it, so it runs as soon as you pick an ability.
Right-click a card for Rename, Toggle Enabled and Delete. Toggle and delete apply to the whole selection, so switching a group of rules off is one action.
A new trigger takes the highest Rule Priority in the set plus ten, which puts it above the rules already there. Change that number to move it.
Deleting a reaction strips every arrow that pointed at it, so no rule is left naming a reaction the set does not hold.
Copy, cut, paste and duplicate work as they do in any Unreal graph. A copied reaction card gets a fresh ID and its own execution method, scorers and gates, so editing the copy leaves the card it came from alone. A copied trigger card gets a fresh ID, but its Conditions stay the same gate objects the original holds, so retuning a condition on the copy retunes it on the original too. Pick the gate's class again on the copy to give it a condition of its own. Right-click also offers Add Comment, which groups cards under a label and changes nothing about how the AI runs.
Copying a card from one Reaction Set and pasting into another carries only the name. An entry's settings live in the asset that holds it and cannot travel on the clipboard, so the pasted card arrives empty and says so in the message log. To reuse a tuned reaction across sets, copy its settings across in the details panel.
Wiring a Rule to a Reaction
Drag from the pin on the right of a trigger card to the pin on the left of a reaction card. That arrow is one entry in the rule's Reaction Links, seen from the other side.
One rule can answer with several reactions. Draw an arrow to each, and the usual priority and scoring on those reactions picks which of them runs.
Trigger
Reaction ID
Parry
Weight Multiplier
2.00
Leave Weight Multiplier at 1 and the reaction's own Selection Weight decides. A thicker, brighter arrow is a rule leaning harder on that answer.
Trigger cards have no incoming pin and reaction cards have no outgoing one, so an arrow between two rules, or between two reactions, cannot be drawn.
The two ways a rule names answers
Reaction Links names reactions one at a time, which is what the arrows write.
Reaction Category names a group instead, and every reaction carrying that category competes. No arrow appears for a category, because the rule names no reaction to draw one to.
Fill in both and the rule answers only with a reaction that appears in its links and carries that category. That narrows what a rule can do and never widens it.
An arrow from a rule with a category to a reaction outside that category reaches nothing, and the other arrows on that rule still answer. The rule falls silent only when every arrow it draws sits outside its category. The trigger card flags each such arrow and names both the reaction and the category. Clear the category, or give that reaction the category.
What the Cards Warn About
The canvas reports what a details panel cannot show you:
| Warning | What it means |
|---|---|
| Nothing reaches this reaction | No arrow points at it and it carries no Reaction Category, so only a Blueprint calling Execute Reaction by name can start it |
| This rule answers nothing | The rule has no On Stimulus tag, so no event matches it |
| Names neither a reaction nor a reaction category | The rule can never produce an answer, and the rule below it takes the event instead |
| Wired outside its category | The arrow and the category disagree, so that arrow reaches nothing |
| Chance is 0 | The rule never fires |
| No execution method | The reaction has nothing to run |
| The execution method is missing data | A field it needs to run is still empty |
| This method takes the AI's brain over | Behavior Tree Sequence replaces the brain for its duration, which a reaction cannot do. Pick a Gameplay Ability method. |
| This ID is used by more than one card | Only the first card with that ID is ever selected |
An unreachable reaction is the one worth reading twice. A reaction with no arrow and no category is dead unless something calls it by name, and nothing about the arrays tells you that.
Which Rule Is Asked First
Rule Priority on each trigger decides the order, highest first. Rules sharing a priority keep the order they sit in.
The array reorders itself to match, so reading the Trigger Rules array top to bottom is reading the order events are offered in.
Watching the AI Answer
Press Play and the picker above the canvas lists every enemy running this Reaction Set, latching onto the first one it finds. The line beside the picker names the reaction that enemy is running, or reports that nothing is answering right now.
The reaction the AI chose is the card you authored it on, so a rule that fired the wrong answer is one click from the setting that produced it.
Pick another entry from Watching to follow a different enemy mid-fight. If the enemy you are watching dies, or a role change moves it to a different Reaction Set, the canvas attaches to another one running this set, or falls back to None when there are none left.
Tuning weights, chances, intervals and gates while the game runs is safe. Adding, deleting or renaming a rule or a reaction mid-play is not, because a running AI holds a reference into the arrays. The editor warns you once per session in the message log when you do it, and the fix is to restart Play In Editor.
Debug it
The canvas follows one enemy at a time. For a record you can scroll back through:
SEC.Debug.LogReactions 1 // Which rule answered, which declined and why, which reaction won
SEC.Debug.Reactions 1 // Reaction list above each enemy, with priorities and cooldowns
SEC.Debug.Stimulus.Draw 1 // The announced shape, and every pawn it reached
SEC.Debug.All 1 turns every overlay on at once, and SEC.Debug.WatchPawn <name> narrows them to one enemy.The rule log is the fastest way to tell a rule that never matched from a rule that matched and then found nothing to answer with. A rule skipped by its interval prints how much of the gap is left. A walk that answered nothing prints how many rules the set carries and how many of those were for that event.
Saving the asset runs validation into the Soulslike Enemy Combat message log, which names any reaction with nothing to run.
AlternativeEditing the arrays instead of the cards
Select nothing on the canvas and the panel on the right keeps the full Reactions and Trigger Rules arrays under Advanced, for reordering or editing several entries at once.
Renaming through those arrays is the one thing worth avoiding. Rename through the card or the Reaction ID row and every arrow that named the old ID follows in one undo step; rename through the raw array and the arrow is left pointing at nothing, which the card then flags.
MultiplayerMultiplayer and dedicated servers
Reactions are chosen wherever the AI's decisions are made, so the picker lists the authoritative copy of each enemy. Under Play As Client that is the server's enemies rather than the client's.
A dedicated server launched as its own process cannot be inspected from the editor, because it has no world in the editor's process. Run the server in-process to watch its enemies.
Related
| Page | Why |
|---|---|
| Reaction System | The rules, scoring and gates every card shows. |
| Attack Telegraphs | Where the events a trigger answers come from. |
| Action Set Editor | The same canvas, for the poll-driven side of an enemy. |
| Combat Roles | A role change swaps the Reaction Set, and the picker detaches when the AI moves to a different one. |