Skip to content

SetHorseLook

Gives a horse its own coat, mane and tail from the game’s horses - on every screen.

The ten coats of GetHorseCoats are ready sets: each one a colour with a straight mane of the same colour and one of three tail lengths. A look names the parts themselves, from every part the game draws on a horse (the horse looks): 200 coats - solid colours, dapples, grullas, markings, the game’s own named horses and the horses its stables sell, many with a build of their own (heavy, light, draft, a mare’s) -, straight, flipped, curly, braided and heavy manes in many colours, and plain, curly and braided tails.

look is a table {body, mane, tail} - body is the coat - or the one line LookToString makes. A part left out is the one of the coat the horse wears (SetHorseCoat): {mane = "horse_curly_hair_01_brown"} changes the mane alone. nil or {} takes the look off. The body changes in place on every screen - no respawn, the saddle and the bags stay on; a look given right after CreateHorse (or straight in its coat) is on from the horse’s first moment. A part that is not one of its kind refuses the whole look: false and the reason. It goes with the horse: a mode that keeps horses saves it (GetHorseLook and LookToString) and gives it back. A horse hitched to a cart (HitchHorse) keeps it in the harness.

SetHorseLook(id, look)
Parameter Type
id number the horse
look table | string | nil {body, mane, tail} - names from GetHorseLookParts -, its one-line form, or nil for none

boolean, string | nil - true, or false and the reason (“There is no horse mane ‘x’.”)

-- a knight's grey with a braided white mane and a braided tail
SetHorseLook(horse, {body = "Horse_Dapple_Grey", mane = "horse_braided_hair_01_white", tail = "braided_tail_01"})
-- a curly mane over the coat it has
SetHorseLook(horse, {mane = "horse_curly_hair_01_brown"})
-- back from the database: the column holds LookToString's line
local ok, why = SetHorseLook(horse, row.look)
if not ok then Log("the saved look of a horse is gone: " .. why) end

GetHorseLook · GetHorseLookParts · SetHorseCoat · LookToString · CreateHorse · the Horses group of the index