GetLookParts
The parts of one kind a man’s look may name - or a woman’s.
kind is "head" (the face), "hair", "beard" or "body" (the skin); gender "female" lists a woman’s parts
(there are no beards among them), anything else a man’s. Every entry is a table: name (what a
look takes), style (the part it derives from - a hair color’s hair model, a head’s variant’s head, a skin tone’s
group - "" at the top), traits (the words the game’s own crowd matches a face, a skin, a hair and a beard by:
"Pale Ordinary Suntanned Posh YoungAdult") and generic (true for the plain parts the game gives its crowds - not
a named character’s, not a wound’s). pattern keeps the parts whose name, style or traits hold every word of it:
"generic", "blonde", "Pale", a hair model’s name for its colors.
Some names are worth knowing: x_hair_20 is no hair (a bald head), m_beard_00 no beard, m_hair_barber_01 to
_16 and UC_beard_barber_01 to _08 the barber’s styles. Empty without the tables export.
Syntax
Section titled “Syntax”GetLookParts(kind [, pattern, gender])| Parameter | Type | |
|---|---|---|
kind |
string | "head", "hair", "beard" or "body" |
pattern |
string | words every part must hold (optional) |
gender |
string | "female" for a woman’s parts; a man’s by default (optional) |
Returns
Section titled “Returns”table - a list of {name, style, traits, generic} in the game’s order
Example
Section titled “Example”-- the plain faces, and the colors of one hair stylelocal faces = {}for _, part in ipairs(GetLookParts("head", "generic")) do if part.style == "" then faces[#faces + 1] = part.name end -- the heads, not their variantsendlocal colors = GetLookParts("hair", "x_hair_05") -- x_hair_05 itself, then m_hair_005_black, _blonde ...
-- a woman's faceslocal hers = GetLookParts("head", "generic", "female")See also
Section titled “See also”GetLookPartInfo · SetPlayerLook · the Looks and character creation group of the index
