Appearances
constAppearances:object
Defined in: server/api.d.ts:7406
The game’s own character-component catalog: every face, hairstyle, beard and skin a player’s body can be given.
Everyone on a fresh server is Henry, because a body with nothing chosen is the one the game hands out. This is where the alternatives come from; player.setAppearance is what puts one on somebody.
Type Declaration
Section titled “Type Declaration”beards()
Section titled “beards()”beards(
head?,gender?):AppearanceOption[]
The beards that face can actually grow.
A beard is modelled against one head’s mesh and stored under that head’s own folder, so asking for one the artists never made for the face wearing it does nothing at all – no error, no beard, a body that comes back clean-shaven. The owning client refuses such a pair outright, so filter a chooser through this rather than through options("beard").
The 164 generic faces carry 24 each, Henry’s face carries the 15 the game’s own barber offers, and 14 faces carry none.
Parameters
Section titled “Parameters”string
The face to ask about – a name from Appearances.options("head"). Omitted or empty means the face a body nobody has chosen one for wears.
gender?
Section titled “gender?”"male" | "female"
Which half of the catalog the head came from; male by default.
Returns
Section titled “Returns”The wearable beards, in the catalog’s own order. Empty for a female body, for a face with none, and for a name the catalog does not carry.
find()
Section titled “find()”find(
part,name,gender?):AppearanceOption|null
Looks one component name up, so a resource can check a name is real before handing it to a player.
Parameters
Section titled “Parameters”"head" | "body" | "hair" | "beard"
Which part the name is for.
string
The component name to look up.
gender?
Section titled “gender?”"male" | "female"
Which half of the catalog to look in; male by default.
Returns
Section titled “Returns”AppearanceOption | null
What the catalog says about it, or null for a name it does not carry.
options()
Section titled “options()”options(
part,gender?):AppearanceOption[]
Every option the game ships for one part. The male tree has 212 faces, 262 hairstyles, 51 beards and 47 skins; the female tree has 61, 71, none and 41.
The hairstyle count is large because the game ships each style once per colour rather than colouring one. Group by option.group to get the styles back.
The 51 beards are the whole catalog, not what any one body can wear: a beard is modelled per face and only exists for the faces it was modelled for. Appearances.beards is the list to show somebody.
Parameters
Section titled “Parameters”"head" | "body" | "hair" | "beard"
Which part to list.
gender?
Section titled “gender?”"male" | "female"
Which half of the catalog to read; male by default.
Returns
Section titled “Returns”The options, in the catalog’s own order.
random()
Section titled “random()”random(
gender?):Appearance
Picks one option for every part, which is the cheapest way to stop a server full of Henrys. Hand the result straight to player.setAppearance.
Uniform over the catalog rather than over what looks good together: the game’s own faces and hairstyles are authored for particular NPCs, so a random body is recognisably random. The beard is drawn after the face and only from what that face can wear, so the result is always one a client will accept.
Parameters
Section titled “Parameters”gender?
Section titled “gender?”"male" | "female"
Which half of the catalog to draw from; male by default.
Returns
Section titled “Returns”A complete appearance. beard is empty for a female one, which the catalog has none of, and for the fourteen male faces no beard was modelled for.