Log inGet started
World

Fencing with Fences

Branchmain
Branchesmain
Commitc0197a6317

README.md

fencer_body

What a combatant in the Hedgerow Assizes looks like.

local Body = require("fencer_body")

Body.build(owner, role, kit)              -- rebuild this fencer's rig
Body.pose(owner, action, phase, facing)   -- pose it; safe every frame
Body.isBuilt(owner)                       -- was this rig built by this module?
Body.forget(owner)                        -- drop the memoised pose
Body.kitOf(role)                          -- the kit standing on a role
Body.kitLabel(name)                       -- what a turnout is called
Body.KITS                                 -- { "assize", "pettifer", "wickham", "ashcombe" }

Turnouts

The kit dresses the rival only. The player is the player in every assize and wears the same whites against all three neighbours.

kitturnoutthe read
assizeclareta dark block over pale legs
pettiferthe bee veila horizontal brim where a head should be
wickhamregimentalsthe outline goes UP: shako, plume, cross-belt
ashcombemourningone unbroken dark column to the ground, no legs

Every turnout changes the silhouette, not only the palette, because at the size the broadcast camera draws them the outline is the whole of the information. extra in each kit is where that happens; it runs after the shared skeleton, and everything it spawns hangs off the rig so it despawns with it.

kit is sticky per role. Fencer and GardenDressing both rebuild a body with no kit argument, and a rival who reverted to the house colours every rebuild would not be a neighbour. An unknown name falls back to the standing kit rather than erroring.

Pose

Every commitment is a pose of the panel plus the arm that carries it, and the panel's angle is the tell: broadside is a sweep gathering, edge-on is a thrust on its way, flat across the body is a guard. A new commitment is a new row in POSE, keyed by the same name Duel.ACTIONS uses.

pose memoises the last action/phase/facing and returns immediately when nothing changed — a fencer holds one pose for whole tenths of a second, and re-writing eight transforms every frame for a body that has not moved is the most expensive thing this module could do.

Rules this module keeps

  • Nothing it makes reaches scene.json: every entity is setTemporary(true) on the line after it spawns, and build despawns the old rig first.
  • panel, arm and glove are fixed names — every driver of this body poses those entities.
  • A rig carries a _body_mark child, so a driver can tell a rig this module built from one an older inline builder put up.