Move reference
This page lists everything a move table and a moveset file can hold. Learn the
basics in Moves first, then come back here when you need a field.
For the functions themselves, see sf2.moves.
Move tables
Section titled “Move tables”These are advanced content APIs. They configure the native animation and AI systems; Lua combat callbacks are covered in Combat scripting. Begin with a working fight and change one move at a time.
Native equipment can use a different AI table group from its animation subtype. Eclipse respects the shipped TacticSubtype metadata (for example, a TwoHandedBlunt weapon can use TwoHanded AI tables), falling back to SubType when it is absent. Item cloning preserves this distinction, and weapon changes update the fighter’s own AI group. Animation and item-condition matching still use the actual subtype. Owned weapon registration supports an optional tactic_subtype; see weapon registration. You can also override weapon AI groups.
Overview
Section titled “Overview”A move is one thing a fighter can do: a punch, a spell, a dodge, a reaction to being hit. A move is made of an animation (a binary clip your mod ships, or a native one), plus the rules around it:
- when it may start (inputs and conditions),
- windows: stretches of the move with a special property, such as “cannot be interrupted” or “invulnerable”,
- attacks: stretches that can hurt the opponent,
- on: sounds, effects and other actions that happen at chosen moments.
A template is a reusable bundle of those settings that other moves inherit.
Eclipse ships many native templates ("Controlled", "MagicPlayer", …) and
you can register your own with sf2.moves.register and kind = "template".
A handle is the value sf2.moves.register returns; you pass it to other
moves, to fighter:play_move and to tactics.
Moves use plain declarative tables. Closed choices are lowercase words
("enemy", "punch", "fight"), body parts have friendly names ("pelvis",
"right_heel"), conditions are one map, and every position in time is a game
frame. The binding checks the table when your mod loads and reports the exact
field that is wrong. A removed core 1.x field names its replacement in the error.
local sf2 = require("sf2")
-- A magic cast the player starts with the Magic key.local spell = sf2.moves.register { id = "spell", animation = "animations/spell", inherit = { "MagicPlayer", "Controlled" }, events = "controlled", face = "enemy", only_for = { rig = "Skeleton" }, when = { keys = "magic", bullets = { type = "magic", min = 1 }, not_mod = { "Concussion", "Stun" }, controllable = true, }, windows = { uninterruptible = { to = 29 } }, on = { [9] = { sound = "snd_midsphere_start" }, [21] = { add_bullets = "magic", amount = -1 }, strike = { sound = { "snd_hit1", "snd_hit2" } }, },}This is an authoring fragment: provide a compatible animation and the rest of your spell’s attack and projectile graph before using it in a fight.
Frames and samples
Section titled “Frames and samples”A move’s animation is stored as a list of samples (keyframes). The game
shows one sample for frames_per_sample game frames (60 game frames make
one second). Windows, attacks and the on table all count game frames, so you
do not need to know how the clip was sampled.
- Frame
0is the first frame the move is on screen. - The first sample is held for two sample-steps while the move blends in, then each later sample is shown for
frames_per_sampleframes. - With
first_sample = Fandframes_per_sample = S, game framefshows sampleF + max(0, floor(f / S) - 1). SampleFcovers frames0to2S - 1; each later sampleF + kcovers(k + 1)Sto(k + 2)S - 1. - A bound that falls between two samples belongs to the sample that contains it.
- Frames are counted at the move’s normal speed. A
playback_ratechange stretches every window the same way. Dagger attacks play faster up to their last hit, so in play their windows come sooner than these frame numbers say.
For example, with first_sample = 1 and the default 3 frames per sample, sample
1 is frames 0 to 5, sample 2 is frames 6 to 8, and sample 9 is frames 27 to 29.
To place something on a sample, use that sample’s first frame for from and
for on frame keys, and its last frame for to.
When a bound must name an animation sample exactly, write from_sample or
to_sample instead of from or to. Do not give both a frame bound and its
_sample form. In VS Code, hover a native move name to see its windows in both
units.
Frame bounds need to know the move’s timing. A move that inherits templates the
mod cannot read (a template from another mod) may set the timing itself; if so,
set frames_per_sample and first_sample on the move, or use the _sample
bounds. A template has no timing of its own, so bounds in a template are always
_sample bounds. A move cannot set frames_per_sample = 1 or first_sample = 0 to override a
different value that an inherited template sets; that is an error.
Move fields
Section titled “Move fields”sf2.moves.register (any kind except "trigger") and the replace field of
sf2.moves.patch accept these fields. A field marked “move only” is
rejected by kind = "template".
| Field | Meaning and default |
|---|---|
id |
Required. Local identifier, unique within your mod. |
inherit |
List of templates to inherit, default empty. Write native template names first, then your own template handles; the game applies them in that order. replace accepts native names only. |
events |
"controlled" or a list of events: the moments the game considers starting this move. Default empty. |
when |
A condition map that must hold for the move to start. |
only_for |
A condition map for availability: which fighters get the move at all (rig, weapon, armor, screen). Checked when the fighter’s move list is built, not each time the move could start. Up to 64 conditions. Inherited availability rules still apply. |
windows |
Windows: special stretches of the move. |
attacks |
List of attacks. |
type |
"move" or "attack". Default none. |
priority |
Integer, default 0. Higher priority wins when several moves match the same input. |
frames_per_sample |
Game frames per animation sample, 1-1001. Default 3, unless an inherited template sets it. |
first_sample |
The sample the move starts on, 0-100000, default 0. |
last_sample |
The last sample to play, 0-100000, default 0 (not set: the clip decides). |
mirror |
Body point used to mirror the move, or false for none. Fighter moves (only_for = { rig = "Skeleton" }) default to "left_heel" when no inherited template sets one. |
tactic_equivalent |
Exact name of a native move, default empty. See below. |
tactic_weapon |
Native tactic name string, default empty. |
looped, ends_stage |
Booleans, default false. |
align, face |
Optional positioning and facing. |
animation |
Move only. Required for kind = "move" and replace. A mod binary path such as "animations/spell", or a handle from sf2.assets.binary. The file must contain a supported native animation; renaming an arbitrary file does not convert it. |
transitions |
Move only. Up to 32 ordered transitions. |
on |
Move only. Scheduled actions, up to 64 in total. |
profile |
Move only. Entry in the native moves list, described below. |
style_factor |
Move only. Number 0-100 (default 1): how much the move counts toward the style meter. |
tactic_distance, tactic_when |
Move only. Conditions the opponent AI checks before choosing this move. |
no_wall_repulsion, no_interpolation_frames, no_magic_recharge |
Move only. Booleans, default false. They set the native move flags with those names; no_magic_recharge stops magic recharging during the move, which is useful for projectile actors. |
velocity |
Move only. Native motion table, described below. |
expected_file |
replace only. Required. See replace. |
tactic_equivalent helps the computer opponent use a move you added. Its tactic
tables are precomputed for native moves and have no rows for mod moves. With an
equivalent, the AI treats this move as the named one when it reads its own or
its opponent’s current move. Wherever a table row offers the equivalent as a
response, it also offers this move, with the same wait. The move’s own
conditions, availability and wall checks still decide whether it is playable.
Pick a native move with similar hit timing and range, for example FrontKick
for a quick grounded kick. Native moves never gain these extra choices. A name
that matches no move logs a native error and has no effect.
Use existing core definitions as a reference for native names and animation
nodes. A valid Lua table does not guarantee that an animation suits the fighter
skeleton. Lists must be dense: consecutive indices starting at 1. Building a
list with table.remove or clearing unused fields with nil works; holes,
zero, negative or fractional indices and extra named entries are rejected.
Events
Section titled “Events”Events are the moments at which the game checks whether a move can start. A move
you start yourself with fighter:play_move needs none. A move bound to an input
usually wants events = "controlled".
An event is a name, or a table with the event name as its key. The names are the
same as the keys of on: start (the move’s animation starts)
and finish (it ends), not the longer animation_start and animation_end.
round_stage is the stage-change event; it is round_stage in both places.
The old spellings fail with an error that names the replacement:
events = { "key_pressed", { interval_end = "uninterruptible" }, { hit = "my_mod:moves/recoil", of = "enemy" } }| Event | Value of the table form |
|---|---|
start, finish |
A move handle or a move name. |
interval_end, interval_start |
A window: a window kind that has a native name (see windows), or a custom window name. |
round_stage |
"start_stance", "fight", "end_stance", "peaceful_start", "shop_purchase", "peaceful_restore" or "try_on". "try_on" starts only the armor and helm shop Try; a weapon, ranged or magic Try raises no round_stage event (see Shop previews). |
hit, strike, every_frame, birth, mod_expires, key_pressed |
A native name to match. |
The optional of picks whose event it is: "self", "enemy", "parent",
"child" or "enemy_child" (default this fighter). events = "controlled"
means a key press, the end of the uninterruptible window and the end of the
animation.
Conditions
Section titled “Conditions”when, only_for, tactic_when, a transition’s when, and the when of a
trigger or patch all use the same condition map. Every entry in the map must
hold. Prefix any kind except controllable with not_ to negate it.
when = { keys = { "punch", { "forward", press = "hold" } }, animation = "ThrowForwardV", window = "ThrowBreakWindow", enemy = { animation = "ThrowForward" }, stage = "fight", not_mod = "MOD_TITAN",}| Kind | Value |
|---|---|
keys |
One key, or a list of 1-14 keys pressed together; taps keep their order. A key is a word or { "key", press = ... }. See below. |
animation |
The current move: a native move or template name, or a move handle. |
window |
A window that is active now: a window kind with a native name, or a custom window name. |
rig, weapon, ranged, magic, armor, helm |
An equipped item in that slot: a subtype name (weapon = "Katana"), a list of subtypes (any of them), { subtype = ..., item = "EXACT_ITEM_NAME" }, or true (anything equipped). rig is the fighter’s skeleton. |
actor |
The model’s exact, case-sensitive native actor name, such as the name a projectile action gave a child. It does not test a warrior ID; use character. |
character |
A fighter handle from sf2.fighters.register: matches that registered character, including copies of its model parameters. |
perk |
A perk handle. Core handles resolve to the native perk name. |
bullets |
{ type = "magic" or "raid_charge", min = 0, max = 2147483647 }: the model’s charge count, inclusive. min must not exceed max. A condition only; use the add_bullets action to spend charge. |
distance |
{ axis = "x" / "y" / "full", min, max, from = point, to = point }. Default axis "full"; min and max default to -1,000,000 and 1,000,000, must be finite and ordered. x is signed and relative to facing, y is signed vertical distance, full is flat straight-line distance. |
direction |
{ from = point, to = point }: the facing of this fighter (or, inside enemy = { ... }, the enemy) relative to two points. It is a test, separate from the move’s face field. |
player_number |
1 or 2: which fight slot the model occupies. |
screen |
"shop_armor", "shop_weapon", "shop_helm", "shop_missile", "shop_magic", "shop_ruby", "shop_free", "shop_raid_item_pack", "profile" or "fight". The weapon, ranged and magic shop sections all use "shop_weapon", so no shop uses "shop_missile" or "shop_magic"; see Shop previews. |
stage |
The round stage: "start_stance", "fight", "end_stance" or "try_on". "try_on" is the armor and helm shop Try; a weapon, ranged or magic Try is in "fight". |
round_result |
"victory" or "defeat": the fighter’s completed-round result. Useful with stage = "end_stance" for victory and loss moves. |
mod |
The name of an active combat modification such as MOD_TITAN. This is not an installed Lua mod. Registration does not check that the name exists. |
controllable |
true: the fighter is ready for a new move. Expands to: not in an uninterruptible or semi_uninterruptible window, the fight stage, not in $Move and semi_uninterruptible at once, and not in Physical. It does not include stun, concussion, equipment or charge checks; add those as needed. |
Combining and scoping:
- Scopes.
enemy,parent,child,enemy_childandbothhold a nested map that is tested on that model:enemy = { animation = "ThrowForward" }. Scopes do not nest, and a scoped map cannot containkeys,distance,controllable,anyorall. Without a scope, a condition tests this fighter. Round stage and screen are shared state, so scopes do not change them. - Lists. Several values of one kind in a list mean all for most kinds, so write
anyorallinstead. The exceptions: for an item slot a list means any one of them (weapon = { "Katana", "Sai" }), and for a negated kind it means none of them (not_mod = { "Stun", "Freeze" }). anyandall.any = { { animation = "A" }, { animation = "B" } }holds when at least one map holds;all = { ... }when every map holds.not_anyandnot_allnegate them. An empty map insideanyis an error. Nesting is limited to eight levels.- Window names.
windowand the interval events can nameuninterruptible,semi_uninterruptible,self_uninterruptible,unstableandthrowable, or a custom window.block,invulnerableandinvisiblewindows are unnamed by default, so they cannot be tested unless you gave them aname.
Keys are "up", "up_forward", "forward", "down_forward", "down",
"down_back", "back", "up_back", "punch", "kick", "ranged", "magic",
"raid_charge" and "super". press is "tap" (default), "hold" or
"release". Repeated keys are preserved: keys = { "punch", "punch" } requires
the native double-tap sequence. Entries go to the native tap, hold and release
groups in the order written; this is not a general timing or input-history
language. Combine keys with the key_pressed event to bind a move to a
fighter’s controls.
Two status effects hold whatever a move’s own conditions say:
- Stun. While a fighter has the
Stunmod (the flag the Stun enchantment sets), it starts no move that inherits"MagicPlayer"(magic and abilities) or"RangedPlayer"(ranged throws), whether the player or the AI picks it. - Silence. While a fighter has the
SilenceIconmod (a ranged hit sets it when the thrower’s ranged item has thePERK_RANGED_PLAYERrule), itsmagicandraid_chargepresses are ignored. The player’s two buttons are dimmed and cannot be pressed. Every other key still works.
A move a script starts with fighter:play_move is not checked. Writing
not_mod = { "Stun", "SilenceIcon" } in your own moves is still fine.
A projectile that has passed the front wall can be tested with a distance
condition. It does not delete the actor; attach a separate cleanup move to it.
Named rig points must exist on that projectile’s skeleton:
when = { actor = "Sphere1", distance = { axis = "x", max = -250, from = { node = "Magic-Node2_1" }, to = { wall = "front" } } }A condition map that names a victory pose looks like this:
when = { round_result = "victory", stage = "end_stance" }Positioning: points, align and face
Section titled “Positioning: points, align and face”A point names a place in the fight. A move uses points to line up with
another fighter, to face a direction, and in distance conditions and effects.
| Point | Meaning |
|---|---|
{ node = "pelvis", of = "enemy" } |
A rig node: a body point or an exact node name of at most 128 characters. |
{ wall = "front", of = "self" } |
The "front" or "back" wall of that fighter’s facing. |
{ pivot = "self" } |
The fighter’s pivot. |
{ animation = "parent" } or { animation = true } |
The animation origin of that model; true keeps the native default model. |
{ floor = "self" }, { com = "self" } |
The floor under, or the center of mass of, that model. |
of (or the value of pivot, animation, floor and com) is "self",
"enemy", "parent", "child" or "enemy_child"; the default is this
fighter. Every point accepts optional x and y offsets (finite, within
-100,000 to 100,000, default 0). Whether a model exists is a runtime question,
not checked at registration.
Body points
Section titled “Body points”The fighter rig’s points are head_top, head, neck, chest, stomach,
pelvis, and left_ / right_ plus shoulder, elbow, wrist, knuckles,
fingertips, hip, knee, ankle, heel, toe and toe_tip. Helper
landmarks and the nodes of weapon, magic and projectile rigs keep their exact
names, such as "Magic-Node2_1". Writing a fighter-rig node’s old exact name
("NHeel_1") is an error that names the body point to use.
align keeps part of the clip where the fighter stands, so a move that is drawn
somewhere else still starts in place.
align = "right_heel"(any body point) keeps that point where the fighter is standing, on the horizontal axes.align = "parent"starts the clip from the parent’s animation origin, for a child that follows its caster.- The table form takes
axes,pivot,positionand optionallyshift_model_node:
align = { axes = { "x", "z" }, -- 1-3 unique axes: "x", "y", "z" pivot = { node = "right_heel" }, -- the point of the clip that is held... position = { pivot = "self" }, -- ...at this place shift_model_node = "Ranged-Node2_1", -- optional exact rig node that is shifted}Alignment supports node, pivot, animation and wall points. Only
position may have nonzero offsets; offsets on pivot are rejected. On an
aligned axis the offset moves the target point, so the pivot lands at the
position plus the offset. On an axis not in axes, the clip keeps its own
coordinate but is still moved by the offset: y moves it up or down (negative
is up), and x moves it by the raw value, which is not flipped with facing.
For example, axes = { "x", "z" } with
position = { node = "pelvis", of = "parent", y = 130 } keeps the clip’s
height but lowers it by 130.
face decides which way the fighter turns when the move starts.
| Value | The fighter faces… |
|---|---|
"enemy" |
toward the enemy. |
"away" |
away from the enemy. |
"keep" |
the way it already faces. |
"turn" |
the opposite way to its current facing. |
"with_enemy", "opposite_enemy" |
the same way as, or the opposite way to, the enemy’s facing. |
"with_parent", "opposite_parent" |
the same way as, or opposite to, the parent’s facing. |
"impulse", "reverse_impulse" |
along, or against, the incoming hit impulse. No impulse is applied. |
{ from = point, to = point } |
from one point toward the other. Supports node, pivot, wall, floor and com points; animation is not a facing point. |
face uses the native facing calculation; it does not move the character.
A paired move started with a play action takes its facing from its own face,
evaluated at that moment, so a throw victim set to "opposite_enemy" mirrors
the same way as the move that started it.
Names and points are not asset lookups at registration. A valid declaration can still reference an absent rig node. Test contact, mirroring and position in a fight.
Windows
Section titled “Windows”A window is a stretch of a move with a special property. windows is a map
from a window kind to its bounds.
windows = { uninterruptible = { to = 29 }, -- frames 0 to 29 block = { from = 30 }, -- frame 30 to the end of the move throwable = { from = 30 }, invulnerable = { name = "Evade", to = 23 }, ThrowBreakWindow = { from = 0, to = 8 }, -- a custom window you name yourself}| Kind | What the game does during the window |
|---|---|
uninterruptible |
Other moves cannot interrupt this one. |
semi_uninterruptible |
Only double-tap follow-ups (moves allowed to cancel 1key / 2key moves) can cancel the move. |
self_uninterruptible, unstable |
Native state flags some vanilla moves use. Copy them from a similar vanilla move. |
throwable |
The fighter can be thrown. |
block |
The fighter blocks. |
invulnerable |
The fighter cannot be hit. While the window lasts, a white outline is drawn around the fighter so players can see it. |
invisible |
The fighter is hidden. |
| Any other name | A custom window with exactly that spelling (letters, digits, _, ., -; up to 128 characters), such as CanWallHit. Your own when = { window = "..." } conditions and patches can find it by name. |
Each value is one of:
true: the whole move (not allowed in a patch).- A bounds table:
from,to(game frames, inclusive,0-100000; leave one out for the start or end of the move), orfrom_sample/to_sample.tomust not come beforefrom. Typed windows (block,invulnerable,invisible) also acceptname = "Evade"to give the window a name you can test. - A list of bounds tables, for several windows of one kind:
invulnerable = { { name = "Evade", to = 9 }, { from = 20, to = 25 } }.
The kinds are written in lowercase. A custom name that is the native spelling of a kind
("Uninterrupt") or one typo away from a kind (uninteruptible) is rejected
with a hint.
Attacks
Section titled “Attacks”An attack is a stretch of a move that can hurt the opponent. attacks is a
list of attack tables:
attacks = { { from = 12, to = 20, edges = { "EThigh_2", "ECalf_2", "EFoot_2" }, damage = 0.12, hit = "High", impulse = { x = 245, z = 350 }, id = 0 },}| Field | Contract and default |
|---|---|
from, to, from_sample, to_sample |
When the attack is active, as for windows. Omitted bounds retain the native behavior. |
name |
Optional name for the attack window, with the same spelling rules as a custom window name. |
id |
Integer 0-999, default 0: the attack’s native identity, used by patches to find it. |
edges |
List of 1-64 rig edge names (1-128 characters each): the body parts that hit. Required unless direct = true. These are attacking edges, not arbitrary mesh vertices. |
direct |
Boolean, default false. With true, leave out edges. The attack hits the current opponent once per active window, without collision edges. Native invulnerability and damage rules still apply. An explicit flag stops a forgotten edges list from making an unavoidable attack. |
damage |
A number, or a table. See below. |
hit |
A hit reaction name (default "High"), or a move handle for an authored reaction. |
impulse |
{ x, y, z } push applied on hit, each finite within +/-100,000 in native physics axes. Omitted axes are 0. |
no_effect |
Boolean, default false. Suppresses the attack’s normal hit effect. Separately scheduled effects stay independent. |
no_critical |
Boolean, default false. Suppresses critical hits. |
no_perk_bonus |
Boolean, default false. Perks and enchantments cannot raise this attack’s damage. They can still lower it, and a behavior’s own on_damage_dealing still applies, which is where the move’s own bonus belongs. |
ignores_block |
Boolean, default false. Bypasses all block windows. Native ranged and magic damage may also bypass block. |
body_part |
"body" or "head". Omit it to keep the native default. |
defense |
List of up to two unique values from "body" and "head". Uses the native defense calculation; these are not literal damage reductions. |
ignores_invulnerable |
A list of up to 32 unique invulnerable window names the attack passes through, or true for all of them. Names are not checked against loaded moves. |
Damage. A number is the attack’s base damage, 0 to 16, scaled by the
attacker’s unarmed damage. A table sets the base and chooses which attributes
the damage scales with:
damage = { amount = 0.06, weapon = 0, unarmed = -10 }amount is the base damage. weapon, ranged, magic and unarmed are
shifts (finite, -1000 to 1000) that offset that attribute before the native
comparison; they are not an extra hit, a percentage or a sum. The native formula
picks the strongest adjusted attribute. Terms are written in weapon, ranged,
magic, unarmed order. A table with no terms scales with unarmed damage; a
single magic = 0 term is a plain magic attack. ranged and magic terms keep
their native block-bypass behavior even when mixed with another term.
-- Inside sf2.moves.register: a damaging spell with no collision edges.attacks = { { from = 147, to = 152, direct = true, damage = { amount = 0.15, magic = 0 }, hit = "NoReaction" } },NoReaction keeps the native no-reaction name; it does not suppress damage.
When an attack connects
Section titled “When an attack connects”An attack connects when one of its edges touches one of the opponent’s body
edges. Each edge is a capsule: a line between two rig points with a thickness.
- The game checks every frame of the attack. From the attack’s second frame on, it also checks the poses between the previous frame and this one, so a fast foot or blade cannot pass through a thin arm or leg between two frames.
- The earliest contact counts. If several pairs touch at that moment, the first
edge in your
edgeslist wins, against the body edge listed first in the opponent’s rig. The standard rig lists the head first. The body edge hit decides which defence applies (helmet or armour) and whether it is a head hit. - On the attack’s first frame only the current pose counts, so an attack never
becomes active earlier than its
from. - An attack hits at most once per window. A
direct = trueattack skips all of this and simply hits.
Clashes and trades
Section titled “Clashes and trades”When the two fighters’ attacks reach each other on the same frame, neither one simply wins:
- Clash. Both attacks deal weapon damage (their
damagehas aweaponterm) and the weapons themselves touch, also between two frames. Neither attack lands and both attack windows end. Both fighters play theirHighShorthit reaction (the block reaction if they are guarding), and a spark and a sound mark where the weapons met. Nobody was hit: there is no damage, andhitandstrikeactions,kind = "trigger"registrations and perks do not run. - Trade. Otherwise, if each attack reaches the other fighter’s body on that frame, both land.
A heavy weapon attack wins a clash against a lighter weapon: only the lighter fighter recoils and loses its attack window. The heavy attack goes on and can still hit with the rest of its window. Two heavy weapons, or two lighter ones, clash as described above.
The weapon’s edges are the attack’s edges that join the weapon’s own points, not
rig joints. Only the two fighters facing each other clash or trade; actors and
projectiles hit as usual. An attack that has already hit in this window, or a
fighter who cannot be hit right now (invulnerable), takes no part. A rig
without a HighShort reaction keeps playing its move after a clash, but its
attack window still ends.
Heavy weapons
Section titled “Heavy weapons”The heavy two-handed weapons wind up two to four times longer than other
weapons. To make that slow swing worth the risk, weapon attacks (moves with the
Weapon template) by a fighter holding a weapon of subtype TwoHanded,
TwoHandedBlunt, Cudgel, Scythe, CompositeScythe (the Reaver) or
DoubleScythe (Mowers and Hunger Sickles) follow extra rules. The first four
share the two-handed moves (TwoHandedSlash and the rest); CompositeScythe and
DoubleScythe weapons swing their own (CompositeScytheSlash,
DoubleScytheSlash and the rest). The timings below are animation samples, the units of the base game’s
move data; a sample lasts 3 game frames in most moves.
- Windup armor. From sample 6 of the attack, where the two-handed swings can
no longer be cancelled, to the end of its first attack window, light hits do
not interrupt it. A move whose
semi_uninterruptiblewindow (the part a follow-up move can still cancel) lasts longer is armored from the sample after that window instead: the Reaver’s plain slash from sample 7. Their damage still lands, but the attacker keeps swinging. Light hits are the ordinary and short reactions:High,HighShort,HighShortPlus,HighPlus,Middle,MiddleShort,MiddleShortPlus,MiddlePlus,MiddleU,Low,Sweep,SpinningandOverhead. Every other reaction (heavy, long, deflect, fall or special), a critical hit, a magic hit and a throw still interrupt the attack. The recovery after the attack window has no armor, so a missed swing can still be punished. While the armor lasts, an outline is drawn around the fighter: orange for the player’s side and blue for the opponent’s. If the fighter is alsoinvulnerable, the white outline shows instead. - Clashes. A heavy attack wins a clash against a lighter weapon.
- Block pressure. A blocked heavy hit slides the guard
45 units back over the first 8 samples of their block reaction. That reaction also keeps them from
acting for 3 samples longer than its own
uninterruptiblewindow. The guard keeps blocking and can still be thrown. No heavy attack breaks a guard, the heavy slash (TwoHandedHeavySlash) included. - Damage. Heavy weapon attacks deal 1.4 times the damage, blocked or not.
- Counter hits. A heavy hit that catches the opponent in the middle of an attack, before that attack’s last window ends, knocks them down with the fall of the same height (high, middle, overhead or sweep). A fighter that cannot fall, such as Titan, plays its normal reaction instead.
These rules only add to what scripts decide. A reaction chosen with
fighter:set_hit_reaction
is kept, so the counter hit does not replace it.
fighter:set_hit_armored
can make any hit armored, but it cannot take the windup armor away. The rules
follow the weapon, not the move: a mod weapon of one of these subtypes gets
them, and a fighter holding another subtype does not, even with a copy of a
two-handed move.
Daggers
Section titled “Daggers”Dagger attacks look fast, but in the base game’s move data they took longer to
land their first hit than a katana’s. Weapon attacks (moves with the Weapon
template) whose locks require the weapon subtype Daggers (the Tec Knives and
the event daggers, which swing DaggersSlash and the rest) follow two extra
rules:
- Quick hands. The attack plays 1.4 times as fast from its start to the
end of its last attack window. The recovery after that window plays at the
move’s normal speed. Windows, sounds and actions stay on their animation
samples, so they move with the animation.
DaggersSlashlands its hit after 26 game frames instead of 37, and the gaps between the hits of a string are short enough that the opponent cannot recover in between. Aplayback_rateset by a mod still applies: the quick part plays at that rate times 1.4, but never faster than one game frame per animation sample. - Cancel on hit. When a dagger hit lands (not blocked, and not absorbed by
armor), the rest of that attack’s
uninterruptiblewindow is lifted as soon as its last attack window ends. Until that window would have ended, a key press can start only a step (a move with theSteptemplate) or a dagger attack on another direction. An attack never cancels into itself or its follow-up press: afterDaggersSlashorDaggersDoubleSlash(no direction) neither of them can start, afterDaggersHeavySlashorDaggersSuperSlash(forward) neither of them, and the back, up and down attacks cannot start themselves. After it, every move is available again as usual. A move started from a cancel cannot be cancelled itself, so a chain is two moves long. Blocking still waits for the attack’sblockwindow, and a missed or blocked attack keeps its full recovery. On screen, the jump from the attack’s follow-through into the next move is eased over 12 game frames; the hit timing is not affected. A player can press for the follow-up as soon as the hit lands: the press is kept until the cancel opens, for up to 15 frames, and the follow-up starts on the cancel’s first frame. Forward and back are read as the attack was facing, and the follow-up keeps that facing, even if the attack carried the fighter past the opponent.
The rules follow the move’s locks. A mod weapon of subtype Daggers gets them
with the dagger moves. A copy of a dagger move locked to another subtype does
not.
Hit reactions
Section titled “Hit reactions”hit accepts the native reactions used by the shipped vanilla and Definitive
Edition moves: Earthquake, Electrocution, ElectrocutionPowerfield, HermitStorm, High, HighHeavy, HighHeavyDeflect, HighLong, HighPlus, HighShort, HighShortPlus, HoaxenPierce, Low, LowHeavy, LowHeavyDeflect, LowPull, Middle, MiddleHeavy, MiddleHeavyDeflect, MiddlePlus, MiddleShort, MiddleShortPlus, MindThrowHit, MindThrowHitNormal, NoReaction, Overhead, OverheadHeavy, OverheadHeavyDeflect, Physycal, RatWaveHit, RootHit, Spinning, SpinningHeavy, SpinningHeavyDeflect, Sweep, SweepHeavy, SweepHeavyDeflect, TitanHighHeavy, TitanMiddleHeavy, TitanOverhead, TitanSweep, TitansHarpoonHit, TitansHarpoonHitGrab, TitansHarpoonStrikeFall, TornadoHit, ToxicCloud, WaspFly and WaterWaveHit.
Physycal is the native spelling for a physical fall. The names select native
hit reactions; they do not supply new reaction animations.
Authored hit reactions
Section titled “Authored hit reactions”To use a reaction animation you registered, give a move handle as hit instead
of adding a mod-specific name to the engine’s list. Define the victim’s move
before the attack, with a hit event whose value is its complete namespaced
ID. The victim’s normal availability, conditions and priorities still apply: the
reference does not force an ineligible animation. A reference to a missing or
inaccessible move rejects the whole registration.
local reaction = sf2.moves.register { id = "recoil", animation = sf2.assets.binary("animations/recoil"), inherit = { "Recoil", "Hit" }, events = { { hit = sf2.mod.id .. ":moves/recoil" } }, face = "reverse_impulse",}local strike = sf2.moves.register { id = "strike", animation = sf2.assets.binary("animations/strike"), attacks = { { from = 30, to = 38, edges = { "Weapon-Edge1" }, damage = 0.3, hit = reaction } },}Supply compatible animation binaries and rig edges, plus the input conditions and other fields your combat design needs. This fragment only shows the reaction link; it is not a complete playable weapon.
Getting up
Section titled “Getting up”A knocked-down fighter falls (PhysicalFall), hits the ground
(PhysicalGroundHit), lies still (PhysicalLying) and then gets up with the
native Standup or StandupBack. A player has three choices on the way:
- Get up in place. Do nothing, and the normal get-up plays.
- Roll. Hold toward the opponent or away when the get-up would start, and the
fighter rolls that way instead (the native
ForwardRollorBackRoll, joined where the roll lies on its back). The roll cannot be hit until it can act, that is, until itsuninterruptiblewindow ends. It needs the fighter lying with the head away from the opponent, the way the rolls pass through the ground; otherwise the normal get-up plays. - Quick rise. Press any key as the body lands, from 4 frames before it hits the ground to 8 after. The body stops sliding, so it lies still and gets up straight away.
Only players get these choices; the AI gets up as before. The usual rules still
decide whether a fighter may get up at all, for example after the round is lost.
A rig without ForwardRoll or BackRoll always gets up in place. The rolls are
the native moves, so move edits to them apply to wake-up rolls too.
Scheduled actions: on
Section titled “Scheduled actions: on”on schedules actions at a game frame or at an event. Put an action, or
a list of actions, under each key. Actions under one key run in the order
written; the whole table may hold up to 64 actions.
on = { [9] = { sound = "snd_blade_fury" }, -- on game frame 9 [15] = { -- several actions on one frame { sound = "snd_midsphere_start" }, { effect = { name = "Glow", core_sequence = "mgc_magic_mid_sphere_start" } }, }, hit = { stop_sound = "snd_blade_fury" }, -- when the move hits finish = { stop_effect = "Glow" }, -- when the animation ends}Frame keys are whole numbers 0-100000 and are counted in game frames, not in
milliseconds or samples. Frames run in ascending order, then events in this
order: birth, round_stage, round_start, key_pressed, key_released,
start, interval_start, every_frame, strike, hit, wall_hit,
interval_end, finish, mod_expires, round_end. start is when the
animation starts and finish when it ends. The native runtime dispatches each
action separately, so the order between different keys does not change what
runs.
Actions add to the ones a template brings, so check inherited templates to avoid doubled effects. Each action table holds exactly one action key:
| Action | Meaning |
|---|---|
{ sound = "snd_hit1" } |
Play one native sound. Optional voice = "male", "male_low" or "female" plays it only when the actor’s voice matches. |
{ sound = { "snd_hit1", "snd_hit2" } } |
Pick one sound at random from the list. Repeating a name weights it. A single random sound is { sound = { "a" } }. A list takes no voice; use separate voiced actions instead. |
{ stop_sound = "snd_blade_fury" } |
Stop a native sound that is playing, for example to end a long clip when a move is interrupted. |
{ effect = { ... } } |
Start a native effect; fields below. |
{ stop_effect = "Glow" }, { stop_follow_effect = "Glow" } |
Stop an effect by its name, or detach its following behavior and leave it playing. |
{ projectile = { ... } } |
Create a native child projectile actor; fields below. |
{ add_bullets = "magic", amount = -1 } |
Change the running model’s charge. "magic" or "raid_charge"; amount is a nonzero integer within +/-100,000. Negative spends charge. It neither creates a projectile nor guards selection. |
{ delete_actor = "self" } |
Delete the selected native actor ("self", "enemy", "parent", "child", "enemy_child"). Usually "self" on a projectile’s own strike or expiry move; do not put it on the caster unless deleting the caster is intended. |
{ play = move, target = "child", child = "Hand" } |
Start a move on target (required). move is a handle or the name of a native move. Optional child picks a spawned actor by exact name; it is checked first and the native target is used if none matches. It does not force a transition, and can fail if the target is absent or cannot select the animation. Register the target move before the caster. A move the target had queued for its next frame is dropped. |
{ shake = { effect_time = 30, amplitude_x = 7, frequency_x = 1 } } |
Camera shake. pause_time and effect_time are integer frame counts 0-10000; amplitude_x, amplitude_y, frequency_x and frequency_y are 0-1000. All default to 0. It does not apply damage. |
{ create_player = { rig = "Skeleton", armor = "Body", weapon = "Fists" } } |
Spawn a native helper fighter wearing the named core items. Slots are rig, armor, helm, weapon, ranged, magic, each a core item name. Used by profile previews that show a move performed on a partner; the spawned actor is the move’s child. |
{ try_on_end = true } |
Signal that a shop preview finished. Put it under finish on an armor or helm shop move. A weapon, ranged or magic Try ends by itself and ignores it; see Shop previews. |
Core sound, icon and effect names are exact symbolic names of 1-128 letters,
digits, _, - or .. They are not file paths or owned asset handles.
Registration checks syntax, not that the resource exists. For mod audio, use the
owned-audio trigger actions of sf2.moves.register with kind = "trigger".
Effects
Section titled “Effects”effect = { ... } starts a native effect on the running model.
| Field | Meaning and default |
|---|---|
name |
Required. The active effect’s name; stop_effect uses it. |
core_sequence |
Required. An existing native effect sequence. |
scale, time_scale |
Numbers above 0 and at most 100, default 1. |
looped |
Default false. A looping effect needs a stop action for the move’s lifecycle. |
on_background |
Default false. true selects the background effect layer, for effects such as a boss’s levitation aura. |
position |
A point (animation is not supported here). Omit it for the native model-owned placement. |
follow |
Default false; true needs position. |
attach |
Anchors and rotates the effect between two live rig nodes: { of = "self", root_point = ..., attach_point = ..., offset_x, offset_y, start_rotation }. of, root_point and attach_point are required (body points or exact node names on that actor); the three numbers default to 0 and stay within +/-10,000. The offset is in the two-node local frame, positive Y down, and start_rotation adds degrees to the node direction. The effect follows the nodes for its lifetime. Use either attach or position; do not set follow with attach. |
on = { [6] = { effect = { name = "SmallSphereStart", core_sequence = "mgc_magic_small_sphere_start", scale = 0.75, time_scale = 1.45, position = { node = "Magic-Node2_1", y = 80 }, follow = true, } }, finish = { stop_follow_effect = "SmallSphereStart" }, round_end = { stop_effect = "SmallSphereStart" },}A moving boss aura attaches to two nodes instead of a fixed point:
on = { [39] = { effect = { name = "ElectroEffect", core_sequence = "mgc_effect_shocker", scale = 0.75, time_scale = 2, on_background = true, attach = { of = "self", root_point = "MacroBodyGatekeeper-Node975", attach_point = "MacroBodyGatekeeper-Node445", offset_x = -54, offset_y = -12, start_rotation = -78 }, } },}If a live node is missing, the effect is skipped and logged; combat damage and move selection are not affected.
Projectiles
Section titled “Projectiles”projectile = { ... } creates a native child actor with its own move.
| Field | Meaning and default |
|---|---|
name |
Required. The child’s exact model name. It is a symbol, not a path. |
core_skeleton |
Required. An existing rig such as "SkeletonMagic". |
copy_parent_type |
"weapon", "ranged" or "magic": copy the caster’s equipment of that kind into the child’s Weapon slot. |
item |
An item handle (weapon, ranged or magic equipment, including a hidden core projectile item) equipped in the child’s Weapon slot. Give exactly one of copy_parent_type or item. |
start |
The child’s first move: a move handle from this mod or a dependency (register it first), or the exact name of a native animation. Omit it to let the native Birth event choose. A start move does not prove the animation fits the rig. |
lifetime_frames |
Integer 1-600, default 180: simulation frames from creation. Typed children belong to the declaring mod, up to 16 per mod and 64 per fight. |
Where the child is created decides how it is tracked. In an offline fight whose
caster is a living main fighter (or a live actor), the child belongs to your mod:
lifetime_frames and the per-mod and per-fight limits apply, and
live projectiles can see it. Everywhere else, such as the
shop’s Try, the dojo, local versus and title sparring, it is created as a plain
native child, exactly like a native magic or ranged throw: it plays its moves and
effects and removes itself with its own delete_actor actions, but lifetime_frames
does not apply and Lua cannot query it.
-- Caster move: spawn the sphere on frame 6 and pay one charge on frame 21.on = { [6] = { projectile = { name = "Sphere1", core_skeleton = "SkeletonMagic", copy_parent_type = "magic", } }, [21] = { add_bullets = "magic", amount = -1 },}A boss ability can equip its own hidden core item instead of borrowing the caster’s equipment. Register a compatible child move first:
local quake_item = sf2.items.get("core:items/magic/MAGIC_BUTCHER_EARTHQUAKE")on = { [66] = { projectile = { name = "Earthquake", core_skeleton = "SkeletonMagic", item = quake_item, start = quake_child, } },}Core skeletons and native starting animations resolve at runtime; the registration checks the shape and your own move references. Live projectiles explains Lua control and retirement, and the projectile ability guide walks through a complete cast, launch and flight. Typed actions do not return a live child handle, supply arbitrary physics or prove rig compatibility.
Move list entry and AI gates
Section titled “Move list entry and AI gates”-- Fields inside sf2.moves.register:profile = { rank = 4, core_icon = "Trick7.super_slash" },tactic_distance = { axis = "x", min = 200, max = 800, from = { pivot = "self" }, to = { node = "pelvis", of = "enemy" } },| Field | Meaning |
|---|---|
profile |
An entry shown in the native moves list. rank is a required integer 0-100000; core_icon is a required existing native icon name such as Trick7.super_slash. Optional keys_description names a native localization key that replaces the drawn key sequence with text, such as Throw_Keys or Wall_Keys. Optional display_name is a localization handle that sets the heading. Omit the table for no entry. |
tactic_distance |
A distance requirement the native AI checks before it considers the move: axis ("x", "y" or "full", default "full"), min and max (default -1,000,000 and 1,000,000, finite, min not above max), and required from and to points. It does not itself configure an AI tactic table. |
tactic_when |
A condition map the AI evaluates when considering the move, for rules that combine distance with other state, such as allowing a cast when the opponent is falling. Does not change player input eligibility. At most 32 conditions. Use either tactic_distance or tactic_when, not both. |
For namespaced mod moves, the native moves list uses the move’s runtime name as
its translation key, so provide a display_name:
local title = sf2.text.register { id = "move.super_slash", language = "eng", value = "Super Slash",}-- Inside sf2.moves.register:-- profile = { rank = 4, core_icon = "Trick7.super_slash", display_name = title }The handle must reference a localization in your mod or a declared dependency.
Motion
Section titled “Motion”velocity gives a move native motion, for example a projectile flight:
-- Fields inside sf2.moves.register:when = { actor = "Sphere1" },velocity = { x = 30 },no_magic_recharge = true,x, y, z are velocity and ax, ay, az acceleration, in native
simulation units; each defaults to 0 and must be a finite number within
+/-100,000. save_velocity (default false) preserves the existing velocity
when the move starts. Motion does not supply a rig, collider, attack or
projectile lifecycle.
Transitions
Section titled “Transitions”transitions (move only; a kind = "template" move rejects it) is a list of up to 32
rows. The first row whose when holds is used. Each row has:
| Field | Meaning |
|---|---|
when |
Required condition map (1-64 conditions). |
sample_shift |
Integer -100000 to 100000: the native relative-sample transition. |
first_sample |
Integer 0-100000: an absolute sample to start on. |
late_frames |
Optional integer 0-15, default 0: how many game frames late a key press may be and still start the move through this row. See late key presses. |
Give exactly one of sample_shift and first_sample. Unlike windows,
transitions are counted in samples, not game frames. Check the values against
the animation. late_frames is the exception: it counts game frames.
-- Fields inside sf2.moves.register { ... }:transitions = {{ sample_shift = 2, when = { animation = "SaiHeavySpit", window = "semi_uninterruptible",} }},only_for = { rig = "Skeleton", weapon = "ChineseSwords" },align = "right_heel",face = "enemy",Early key presses
Section titled “Early key presses”When a player presses a key and the move that is playing refuses it, for example
because it is still uninterruptible, the game keeps the press for 6 frames
(0.1 seconds) and tries it again on each of them, as if it had just arrived. On
the first frame a move accepts it, that move starts. A press made a little
before a window opens therefore still lands, without any extra field.
- Keys are read as they are on the retry: a tapped key still counts, and a key the move needs held must still be held.
- A retry only picks a move. The playing move’s
key_pressedactions andkind = "trigger"registrations ran once, when the press arrived, and do not run again. - Only players’ presses are kept, not the AI’s.
- After a dagger hit lands, a kept press waits for the dagger cancel to open without using up its 6 frames, for up to 15 frames after the press.
- A new press replaces a kept one. Kept presses are dropped when the fighter’s input is switched off, for example at the end of a round.
- Retries count simulation frames, so versus matches, rollback and replays all get the same result.
Late key presses
Section titled “Late key presses”A follow-up such as a double tap usually cancels its starter during a short
window, for example the starter’s semi_uninterruptible window. The game checks
a key press against the windows on the frame it arrives (and, if it is refused,
on the next few frames, see early key presses). If the
second tap comes a frame after that window closed, the starter’s next window
(usually uninterruptible) refuses it and the press is lost, so the starter
plays out instead.
late_frames = N gives one transition row a grace period. When a key press does
not meet the move’s when, the game checks it again as if it had arrived 1, 2,
… up to N frames earlier. On each earlier frame it tests this row’s when and
the move’s when against this fighter’s windows as they were then. If both
hold, the move starts through this row. Everything else (the keys, the current
animation, distances, the opponent) is checked as it is now.
- Only key presses get the grace: the
key_pressedevent, whichevents = "controlled"includes. The end of a window or of an animation is checked as usual. Key presses made by the AI’s random tactics get no grace. - The look-back counts from the frame the press arrived. A kept early press tried again later gets no look-back.
- The look-back stays inside the move that is playing now. It never reaches the move before it.
- On the earlier frame, the row that counts is the first row whose
whenheld, as for an on-time press. The press is only accepted if that row’slate_framescovers how late it was. sample_shiftstill counts from the starter’s sample when the new move starts, so a late follow-up picks up from where the starter is now.- Nothing else changes. The starter’s windows stay as written, and moves without
late_framesstill need an on-time press. - The limit is 15 frames, because the game remembers a two-key sequence for only 15 frames after the latest press. A longer grace could not help a double tap.
- The check uses simulation frames, so versus matches, rollback and replays all get the same result.
-- Fields inside sf2.moves.register { ... } for a Forward + Kick, Kick move.-- FrontKick's semi_uninterruptible window is its first 6 frames; after it,-- FrontKick is uninterruptible and not_window refuses the press. With-- late_frames = 6, a second Kick up to 6 frames late still starts this move.when = { keys = { "kick", "kick", { "forward", press = "hold" } }, not_window = "uninterruptible", stage = "fight",},events = "controlled",transitions = {{ sample_shift = -1, late_frames = 6, when = { animation = "FrontKick", window = "semi_uninterruptible",} }},Shop previews
Section titled “Shop previews”The shop draws the player’s fighter beside the item list. It rebuilds that fighter when the shop opens, when an item is equipped or unequipped, and when a Try ends. Try appears for an item you do not own yet and plays it once, with the shop interface faded, and then the shop comes back. What the fighter plays depends on the shop section:
| Section | Fighter on display | Try |
|---|---|---|
| Weapons, Ranged, Magic | The weapon’s normal start stance, then its idle. These are moves that inherit ShopPeacefulStart and ShopPeacefulRestore and are allowed on screen = "shop_weapon", such as the native KatanaStartStance-Left. Ranged and magic items use the same stance. |
The item’s own fight move, chosen exactly as a fight would choose it. No shop-only move is needed. |
| Armor, Helm | Shop moves allowed on screen = "shop_armor" or "shop_helm". |
Shop moves that start on round_stage = "try_on" and end with a try_on_end action. |
How a weapon, ranged or magic Try works:
- Inputs. The preview presses the section’s normal fight input: for a
weapon, forward held with punch tapped twice (the super slash input); the
ranged key for a ranged item; the magic key for magic. The highest-priority
move whose
whenholds starts, as in a fight. For a native weapon that is its super slash, such asKatanaSuperSlash. A weapon with no super slash plays its forward heavy attack, or failing that its standing punch attack. - Fight state. The fighter is in the
fightround stage, sostage = "fight"andcontrollable = truehold. A magic Try gives the fighter one full magic charge, sobullets = { type = "magic", min = 1 }holds. - Opponent. An invisible opponent stands 500 units in front of the fighter.
It gives the move something to face, a target for projectiles, and a place
for casts that appear at the enemy. It never moves, and nothing can hit it: a
preview has no hits, damage, hit reactions or
strikeevents. A move that only continues after it connects (a grab, or a cast that follows up on contact) shows only the part before contact. - End. The Try ends when the fighter is back in a move that inherits
Stance(an idle or transition) and everything it spawned (a thrown weapon, a projectile) is gone. Spawned actors get at most 150 frames (2.5 seconds) after the fighter is back in a stance. A Try always ends within 8 seconds. If the input starts no move at all, the Try ends at once. - Not used. Weapon, ranged and magic previews never select moves that
inherit
ShopTryOn,MagicShoporMagicShopTryOn. No shop section usesscreen = "shop_missile"or"shop_magic"any more. Moves that need them can stay in your mod, but these sections never play them. - No lasting effect. The preview fighter is a temporary copy of the player. Its charge, cooldowns and statistics never reach the save, quests, achievements or the player’s charge in a fight.
The versus Armory uses the same Try when it shows a ranged or magic slot.
To make Try show your weapon, give it a super slash (forward + punch,
punch), or at least a fight move for forward + punch or punch alone. A ranged
or magic item needs its fight move for the ranged or magic key. This
fragment goes inside sf2.moves.register { ... }; the animation, attacks and
windows are your own:
-- A super slash for the weapon subtype "MyBlade". In a fight the player holds-- forward and taps punch twice; the shop's Try presses the same keys.inherit = { "3key", "Forward", "Weapon", "Controlled", "SoundStrike" },type = "attack",priority = 130,events = "controlled",face = "enemy",only_for = { rig = "Skeleton", weapon = "MyBlade" },when = { keys = { "punch", "punch", { "forward", press = "hold" } }, controllable = true,},Moveset files
Section titled “Moveset files”A moveset file describes changes to the base game’s moves as data. It can do
everything sf2.moves.patch and
sf2.moves.fork do (speed, damage, attacking
edges, intervals, hit reactions, priority, animation and per-subtype or per-weapon copies),
but needs no script. The in-game Moveset Lab writes these
files, and you can also write or edit them by hand.
Units: files use samples, Lua uses frames
Section titled “Units: files use samples, Lua uses frames”Moveset files keep the units and field names the in-game Moveset Lab writes.
Every start, end, frame and expected / value frame number in a JSON file
counts animation samples (keyframes), and damage terms use the native names
such as UnarmedDamage. sf2.moves.patch
in Lua counts game frames and uses lowercase words. If you move an edit from a
JSON file into Lua, convert it. The sample numbers below are for a move with
first_sample 3 and 3 frames per sample, such as HighKick:
| Moveset file (samples) | sf2.moves.patch in Lua (game frames) |
|---|---|
"intervals": [ { "select": { "name": "Uninterrupt", "start": 0, "end": 15 }, "end": 12 } ] |
windows = { change = { uninterruptible = { expected = { to = 41 }, value = { to = 35 } } } } |
"attacks": [ { "id": 0, "start": { "expected": 6, "value": 5 } } ] |
attacks = { { id = 0, from = { expected = 12, value = 9 } } } |
"damage_terms": { "expected": { "UnarmedDamage": 0 }, "value": { "WeaponDamage": 0, "UnarmedDamage": -10 } } |
damage = { expected = { unarmed = 0 }, value = { weapon = 0, unarmed = -10 } } |
"sound_frame": { "name": "snd_disk", "expected": 18, "value": 17 } |
sound_frame = { name = "snd_disk", expected = 48, value = 45 } |
"input": { "expected": "Super", "value": "RaidCharge" } |
input = { expected = "super", value = "raid_charge" } |
Sample-to-frame conversion depends on the move’s first_sample and frames per
sample; Frames and samples gives the rule,
and hovering a native move in VS Code lists its windows in both units. A conversion
that needs a sample exactly can use from_sample / to_sample in Lua.
Where the file goes
Section titled “Where the file goes”Put one or more .json files in a movesets/ folder next to mod.toml:
yourname.faster-kicks/ mod.toml movesets/ moveset.jsonFiles load in name order, before the mod’s Lua entrypoint (if any), in the same
registration. A mod with only data files can omit entrypoint; see
data-only mods.
Requires: a dependency on core (or the item’s owner) when a fork names an
item. A mod can also add
weapons in weapon files.
A complete example
Section titled “A complete example”{ "schema": 1, "kind": "eclipse.moveset", "name": "Faster kicks", "moves": [ { "move": "HighKick", "note": "Quicker but weaker", "playback_rate": { "expected": 1.0, "value": 1.25 }, "intervals": [ { "select": { "name": "Uninterrupt", "start": 0, "end": 15 }, "end": 12 } ], "attacks": [ { "id": 0, "damage": { "expected": 0.12, "value": 0.1 }, "edges": { "expected": ["EThigh_2", "ECalf_2", "EInstep_2", "EToe_2", "EFoot_2"], "value": ["EInstep_2", "EFoot_2"] } } ] } ], "forks": [ { "id": "KatanaHeavySlash_Ninja", "move": "KatanaHeavySlash", "subtype": "NinjaSword", "playback_rate": { "expected": 1.0, "value": 1.2 } } ]}Top-level fields
Section titled “Top-level fields”| Field | Required | Meaning |
|---|---|---|
schema |
yes | Format version. Must be 1. |
kind |
yes | Must be "eclipse.moveset". |
name |
no | A label for people reading the file. |
moves |
no | Array of move edits, up to 2048. |
forks |
no | Array of forks, up to 512. |
The file must be UTF-8, at most 2 MiB, and strict JSON: no comments, no trailing commas,
no duplicate field names. Unknown fields are errors, so a typo is reported instead of
silently ignored. An error stops the whole mod from loading and is listed in the mod
menu’s Details with the file and field, such as
movesets/moveset.json.moves[0].attacks[0].damage.expected must be a number.
Move edits
Section titled “Move edits”Each entry changes one native move. move is required; every other field is optional, but
an entry must change something. Most fields are guarded: they give the value the move
has now in expected and the new value in value. If the base game’s value differs (for
example after a game update, or a typo), the mod fails to load instead of applying a wrong
edit.
| Field | Meaning |
|---|---|
move |
Exact, case-sensitive native move name, such as "HighKick". |
note |
Free text for people, up to 2000 characters. Kept when the Moveset Lab saves. |
disable |
true keeps the move loaded but makes it unselectable. Must be the only change in its entry. |
priority |
{ "expected", "value" }, integers 0–100000. Higher-priority moves win when several match the same input. |
playback_rate |
{ "expected", "value" }, numbers 0.5–2.0. 1.25 is 25% faster. expected is 1.0 for a native move. At most MidFrames + 1; not for looped or physics moves. See playback rate. |
animation |
{ "expected", "value" }. expected is the current .bytes file. value is another native clip’s filename, or { "asset": "animations/my_clip" } for a clip in your mod’s assets/ folder. |
input |
{ "expected", "value" }, the move’s key input: expected is the base game’s input, value the new one. |
sound_frame |
{ "name", "expected", "value" }: move one directly scheduled sound to another frame. |
intervals |
Array of interval edits, up to 64. |
attacks |
Array of attack edits, up to 32. |
new_attacks |
Array of new attacks added to the move, up to 32. |
clip_range |
{ "expected", "value" }, each [first, last]: the keyframes of the clip the move plays. See trimming. |
chains |
Array of combo links: moves this move may start out of, up to 16. |
Only one mod can patch a given move. A second mod (or Lua patch) on the same move fails to load; the VS Code extension warns about this.
A move’s input is the keys that start it. It is a list of alternatives; pressing any one
of them starts the move (for example a dash that starts on Up-Back, or on Back tapped
twice). Each alternative is a chord: the keys pressed together, 1–14 of them. A key is
written as its name, which means it is tapped, or as { "key": ..., "press": ... } with
press one of "Tap", "Hold" (keep it held) or "Release" (let it go):
"input": { "expected": [ [ "Punch", { "key": "Forward", "press": "Hold" } ] ], "value": [ [ "Kick", { "key": "Back", "press": "Hold" } ] ]}- Key names:
Punch,Kick,Ranged,Magic,RaidCharge,Super, and the directionsForward,Back,Up,Down,Up-Forward,Up-Back,Down-Forward,Down-Back. Directions are for a fighter facing right; the game mirrors them when it faces left. - The same key tapped twice in one chord (
[ "Punch", "Punch" ]) is a two-tap sequence. - Up to 8 alternatives.
[]is no input: a move without one is started by the game itself (hit reactions, combo steps, AI actions). Giving such a move an input, or removing a move’s input, changes when it can happen; test it in a fight. - A single tapped key can still be written as a plain string, as in older files:
"input": { "expected": "Kick", "value": "Punch" }. - The edit replaces the move’s whole input. It works on moves whose keys form one chord, or one set of alternatives. Moves whose keys are mixed into other conditions report that their input is not editable; edit those in Lua.
- What a move must follow (a combo step, being in the air) is not part of its input and stays as it is.
Intervals
Section titled “Intervals”An interval is a frame window with a meaning: Uninterrupt (the move cannot be cancelled),
Block, Invulnerable, Throwable and so on. Each entry is one of three shapes:
{ "select": { "name": "Uninterrupt", "start": 0, "end": 15 }, "start": 2, "end": 12 }{ "select": { "type": "Block", "start": 16 }, "remove": true }{ "add": { "type": "Invulnerable", "name": "Dodge", "start": 0, "end": 3 } }select names one existing interval exactly by type, name, start (default 0) and
end. Leave out end to select an open-ended interval, one that lasts until the move
ends. The selector must match exactly one non-attack interval. add takes a type
(Block, Invulnerable, Invisible, Throwable or omitted), a name (required when
there is no type, and new to the move), start, and an optional end. The details match
window edits in Lua.
Attacks
Section titled “Attacks”Each attack interval has an id (usually 0 for a move’s first attack). An attack edit lists
the fields to change, each guarded:
| Field | expected / value |
|---|---|
start, end |
Attack frames, integers. |
damage |
Base damage 0–16. |
damage_terms |
Object of term type to shift, such as { "UnarmedDamage": 0 }. The new terms are 1–4 of UnarmedDamage, WeaponDamage, RangedDamage, MagicDamage, and may not add or remove RangedDamage, MagicDamage or RaidChargeDamage. |
edges |
Array of attacking edge names: the parts of the body or weapon that hit. 1–64 distinct names. |
impulse |
[x, y, z] push applied on hit. |
hit |
Hit reaction name, such as "High" or "MiddleShortPlus". |
See attack edits for the Lua form of the same edits.
New attacks
Section titled “New attacks”new_attacks adds attacks to a move: another hit in a combo move, or a hit for a move that
had none. Each one is a full attack, so every field is required:
| Field | Meaning |
|---|---|
id |
Attack id, 0–100000. It must not repeat one of the move’s own attack ids (the Moveset Lab picks the next free one). |
start, end |
The keyframes during which the attack can hit, start ≤ end. |
damage |
Base damage, 0–16. Base-game hits mostly sit between 0.06 and 0.45. |
damage_terms |
1–4 damage types with their shifts, such as { "WeaponDamage": 0 }: WeaponDamage, UnarmedDamage, RangedDamage or MagicDamage (the last two make the attack unblockable). Each shift is −1000 to 1000. |
edges |
1–64 distinct attacking edges: the body or weapon parts that hit, such as "EHand_2" or "WEAPON_KATANA-Blade". |
impulse |
[x, y, z] push given on hit. |
hit |
The hit reaction, such as "Middle" or "HighShort". |
{ "move": "KatanaDoubleSlash", "new_attacks": [ { "id": 90, "start": 26, "end": 28, "damage": 0.08, "damage_terms": { "WeaponDamage": 0, "UnarmedDamage": -10 }, "edges": [ "WEAPON_KATANA-Blade", "WEAPON_KATANA-Edge24" ], "impulse": [ 245, 0, 0 ], "hit": "HighShort" } ] }A new attack has no expected values: it is not in the base game, so the mod owns it. It
counts as an edit of the move, so only one mod can patch that move. To change a base-game
attack instead, use attacks.
Trimming
Section titled “Trimming”clip_range sets which keyframes of its clip a move plays, [first, last]. Start later to
skip a wind-up; end earlier to cut a long recovery.
| Part | Meaning |
|---|---|
expected |
The move’s base-game [FirstFrame, last keyframe]. A move without an authored EndFrame plays to its clip’s last keyframe. The Moveset Lab fills this in. |
value |
The new range. last must be after first and inside the clip the move plays, including a clip swapped in with animation. |
{ "move": "KatanaHeavySlash", "clip_range": { "expected": [2, 48], "value": [6, 40] } }Attacks, windows and sounds keep their keyframe numbers, so an attack that starts before
the new first or after the new last never happens. Looped and physics moves cannot be
trimmed.
Combo links
Section titled “Combo links”chains lets this move start out of another move during a window of that move’s
keyframes, even inside the part of it that normally cannot be interrupted. This move’s own
input still starts it, and its other conditions (weapon locks, the round, distance for the
AI) still apply. Each link is required to have:
| Field | Meaning |
|---|---|
from |
The move to follow: a native move name, or a fork’s runtime name <mod id>.<id>. Each move may be followed once per entry. |
start, end |
The window, in keyframes of the followed move, 0 ≤ start ≤ end. |
{ "move": "KatanaDoubleSlash", "chains": [ { "from": "KatanaHeavySlash", "start": 20, "end": 34 } ] }Here Double Slash may start once Heavy Slash reaches keyframe 20, until keyframe 34. The
link adds a window named EclipseChain>KatanaDoubleSlash to the followed move; its other
moves and the AI are unchanged. Combo links count as an edit of this move, not of the
followed one.
A fork copies a move for one weapon subtype or one weapon, leaving the original for everyone else. It takes the fields of a move edit (applied to the copy; all optional for a fork) plus:
| Field | Required | Meaning |
|---|---|---|
id |
yes | Local name of the copy; the runtime name is <mod id>.<id>. |
move |
yes | The move to copy: a native move, or an earlier fork’s runtime name. |
subtype |
one of these | Weapon subtype that gets the copy. Removed from the original’s lock group. |
like |
no | Needs subtype. For a brand-new subtype: the move must be locked to this existing subtype (e.g. "Scythe"); the copy is locked to subtype instead and the original keeps all its locks. Must differ from subtype; cannot be used with item. |
item |
one of these | Qualified item ID, such as "core:items/weapon/weapon_golden_katana", that gets the copy. The original stops matching that item. |
add |
no, default false |
true makes a new move instead of a replacement. |
{ "id": "HighKick_Golden", "move": "HighKick", "item": "core:items/weapon/weapon_golden_katana", "attacks": [ { "id": 0, "damage": { "expected": 0.12, "value": 0.18 } } ] }New subtype with like
Section titled “New subtype with like”A new weapon subtype (say "Scythe2") needs its own copy of each move it should use,
because no move is locked to it yet. Add one fork per move with like naming the class to
copy from; the original moves are untouched:
{ "id": "scythe2_slash", "move": "ScytheSlash", "subtype": "Scythe2", "like": "Scythe" }To share the original moves instead of copying them, use
the item_locks.add field of sf2.moves.patch in Lua.
like also works with "add": true (a new move for the new subtype, answering only to its
own name). An add fork with a subtype whose source is already locked to other weapon
subtypes is an error: it would make a move nobody can use, so add like.
Guards in a fork compare against the copied source move. Read
sf2.moves.fork for how copies keep combos and
which conflicts are rejected.
New moves
Section titled “New moves”With "add": true the copy is a new move beside the original rather than a replacement
for some fighters. The original keeps all its fighters and is not changed. The new move:
- starts as an exact copy of
move: its animation, attacks, frame windows, sounds and the conditions it must follow; - goes to the fighters named by
subtypeoritem(at most one of them), or, with neither, to the same fighters as the original; - shares the original’s templates, so moves that follow a template (for example a
"Central"step) can follow it too, but it does not answer to the original’s own name: combos written for that exact move do not continue from the new one; - should get its own
input; with the original’s input both moves compete and the higherprioritywins.
{ "id": "rising_slash", "move": "KatanaUpperSlash", "subtype": "Katana", "add": true, "input": { "expected": [ [ "Punch", { "key": "Up", "press": "Hold" } ] ], "value": [ [ "Kick", { "key": "Up", "press": "Hold" } ] ] }, "priority": { "expected": 120, "value": 122 } }New moves are copies of existing moves: they reuse a game clip, or a clip swapped in with
animation. For a move built from your own data, use
sf2.moves.register.
Weapon files
Section titled “Weapon files”A data-only mod can also add weapons and change existing ones, with a weapons/ folder of
.json files next to movesets/. The in-game Weapon Workshop writes
weapons/weapons.json. The format (new weapons with names, damage, perks and
enchantments, and patches of base-game weapons) is described in
Weapon files.
A weapon’s hitting parts are the edges named in its model, such as WEAPON_KATANA-Blade.
Native moves find them by name: a model of your own needs edges with the same names as
the subtype’s models, or its attacks must name its own edges (see
attacks).
Finding the current values
Section titled “Finding the current values”Every expected value must match the base game exactly. To read a move’s current
priority, intervals, attack IDs, damage and edges:
- open the move in the Moveset Lab;
- hover the move name inside a Lua
sf2.moves.patchin VS Code; or - run
python Tools/Audits/QueryMoves.py show HighKickfrom an Eclipse source checkout.
Writing by hand
Section titled “Writing by hand”The Moveset Lab rewrites files in a canonical layout: two-space indentation, a fixed field
order, numbers such as 1.0 for decimal fields, and one line per array of edge names.
Saving a file you wrote by hand may reorder fields; keep notes in note, not in
comments. Live testing works too: in the game, Reload mods (F9)
re-reads edited moveset files. Patches apply at once; forks apply to fighters built
after the reload, such as the next fight.
Limits
Section titled “Limits”Moveset files edit and copy existing moves, and add new moves copied from them; they do
not define moves from scratch or new blending transitions (use
sf2.moves.register for that). Edits
are checked against the base game when the mod loads. They are not checked against
gameplay, so test changed hitboxes, timings and speeds in a fight. Online versus refuses
to start while moveset content is active.