Skip to main content

Effects and Sounds (Cue Sets)

The simulation never spawns an effect or plays a sound directly: it emits cues (GameplayTags under AFT.Cue), and the presentation (AAFTBattlePresentation) plays them. Each cue event has a stable key, so a frame simulated again after a rollback does not play the same spark twice.

Cue sets​

An AFT Cue Set (UAFTCueSet, Content Browser > right click > AFT > Cue Set) maps cue tags to what they play:

Property of a cueDescription
Effect, EffectScaleNiagara system spawned at the cue location.
Sound, VolumeMultiplierSound played at the cue location.
CameraShake, CameraShakeScaleUnreal camera shake class started on every player camera.
EffectActorActor spawned at the cue, turned like the event and scaled by EffectScale (see Effect actors). Empty by default.
CameraImpulseImpact shake of the battle camera, 0 to 1 (see Impact feedback).
Rumble, RumbleDuration, RumbleTargetController vibration: intensity 0 to 1, length in seconds (0.12, it fades out), and whose controllers vibrate.

Every field is optional. A cue set has a Parent set used as fallback.

Resolution order for a cue of a fighter: the fighter CueSet, then its parents, then Project Settings > AFT Core > Default Cue Set (DA_AFT_DefaultCues in the template, with the common hit sparks, guard effects and sounds of the project, and the impact feedback below).

Built-in cues​

TagPlayed when
AFT.Cue.Hit.DefaultAn attack hits (when its hit definition has no HitCue).
AFT.Cue.Block.DefaultAn attack is blocked (when its hit definition has no BlockCue).
AFT.Cue.ClashTwo hitboxes clash.
AFT.Cue.ThrowTechA throw is broken.
AFT.Cue.LandingA fighter lands. The template plays a small ground smoke and a soft impact.
AFT.Cue.Landing.HeavyA hit fighter falls hard: the KO fall, or a landing in hit stun or hard knockdown (instead of AFT.Cue.Landing). The template plays the ground smoke and an impact sound.
AFT.Cue.KOA fighter is knocked out (the finishing hit).
AFT.Cue.SwingWhiff sound of the attacks generated by the wizard.
AFT.Cue.ProjectileVisual of the projectile action generated by the wizard (Projectile_Fireball).
AFT.Cue.SuperFreezeSuper flash.
AFT.Cue.Wall.BounceA fighter bounces off the wall (impact, smoke, camera shake). See Walls.
AFT.Cue.Wall.SplatA fighter sticks to the wall.
AFT.Cue.Wall.BreakThe wall breaks (wall break rules).

Add your own tags under AFT.Cue (Project Settings > GameplayTags), then use them in:

  • the HitCue / BlockCue of a hit definition;
  • a Cue (VFX / Sound) frame event (with an offset, attached or not);
  • the Cue of a Super Freeze event.

Impact feedback​

The cues also give the hits their weight: a shake of the battle camera (CameraImpulse) and a vibration of the controllers (Rumble). Both are presentation only: the simulation never reads them, and a frame simulated again after a rollback does not play them twice.

For hits, the strength of the event scales the shake, the vibration and the effect actor: from x0.55 to x1.25 with the damage of the hit (full at 1500 damage), and x1.25 more on a counter hit. The other cues have a strength of 1.

The template values, in DA_AFT_DefaultCues:

CueCameraImpulseRumbleRumbleDurationRumbleTarget
AFT.Cue.Hit.Default0.420.50.14Both
AFT.Cue.Block.Default0.160.280.08Both
AFT.Cue.Landing00.120.06Source
AFT.Cue.Landing.Heavy0.320.450.2Both
AFT.Cue.Wall.Bounce0.50.550.18Both
AFT.Cue.Wall.Splat0.550.60.22Both
AFT.Cue.KO0.750.80.35Both

RumbleTarget:

ValueControllers that vibrate
Both (default)The fighters of the event: attacker and defender for a hit or a guard, the fighter for a landing.
SourceThe fighter that made the event (attacker, landing fighter).
TargetThe fighter that receives it (defender).
EveryoneEvery local player.

Only the gamepads of local players vibrate: a CPU or an online opponent never gets a vibration.

UAFTEditorLibrary::CreateDefaultCueSet(PackagePath) creates DA_AFT_DefaultCues with these values, the hit / guard sparks, the ground and wall smoke and the sounds of the project. On an existing set it only fills what an entry leaves empty, so your own values stay.

Ground and wall impacts​

Every landing and the wall bounce play a toon smoke burst and an impact sound, with the camera shake and the vibration above:

CuePlayed whenSmoke (EffectScale)Sound
AFT.Cue.LandingA fighter lands: after a jump, an air dash, an air recovery...NS_AFT_Ground_Smoke (x0.5)A_AFT_Ground_Land (x0.8)
AFT.Cue.Landing.HeavyA hit fighter falls hard on the ground: knockdown, KO fall, thrown fighterNS_AFT_Ground_Smoke (x1)A_AFT_Ground_Impact
AFT.Cue.Wall.BounceA fighter bounces off the wall (Walls)NS_AFT_Wall_Smoke (x1)A_AFT_Wall_Impact

