Skip to content

SetHorseType

Makes a horse a cart horse, a riding horse or a type of the mode’s - what it pulls and how it goes under a rider.

A horse’s type (SetHorseTypeRule) says what it pulls in front of a cart (HitchHorse) and its pace under a rider against a riding horse’s. The server knows "riding" (every horse given none: pulls 350 kg, the full pace) and "draft" (pulls 750 kg, 0.95 of the pace - a cart’s own horses pull as draft horses); a mode adds its own. So a good cart horse is no racer and a racer no cart horse. A rider’s horse takes the type’s pace through the game’s own speed effects on the horse. nil or "" makes it a riding horse again. The server forgets a horse’s type when it forgets the horse: a mode that keeps horses saves it with them.

SetHorseType(id [, type])
Parameter Type
id number the horse
type string a type’s name (any case); nil = "riding" (optional)

boolean - false for anything but a horse, or a type nobody made

-- the horse trader's draught horse
local horse = CreateHorse(x, y, z, yaw, pid)
SetHorseType(horse, "draft")

GetHorseType · SetHorseTypeRule · HitchHorse · the Horses group of the index