Edit and create moves
A move is one thing a fighter can do: a punch, a spell, a dodge, a reaction to being hit. Every move is an animation plus rules about when it starts, when it can be interrupted and which parts of the body can hurt the opponent. This guide shows three ways to change moves, from easiest to most powerful.
| I want to… | Use |
|---|---|
| Tune speed, damage, hit timing or hitboxes without writing code | The Moveset Lab |
| Hand-edit or share the same kind of tuning as a data file | A moveset file (movesets/*.json) |
| Give one weapon its own version of a move, add a brand-new move, or start a move from a script | Lua: sf2.moves.patch, sf2.moves.fork, sf2.moves.register |
All three work on the same moves, so you can start in the Lab and move to Lua later. New to mods? Read How mods work first.
Words used on this page
Section titled “Words used on this page”- A frame is 1/60 of a second of game time. Lua and the Lab count windows and attacks in frames.
- A move’s animation is stored as samples (keyframes). Moveset files count samples, the Lab calls them keyframes, and Lua counts game frames. The Lua section shows the conversion.
- A window is a stretch of a move with a special property, such as “cannot be interrupted” (
uninterruptible), “blocks” or “invulnerable”. - An attack is a stretch of a move that can hurt the opponent. It names the body or weapon parts that deal the hit (its edges) and a damage value.
- A fork is a copy of a move that only one weapon type, or one weapon, uses. The original stays for everybody else.
- A template is a reusable bundle of move settings that other moves inherit.
Tune moves in the Moveset Lab
Section titled “Tune moves in the Moveset Lab”The Moveset Lab is an in-game editor. Pick a weapon type, watch a move on a live fighter with its hitting parts drawn in red, change a number, and save the result as an ordinary mod. You do not need Lua.
Open it from Multiplayer on the title screen (choose MOVESET LAB, or press M), or from Mods on the title screen.
Find your way around
Section titled “Find your way around”- The top bar holds the mod you are editing, the FIGHTERS scope (shared moves, unarmed, or a weapon type such as Katana), an optional single WEAPON, and UNDO, REDO, APPLY, TEST, EXPORT and CLOSE.
- The left list shows the moves in that scope. A gold dot marks moves you changed. Use Search or EDITED to filter.
- The stage shows the attacker and a training dummy that plays the hit reaction. The transport bar plays, steps and slows the move; GHOST draws the base-game version faintly behind your edit.
- The timeline has one lane per attack and window: red bars are attacks, blue-grey bars are windows. Drag a bar to move it or an end to resize it.
- The inspector on the right has four tabs: MOVE, ATTACK, WINDOWS and HITBOX.
Number fields have - and + buttons. Hold Shift to step by ten. A changed value shows a gold dot, the base-game value and RESET.
What you can change
Section titled “What you can change”| Tab | You can change |
|---|---|
| Move | The input that starts the move, speed (0.5x up to 2x), priority (higher wins when two moves match the same input), the clip (swap the animation), trim (skip a wind-up or cut a recovery) and combos (let this move start out of another). |
| Attack | When the attack can hit, its base damage, damage shifts per damage type, hit reaction, and push on the victim. + NEW ATTACK adds a second hit to a move. |
| Windows | When a window starts and ends, or add a Block, Invulnerable, Invisible or Throwable window at the playhead. |
| Hitbox | Which body or weapon parts deal the hit. Click a part on the fighter to add or remove it. MIRROR SIDES moves the hitbox to the other arm or leg. |
Who gets a change
Section titled “Who gets a change”Many moves are shared. All kicks belong to every fighter, and a katana move may belong to several sword types. The first time you edit a shared move, the Lab asks who should get the change:
- Whole family or Every fighter changes the move for everyone who has it.
- Only Katana (copy) makes a fork for that weapon type. The original stays for the rest of the family.
- Only Golden Katana (copy) makes a fork for one weapon, including weapons added by other mods.
Forks appear in the list under their own name and can be removed with Delete this copy on the MOVE tab.
Common jobs
Section titled “Common jobs”Make a new move. Press + NEW MOVE, give it a name, choose the move it starts as a copy of and who can use it, then press CREATE. Give it its own input under INPUT; with the original’s input both moves compete and priority decides. New moves reuse an existing animation unless you swap the clip.
Change an input. An input is one or more chords (keys pressed together). Each key is a tap, a hold or a release. + KEY adds a key to the chord and + ALTERNATIVE adds another chord that also starts the move. Directions are written for a fighter facing right; the game mirrors them.
Link a combo. Select the move that should come second, press + CAN FOLLOW… under COMBOS, choose the move it follows and set the keyframes of that move during which the second move may start. Then APPLY and TEST.
Swap or import an animation. CHANGE CLIP… lists the game’s clips; IMPORT CLIP… adds a native .bytes clip file to your mod. The Lab warns you when an attack would end after the new clip’s last keyframe. A clip made for another body can look wrong, so watch the red hitting parts in the preview.
Apply, test and share
Section titled “Apply, test and share”Changes stay in the Lab until you press APPLY, which saves the mod folder and applies your edits to the running game. TEST applies and starts a training fight with the Lab’s fighter. EXPORT applies, then writes <mod id>-<version>.zip to an Eclipse mods folder on your desktop, ready to install on another game (see Sharing mods).
The Lab saves into one mod at a time. NEW asks for a name and makes the ID from it (“Heavy Katana” becomes local.heavy-katana). Use a distinctive name before sharing, so your ID does not clash with another player’s mod. Raise version in mod.toml yourself before you upload an update.
WEAPONS in the top bar opens the Weapon Workshop on the same mod; see Weapons. Release builds do not show it yet: the Workshop is only in the Unity project and development builds.
Limits of the Lab
Section titled “Limits of the Lab”- It edits data-only mods. A mod with a Lua
entrypointis not listed; usesf2.moves.patchthere. - Only one mod can patch a given move. If another enabled mod already patches it, APPLY reports the conflict.
- Every edit records the base-game value it expects. If a game update changes that value, the mod refuses to load instead of applying a wrong edit.
- Online versus is unavailable while any moveset mod is enabled.
- Test changed hitboxes and timings in a fight before you share them. The Lab checks data, not gameplay.
Moveset files
Section titled “Moveset files”The Lab writes a moveset file, and you can write or edit one by hand. Put one or more .json files in a movesets/ folder next to mod.toml:
yourname.faster-kicks/ mod.toml movesets/ moveset.jsonA mod with only data files can leave out entrypoint. Files load in name order. Add schema and kind exactly as shown. An unknown field or a typo stops the mod from loading and the mod menu’s Details names the file and the field.
{ "schema": 1, "kind": "eclipse.moveset", "name": "Faster kicks", "moves": [ { "move": "HighKick", "note": "Quicker but weaker", "playback_rate": { "expected": 1.0, "value": 1.25 }, "attacks": [ { "id": 0, "damage": { "expected": 0.12, "value": 0.1 } } ] } ], "forks": [ { "id": "KatanaHeavySlash_Ninja", "move": "KatanaHeavySlash", "subtype": "NinjaSword", "playback_rate": { "expected": 1.0, "value": 1.2 } } ]}Every changed value is written as { "expected": <what the game has now>, "value": <what you want> }. If the base game’s value differs from expected, the mod fails to load rather than applying a wrong edit. This guard is what keeps old mods from silently breaking after a game update.
| Field | Required? | Meaning |
|---|---|---|
schema |
Yes | Must be 1. |
kind |
Yes | Must be "eclipse.moveset". |
moves |
No | Edits to existing moves. Each has a required move (exact, case-sensitive native name). |
forks |
No | Copies of a move for one weapon type (subtype) or one weapon (item). Each has a required id and move. |
A move edit can contain playback_rate, priority, animation, input, sound_frame, intervals (window edits), attacks (attack edits), new_attacks, clip_range (trim), chains (combo links) or disable. A fork takes the same fields, plus add: true to make a new move beside the original instead of replacing it. To find the current values to copy into expected, open the move in the Lab.
Moveset files count animation samples, not frames, and use the native names the Lab writes (UnarmedDamage, Uninterrupt). If you move an edit from JSON into Lua, convert it:
| Moveset file (samples) | sf2.moves.patch in Lua (frames) |
|---|---|
"attacks": [{ "id": 0, "start": { "expected": 6, "value": 5 } }] |
attacks = { { id = 0, from = { expected = 12, value = 9 } } } |
"damage_terms": { "expected": { "UnarmedDamage": 0 }, ... } |
damage = { expected = { unarmed = 0 }, value = { ... } } |
"input": { "expected": "Super", "value": "RaidCharge" } |
input = { expected = "super", value = "raid_charge" } |
The examples assume a move that starts at sample 3 with 3 frames per sample, such as HighKick. Hovering a native move name in VS Code lists its windows in both units.
Moves in Lua
Section titled “Moves in Lua”Use Lua when you need something the Lab cannot do: a move for a new weapon type, a move started by your own rules, or edits that depend on a setting. The three functions are sf2.moves.patch (change a move), sf2.moves.fork (copy it for one weapon) and sf2.moves.register (define a new move or template).
Patch a native move
Section titled “Patch a native move”This script shortens a recovery and makes a kick quicker. expected is the value the game has now; value is your change.
local sf2 = require("sf2")
-- Cut FrontKick's uninterruptible window short: it ends at frame 44 instead of 50.sf2.moves.patch { move = "FrontKick", windows = { change = { uninterruptible = { expected = { from = 12, to = 50 }, value = { to = 44 } } } },}
-- Make the high kick 25% faster and a little weaker.sf2.moves.patch { move = "HighKick", playback_rate = { expected = 1.0, value = 1.25 }, attacks = { { id = 0, damage = { expected = 0.12, value = 0.1 } } },}move is the exact native name, not a handle. See sf2.moves.patch for every field, including input, priority, animation, item_locks and perk_locks.
Switch on a restricted move
Section titled “Switch on a restricted move”The game’s moves file also holds moves that belong to a larger content mod, such as the Definitive Edition’s Axe Kick, Leg Push throw and magic spheres. They are marked restricted: without a mod that asks for them, nobody can perform them and they are not listed among the player’s moves. A mod switches one on with enable = true:
for _, move in ipairs({ "AxeKickOld", "ThrowLegPush", "ThrowLegPushV", "StandupAfterLegFall" }) do sf2.moves.patch { move = move, enable = true }endEnable every move of a family, not just the one the player starts: the throw above also needs its victim and stand-up moves. sf2.moves.patch lists the restricted moves. Once enabled, a move behaves like any other native move, and the same patch can also change it. One exception concerns computer opponents: a restricted wall move (such as Wall Run) is used by the computer only when the game’s own wall jumps would be, with you attacking close to the wall behind it. Players can still use it anywhere its input works. Some restricted moves borrow another move’s picture in the profile’s move list; give one its own with the patch’s profile_icon and a sprite from your mod.
Give one weapon its own version
Section titled “Give one weapon its own version”sf2.moves.fork copies a move for one weapon type or one weapon, so you can patch the copy without touching anyone else’s move. It returns the copy’s name, which you pass to sf2.moves.patch.
local sf2 = require("sf2")
-- Ninja swords get a faster heavy slash. Katana and ShogunKatana keep the original.local ninja_slash = sf2.moves.fork { id = "KatanaHeavySlash_Ninja", source = "KatanaHeavySlash", subtype = "NinjaSword",}sf2.moves.patch { move = ninja_slash, playback_rate = { expected = 1.0, value = 1.2 } }
-- Only the Golden Katana hits harder with its kick.local golden_kick = sf2.moves.fork { id = "HighKick_Golden", source = "HighKick", item = "core:items/weapon/weapon_golden_katana",}sf2.moves.patch { move = golden_kick, attacks = { { id = 0, damage = { expected = 0.12, value = 0.18 } } },}If you invent a brand-new weapon type, no move is locked to it yet. Add like = "Scythe" to copy a move “the way Scythe has it, but for my type”; each move your type should use needs its own fork. See sf2.moves.fork.
Let your item use another item’s move
Section titled “Let your item use another item’s move”A few moves are locked to one exact item rather than a weapon type. Titan’s Mind Throw
cast (MindThrowPlayer), for example, needs Titan’s own sword. If your mod adds its own
copy of that sword, the move does not know it. item_locks.add with source_item and
item lets your item unlock the move alongside the original, without copying the move:
sf2.moves.patch { move = "MindThrowPlayer", item_locks = { add = { { source_item = "core:items/weapon/WEAPON_TITAN_GIANT_SWORD", item = my_titan_sword, -- a handle from sf2.items.register, or an item ID } } },}The fighter still needs everything else the move asks for (here, the Mind Throw magic). Lock changes apply when the game loads, so use Apply & Restart.
Register a new move
Section titled “Register a new move”sf2.moves.register builds a move from data. It needs an animation file in your mod (assets/animations/uppercut.bytes), which must be a native animation clip for the fighter’s skeleton. Renaming another file does not convert it, and creating animations is outside this guide.
local sf2 = require("sf2")
local uppercut = sf2.moves.register { id = "uppercut", animation = sf2.assets.binary("animations/uppercut"), inherit = { "Controlled" }, -- native template: lets the game start it from input events = "controlled", face = "enemy", first_sample = 1, priority = 110, only_for = { rig = "Skeleton", weapon = "Fists" }, -- who gets the move when = { -- when it can start keys = { "punch", { "up", press = "hold" } }, stage = "fight", controllable = true, }, windows = { uninterruptible = { to = 9 }, block = { from = 10 }, throwable = { from = 10 }, }, attacks = { { id = 21, from = 4, to = 5, edges = { "EForearm_2", "EHand_2", "EFingers_2" }, damage = { amount = 0.11, unarmed = -10 }, hit = "High", impulse = { x = 245 }, } }, on = { [3] = { sound = "snd_swish7" }, strike = { sound = "snd_hit1" }, },}The pieces:
only_fordecides which fighters get the move at all (skeleton, weapon, armour).whendecides when it may start: keys, current animation, distance, round stage and more.windowsandattacksuse game frames.fromandtoare inclusive; leave one out for the start or end of the move.damageis a number, or{ amount, weapon, ranged, magic, unarmed }where the extra numbers shift which of the fighter’s attributes the damage scales with.onruns actions at a frame or event: sounds, effects, projectiles, camera shake.- Register a
kind = "template"first when several moves share settings, then list it ininherit. Akind = "trigger"plays a sound or hit effect when an event happens, without defining a move.
only_for and when control selection, so an unrestricted move can reach more fighters than you meant. Restrict it, then test with every weapon you intended.
The complete field list (conditions, positioning, window kinds, hit reactions, transitions) is in sf2.moves.register.
Start a move from a script
Section titled “Start a move from a script”A move with no events is never picked by input. Start it yourself from a combat callback with fighter:play_move. This is how an ability button or a timed attack works. The method returns a receipt whose status becomes "applied" when the animation has started. It does not mean the move finished or hit.
local sf2 = require("sf2")
local strike = sf2.moves.register { id = "ability_strike", animation = sf2.assets.binary("animations/ability_strike"), first_sample = 1, only_for = { rig = "Skeleton" }, attacks = { { from = 4, to = 6, id = 30, edges = { "EForearm_2", "EHand_2" }, damage = { amount = 0.15, unarmed = -10 }, hit = "High", impulse = { x = 245 }, } },}
-- A behavior (see the combat scripting guide) that fires the move every 4 seconds.local ability = { state = { lifetime = "round", fields = { cooldown = 0 } }, on_tick = function(self, fighter, event) self.state.cooldown = math.max(0, self.state.cooldown - event.delta_frames) if self.state.cooldown > 0 then return end local view = fighter:snapshot() if not view or not view.round_active then return end local receipt = fighter:play_move(strike) if receipt.status ~= "failed" then self.state.cooldown = 240 end end,}play_move skips normal move selection, so your Lua decides the cost, cooldown and whether it may interrupt something else. Only one request per fighter is accepted per step; competitors get a failed receipt. Attach the behavior to a perk, a weapon or a fight rule; Combat scripting explains how.
Limits
Section titled “Limits”- Patches and forks apply when the game loads mods; changing them needs Apply & Restart.
- Lua moves reuse the fighter’s skeleton. A valid table does not guarantee that an animation suits a rig; test in a fight.
- Moveset files and the Lab edit and copy existing moves. They do not define a move from scratch (use
sf2.moves.registerfor that). - Online versus refuses to start while moveset content is active.
Next steps
Section titled “Next steps”- Opponent AI teaches opponents to choose your new moves.
- Combat scripting shows behaviors, callbacks and
fighter:play_move. - Weapons covers weapons that use your moves.