Skip to content

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).

GetHorseLookParts(kind [, pattern])
Parameter Type
kind string "body", "mane" or "tail"
pattern string words each part must hold (optional)

table - { {name, family, derivesFrom, build}, ... }; {} for an unknown kind

-- a horse seller's stock of braided manes
local manes = GetHorseLookParts("mane", "braided")
SetHorseLook(horse, {mane = manes[math.random(#manes)].name})
-- a heavy work horse
local heavy = GetHorseLookParts("body", "heavy")
SetHorseLook(horse, {body = heavy[1].name})

SetHorseLook · GetHorseCoats · the Horses group of the index