Skip to content

Tune hit feedback

Designer · 20 min · No code

Result: a landed hit shakes the camera and rumbles the pad the way you want, for the player's hits and for hits the player takes, and a critical hit announces itself the way you want.

Before you start

  • Your first art. You should know where the XenoCore content is.
  • A gameplay cue is a cosmetic (sound, particles, camera shake, rumble) played by a tag, here GameplayCue.XenoCore.*. The asset that plays it is a cue notify in a cue folder. See also gameplay effect.

How hit feedback is put together

A landed hit produces feedback from three places. Knowing which one owns what saves a lot of guessing:

What you see or feel Where it comes from Asset
Camera shake and pad rumble The hit cue GameplayCue.XenoCore.Hit GameplayCues/GCN_XenoCore_Hit
The swing whoosh The swing cue GameplayCue.XenoCore.Swing GameplayCues/GCN_XenoCore_Swing
Sparks, hit sound, the damage number over the enemy Lyra's damage cue, carried by the damage effect Battle/Attributes/GE_XenoCore_Damage → Lyra's GCNL_Character_DamageTaken
Particles on the target for a critical, a block or an evade Cues the damage calculation fires on the character that was hit GameplayCues/GCN_XenoCore_Hit_Critical, GCN_XenoCore_Hit_Blocked, GCN_XenoCore_Hit_Evaded
CRITICAL HIT! over the target, the gold critical number and the critical hit sound The damage calculation, plus Lyra's damage cue Project Settings › Game › XenoCore Content › Critical Hit

The auto-attack and every damaging Art fire the hit cue themselves, after the hit has landed. A missed swing fires nothing. Heals never fire the hit cue.

Lyra's damage cue draws the number and plays the hit-confirm and kill sounds for every party member's hits, not only the leader's: an AI-controlled ally's hit on an enemy sounds and reads the same as yours. An enemy's hit on a party member plays the damage-taken sound instead, and draws a number over whoever was hit. For an AI-controlled ally that number and sound come from XenoCore, not Lyra: the sound is Ally Damage Taken Sound (and Ally Damage Taken Critical Sound) under Project Settings › Game › XenoCore Content › Battle. Clear it and allies take hits silently.

On a critical hit the same cue switches to Lyra's critical style: the number draws gold and the hit-confirm sound is the heavier critical one. At the same moment CRITICAL HIT! pops over the target, arriving larger and snapping down to its resting size.

The cue runs on whichever side has a local player controller. When the player hits an enemy, the player's camera shakes. When an enemy hits the player, the player's camera shakes too. When an enemy hits an AI-controlled party member, nothing shakes, because nobody is looking through that character.

GCN_XenoCore_Hit is a Burst cue: it plays once and is never spawned into the world. Its settings live in one struct, Burst Effects.

Steps

