Looks of slider characters
A look is a set of body and face dials plus the names of the clothes and hair worn. It is the same PlayerLook.Look that the player’s look uses. Its dials are numbers such as height, headSize and eyeSize, and its worn items are names such as hat, hair and shirtT.
NpcAppearance look calls
Call GetLook(npcId) to read a slider character’s look, and SetLook to apply one. GetLook gives null for a character that is not built from sliders.
public static partial class NpcAppearance
{
public static PlayerLook.Look GetLook(int npcId);
public static bool SetLook(string modId, int npcId, PlayerLook.Look look);
}
| Method | Returns | What it does |
|---|---|---|
GetLook(npcId) | PlayerLook.Look | The character’s current look. It is null if the character is not built from sliders. |
SetLook(modId, npcId, look) | bool | Applies a look. Returns true when it was applied. |
Things to know
GetLookgives the current look of a slider character, andnullfor any other character.SetLookapplies the dials of your look, and each dial is kept inside the range the player’s own look screen allows. For a worn item, a name the character does not have in its list keeps the item it is wearing now. The look’smaleandadvancedsettings are ignored, because the character keeps its own. (Wearable names are checked against the choices of the NPC’s current gender.)- Only one mod can change a character’s look at a time. A second mod that calls
SetLookfor the same character is refused until the first mod callsRestoreorClear. RestoreandClearput the look back to what it was before your mod’s firstSetLookon that character. For a mod NPC that your own mod spawned, they also forget the look saved for it, so its next spawn starts from the look of the character it was copied from. See Look and shape.