Skip to content

Weapons

A weapon has a name, a picture for the shop, a 3D model, a subtype (the family of moves it fights with), a shop listing, starting damage and, if you like, perks and enchantments. There are three ways to describe one. They produce the same result, so pick the one that suits you.

Way Choose it when You need
Weapon Workshop (in game) You want to see the weapon on a live fighter and a shop card while you work. You prefer clicking to typing. The Unity project or a development build on desktop, with mouse and keyboard. Release builds do not include it yet.
Weapon file (weapons/*.json) You want a data-only mod, or to write many weapons quickly. No script is needed. A text editor.
Lua (sf2.items) The weapon needs a script, such as a special ability, or you are making armor, helms, ranged or magic. A script and the core dependency if you borrow core assets.

Whatever you pick, a weapon needs a shop listing or a reward before a player can get it. A weapon with neither exists in the game but nobody can obtain it.

The Weapon Workshop edits weapons for a mod and saves them as an ordinary data-only mod (a weapon file plus any models and pictures you add). You can still edit the saved files by hand later.

For now the Workshop is only in the Unity project and in development builds; release builds of the game do not show it. In a release build, use a weapon file or Lua instead.

Open it from Multiplayer > WEAPON WORKSHOP (or press W) on the title screen, from Mods > Weapon Workshop, or with WEAPONS in the Moveset Lab. It is a desktop tool: phones and tablets do not offer it.

The screen. The top bar shows the mod you are editing (MOD, NEW), MOVES to open the Moveset Lab on the selected weapon, and UNDO, REDO, SAVE, TEST, EXPORT and CLOSE. On the left, MY WEAPONS lists what your mod adds and GAME WEAPONS lists the game’s own (a gold dot marks one your mod changes). In the centre a fighter holds the selected weapon: TRY A MOVE (or Space) plays the next attack, and HITTING PARTS shows the parts an attack hits with. Beneath it a shop card shows your latest edits. The right side holds the fields.

Make a weapon.

  1. Choose MY WEAPONS and press + NEW.
  2. Pick the weapon’s class, such as katana or nunchaku. The class decides which moves it fights with.
  3. Edit the fields, then press SAVE (F5). To start from one particular game weapon, pick it under GAME WEAPONS and press NEW FROM THIS.

The fields.

Field What it does
Name The English name players see (up to 64 characters).
Moves The class whose moves the weapon uses.
Model GAME MODEL… borrows a game weapon’s look. IMPORT… uses your own .obj, .stl, .gltf or .glb file, or Eclipse geometry. BOTH HANDS doubles a model for dual weapons.
Shop icon GAME ICON…, or IMPORT PNG… for your own picture.
Shop level 1 to 52: the player level at which the shop offers it.
Paid in, Price Coins or gems, and the amount.
Weapon damage The damage a newly bought copy starts with. Left on automatic, it follows the shop level. RESET returns to automatic.
Perks Always-on abilities while equipped. + PERK… lists the game’s perks.
Enchantments What a newly bought copy comes with. + ENCHANTMENT… lists the weapon enchantments.
Names in other languages One name per language; empty means the English name.

A new class. To make a weapon that fights its own way, press + NEW and choose NEW CLASS… at the top of the list. Give it a name (letters, digits and _, starting with a letter), pick a class to start from, and choose whether to COPY ALL moves of that class or start with NONE YET. Each copied move belongs to the new class alone, so you can edit it in the Moveset Lab without touching the original. See Moves.

Import a 3D model. The importer shows your weapon flat, the way the game draws every weapon, with the weapon it replaces in grey for size. Set which axis runs from handle to tip, the length, where the hand holds it and where it hits. Colours and textures do not carry over. Moves find a weapon’s hitting parts by name (such as WEAPON_KATANA-Blade), and the importer names them to match.

Change a game weapon. Under GAME WEAPONS, pick a weapon and change its model, picture, shop level, prices, damage, perks or enchantments. Every field starts at the game’s value; a changed value gets a gold dot and a RESET button. Set one of the two prices to 0 to remove that way of paying (at least one must stay above 0). The changes are saved as a patch.

Save, test, share. SAVE writes the mod to its folder, for example Mods/local.heavy-katana/. TEST (T) saves and starts a training fight with the weapon. EXPORT writes a ZIP to an Eclipse mods folder on your desktop, ready to install elsewhere. The shop and campaign see weapon changes after the game restarts.

Limits. The Workshop edits data-only mods, so mods with a Lua entry script do not appear in its list. Damage and default enchantments show in the campaign, not in training. Perks are the game’s own; a new ability needs Lua. Names of game armor, helms and other gear cannot be edited here. Online versus is unavailable while the Workshop is open.

A weapon, model and icon from the base game each have their own ID and their own lookup (sf2.items.get, sf2.assets.model, sf2.assets.sprite), and the handles are not interchangeable. To make a new katana that looks like the game’s, pass the katana’s model to your own item rather than the katana item. Core IDs, and the catalog that lists them, are explained in Reskin the game. Looking an item up copies nothing and changes no price or stat.

A stackable consumable is an item the player uses up, such as a healing elixir. The player holds it as a count of pieces, up to its stack. The shop sells it one piece at a time, fights can drop it, and your script spends a piece and applies its effect when the player uses it. It needs Lua.

1. Register it with category = "consumable", a stack and an icon. Add shop to sell it; leave shop out for an item that only comes from fights or story events:

local elixir = sf2.items.register {
category = "consumable",
id = "healing_elixir",
display_name = sf2.text.register { id = "item.healing_elixir", language = "eng", value = "Healing Elixir" },
description = sf2.text.register { id = "item.healing_elixir.description", language = "eng",
value = "Restores a quarter of your health." },
icon = sf2.assets.sprite("sprites/healing_elixir"),
stack = 9, -- the most a player can carry
shop = { price = { coins = 250 } }, -- the price of one piece
}

In the shop it sits in the tab with the chests. Its tile shows how many the player holds (x3) and the price, and each purchase adds one piece until the player holds a full stack.

2. Hand out more pieces as a fight reward, with count on the reward’s item, or from a story event with sf2.profile.give_item. Neither goes past the stack.

rewards = { [1] = { gems = 5, items = { { item = elixir, count = 2 } } } }
sf2.profile.give_item(elixir, 3)

3. Use a piece. sf2.profile.take_item spends it and returns true only when the player had one; sf2.profile.item_count says how many are left. Menu buttons have no combat authority, so a button in a fight menu takes the piece and a battle rule on the player applies the effect on its next tick:

local drink_pending = false
local function drink_button(view)
if sf2.profile.take_item(elixir) then
drink_pending = true
sf2.ui.update(view, "elixirs", { text = "x" .. sf2.profile.item_count(elixir) })
end
end
local elixir_rule = {
on_tick = function(_, fighter)
if drink_pending then
drink_pending = false
fighter:change_health(0.25)
end
end,
}

Add elixir_rule to your fight as a behavior rule that targets the player (see Battle rules). The count is saved with the player’s inventory, and a save keeps it while your mod is turned off. Every field is in sf2.items.register.

Eclipse has five experimental weapon mechanics, the weapon lab. They are all off unless a mod switches them on. A mod turns them on for every fight it runs in, online included, with sf2.game.enable:

-- Every mechanic; list only the ones you want.
sf2.game.enable { "charge_attacks", "polearm_tip", "scythe_execute", "kusarigama_pull", "katars_point_first" }
Name What it does
charge_attacks Holding the forward slash charges it for up to a second (Kusarigama: the up slash; Glaivebow and Rifle: the super slash). Not for heavy weapons. From half charge it knocks down.
polearm_tip Spear, Glaive, Naginata and Staff hits at the weapon’s tip deal more and stun longer; close hits are weaker.
scythe_execute A scythe hit on an opponent under 10% health knocks them out.
kusarigama_pull The Kusarigama’s forward slash pulls the opponent in, blocked or not.
katars_point_first Katars win weapon clashes against every weapon except the heavy ones.

Options has no switches for them: a player turns them off by turning your mod off. Online, both players must run the same mods anyway, so both fight with the same mechanics. Replays record the mechanics a fight used and play them back without the mod.

If you start with one way and later need the other, the fields map directly.

Weapon file Lua
id, subtype, tactic_subtype, model, icon The same fields of sf2.items.register with category = "weapon".
name, names sf2.text.register with the ID weapon_name_<id>, once per language.
damage initial_stats = { weapon_damage = ... }.
shop The shop field.
innate_perks The perks field of sf2.items.patch.
default_enchantments The enchantments field of sf2.items.patch.
Patch shop.price, currency, secondary_price price and secondary_price.
Patch shop.level and damage initial_profile.
  • Weapon files and the Workshop load when the game starts. Restart to see a change in the campaign shop.
  • Starting damage, levels and default enchantments apply to copies acquired after the mod loads. Copies players already own keep theirs; innate perks work on them too.
  • Removing a weapon or changing its id makes the copies players own unavailable. A weapon file cannot keep an old ID alive; Lua can, with sf2.items.retire.
  • None of this checks game balance. Test a new weapon’s strength in a fight.
  • A new weapon’s attacks hit with the edges named in its model. A model of your own needs edges with the same names as the subtype’s models. See Moves.