A fighter whose hit stun ended in the air lands on its feet: that is a normal landing (AFT.Cue.Landing).

Asset (SomndusStudio/AFT)Description
VFX/Ground/NS_AFT_Ground_SmokeLightweight Niagara system: one burst of 14 to 18 puffs along the ground on both sides. They swell, rise a little and erode away in 0.55 to 0.95 s. The EffectScale of the cue scales the puffs, their speed and their rise.
VFX/Ground/NS_AFT_Wall_SmokeThe same smoke against a wall: 12 to 16 puffs around the body of the fighter, along the wall, up and down.
VFX/Materials/MI_AFT_FX_ToonSmokeUnlit translucent toon smoke (parent M_AFT_FX_ToonSmoke): two tones (LightColor, ShadowColor, LightThreshold), dark rim (InkColor, RimWidth, RimStrength), erosion over the particle life (ErosionMax, EdgeSoftness), soft contact with the floor (DepthFadeDistance).
VFX/Textures/T_AFT_FX_SmokePuff4 puff shapes (2 x 2). R = light, G = density (the low values erode first), B = folds.
Audio/SFX/A_AFT_Ground_Impact, A_AFT_Ground_Land, A_AFT_Wall_ImpactSound Cues: each plays one of 5 variations at random (Audio/SFX/Kenney).

The impact sounds come from the Impact Sounds pack by Kenney (impactSoft_heavy, impactSoft_medium, impactPunch_heavy), under the Creative Commons CC0 license (public domain): free to use, modify and ship in your game, no credit required.