1. Make your own camera shake

  1. Create a folder MyGame/Feedback under Content.
  2. Find Lyra's Feedback/CameraShakes/CS_Character_DamageTaken (in the project's own Content folder, not under Plugins). This is the shake the hit cue uses today.
  3. Duplicate it into MyGame/Feedback and name it CS_MyGame_Hit.
  4. Open CS_MyGame_Hit and adjust it. It is a legacy (oscillation) camera shake: under Oscillation, start with Oscillation Duration and Rot Oscillation (each axis's Amplitude and Frequency). A short, sharp shake reads as impact, a long one reads as an explosion.
  5. Save.

2. Make your own rumble (optional)

  1. Duplicate Lyra's Feedback/Haptics/FFE_Character_Damage (project Content folder) into MyGame/Feedback. Name it FFE_MyGame_Hit.
  2. Open it and edit the curves. Keep it short: a rumble that outlasts the hit feels like lag.
  3. Save.

3. Point the hit cue at your assets

The cue's tag is fixed in C++, so there is exactly one hit cue in the project. Change what it plays, not which cue plays.

  1. Open GameplayCues/GCN_XenoCore_Hit and click Class Defaults.
  2. Expand Burst Effects.
  3. Under Burst Camera Shake, set Camera Shake to CS_MyGame_Hit. Use Shake Scale to make the whole shake stronger or weaker without editing the shake asset.
  4. Under Burst Force Feedback, set Force Feedback Effect to FFE_MyGame_Hit.
  5. Compile and Save.

This is an edit to a shipped asset

It is one reference change. Write it down, because a template update that replaces GCN_XenoCore_Hit will point it back at Lyra's shake.

Fails silently: a second notify with the same tag

Do not duplicate GCN_XenoCore_Hit and leave both with the tag GameplayCue.XenoCore.Hit. Only one of them will play, and which one is not something you choose.

4. Change the swing whoosh (optional)

  1. Open GameplayCues/GCN_XenoCore_Swing, Class Defaults, Burst Effects.
  2. Under Burst Sounds, replace the sound (Lyra's Lyra_MeleeWhoosh_01) with your own.
  3. Compile and Save.

5. Tune the critical hit (optional)

  1. Open Edit › Project Settings › Game › XenoCore Content and find the Critical Hit category.
  2. Set what you want:

    Setting Default What it does
    Critical Hit Text CRITICAL HIT! The line raised over the target. Keep the word HIT in it: a bare "CRITICAL" reads as a low-health warning.
    Critical Hit Scale 1.15 Resting size of the line. BREAK, TOPPLE and DAZE are 1.
    Critical Hit Punch 1.7 The line arrives this many times its resting size and snaps down to it in about 0.14 s. 1 = no punch.
    Critical Hit Stop Seconds 0 (off) A brief freeze of the whole world on a critical hit, in real seconds. XC1 has none. Try 0.06.
    Critical Hit Stop Dilation 0.05 World speed during that freeze. Only used when Critical Hit Stop Seconds is above 0.
  3. The settings save to the project's config as you change them. The line's colour is Critical Colour on BP_XenoCoreDamageExecution (see Stats and damage).

The hit-stop never fights other slow motion. It starts only when the world is running at normal speed, so it is skipped during the defeat slow-down, and it hands time back only if nothing else has changed the world speed in the meantime.

Anything else can raise a line with the same punch: the Notify node has a Punch input (1 = none).

Test it

  1. Plug in a gamepad, open Maps/L_XenoCore_Gym and press Play.
  2. Use the pad, not the keyboard, for the whole test.
  3. Attack a minion. Each landed hit shakes the camera and rumbles the pad. A miss does neither.
  4. Let a minion hit you. The camera shakes on its hits too.
  5. Watch a critical hit (your Critical Rate comes from equipment, so equip something with Critical Rate, or wait for one). CRITICAL HIT! slams in over the target, the number beside it is gold and the hit sound is heavier than a normal hit's.
  6. Watch an ally's hits on an enemy. Each one draws a number and plays the hit-confirm sound.

To test rumble while using a keyboard, open the console (`) and enter LyraPC.ShouldAlwaysPlayForceFeedback 1. Set it back to 0 when you are done.

If it doesn't work

No rumble at all

Rumble plays only while the last input you used was the gamepad, and only while Vibration is on in the game's settings (Gamepad › Hardware). Touching the mouse or keyboard switches it off until you press a pad button again. Nothing is logged. Use LyraPC.ShouldAlwaysPlayForceFeedback 1 to rule this out.

Fails silently: a cue added to an effect never shakes the camera

If you give an Art's own effect a Gameplay Cue in its Gameplay Cues list, the cue's sparks and sounds play but its camera shake and rumble never do. Cues fired by a gameplay effect carry no player controller, so there is nothing to shake. This is true in stock Lyra as well. Put shake and rumble only in GCN_XenoCore_Hit, which is fired directly with the controller filled in.

Fails silently: a new cue that never plays

A cue notify is only found if it sits under a registered cue folder. The registered folders are XenoCore/Content/GameplayCues (registered by the XenoCore Game Feature) and the project's Content/GameplayCues and Content/GameplayCueNotifies (from Config/DefaultGame.ini). Put your own cues under Content/GameplayCues/MyGame/. A notify anywhere else loads fine, shows no error, and never plays.

Numbers or hit sounds on hit are gone

Those come from XenoCore's own damage cue, GameplayCues/GCNL_XenoCore_DamageTaken, fired by the cue tag GameplayCue.XenoCore.DamageTaken on GE_XenoCore_Damage. A damage effect that fires Lyra's GameplayCue.Character.DamageTaken instead shows sparks but no number and no hit sound, and nothing is logged. Duplicate GE_XenoCore_Damage for new damage effects. See Troubleshooting: combat and arts.

Fails silently: CRITICAL HIT! shows but the number is the normal colour

The battle line and the gold number both come from XenoCore. If you see the line and a normal number, the damage effect is firing Lyra's cue rather than GameplayCue.XenoCore.DamageTaken. See Troubleshooting: combat and arts.

The game seems to stutter on critical hits

That is the hit-stop. Set Critical Hit Stop Seconds back to 0.

Going further