# Defense System

> Give a pawn a guard: create a Defense Rule Set, author one response, and an incoming hit is parried, blocked or ignored before it reaches health.

Markdown version of https://rigbak.com/docs/soulslike-combat/defense-system, a page of the Soulslike Enemy Combat documentation. Link that page when citing it.

> A pawn carries an ordered list of answers to an incoming hit. The first one that fits decides what the blow was worth and reports back, so the attacker can tell a parry from a block.

## Set it up (60 seconds)

1. **Add the Defense component**

   Select the pawn, **Add Component**, **SEC Defense**. An enemy built on `EnemyCharacterBase` already carries one named **Defense**; select that instead of adding a second.
2. **Create a Defense Rule Set**

   Right-click in the Content Browser, **SEC**, **Damage and Defense**, **Defense Rule Set**.

   Create the asset: right-click in the Content Browser, choose **SEC > Damage and Defense > Defense Rule Set**, and name it **DA_Defense_KnightArmour**.

   *Right-click in the Content Browser, SEC, Damage and Defense, Defense Rule Set.*
3. **Author one response**

   On the asset, press **+** on **Responses** and pick **SEC Guard**. Set **Required Defender Tags** to the tag the guard holds while it is up, and **Result Tag** to `SEC.Defense.Block` so the attacker learns what happened.

   In **DA_Defense_KnightArmour**, under SEC Guard, set:

   | Property | Value |
   | --- | --- |
   | Required Defender Tags | SEC.State.Blocking |
   | Result Tag | SEC.Defense.Block |

   *Required Defender Tags and Result Tag both ship empty, so they are the two to fill in. The rest of a Guard ships as a block: a 60 degree arc and a 0.2 multiplier.*
4. **Point the Defense component at it**

   Select the pawn's **SEC Defense** component and set **Defense Set** to the asset.

   In **SEC Defense**, under SEC > Defense, set:

   | Property | Value |
   | --- | --- |
   | Defense Set | DA_Defense_KnightArmour |

   *Defense Set answers after everything authored directly on the component, which ships empty.*
5. **Answer Handle Incoming Damage**

   In the pawn's **Class Settings**, add the **SEC Damageable** interface, then implement **Handle Incoming Damage** with one node. **Resolve Defense and Apply Damage** runs the responses, charges what they cost, takes what survived off the pawn's health pool, and reports back.

   Blueprint graph, nodes in reading order:

   - **Comment box: BP_PlayerCharacter · SEC Damageable interface**

     - **Handle Incoming Damage** (event); outputs: Damage Info
     - **Defense** (variable)
     - **Resolve Defense and Apply Damage** (function; Target is SEC Defense Statics); inputs: Defense, Damage Info, Health Vital Tag = SEC.Vital.Health; outputs: Return Value
     - **Return Node** (function); inputs: Return Value

   Set **Health Vital Tag** on the node to the pawn's health pool, `SEC.Vital.Health` in the tags the plugin ships. The pin starts empty, and the pawn needs a **SEC Vitals** component carrying a row for that tag; without either one the node resolves the hit and drains nothing. See [Vitals](https://rigbak.com/docs/soulslike-combat/vitals).

   Enemies built on `EnemyCharacterBase` answer this already, so skip this step there.
6. **Play, and hit it while the tag is held**

   A fifth of the damage lands, and the swing comes back carrying `SEC.Defense.Block`. Drop the tag and the same blow lands whole.