The particle alpha drives the erosion: the Scale Color module of the emitters takes it from 1 at the spawn to 0 at the end of the life. The colors come from the material instance, not from the particle color. The sprites face the camera and keep a small tilt only, because the light of the puffs is painted in the texture (from the upper left). To change the effects:

  • the look: the parameters of MI_AFT_FX_ToonSmoke;
  • the amount, size and motion: the modules of the Niagara systems (Spawn, Initialize Particle, Add Velocity, Drag, Scale Sprite Size), or the EffectScale of a cue;
  • another effect or sound: the Effect / Sound of the cue in your cue set (a fighter's cue set can override it for that fighter).

Camera shake​

AAFTBattleCamera adds the impulses to a trauma value (0 to 1). The camera shakes with trauma squared (Perlin noise), so small hits stay subtle and big ones punch, and the trauma fades out. The shake is added on top of the framing.

PropertyDefaultDescription
ShakeOffset14, 10Offset at full trauma (cm): along the screen and up.
ShakeRoll1.6Roll at full trauma (degrees).
ShakeFrequency24Speed of the noise.
ShakeDecay3.2Trauma lost per second.

From Blueprint: Add Impact(Strength) adds trauma (your own effects, a super), Get Shake Trauma reads it. The console command aft.CameraShake scales the shake (0 = off, 1 = default).

Vibration​

UAFTInputSubsystem plays the vibrations on the gamepad of a player slot:

  • PlayRumble(PlayerSlot, Intensity, Duration): intensity 0 to 1, it fades out over Duration (seconds);
  • StopAllRumble();
  • SetRumbleEnabled(bEnabled) and IsRumbleEnabled (on by default): the player option.

SetRumbleEnabled(false) stops the running vibrations and turns off every vibration of the cues, on every player slot. It also turns off the engine force feedback of the local player controllers, new ones included (after a map change), so the force feedback that other code plays stops too. SetRumbleEnabled(true) gives them their force feedback back.

In the template, the Vibration option of the settings screen (Controls tab, Controller section) calls it: this built-in setting (Controls: Vibration in the settings collection) applies it when every map starts and each time the settings are applied. In your own settings collection, add a Controls: Vibration row, or call SetRumbleEnabled from your own setting.

For debugging, the console command aft.Rumble 0 turns off the vibrations of the cues.

Effect actors​

EffectActor spawns any actor at the cue, for an effect that a Niagara system can't do. It is spawned once per event, even when a rollback simulates the event again, and attached to the fighter when the cue is attached. The default cue set has none.

Derive it from AFT Cue Effect (AAFTCueEffect) to get the strength of the event:

MemberDescription
On Cue Effect(Strength)Event called right after the spawn: 1 = a normal event, more for heavy hits.
Get Strength, Get ProgressStrength of the event; progress from 0 at the spawn to 1 at the end of the lifetime.
LifetimeSeconds before the actor destroys itself (0.5).

A cue effect also works without a cue: placed in a level or spawned by a Level Sequence (the effects of a cinematic super), it starts on its first tick, with a strength of 1. Attached by a cue to a projectile, it goes away with the projectile.

Slash effects​

AFT Slash Effect (AAFTSlashEffect) is a cue effect for Guilty Gear like weapon trails and impacts: one flipbook material on several meshes (arcs, ribbons, streaks), each mesh placed, oriented, delayed and scaled on its own. Several meshes with the same material give the depth of hand drawn slashes, for the cost of a few meshes.

Make one Blueprint child of AFT Slash Effect per swing and per impact, and set it as the EffectActor of a cue of the fighter cue set:

EffectCueWhere
Swing trailA Cue event on the action timeline, one frame before the hitbox, attachedAt the weapon grip (the Offset of the event)
ImpactThe HitCue of the hit definitionAt the contact point

Name the cues after the effects, for example AFT.Cue.Hero.Slash.Horizontal and AFT.Cue.Hero.Hit.Heavy (add the tags under AFT.Cue in Project Settings > GameplayTags, or in a tag .ini file of Config/Tags). The cue entry can add a sound, a CameraImpulse and a vibration to the slash. From Python, SetCueDefinition fills the cue set (see Timeline scripting).

PropertyDefaultDescription
SlashLayersThe meshes of the effect (below).
MaterialM_AFT_FXSlashFlipbook material of every layer (empty = M_AFT_FXSlash).
ColorwhiteTint of every layer.
Intensity1Glow, with the bloom.
StrengthScale0.35Heavy hits (event strength above 1) make the slash bigger: 0 = always the same size.

Each layer (FAFTSlashLayer):

PropertyDefaultDescription
MeshOne of the slash meshes, or any static mesh.
TransformPlacement in the effect space (cm, before the actor scale): X forward (the facing of the event), Z up, Y toward the camera. A negative Z scale flips an arc (a downward swing).
EndScale1.1Scale multiplier reached at the end of the layer: the slash keeps opening. Keep it positive (a negative value goes through 0).
Spin0Roll around the local X axis over the layer (degrees).
Delay, Duration0, 0.25Seconds after the spawn, and seconds to play the flipbook once.
ColorwhiteTint of the layer, multiplied with the Color of the effect.
MaterialAnother material for this layer (empty = the material of the effect).

A layer opens with an ease out and is hidden outside [Delay, Delay + Duration]. The effect destroys itself when its last layer ends: its Lifetime comes from the layers.

The plugin content has the material, its flipbook and seven meshes (original content, free to use in your game):

Asset (/AFT/Game)Description
MaterialLibrary/FX/M_AFT_FXSlashUnlit translucent, two sided. Progress (0 to 1, set by the effect) picks the frame of the flipbook (Columns x Rows, 4 x 4). The red channel goes through a color ramp (EdgeColor -> Color -> CoreColor), the blue channel draws dark ink strokes (InkColor, InkAmount), the green channel is the opacity (x Opacity). Intensity scales the glow.
TextureLibrary/FX/T_AFT_FXSlash_Flipbook16 frames of 512 x 128 (4 x 4). U along the slash (0 = tail, 1 = head, the swing direction), V across (0 = inner edge, 1 = leading edge). R = heat (1 = white hot leading edge), G = opacity, B = ink. Linear masks (no sRGB).
MeshLibrary/FX/S_AFT_FXSlash_ArcHalf moon: a swing from below in front to above behind.
MeshLibrary/FX/S_AFT_FXSlash_ArcWideWide arc (320 degrees): spins, sweeps.
MeshLibrary/FX/S_AFT_FXSlash_ConeThe arc swept in 3D, its inner edge toward the camera. Under an Arc, it gives the slash its volume.
MeshLibrary/FX/S_AFT_FXSlash_SwirlSpiral with a twisted band: spin attacks, finishers.
MeshLibrary/FX/S_AFT_FXSlash_ThrustShort fat wedge: jabs and pokes.
MeshLibrary/FX/S_AFT_FXSlash_StreakStraight ribbon (100 x 6 cm): speed lines, impact rays, crossed slashes.
MeshLibrary/FX/S_AFT_FXSlash_RingThin ring: shock waves of the impacts and of the super flash.

The meshes lie in the fighting plane (XZ: the camera looks at it from +Y) and their UVs follow the flipbook layout, so any mesh with the same UV layout works with the material.

Recipes:

  • Swing trail: an Arc (0.24 s), a Cone under it (delay 0.02 s, a warmer tint) and a larger Arc (delay 0.04 s, red). Turn the arcs with the swing: pitch for a vertical swing, a roll of about 70 degrees for a horizontal swing (the arc plane tilted toward the camera), a negative Z scale for a downward swing.
  • Impact: two crossed Streaks through the contact point, 5 to 14 short Streaks as rays around it, and a Ring (0.15 to 0.3 s). Bigger and longer for the heavy hits.
  • Super flash: rings, long streaks and rays at chest height, as the cue of the Super Freeze event.

Custom cue handling​

AAFTBattlePresentation::PlayCue is a Blueprint overridable event. Derive a Blueprint from AAFTBattlePresentation, set it as Project Settings > AFT Game > Presentation Class and override Play Cue to play anything (decals, hit stop flashes, UI effects...). The parent Play Cue plays the cue set entry (effect, sound, shakes, vibration, effect actor): call it from your override to keep them. Every simulation event is also broadcast to Blueprint by UAFTBattleSubsystem::OnSimEvent (FAFTSimEventView: type, frame, fighter, target, location, tag, value, counter hit).