Skip to content

Make a status effect

Designer · 30 min · No code

Result: a new debuff, Frostbite, that lowers Agility and deals damage every second. It announces itself over whoever it lands on, shows its icon on their HUD plate, and any Art can apply it with its own duration and strength.

Before you start

How a status works

A status is a gameplay effect whose class is XenoCoreStatusEffect. The gameplay-effect part does the work: modifiers, duration, periodic ticks and the tags it grants. The XenoCoreStatusEffect part adds only what the UI needs:

Field (Status category) What it does
Display Name The popup over the character, and the line in the Arts menu
Abbreviation Two or three letters drawn on the HUD icon when there is no Icon
Colour The popup's colour and the icon's fill
Icon Optional artwork for the HUD icon
Is Buff Buffs sort after debuffs on the plate

There is no list to register it in: any XenoCoreStatusEffect that lands is announced and drawn.

The numbers belong to the Art, not the status. Every shipped status reads its duration, and where it has one its strength, from SetByCaller values the Art sends:

SetByCaller tag Sent from the Art's entry Used by
XenoCore.Status.Duration Duration Every shipped status
XenoCore.Status.Magnitude Magnitude Bleed, Poison, Blaze, Chill (damage per second), Regenerate (healing per second), and every stat up, stat down, Slow and Haste (strength as a percentage)

The shipped statuses are in Battle/Status:

Kind Assets What they do
Stat down GE_XenoCore_Status_StrengthDown, EtherDown, AgilityDown, PhysicalDefDown, EtherDefDown Stat lowered by Magnitude percent (15 gives ×0.85)
Stat up ..._StrengthUp, EtherUp, AgilityUp, PhysicalDefUp, EtherDefUp, MaxHealthUp Stat raised by Magnitude percent (15 gives ×1.15)
Speed ..._Slow, ..._Haste Auto-attack speed lowered / raised by Magnitude percent
Damage over time ..._Bleed, ..._Poison, ..._Blaze, ..._Chill Magnitude damage every second
Healing over time ..._Regenerate Magnitude healing every second
Bind ..._Bind Cannot move

Their icons are in UserInterface/Status/Icons.

The percentage statuses (stat up, stat down, Slow, Haste) compute their modifier with XenoCoreStatusPercentCalc: the percentage the Art or skill sends, or its Default Percent (30, so ×1.3 / ×0.7) when the entry sends no Magnitude. A skill whose Ability applies one sends the skill's Value as the percentage (Skills).

Steps

1. Duplicate the closest status

  1. Duplicate Battle/Status/GE_XenoCore_Status_Poison into MyGame/Status as GE_Status_Frostbite. Poison already has a periodic damage modifier reading XenoCore.Status.Magnitude.
  2. Open it.

2. Present it

Under Status:

  1. Display Name: Frostbite. Abbreviation: FRB.
  2. Colour: an icy blue. Is Buff: off.
  3. Icon: optional. Import a square texture with alpha, Texture Group UI, or leave it empty and the icon is drawn as the colour with the abbreviation on it.

3. Give it its own tag

  1. Find the component that grants tags (Grant Tags to Target Actor, in the effect's Components list). Replace Status.XenoCore.Debuff.Poison with a new tag, Status.MyGame.Debuff.Frostbite. Add the tag first in Project Settings › Project › GameplayTags (Add New Gameplay Tag), or pick it from the tag picker's Add New row.
  2. Keep your tag under a Debuff or Buff parent. Anything that asks "does this character have any debuff?" can then match the parent.

Fails silently: two statuses sharing a tag

A status that keeps Poison's tag is Poison to anything that checks tags. Always give a new status its own tag.

4. Add the Agility modifier

  1. In Modifiers, keep the periodic damage modifier.
  2. Add one: Attribute XenoCoreStatSet.Agility, Modifier Op Multiply Additive, Magnitude a scalable float of -0.3 (Agility ×0.7).
  3. Leave the Duration Policy as Has Duration with its magnitude set to Set By Caller, tag XenoCore.Status.Duration, exactly as Poison had it.
  4. Check Duration › Period › Period is 1.0: one second between damage ticks. Leave Stacking as Poison had it (Stack Per Target, Stack Limit Count 1), so a second hit refreshes the status rather than adding a stack.
  5. Save.

Fails silently: copying Agility Down's modifier

GE_XenoCore_Status_AgilityDown's modifier reads its strength from XenoCore.Status.Magnitude through XenoCoreStatusPercentCalc. Frostbite already uses Magnitude for its damage per tick, so a copied modifier would take the same number: a Magnitude of 25 would also lower Agility by 25 %. One status has one Magnitude; keep the second modifier a fixed scalable float.

5. Apply it from an Art

On any Art definition, under Art › Effects, add:

Field Value
Effect GE_Status_Frostbite
Chance 1.0
Duration 12
Magnitude 25 (damage per tick)
Condition Always
Recipient Each target

Both Duration and Magnitude are scalable floats, so they can grow with the Art's level (Make an attack Art, step 6).

Test it

  1. Press Play in Maps/L_XenoCore_Gym with the Art slotted.
  2. Use it on a minion. "Frostbite" pops over it in your colour, and it takes damage every second for twelve seconds.
  3. Have a minion apply it to the party instead (give the status to a minion Art's effect list), or use an Art with Recipient User on yourself: your HUD plate shows the icon.

If it doesn't work

Save error: 'takes its duration from the art, and Duration is 0'

The Art's entry has Duration 0. The status would last no time at all. The Art definition reports this as an error; set a duration.

Save error: 'takes its strength from the art, and Magnitude is 0'

The status reads XenoCore.Status.Magnitude and the entry sends nothing, so it would tick for 0. Set Magnitude.

Fails silently: no popup and no icon

The effect's class is a plain gameplay effect, not XenoCoreStatusEffect. Always duplicate a shipped status rather than creating a new gameplay effect.

The Agility change is permanent

The effect's Duration Policy was changed to Instant. An instant effect changes the base value for good. Keep Has Duration.

Going further