Skip to content

Looks

A look is an armor or helm model the player wears over their gear. The gear keeps its stats; the look changes only what is drawn. The fighter is hit, moves, falls and ragdolls exactly as it does in the gear underneath, so a look can never change a fight. Boss forms are a good fit: a player can show a boss’s body while keeping the armor they trust.

New to mods? Read How mods work first. All examples assume your script starts with local sf2 = require("sf2").

In the shop’s Armory, the armor and helm pages have a LOOKS button in the header. Pressed, the grid shows looks instead of gear:

  • the bare body or head comes first, then the looks the player has unlocked, then the locked ones, greyed with a lock;
  • the fighter tries on whichever look is selected;
  • WEAR keeps the look, and TAKE OFF goes back to the gear’s own look;
  • a strip under the grid names the look and, for a locked one, how to unlock it;
  • when a mod marks boss forms, a FORMS button shows only those, each tile with its boss’s portrait.

The two slots are the armor slot, which draws the whole body (so a boss form goes here), and the helm slot. Each Armory loadout remembers its looks with its gear.

Owning an armor or helm unlocks its look. The look stays unlocked after the item is sold. Everything else is unlocked by a mod, with sf2.profile.unlock_look.

The base game’s boss bodies and heads are armor and helm items, so they can be looks already. Unlock one when the player beats its boss:

local kenjiForm = sf2.items.get("core:items/armor/body_kenji")
local kenjiHead = sf2.items.get("core:items/helm/head_kenji")
sf2.story.on("fight_end", function(event)
if event.fight == sf2.mod.id .. ":fights/kenji" and event.result == "win" then
sf2.profile.unlock_look(kenjiForm)
sf2.profile.unlock_look(kenjiHead)
end
end)

To list the forms under FORMS with their boss’s portrait, mark them while your mod loads. boss takes a game text key (or a text handle), and the locked tile then says “Beat KENJI to unlock”:

sf2.looks.patch {
item = sf2.items.get("core:items/armor/body_kenji"),
form = true, portrait = "man_kungfu", boss = "NAME_KENJI",
}

unlock_look returns true the first time, so you can show a message only once. sf2.profile.has_look checks whether a look is unlocked. The Core IDs page lists every armor and helm ID.

To ship a look that is not gear, register it. You need a model built for the standard fighter rig, an icon sprite and a name:

local crowMask = sf2.looks.register {
slot = "helm",
id = "crow_mask",
display_name = sf2.text.register { id = "look.crow_mask", language = "eng", value = "Crow Mask" },
icon = sf2.assets.sprite("sprites/crow_mask_icon"), -- assets/sprites/crow_mask_icon.asset
model = sf2.assets.model("models/mdl_helm_crow_mask"), -- assets/models/mdl_helm_crow_mask.xml
hint = sf2.text.register { id = "look.crow_mask.hint", language = "eng", value = "Beat the Crow at the gate" },
}

The look starts locked. The hint is what the locked tile says; leave it out and the tile says “Locked”. Unlock it with sf2.profile.unlock_look(crowMask). A registered look is never sold and never offered as gear, so only your unlock call gives it to the player.

The easiest model to start from is an existing armor or helm model. See sf2.assets.model for where model files go, and the characters guide for how fighter models are built.

sf2.looks.patch sets the look options of an armor or helm that already exists: a core item, another mod’s, or one of your own gear items.

sf2.looks.patch {
item = sf2.items.get("core:items/armor/body_titan"),
versus = false,
hint = sf2.text.register { id = "look.titan.hint", language = "eng", value = "Defeat Titan" },
}

Each item takes one set of options, from one mod.

If your mod adds a gear item that copies a look already in the list (a reward’s own copy of a boss’s armor, say), set hidden = true on it so the Looks list shows the look only once:

sf2.looks.patch { item = sf2.items.get("mymod:items/armor/titan_reward_body"), hidden = true }

In versus, both fighters already fight with the same ratings, so every armor and helm there is a look. Versus players also see the looks that exist only as looks (from sf2.looks.register) in the armor and helm lists, once they have unlocked them in their campaign save. Online, your opponent sees the look you wear, and replays keep it.

Set versus = false to keep a look to the campaign. Use it when a look’s shape would mislead an opponent, for example a body much bulkier than the fighter it is drawn on. Versus play then draws the gear instead, and the item is left out of the versus armor or helm lists.

  • A look only draws. It never adds hitboxes, weight or collisions, and its cloth follows the fighter without pulling on it.
  • The model must hang on the standard rig. If its edges or node weights name rig points the fighter does not have, or its own points never connect to the rig, it is not drawn, and the player sees their gear instead. Single shapes that name missing points are skipped, as the game does for its own models.
  • Skinned nodes (SkinnedNode) in a look’s model are ignored: they need a character’s proportion rig.
  • A player using a character look from Mods > Characters draws that look; armor and helm looks wait until they switch back to Shadow’s own look.
  • Weapons have no looks. A weapon’s model decides its reach, so the blade drawn is always the blade that hits.