GetHorseLookParts
The coats, manes or tails a horse’s look may name.
Every part of one kind - "body" (the coats), "mane" or "tail" - in the game’s order (the horse
looks lists them all). pattern keeps the ones whose name, family, the part they derive from or their build hold each
word of it (any case): "dapple", "braided", "curly white", "heavy". Each entry is {name, family, derivesFrom, build}: family is the top of its tree ("Horse_Dapple", "horse_curly_hair_01", "Unique" - the game’s named horses,
"Shop" - the horses its stables sell), derivesFrom the part it comes from ("" at the top), build the body’s shape
words of a coat ("heavy", "light", "draft", "noble", "female"; "" the plain build).
Syntax
Section titled “Syntax”GetHorseLookParts(kind [, pattern])| Parameter | Type | |
|---|---|---|
kind |
string | "body", "mane" or "tail" |
pattern |
string | words each part must hold (optional) |
Returns
Section titled “Returns”table - { {name, family, derivesFrom, build}, ... }; {} for an unknown kind
Example
Section titled “Example”-- a horse seller's stock of braided maneslocal manes = GetHorseLookParts("mane", "braided")SetHorseLook(horse, {mane = manes[math.random(#manes)].name})
-- a heavy work horselocal heavy = GetHorseLookParts("body", "heavy")SetHorseLook(horse, {body = heavy[1].name})See also
Section titled “See also”SetHorseLook · GetHorseCoats · the Horses group of the index
