Sunfall Ridge
README.md
pilotLook
Dresses every player in Sunfall Ridge as a hang-glider pilot: the sunfall.pilot avatar (the
library humanoid's rig, so the CharacterController, the locomotion and glideKit's poses all
still work) wearing a full-face helmet with a smoked visor and an orange crown stripe (parts of
the avatar), a charcoal base layer, a dark-teal soft-shell jacket, charcoal trousers, black
leather gloves and brown leather boots (garments in sunfall.package/pilotKit).
A person's own account look would otherwise be composed onto their body when they join, so the
pilot is laid on as the game's override rules on the body's Appearance component (see
avatarAppearance.override): every peer composes the same pilot, whatever the person wears
elsewhere. Rules compose over a document, so the body also starts from a bare pilot document,
which a person's account look replaces and the rules then dress again.
Use
In a player prototype's build, on the body:
local Look = require("sunfall.pilotLook")
body.component.add("Asset", { source = asset.resolve("sunfall.pilot", "avatar") })
body.component.add("Appearance", { document = Look.documentJson(), rules = Look.rulesJson() })
At runtime, on a live avatar root: Look.apply(body). Look.rules() returns the rules table;
Look.AVATAR and Look.GARMENTS name what it wears.