> **Warning**
>
> A response answers only while the pawn holds the tags in its **Required Defender Tags**, and nothing in the plugin puts them there. A guard ability, a [reaction](https://rigbak.com/docs/soulslike-combat/reaction-system), or a [montage window](https://rigbak.com/docs/soulslike-combat/animation-integration) has to hold one while the guard is up. Until something does, the response sits inert and hits land at full damage.

> **Note**
>
> A response only that one pawn needs does not need the asset. Press **+** on the component's own **Responses** instead of creating a Defense Rule Set, using the same **Required Defender Tags** and **Result Tag** fields. Responses authored there run ahead of the Defense Set, so the two combine rather than compete.

A Defense component with nothing authored and no Defense Set reports the incoming damage unchanged, so dropping it onto an existing pawn changes nothing until you write the first response.

---

## The responses that ship

Add them to **Responses** in this order to start from a sane list: most situational at the top, the scaling ones at the bottom.

| Response | Answers when | Ships with |
| --- | --- | --- |
| **SEC Invulnerable** | The pawn holds the tags. No arc, so it answers from every direction, and no cost. | Damage fixed at 0 |
| **SEC Guard** as a parry | The pawn holds the parry window's tag and the blow arrives inside the arc. | Set **Damage Multiplier** to 0 and **Cost Per Damage** to 0 |
| **SEC Guard** as a block | The pawn holds the raised guard's tag and the blow arrives inside the arc. | 60 degree half arc, multiplier 0.2, cost per damage 1 |
| **SEC Scale Damage** | The pawn holds its defender tags and the attack carries its attack tags, where an empty list passes. Scales a hit: double against a stance-broken enemy, half against a buffed one, less against armor that resists a kind of damage. | Multiplier 1, **Continue After Claim** on |

A parry and a block are the same response with different values, so list the parry above the block and a hit inside the parry window never reaches the block. **SEC Scale Damage** scales a hit rather than answering it, and reports no result tag unless you give it one, so a blow only it touched reads to the attacker as a clean hit.

> **Note**
>
> **SEC Parry**, **SEC Block**, **SEC Damage Modifier** and **SEC Damage Type Resistance** show as Deprecated in the response picker. A rule set already holding them keeps answering hits the way it did. Author new responses with **SEC Guard** and **SEC Scale Damage**.

### Where the tags come from

A response reads the pawn's current state tags and nothing else. Whatever grants a tag decides when the response is live: a [reaction](https://rigbak.com/docs/soulslike-combat/reaction-system) on an enemy, an input-driven ability on a player, or a [montage window](https://rigbak.com/docs/soulslike-combat/animation-integration) that holds a tag for the frames it covers.

That is the seam between the two halves of a defense. The reaction picks the animation and plays it; the response prices a hit that lands during it. One enemy parry reaction plus one parry **SEC Guard** covers the whole move, and neither knows about the other beyond the tag they share.

---

## Author a response

### What a guard reads

**SEC Guard** adds two fields of its own.

| Field | Sets |
| --- | --- |
| **Arc Half Angle Degrees** | Half the width of the arc the blow must arrive inside, in degrees to either side of straight ahead. 60, the starting value, accepts anything up to 60 degrees off the front; 180 accepts all round. A blow carrying no direction counts as frontal, so an attack with none cannot slip past a raised guard. |
| **Damage Multiplier** | How much of the hit still lands. 0 stops it completely, which is a parry; 0.2, the starting value, lets a fifth through as chip damage, which is a block; 1 changes nothing. |

**SEC Scale Damage** has a **Damage Multiplier** too, with no upper limit: 2 doubles the hit, 0.5 halves it. **SEC Invulnerable** adds nothing; it takes the whole hit.

### What every response carries

Every response carries these.

| Field | Sets |
| --- | --- |
| **Required Defender Tags** | Tags the pawn must all hold for this to answer, such as those the parry, guard, or dodge ability grants while it runs. Empty answers whatever the pawn is doing. |
| **Blocked Defender Tags** | Tags that stop this answering when the pawn holds any of them, such as a stagger. Empty stops nothing. |
| **Result Tag** | What to call this answer, reported to the attacker so its swing and its impact effects can react. Unset reports nothing, which suits armor that only shaves damage. |
| **Required Attack Tags** | Tags the incoming attack must all carry for this to answer, read off the attack's **Damage Tags**. Empty answers whatever the attack is. A parent tag covers everything beneath it, so `SEC.Damage.Elemental` answers fire, ice and lightning. |
| **Blocked Attack Tags** | Tags that stop this answering when the attack carries any of them. List `SEC.Attack.Unblockable` here on a guard and an attack carrying that tag falls through to whatever sits below. |
| **Continue After Claim** | Keep running the responses below this one after this one answers, so a resistance can shave what a block let through. Off on **SEC Guard** and **SEC Invulnerable**, as a parry wants, and on for **SEC Scale Damage**. |
| **Cost Vital Tag** | Vital this answer charges, such as stamina for a raised guard. Leave it unset and the answer is free, which also means the pawn needs no vitals at all. |
| **Flat Cost** | Units charged per hit, whatever the blow was worth. Ignored while **Cost Vital Tag** is unset. |
| **Cost Per Damage** | Extra units charged per point of incoming damage, measured against the blow before anything reduced it. 1 charges the whole hit to the vital, 0 turns the scaled part off. Ignored while **Cost Vital Tag** is unset, so the 1 that **SEC Guard** ships with charges nothing until you point that field at a pool. |
| **Spend Remainder when Unaffordable** | Take whatever the vital has left when it cannot cover the full charge. The answer is refused either way and the hit falls through to the responses below; this decides only whether the pool empties on the way, raising its depleted tag and firing its depleted event, for a guard meant to break on the blow it could not afford. Off by default. |
| **Vital Damage Multipliers** | Vitals this response treats differently from health. Empty and one **Damage Multiplier** covers every vital, so a block that halves health halves stance with it. Add a row to let stance or poise through at its own rate. |

> **Note**
>
> Working out the answer spends nothing. The component charges what the responses cost afterward, so **Preview Incoming Damage** can run the same walk on any machine and show a player what a hit would cost before it lands.

---

## Worked examples

### Frames where the pawn takes nothing

Give the ability a tag while it runs, put **SEC Invulnerable** at the top of the list, and point **Required Defender Tags** at that tag.

**Details panel: SEC Invulnerable** (instanced object, in SEC Defense > Responses [0])

**Category: Defender Gates**

| Property | Value |
| --- | --- |
| Required Defender Tags | SEC.State.Invulnerable |
| Blocked Defender Tags | no tags |

**Category: Result**

| Property | Value |
| --- | --- |
| Result Tag | SEC.Defense.Block |

**Category: Defense Rule**

| Property | Value |
| --- | --- |
| Continue After Claim | false |

**Category: Attack Gates**

| Property | Value |
| --- | --- |
| Required Attack Tags | no tags |
| Blocked Attack Tags | no tags |

**Category: Cost**

| Property | Value |
| --- | --- |
| Cost Vital Tag | None |
| Flat Cost | 0 |
| Cost Per Damage | 0 |
| Spend Remainder when Unaffordable | false |

**Category: Vital Damage**

| Property | Value |
| --- | --- |
| Vital Damage Multipliers | 0 Array elements |

*Takes the hit for nothing while the pawn holds the tag. No arc, so it answers from every direction, and no cost.*

Damage is zero from any direction, at no cost. `SEC.State.Invulnerable` ships as a starting tag for a boss in an immune phase or an actor a script has put out of reach. The blow still lands, still plays its impact effect, and still reports back.

For the invulnerability frames of a dodge, where a sweep should attempt nothing at all, list `SEC.State.Intangible` in **Pass Through Tags** on the attacker's melee trace instead. That tag is already in the shipped list, so a [montage window](https://rigbak.com/docs/soulslike-combat/animation-integration) holding it across the roll is the whole setup. Reach for **SEC Invulnerable** when the hit has to resolve, or when damage arrives from something other than a sweep.

### A parry, front only

Give the parry ability a tag while its window is open and put a **SEC Guard** above the block. A Guard starts out as a block, so set **Damage Multiplier** to 0 for a parry that lets nothing through, **Cost Per Damage** to 0 so it costs nothing, and **Result Tag** to `SEC.Defense.Parry`. **Arc Half Angle Degrees** at 60 keeps it to the front, 60 degrees to either side.

**Details panel: SEC Guard** (instanced object, in SEC Defense > Responses [1])

**Category: Guard**

| Property | Value |
| --- | --- |
| Arc Half Angle Degrees | 60 |
| Damage Multiplier | 0.00 |

**Category: Defender Gates**

| Property | Value |
| --- | --- |
| Required Defender Tags | Player.State.Parrying |
| Blocked Defender Tags | no tags |

**Category: Result**

| Property | Value |
| --- | --- |
| Result Tag | SEC.Defense.Parry |

**Category: Defense Rule**

| Property | Value |
| --- | --- |
| Continue After Claim | false |

**Category: Attack Gates**

| Property | Value |
| --- | --- |
| Required Attack Tags | no tags |
| Blocked Attack Tags | no tags |

**Category: Cost**

| Property | Value |
| --- | --- |
| Cost Vital Tag | None |
| Flat Cost | 0 |
| Cost Per Damage | 0 |
| Spend Remainder when Unaffordable | false |

**Category: Vital Damage**

| Property | Value |
| --- | --- |
| Vital Damage Multipliers | 0 Array elements |

*A Guard set up as a parry: nothing lands, nothing is charged, and it answers only while the parry ability holds its tag and the blow arrives inside 60 degrees of straight ahead.*

A blow from the front inside the window does nothing. A blow from behind falls through to whatever sits below, so a parry and a block coexist without either of them naming the other.

### A block that costs stamina

Give the guard ability a tag it holds while the guard is up, put a second **SEC Guard** under the parry, and point **Cost Vital Tag** at the stamina pool. The arc and the multiplier stay at their starting values.

**Details panel: SEC Guard** (instanced object, in SEC Defense > Responses [2])

**Category: Guard**

| Property | Value |
| --- | --- |
| Arc Half Angle Degrees | 60 |
| Damage Multiplier | 0.20 |

**Category: Defender Gates**

| Property | Value |
| --- | --- |
| Required Defender Tags | Player.State.Guarding |
| Blocked Defender Tags | Player.State.Staggered |

**Category: Result**

| Property | Value |
| --- | --- |
| Result Tag | SEC.Defense.Block |

**Category: Defense Rule**

| Property | Value |
| --- | --- |
| Continue After Claim | false |

**Category: Attack Gates**

| Property | Value |
| --- | --- |
| Required Attack Tags | no tags |
| Blocked Attack Tags | no tags |

**Category: Cost**

| Property | Value |
| --- | --- |
| Cost Vital Tag | SEC.Vital.Stamina |
| Flat Cost | 5 |
| Cost Per Damage | 1 |
| Spend Remainder when Unaffordable | false |

**Category: Vital Damage**

| Property | Value |
| --- | --- |
| Vital Damage Multipliers | 0 Array elements |

*A Guard set up as a block. Charges 5 stamina plus 1 per point of the incoming blow. A pawn that cannot pay drops through to whatever sits below.*

A response's charge is **Flat Cost** plus **Cost Per Damage** times the blow before anything reduced it. The values above cost 45 stamina against a 40 damage swing.

**Running out is a guard break.** Before a costed response answers, the component asks whether the pawn can pay. One that cannot pay steps aside and the next response down takes the hit, so an exhausted pawn eats the blow at whatever the responses under the block make of it. Two responses drawing on one vital are measured against a running total, so a pool that covers one of them does not cover both.

The pool comes from the pawn's [Vitals](https://rigbak.com/docs/soulslike-combat/vitals) component. A pawn with a costed response and no vitals component answers for free and names itself once in the Output Log.

### Armor

Put a **SEC Scale Damage** at the bottom of the list and name the kind of damage it resists in **Required Attack Tags**.

**Details panel: SEC Scale Damage** (instanced object, in DA_Defense_KnightArmour > Responses [0])

**Category: Scale**

| Property | Value |
| --- | --- |
| Damage Multiplier | 0.60 |

**Category: Defender Gates**

| Property | Value |
| --- | --- |
| Required Defender Tags | no tags |
| Blocked Defender Tags | no tags |

**Category: Result**

| Property | Value |
| --- | --- |
| Result Tag | None |

**Category: Defense Rule**

| Property | Value |
| --- | --- |
| Continue After Claim | true |

**Category: Attack Gates**

| Property | Value |
| --- | --- |
| Required Attack Tags | SEC.Damage.Physical.Slashing |
| Blocked Attack Tags | no tags |

**Category: Cost**

| Property | Value |
| --- | --- |
| Cost Vital Tag | None |
| Flat Cost | 0 |
| Cost Per Damage | 0 |
| Spend Remainder when Unaffordable | false |

**Category: Vital Damage**

| Property | Value |
| --- | --- |
| Vital Damage Multipliers | 0 Array elements |

*Shaves 40 percent off slashing damage and carries on down the list, so it trims whatever the guards above it let through.*

| Field | Sets |
| --- | --- |
| **Required Attack Tags** | Which kind of damage this resists, matched against the attack's **Damage Tags**. A parent tag covers everything beneath it, so `SEC.Damage.Physical` resists slashing, piercing, and bludgeoning at once. Leave it empty to scale every hit, which is flat armor. |
| **Damage Multiplier** | How much of the hit still lands. Starts at 1, which changes nothing. |
| **Result Tag** | Leave it unset for plain armor, which shaves the damage without telling the attacker anything. |

This response answers by what the attack is rather than by what the pawn is doing, which is why it ships with **Continue After Claim** on, and a hit that only armor touched reports no result tag and reads to the attacker as a clean hit. [Melee Trace](https://rigbak.com/docs/soulslike-combat/melee-trace) covers the damage tags an attack carries and where it picks them.

---

## Where the responses come from

Most situational first. A hit enters at the top.

1. **What the pawn is carrying** (Weapon Defense Set on each held item, gathered through Get Defense Sets): Runs in the order the items were equipped, and stops the moment an item is put down. A shield in the off hand contributes alongside the sword.
2. **Responses on the component** (SEC Defense > Responses): The pawn's own answers: its dodge frames, its parry, its stance. Authored on the pawn, so they hold whatever it is holding.
3. **The shared set** (SEC Defense > Defense Set): A Defense Rule Set several characters point at. Last in the walk, so a broad resistance here trims whatever the answers above it let through.

The first response that answers the hit ends the walk. Tick Continue After Claim on a response and the ones below it keep shaving what is left, which is what armor wants and a parry does not.

| Field | Sets |
| --- | --- |
| **Defense Set** | A shareable list of responses, for armor or a stance several characters use. Runs last, under everything in **Responses**, so a broad resistance here shaves whatever the answers above it let through. Empty means everything is authored on this pawn. |
| **Responses** | Responses authored on this pawn alone, running after whatever the pawn is carrying brings and before the **Defense Set**. |

**Details panel: SEC Defense** (component, in BP_PlayerCharacter)

**Category: SEC > Defense**

| Property | Value |
| --- | --- |
| Defense Set | DA_Defense_KnightArmour |
| Responses | 3 Array elements |
| Outcome Effects | 0 Array elements |

*Responses run top down. Whatever the pawn is carrying answers first, then these, then the Defense Set.*

### Pointing several characters at the same set

Set more than one Defense component's **Defense Set** to the same asset, `DA_Defense_KnightArmour` from the walkthrough above or a copy authored for another archetype, to give every pawn carrying it the same answers. Edit the asset once and every pawn pointed at it picks up the change.

### A weapon that brings its own

Fill in **Weapon Defense Set** on a weapon Blueprint built on `SECWeaponBase` and point it at a rule set holding the parry, the block, or whatever the weapon is worth. Arm the enemy through the equipment component's **Starting Loadout** or an **Equip Actor** call, and it answers with those for as long as it holds the item.

A shield in the off hand works the same way. Everything held that carries a set contributes, in the order the pawn equipped them, and all of them answer ahead of the pawn's own responses. `EnemyCharacterBase` gathers them from its equipment already. See [Weapons](https://rigbak.com/docs/soulslike-combat/weapons).

---

## Telling the attacker what happened

Every response that answers adds its **Result Tag** to the result, and that reaches the attacker in the damage result's **Result Tags**. Two things read them.

**The attacker's melee trace.** **Skip Record Tags** on the attacker's trace component lists the outcomes that leave the target hittable for the rest of the swing. A match means the swing was not spent, so it can connect again on a later frame. No match records the hit, so a parry or a block costs the attacker that swing. Both readings are legitimate; pick per game. See [Melee Trace](https://rigbak.com/docs/soulslike-combat/melee-trace).

**Hit effects.** An effect on the damage config sits out a hit through **Suppress on Result Tags**, so a parried blow need not shake the screen or spray blood. **Require Any Result Tags** does the opposite and gives a parry its own sparks.

Four tags ship: `SEC.Defense.Parry`, `SEC.Defense.Block`, `SEC.Defense.Dodge`, and `SEC.Defense.Clash`. A tag of your own works the same way, and listing a parent covers everything beneath it.

**Outcome** on a defense result, and the outcome enum it holds, are deprecated: read **Result Tags** instead. **SEC Parry (Deprecated)**, **SEC Block (Deprecated)** and **SEC Invulnerable** still write an outcome, while **SEC Guard**, **SEC Scale Damage** and the two other deprecated responses leave it at Unguarded, so a Blueprint branching on it reads a guarded hit as unguarded.

> **Warning**
>
> A parry, block or invulnerable response that answers a hit without a **Result Tag** leaves the attacker unable to tell what happened, so the swing is spent as if the blow had landed. The Output Log names the response once when that happens.

---

## What the pawn does about it

**Outcome Effects** on the Defense component, and on a Defense Rule Set, are what the pawn does beyond taking the damage: a spark or a screen shake, a counter window it grants itself, a stagger it sends back to whoever swung. These are the same effects an attack authors on its damage config, so each carries the same outcome gates and picks the sides it lands on.

Gate one on **Require Any Result Tags** and it answers a single outcome. A parry that opens a counter window is one row:

| Setting | Value |
| --- | --- |
| Effect | **SEC Apply Gameplay Effect** |
| **Require Any Result Tags** | `SEC.Defense.Parry` |
| **Gameplay Effect** | The effect holding the window open |
| **Affected Sides** | Target |

They run once the damage is off the pawn's pools, so an effect reading **Was Fatal** or a drained pool sees what the hit did.

<details>
<summary>Where the consequences come from (Advanced)</summary>

The component gathers the list the way it gathers responses: whatever the pawn is carrying hands its own over, then the component's own list, then the Defense Set. A set that arrives twice, carried and assigned, counts once. Order carries no meaning here, because each consequence that passes its gates runs, while responses stop at the first one that claims the hit.

**Run Outcome Effects** is the call for a project that works the damage steps by hand instead of calling **Resolve Defense and Apply Damage**. Call it last, once health has come off.

</details>

---

## Debug it

Press Play and swing at the pawn with the tag held, then without it.

```
SEC.Debug.Melee.DrawTracing 1    // The attacker's sweep, so you can see the blow reach the pawn
```

Filter the Output Log to **LogSECDefense**. The defense path names each problem once rather than every frame, and the four it reports cover most of what goes wrong: a response that charges a vital the pawn has no component for, a response that answered without a **Result Tag**, a pawn with no health pool to take the damage off, and an attack listing the health pool in its **Additional Vital Damage**.

**Preview Incoming Damage** on the component reaches the same answer as the real resolve and charges nothing, so a debug widget can print what any hit would cost before it lands.

<details>
<summary>The pawn is hit and nothing changes (Advanced)</summary>

In the order worth checking:

- **Nothing grants the tag.** **Required Defender Tags** names a tag no ability, reaction or montage window ever holds, so the response never gets its turn. This is the common one and it logs nothing.
- **Handle Incoming Damage is not implemented.** Without the **SEC Damageable** interface on the pawn, **SEC Deal Damage** falls back to Unreal's point damage and the Defense component never runs.
- **The blow came from outside the arc.** A Guard measures the direction the hit arrived from against the pawn's real facing. A hit from behind falls through to whatever sits below.
- **The attack carries a tag the response turns away.** A tag in **Blocked Attack Tags**, such as `SEC.Attack.Unblockable`, lets the blow past, and a **Required Attack Tags** entry the attack lacks keeps the response silent.
- **The pawn cannot pay.** A costed response the pawn cannot afford steps aside on purpose, which is the guard break.
- **A response above it claimed the hit.** The first response that answers ends the walk unless it has **Continue After Claim** ticked.
- **The call ran off the server.** Charging a cost and draining health both need the authority.

</details>

<details>
<summary>Stance, poise and other vital damage (Advanced)</summary>

An attack can carry damage to vitals other than health. One **Damage Multiplier** covers every vital by default, so a block that halves the health damage halves the stance damage with it.

Add a **Vital Damage Multipliers** row on the response to give one vital its own rate: name the vital's tag and set how much of it still lands. 0 stops that vital, 1 passes it untouched, and above 1 raises it, which is how you author a block that costs extra stance.

The walk reports the health figure and the extra vital damage separately, so a project applying them by hand has each one. See [Vitals](https://rigbak.com/docs/soulslike-combat/vitals).

</details>

<details>
<summary>Scaling a hit by what the pawn is (Advanced)</summary>

**SEC Scale Damage** with **Required Defender Tags** filled in scales the hit while the pawn holds those tags. It has no arc, and it multiplies the hit by **Damage Multiplier**: 2 doubles it, 0.5 halves it, 1 changes nothing.

It ships with **Continue After Claim** on and reports no result tag unless you give it one, so a hit that only this touched reads to the attacker as a clean hit and the swing is spent normally. Gate it on `SEC.State.StanceBroken` for the window where a guard-broken enemy takes extra, or on a buff tag for a target that takes less.

Its multiplier applies to every vital the hit carries, so pair it with a **Vital Damage Multipliers** row when one vital should scale at its own rate.

</details>

<details>
<summary>Bringing responses in from somewhere other than a weapon (Advanced)</summary>

Two interfaces cover the rest of the cases, and both are Blueprint-implementable from Class Settings.

| Interface | Where | What it answers |
| --- | --- | --- |
| **SEC Weapon Defense Set Provider** | On the item | **Get Weapon Defense Set**, for an equippable that is not a weapon Blueprint. |
| **SEC Defense Set Provider** | On the pawn, or on any component of it | **Get Defense Sets**, one entry per thing in force, for a pawn that gathers its own way, or a component that carries the pawn's weapon. |

The component stores nothing. It asks the pawn and its components each time it works a hit out, so a set stops answering the moment the pawn stops carrying what brought it. Returning an empty list leaves the pawn on its own responses.

For a list built some other way again, override **Get Effective Responses** on the component and return the responses in the order you want them run.

</details>

<details>
<summary>Writing a response of your own (Advanced)</summary>

Subclass **SEC Defense Response** in Blueprint and implement two events. Your response gets the same **Required Defender Tags**, **Blocked Defender Tags**, attack tags, cost and **Result Tag** fields as the ones that ship, and the component checks the tags and reports the **Result Tag** for it.

| Event | Do |
| --- | --- |
| **Should Apply** | Judge whether this response handles the hit and change nothing. The context carries the defender, the pawn's state tags, the hit, and the blow before anything reduced it. |
| **Apply** | Change what the hit is worth: scale or zero **Final Damage**. |

**Should Apply** runs only after the tag checks passed, and **Apply** only after **Should Apply** agreed and the component found the cost affordable, so a response has no reason to re-check its own gates.

A parry that scales with a stat, a block that only answers heavy attacks, a resistance keyed to a boss phase: each is one **Should Apply** branch.

A response subclassed straight from **SEC Defense Rule** gets no defender tags or **Result Tag** from the component, so it checks its own tags in **Should Apply** and adds its own result tag in **Apply**. **Get Display Name** on **SEC Defense Rule** is deprecated and nothing in the plugin calls it; the editor names a response by its class's display name. An override keeps working.

</details>

<details>
<summary>Costs against a project's own resources (Advanced)</summary>

**Can Afford Response Cost** and **Pay Response Cost** on the component are the seam. The defaults read and drain the pawn's Vitals component; override both together for a project running its own pools.

The component asks **Can Afford Response Cost** while it works a hit out, so that override must change nothing: a response the pawn cannot pay for steps aside rather than answering. **Pay Response Cost** runs afterward, on the authority, and reports how much came off. A response with **Spend Remainder when Unaffordable** ticked also asks **Get Payable Response Cost** how much the pool can still give, so override that one too.

A pawn that keeps its states somewhere other than an ability system overrides **Get State Tags** in the same way, and every tag gate reads from what it returns.

</details>

<details>
<summary>A pawn wired through Event Any Damage (Alternative)</summary>

Call **Resolve Defense and Apply Damage (Any Damage Event)** instead. It takes the loose numbers Unreal's damage event hands over and works the blow's direction out from where the attacker is standing, so a directional response still has a bearing to measure against.

It takes the surviving damage off the health pool too, so nothing after it should subtract health again. Prefer the version in the quick start wherever a damage info exists, since that one carries the exact hit and the attack's own tags.

</details>

<details>
<summary>Running your own health pool (Alternative)</summary>

Call **Resolve Incoming Damage** on the component instead of the one-node version. It runs the responses and charges what they cost, then hands back the result without draining health or the extra vitals. Subtract its **Damage Applied** from your own health variable and return the result unchanged, so the attacker still gets the tags.

To drive each step yourself, **Evaluate Defense**, **Apply Defense Result** and **Fill Damage Result** are the same act split three ways: work out the answer, charge the costs on the server, then stamp the decision into the damage report.

</details>

<details>
<summary>Multiplayer</summary>

Charging a cost and draining health both need the authority, so run **Resolve Defense and Apply Damage** on the server. A call anywhere else charges nothing and drains nothing, and the result it hands back is advisory.

**Preview Incoming Damage** reaches the same answer on any machine, so a guard meter or a damage-preview widget on the owning client can call it freely.

Vitals replicate on their own, so the client sees the stamina a block spent without any extra wiring. See [Vitals](https://rigbak.com/docs/soulslike-combat/vitals).

</details>

---

## Related

| Page | Why |
| --- | --- |
| [Telegraphs](https://rigbak.com/docs/soulslike-combat/attack-telegraphs) | How an enemy learns a blow is coming in time to raise the guard these responses price. |
| [Reaction System](https://rigbak.com/docs/soulslike-combat/reaction-system) | The other half of a defense: the reaction plays the parry, the response decides what it was worth. |
| [Melee Trace](https://rigbak.com/docs/soulslike-combat/melee-trace) | Where the hit comes from, **Skip Record Tags**, **Pass Through Tags**, and the damage tags an attack carries. |
| [Vitals](https://rigbak.com/docs/soulslike-combat/vitals) | The pools a costed response charges, and the health a resolved hit comes off. |
| [Weapons](https://rigbak.com/docs/soulslike-combat/weapons) | **Weapon Defense Set**, and arming an enemy so it arrives. |
| [Animation Integration](https://rigbak.com/docs/soulslike-combat/animation-integration) | Montage windows that hold a state tag for exactly the frames a response should answer on. |

Previous page: [Vitals](https://rigbak.com/docs/soulslike-combat/vitals). Next page: [Animation Integration](https://rigbak.com/docs/soulslike-combat/animation-integration)
