Visual effects cookbook
Mods can change how fights look without touching the fight itself. You describe an effect once, while your mod loads, and the engine draws it. This page is a cookbook: each recipe is a short script you can paste into your mod’s entrypoint and then adjust. The field-by-field details of every effect are in the sf2.fx reference.
New to mods? Read How mods work and Lua basics first.
How effects work
Section titled “How effects work”All effects live in sf2.fx. There are two kinds:
- Building blocks let you design your own effect:
particles,overlay,trail,screen(a whole-picture grade),shadow,glint,lightandstain. Any number of mods can add them and they stack. - Built-in looks are ready-made effects you only tune: bloom, rim light, depth haze and more. Each look has one owner.
Things that apply to every effect:
- Register at load time. Call
sf2.fx.*at the top level of your script, not from a callback. Usesf2.fx.play,sf2.fx.setandsf2.fx.on_framefor things that happen during a fight. - Presentation only. Effects never change the fight, your save or whether mods can play together online. Adding or removing a visuals mod is always safe.
- Colours are
"#RRGGBB"or"#RRGGBBAA"(the last two digits are opacity).blend = "additive"makes an effect glow; the default"alpha"paints over what is behind it. - Sizes and speeds are in location units. A standing fighter is about 300 units tall, and speeds are units per second. Durations are in seconds.
- Ranges. A field marked range takes one number (
lifetime = 0.6) or{ min, max }(lifetime = { 0.4, 0.8 }). Each particle picks a random value. - Defaults. Every numeric field is optional. Omitted fields use the defaults in the reference. An out-of-range value or an unknown field is an error that names the field.
- Each effect needs an
id: 1-64 lowercase letters, digits,_or-, unique among your mod’s effects. The effect’s full name is<mod-id>.<id>. A mod can add up to 128.
Choose where an effect runs
Section titled “Choose where an effect runs”Every building block accepts these fields:
| Field | Default | Meaning |
|---|---|---|
tags |
Every stage | Only run on stages that have one of these stage tags, such as { "fire" } or { "day", "dusk" }. This is the usual way to pick stages. |
exclude_tags |
None | Never run on a stage with one of these tags. |
match, exclude |
None | Lowercase words found in a stage’s name. Prefer tags; use words only for one particular stage. |
stages |
Every stage | Exact stages, such as { "moon_se", "sakura_se" } (a core:locations/ ID or a handle from sf2.world.register also works). Use it for dressing painted onto one stage’s art: a glow on its moon, a light at its lantern. Up to 64. |
setting |
Always on | A settings switch that players can turn off. |
scenes |
"fights" |
Some effects accept "everywhere" to also run on fighter previews in the shop and profile. |
Stage tags describe a stage’s light (day, dusk, night, dark), weather (rain, snow, mist, heat) and contents (fire, lamps, foliage, petals, water). An effect written for fire runs on every burning stage, including stages from other mods.
When several filters are given, a stage must pass all of them. stages and match are different: match = { "moon" } runs on every stage with moon in its name (moon and moon_se), while stages = { "moon_se" } runs on that one stage only.
Triggers
Section titled “Triggers”Most effects run all the time. Some run once when something happens:
| Trigger | Fires when |
|---|---|
hit, critical, block, ko |
An unblocked hit, a critical hit, a blocked hit (not stains or screen overlays), or the hit that empties a health bar |
shock |
A hit that staggers the fighter and knocks the weapon from their hand. It fires together with hit |
guard_break |
A hit the opponent was guarding that a perk such as Block Breaker (or a script’s set_hit_blocked) let through. It fires together with hit; perks limits it to chosen perks |
clash |
Two weapon attacks meet blade on blade and neither lands. Effects burst from where the weapons crossed; no hit, block or critical fires |
perk |
A perk shows or pulses its icon over a fighter: the moment an enchantment such as Lifesteal or Stun takes effect. Effects play on that fighter; perks picks which perks |
final_ko |
Only the knockout that decides the fight (every knockout in a one-round fight, the second round’s in a best-of-three; never in Survival or on a time-out). It fires together with ko, so keep slow, cinematic effects here and a best-of-three won’t pause on every round |
land, knockdown, slide, wall |
A fall ends, the body hits the floor, the feet skid, or a fighter is knocked into a wall (contact particles and screen grades; slide is particles only) |
round |
A round begins (screen grades and screen overlays) |
interval |
Every few seconds by itself (screen grades) |
script |
Your Lua calls sf2.fx.play (screen grades) |
shock, guard_break, clash and perk work for screen grades, hit particles and hit lights, but not stains or screen overlays.
An enchantment’s icon appears over the fighter it works on, so a perk effect plays there: over the owner for Lifesteal, Frenzy, Overheat and Shielding, and over the opponent for Intoxication, Stun and Bleeding. Naming the enchantment ("PERK_ITEM_SPECIAL_LIFESTEAL") also covers its weapon, ranged and magic copies. Leave perks out only if you want every perk that shows an icon, not only enchantments.
Recipes
Section titled “Recipes”Hit sparks
Section titled “Hit sparks”Sparks thrown from the point of contact on every unblocked hit:
local sf2 = require("sf2")
sf2.fx.particles { id = "hit_sparks", placement = "hit", trigger = "hit", blend = "additive", color = "#FFD27A", end_color = "#FF5A1E00", -- fade from gold to transparent orange count = 10, lifetime = { 0.18, 0.35 }, size = { 2, 5 }, speed = { 250, 700 }, gravity = 900, radius = 4,}placement = "hit" makes a burst of count particles that fly outward at speed, fall with gravity and fade out. For a bigger moment, add a shockwave ring on critical hits:
sf2.fx.particles { id = "critical_ring", placement = "hit", trigger = "critical", blend = "additive", shape = "ring", color = "#FFE8C8B0", end_color = "#FFE8C800", count = 1, radius = 0, lifetime = 0.35, size = 44, grow = 6, -- expands to six times its size}Built-in particle shapes are dot, glow, ring, star, smoke and shard. To use your own picture, give a sprite from sf2.assets.sprite instead of a shape.
Screen flash
Section titled “Screen flash”A screen grade changes the whole picture. This one flashes bright and fast on every critical hit:
local sf2 = require("sf2")
sf2.fx.screen { id = "crit_flash", trigger = "critical", brightness = 0.45, contrast = 1.2, saturation = 0.7, hold = 0.03, -- seconds at full strength duration = 0.25, -- seconds to fade back}The grade is off until its trigger fires, then holds for hold seconds and eases back over duration. Both use real time, so slow motion does not stretch them; a pause stops them, and they pick up where they were when play resumes. A grade can also carry a sound and muffle (a low-pass filter over everything else), which makes a knockout sting stand out:
sf2.fx.screen { id = "knockout_fade", trigger = "ko", saturation = 0, contrast = 1.15, -- drain the colour... accent = "#B01010", accent_strength = 1, -- ...except red hold = 1.2, duration = 1.6, time_scale = 0.3, -- slow motion while the grade is on sound = { sound = "snd_time_shift", volume = 0.8 }, muffle = 0.75,}The sounds your effects play skip a triggered grade’s muffle, so the sting above stays clear while the rest of the fight goes dull. An always-on grade (one with no trigger) can carry a muffle too, for a look that changes how the whole fight sounds, such as an old cinema speaker. That muffle covers every sound of the fight, your effects’ sounds included:
sf2.fx.screen { id = "old_film", monochrome = 1, grain = 0.5, muffle = 0.4 }Camera push-in
Section titled “Camera push-in”Give a triggered grade a zoom above 1 and the camera pushes in while it is active, easing back out with the grade. The view also moves toward the fighter involved.
local sf2 = require("sf2")
-- A kill cam: slam in on the fallen fighter while time nearly stops.sf2.fx.screen { id = "kill_cam", trigger = "ko", zoom = 1.65, zoom_offset_y = -70, -- negative offset keeps heads in view hold = 0.7, duration = 2.2, time_scale = 0.12, vignette = 0.5,}The push always keeps both main fighters in view, so a wide gap limits the zoom. A native rule that forces minimum zoom turns it off. For zoom_offset_y, around -40 to -70 keeps heads in view at zoom 1.3 to 1.7. To control the camera yourself instead, see Combat scripting.
A push cuts straight in by default. Give it zoom_attack (seconds, counted inside hold) and it eases in instead; if it fires again while still showing, it carries on from where it was. To smooth the whole fight camera, its framing, push-ins, shots and shake together, use the smooth_camera look below.
For a fighting-game style close-up instead, give a grade on a hit trigger close_up: the camera snaps in on the exact point where the blow landed, holds for hold and pulls back out over duration. It may crop the fighters, which zoom never does:
sf2.fx.screen { id = "shock_close_up", trigger = "shock", close_up = 2.4, hold = 0.45, duration = 0.3 }For a shot with real depth, use the cinematic camera’s camera_* fields. Every stage layer sits at its own depth, so pushing in makes the floor and fighters grow faster than the far backdrop, and a sideways move slides the layers past each other. This dolly zoom keeps the winner the same size while the stage swells behind them:
sf2.fx.screen { id = "winner_vertigo", trigger = "outro", camera_vertigo = 0.7, -- pull back while the lens zooms in camera_roll = 2.5, -- a slight tilt, in degrees camera_attack = 1.6, -- seconds to reach full strength hold = 10, duration = 0.8,}A sideways move (camera_x, camera_y, camera_focus) needs a push-in (camera_dolly, camera_lens or camera_vertigo) to make room for it, because the camera never shows past the edge of the stage art. The stage is made of flat pictures, so during the fight the camera can move, push in and tilt, but it never swings around the fighters. The knockout finisher and replay, which stop the fight, are the exception (see below).
A shot can also move while it plays. camera_pan and camera_rise move the camera sideways and up by that many stage units every second, camera_turn changes the tilt, and camera_swell keeps a dolly zoom growing, the way camera_drift keeps pushing in. This round opening starts high above one side and sinks into the fight while the fighters take their stance (a round’s shot waits in its first position behind the “Round” banner and starts to move when the fighters appear):
sf2.fx.screen { id = "round_crane", trigger = "round", camera_dolly = 0.4, -- pushed in, which leaves room to move camera_x = -130, -- off to the left camera_y = 85, -- and up high camera_rise = -40, -- sinking 40 stage units a second camera_drift = 0.05, -- while creeping in hold = 1.1, duration = 1.2,}The moves keep going while the shot eases back, so aim them back toward the middle: a shot that starts left should move right.
camera_x and camera_roll, and their moves camera_pan and camera_turn, normally point fixed ways on the screen. On a hit or wall shot, camera_with_blow = 1 turns them to follow the moment instead: the camera travels the way the blow went, or toward the wall the fighter hit, and the horizon dips toward that side. A Dutch tilt then always falls with the body, whichever way the fighters face.
Swing around the finishing blow
Section titled “Swing around the finishing blow”The knockout finisher stops the fight dead the instant the blow that wins it lands. Turn it on with sf2.fx.knockout_finisher; its hold is the number of seconds the fight stands still. It is separate from the knockout close-up, so give it a setting of its own if players should be able to switch it apart. The fighters hold the pose of the impact, and grades with trigger = "finisher" play while it lasts. With the fight stopped, the camera can circle the fighters: camera_orbit swings it around them by that many degrees (positive to the right), and camera_sweep keeps it circling by that many degrees a second. The fighters turn as solid shapes in depth. The stage, which cannot turn, drops out of focus behind them and slides past as the camera goes round, until the fight moves again.
Your effects for the blow itself wait for the finisher. Its hit, ko and final_ko grades, particles and sounds start as the fight moves again, so a slow-motion grade on final_ko begins after the swing, not under it.
The swing moves fast, slow, fast: the blow flings the camera out over camera_attack, it glides through the rest of hold, and it whips back over duration, so it reaches the side view still moving. The fighter coming nearer grows and the one going away shrinks, as through a lens.
Slow should never mean stopped. If the camera barely moves through the hold, the stop looks like a still picture. Give camera_sweep 15 to 20 degrees a second and add a slow push-in with camera_drift, so something is always moving.
Three things make the turn read as depth, all set in sf2.fx.knockout_finisher:
beatshows the stopped blow from the side for a moment before the camera leaves, so the hit is seen landing. A flash on thefinishertrigger then falls on the blow itself.ringstands a thin ring of light around the blow. From the side it is a line; as the camera goes round it opens into a hoop that passes behind one fighter and in front of the other.debrishangs small bits in the air around the blow. Near ones cross far ones as the camera moves.
A soft light also hangs in the air behind the fighters so they stay readable on a dark stage. glow sets how strong it is.
This finisher shows the blow for a beat, then holds it for 1.85 seconds while the camera circles and pushes in with a slight tilt:
-- Stop for 1.85 seconds on the blow that wins the fight, after a short beat on the blow.sf2.fx.knockout_finisher { hold = 1.85, beat = 0.08, -- show the blow landing first ring = 0.8, -- a ring of light around the blow debris = 36, -- bits hanging in the air}
sf2.fx.screen { id = "finisher_orbit", trigger = "finisher", camera_orbit = 34, -- fling the camera 34 degrees to the right camera_attack = 0.45, -- in under half a second camera_sweep = 18, -- and keep circling, 18 degrees a second hold = 1.25, duration = 0.6, -- then whip back, home as the stop ends camera_dolly = 0.3, camera_drift = 0.06, -- push in, and keep pushing camera_focus = 0.8, -- on the point where the blow landed camera_roll = 2.5, -- with a slight tilt}
-- A flash marks the blow and covers the cut into the turned view.sf2.fx.screen { id = "finisher_flash", trigger = "finisher", brightness = 0.45, contrast = 1.25, hold = 0, duration = 0.3 }Make hold plus duration end when the stop does (1.25 + 0.6 here), so the cut back to the stage falls on the swing’s last fast move. The beat is added on top of the finisher’s hold and the swing starts after it, so these times do not change when you add one. The gear is drawn for the side view and thins as the angle grows, so stay around 45 degrees or less for the best look. The same camera fields work on the knockout replay’s triggers. See Orbiting the finishing blow for the details.
See sf2.fx.screen for the details.
Make an effect happen from Lua
Section titled “Make an effect happen from Lua”A grade with trigger = "script" waits for your code. Use it for a boss changing phase, a summon or a bolt of lightning.
local sf2 = require("sf2")
local stall = sf2.fx.screen { id = "stall", trigger = "script", saturation = 0.2, contrast = 1.4, vignette = 0.75, hold = 0.3, duration = 1.1, time_scale = 0.3, zoom = 1.3, zoom_offset_y = -40, sound = "snd_time_shift",}
-- Inside a combat callback, when your ability fires:local view = fighter:snapshot()if view then sf2.fx.play(stall, { x = view.self.position.x }) endsf2.fx.play returns false when the grade cannot show (its switch is off or the stage is excluded). x is the arena position the camera push frames.
Weapon and kick trails
Section titled “Weapon and kick trails”A trail is a fading ribbon swept by a line on the fighter. weapon = true follows the blade; nodes follows two points on the body (inner end first). Weapons already have a built-in trail (its look is the weapon’s mastery level, chosen in the shop’s armory); a mod’s weapon trail takes its place on the fighters it applies to, except on a weapon showing mastery rank I or higher, which keeps its mastery look. The built-in trail takes its shape from the weapon’s subtype (a mod weapon uses its subtype’s shape) and, at the base level, its colours from the weapon’s icon:
local sf2 = require("sf2")
sf2.fx.trail { id = "kick_trail", nodes = { "NKnee_2", "NHeel_2" }, fighters = "player", color = "#6FB8FF", blend = "additive", lifetime = 0.15, min_speed = 700,}
-- A blade trail that gathers toward the tip, cools to red and leaves a crisp edge.sf2.fx.trail { id = "katana_cut", weapon = true, weapons = { "katana" }, falloff = 2.2, end_color = "#6A1A10", edge = 0.85, edge_width = 0.07,}Useful node names: NPivot (centre of the body), NWrist_1/NWrist_2, NKnuckles_1/NKnuckles_2, NKnee_1/NKnee_2, NHeel_1/NHeel_2, Weapon-Node2_1/Weapon-Node2_2, Magic-Node2_1 and Ranged-Node2_1. A node a fighter lacks is skipped. Trails appear only while the moving end is faster than min_speed. To get a layered look, stack trails and set ribbon = 0 on layers that should draw only an edge.
For an ink look, streaks adds hair lines like a brush stroke, erode makes the trail tear into wisps as it fades, and soft_edge smooths its edges. A trail in the fighter’s own dark colour disappears on dark stages; an edge_color edge that cools toward end_color (edge_cool) keeps it visible there.
Thrown weapons and magic missiles can leave a trail too. Use projectile = true instead of weapon or nodes. The ribbon is width units across the projectile’s path, brightest along the line it flies. Projectiles move slower than a swing, so lower the speeds:
sf2.fx.trail { id = "thrown", projectile = true, width = 36, lifetime = 0.2, min_speed = 200, full_speed = 1200, alpha = 0.85, start_alpha = 0, edge = 0.9, edge_color = "#FFE8C8", edge_cool = 1, end_color = "#6A1A10",}Weather and atmosphere
Section titled “Weather and atmosphere”Pick stages with tags, so the effect follows the weather instead of listing stage names.
local sf2 = require("sf2")
-- Rain on every rainy stage: stretched streaks falling and drifting left.sf2.fx.particles { id = "rain", tags = { "rain" }, placement = "front", color = "#BFD4EA90", shape = "dot", stretch = 2.5, count = 400, lifetime = { 0.5, 0.8 }, size = { 1, 2 }, velocity_x = { -80, -60 }, velocity_y = { -1400, -1100 }, -- negative y is down area_width = 1.3, area_height = 1.3,}
-- A fog bank drifting slowly in front of the fighters' feet.sf2.fx.overlay { id = "fog_bank", tags = { "mist" }, placement = "front", shape = "band", color = "#D8E2EA", y = -215, width = 3600, height = 150, alpha = 0.16, sway = 160, sway_speed = 0.025, pulse = 0.2, pulse_speed = 0.04,}
-- Hot air shimmering over lava and fire stages.sf2.fx.screen { id = "heat_haze", tags = { "fire" }, distortion = 0.35, distortion_speed = 4, distortion_height = 0.45,}
-- Lightning with thunder every nine seconds or so on rainy stages.sf2.fx.screen { id = "lightning", tags = { "rain" }, trigger = "interval", interval = 9, interval_jitter = 0.6, brightness = 0.55, contrast = 1.3, saturation = 0.6, hold = 0.04, duration = 0.45, sound = { "snd_hermit_lightning", "snd_hermit_lightning2" },}For drifting dust, snow, embers or petals, the built-in sf2.fx.ambient_particles picks a style per stage tag so you do not write each one.
Bring a stage to life
Section titled “Bring a stage to life”Three effects work on the stage’s own painting rather than adding art on top. They suit dressing written for one stage, so pair them with stages.
- Wind and ripples.
sf2.fx.swaymoves named stage pictures: trees bend from their base, banners flutter from their pole, water shimmers. The picture names come from the stage’s layout. - Reflections. An overlay with
shape = "reflection"mirrors what is drawn above its box onto a lake or a polished floor. On a far layer it reflects the scenery; placed in front, on the floor, it also reflects the fighters. - Focus. An overlay with
shape = "blur"softens every layer behind it, so the fighters stand out as if the camera were focused on them.
local stage = { "lamps_on_water_se" }-- The willow by the water sways; the lake mirrors the temple and sky.sf2.fx.sway { id = "willow", stages = stage, images = { "_0004_willow_left" }, amount = 8, speed = 0.2 }sf2.fx.overlay { id = "lake", stages = stage, placement = "background", depth = 0.9, shape = "reflection", y = -120, width = 2400, height = 110, alpha = 0.4, ripple = 0.5, fade = 0.8,}sf2.fx.overlay { id = "focus", stages = stage, placement = "background", depth = 0.9, shape = "blur", blur = 0.25 }Keep these subtle: a reflection at alpha 0.3 to 0.5 and a sway of a few units read as part of the painting, while stronger values start to look like a filter.
Lights make weapons, magic and hits light up fighters and the stage:
local sf2 = require("sf2")
-- Fire weapons glow orange and light the fighter holding them.sf2.fx.light { id = "fire_weapons", source = "weapon", scenes = "everywhere", weapons = { "fire", "flame", "lava" }, color = "#FF8A3A", radius = 340, glow = 0.3, flicker = 0.25, flicker_speed = 9,}
-- Every stage lights the fighters from wherever its own light is.sf2.fx.light { id = "stage_light", source = "stage", exclude_tags = { "fire" }, radius = 3600, intensity = 0.85, fighter_light = 0.55, body_light = 0.08, glow = 0, flicker = 0,}
-- A warm flash at every clean hit, lighting both fighters for an instant.sf2.fx.light { id = "hit_light", source = "hit", trigger = "hit", color = "#FFD7A0", radius = 520, intensity = 1.2, fighter_light = 0.9, body_light = 0.35, glow = 0.3, glow_size = 240, flicker = 0, duration = 0.12,}God rays are a screen grade that streams light from bright areas: sf2.fx.screen { id = "sun_rays", tags = { "day" }, god_rays = 0.3, god_rays_follow = 1 }. With god_rays_follow = 1 the rays come from the stage’s own light.
Dust, shadows and stains
Section titled “Dust, shadows and stains”local sf2 = require("sf2")
-- Dust from heavy landings.sf2.fx.particles { id = "landing_dust", placement = "contact", trigger = "land", color = "#C9B89A66", end_color = "#C9B89A00", count = 12, radius = 16, lifetime = { 0.45, 0.9 }, size = { 16, 34 }, speed = { 10, 40 }, velocity_x = { -140, 140 }, velocity_y = { 15, 60 }, noise = 15,}
-- A soft contact shadow under each fighter.sf2.fx.shadow { id = "contact_shadow", alpha = 0.42, width = 150, height = 26, fade_height = 320 }
-- Blood splatters on hits, pooling on the floor.sf2.fx.stain { id = "hit_stains", color = "#4A0606", count = 3, size = { 8, 20 }, limit = 50, speed = { 90, 210 }, gravity = 900, lift = 90, merge_radius = 16, max_pool_size = 70,}React to the fight while it runs
Section titled “React to the fight while it runs”sf2.fx.on_frame calls your function a few times a second (default 10) with a read-only view of the fight. sf2.fx.set changes the effect’s numbers (or switches it off with enabled = false), and sf2.fx.reset puts them back. Here the screen darkens and pulses like a heartbeat when the player is below a third of their health:
local sf2 = require("sf2")
local danger = sf2.fx.screen { id = "danger", vignette = 0, accent = "#B01010", accent_width = 0.06 }
sf2.fx.on_frame(function(view) if not view.player then return end local peril = math.max(0, 1 - view.player.health_fraction / 0.33) local beat = math.max(0, math.sin(view.time * (1.2 + peril * 1.4) * math.pi * 2)) ^ 6 sf2.fx.set(danger, { vignette = math.min(1, peril * (0.45 + beat * 0.25)), accent_strength = peril })end, { rate = 10 })The view has round, time, round_active, outro, location, player and opponent (each with health, max_health, health_fraction, x, magic and magic_ready) and distance. magic is the fighter’s shadow energy from 0 to 1, and magic_ready is true while a cast is charged. A node particle’s emit (0 to 1) can be set here to turn a stream on and off without clearing what it already threw, for example smoke that rises off a fighter while magic_ready is true. Colours, shapes, triggers and sprites cannot change after registration; numbers can. If the handler errors or runs out of its instruction budget it is switched off for the session and a warning is logged.
Give players a switch
Section titled “Give players a switch”Players can turn your effects off without disabling your mod. Register a switch and pass it as setting:
local sf2 = require("sf2")
local sparks = sf2.settings.toggle { id = "hit_sparks", label = "Hit sparks", default = true,}sf2.fx.particles { id = "hit_sparks", setting = sparks, placement = "hit", count = 10, speed = { 250, 700 } }Switches appear under Options > Mod settings. Menus and settings covers groups, descriptions and switches that exclude each other.
Built-in looks
Section titled “Built-in looks”These are called as sf2.fx.<name> { ... } with no id. You only tune their numbers, and each look has one owner: if two enabled mods configure the same look, the second fails to load with a conflict error.
| Look | What it does |
|---|---|
background_depth |
Far background layers move proportionally less, so the scene reads deeper |
depth_haze |
Distant layers fade toward the colour of the farthest layer |
rim_light |
A thin lit edge on each fighter, optionally turned toward the stage’s own light |
ink_lines |
A thin lit line inside each fighter’s shadow where an arm, a leg or the weapon crosses the body |
bloom |
Bright pixels glow; adapts to pale stages |
ambient_particles |
Drifting dust, snow, embers or petals chosen per stage |
impact |
A short radial blur and colour split on heavy hits, scaled by the player’s hit-shake accessibility sliders |
ink_hud |
Restyles the fight HUD as black lacquer and gold leaf |
knockout_outro |
A close-up on the winner after a knockout |
smooth_camera |
The fight camera glides: eased zoom, a look-ahead, soft arena ends, blended shots and a shake that grows with each blow’s weight |
local sf2 = require("sf2")
local bloom = sf2.settings.toggle { id = "bloom", label = "Bloom", default = true }sf2.fx.bloom { threshold = 0.85, intensity = 0.6, setting = bloom }sf2.fx.depth_haze { strength = 0.35 }Limits and good habits
Section titled “Limits and good habits”- The impact look scales with the player’s Critical hit shake and Hit shake accessibility sliders. Keep screen shake modest.
- Title-screen sparring does not trigger screen grades, slow motion or muffle. The
soundof hit, block, critical, shock, guard break, knockout andintervaleffects still plays there, faded with the title’s other sparring sounds. - The game slows a fight down by itself when a blow is about to kill. During that slow motion it also plays a sound, drains the colour toward a cold grey, darkens the edges of the screen, muffles the rest of the fight and moves the camera in on the fighters with a slight tilt. Your grades combine with it. Saturation and contrast multiply, and the strongest vignette and muffle are used. Its camera move gives way to your
camera_*shots as they come in, so a kill cam takes over smoothly. Keep this in mind for an always-on grade that already removes most of the colour. - Outside online matches, training and replays, that slow motion also lasts past the blow. It stays slow for a moment and then speeds back up to normal, which takes longest after a kill. During that time a grade’s
time_scalecombines with it, and the slower of the two is used. - While a fight is paused for a menu (the pause menu, a local versus pause or replay pause, or the dojo’s menu scroll and Options), your effects hold still with the fighters: grades and their fades,
intervaltimers, particles, overlay pulses and flicker, stage sway and reflections, hit lights and screen-effect sounds. They carry on from the same point when play resumes. An online match never pauses, so its effects keep running behind the menu. The result screen also stops the fight but leaves effects running. - Hit effects, contact shadows, stains and combat-triggered grades need real fight events, so they do not show on menu previews even with
scenes = "everywhere". - Effects are checked for valid values when the mod loads, but how they look depends on the stage. Try each effect on a bright stage, a dark stage and a snowy one.
- A mod can add up to 256 effects. Many particles cost frame time; keep
countmodest on phones. - Under the player’s Performance effects preset (Options > Display > Effects, the default in the 32-bit Android build), the game draws cheaper versions of the built-in effects: bloom, halation and god rays start from a smaller copy of the picture with one glow level less, living ink uses coarser fields (as it always does on phones), and stage depth of field and reflections take fewer samples. It also turns off anti-aliasing and the switches you marked
heavy(see heavy switches). Your effects and settings stay the same. Quality, the default on computers and 64-bit phones, draws everything.
Chiaroscuro 2 (source) shows most of this page in one mod: about 240 effects behind 47 switches, over half of them dressing the 25 Special Edition stages one by one. See also the showcase.
Next steps
Section titled “Next steps”- Menus and settings for switches and stage tags.
- Sound and music for the sounds your grades play.
- Combat scripting to trigger effects from your own rules.