# :horse: Stable
Documentation relating to the kd_stable.

:::: tabs
::: tab BUY
[Buy the script](https://jumpon-studios.com/redm/horse-stable)
:::

::: tab PREVIEW
<iframe width="560" height="315" src="https://www.youtube.com/embed/LUgGS5I5FjM?si=wIuK5RGZWczm_twX" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
:::
::::

## 1. Installation
kd_stable works on all frameworks compatible with jo_libs ([the list](/jo_libs/)).

To install kd_stable :
- Download the library: [jo_libs](https://github.com/Jump-On-Studios/RedM-jo_libs/releases/latest/download/jo_libs.zip)
- Unzip the folder and drop it in your resource folder
- Download kd_stable from your [keymaster](https://keymaster.fivem.net/asset-grants?search=stable)
- Unzip the folder and drop it in your resource folder
- Add this ensure in your server.cfg
  - `ensure jo_libs`
  - `ensure kd_stable`

Congratulation, the **Stable** script is ready to be used!
:::warning
Be sure you have oxmysql ensure in your server.cfg
:::
:::tip
The script automatically creates all necessary database tables during its initial startup.
:::

## 2. Usage
Go to the store (blip on the map) to get the prompt. Press the key to open the menu.

## 3. Script configuration
The configuration file is `config.lua` in the resource root. **Do not edit this file directly** as your changes may be lost during updates. Instead, use `overwriteConfig.lua` to store your customizations.

- **`config.lua`** - Default configuration maintained by developers. **Do not modify this file.**
- **`overwriteConfig.lua`** - This is where you place only the values you want to override.

### How to customize the configuration

1. Open `kd_stable/overwriteConfig.lua`
2. Find the value you want to change in `config.lua` (e.g., `Config.language`)
3. Copy only that line into `overwriteConfig.lua`
4. Edit the copied value to your liking

The script loads `config.lua` first, then `overwriteConfig.lua` overwrites only the values you redefine. This ensures your customizations are preserved when updating the script.

`kd_stable/shared/config.lua`

```lua
-------------------------------
-- DOCUMENTATION : https://docs.jumpon-studios.com/
--------------------------------

-------------------------------------------
-- DON'T EDIT THIS FILE
-- TO OVERWRITE CONFIG VALUE, USE overwriteConfig.lua file instead
-------------------------------------------

Config = {}
Config.debug = false

Config.realisticModHorse = false
-- if true :
-- No horse teleportation. You can only whistle horse if he is near than you.
-- Horses are linked on the last stable you use to stabling it.
Config.realisticModWagon = false
-- if true :
-- No wagon teleportation.
-- Wagons are linked on the last stable you use to stabling it.

Config.distancePromptStore = 3.0                 --maximum distance to display the prompt to open the store
Config.distanceSpawnPed = 15.0                   --maximum distance to spawn the stable man
Config.distanceSpawnHorse = 50.0                 --distance to spawn the horse when whistle
Config.distanceSpawnWagon = 50.0                 --distance to spawn the wagon when you call it
Config.distanceTeleportHorse = 200.0             -- maximum distance to whistle horse before teleport him
Config.ExtraLightIntensity = 15.0                --Light intensity when preview horse in stable
Config.syncTimer = 5 * 1000                      --Loop timer to resync horse after using instance
Config.useMenuWithMouse = true                   --turn off to disable the mouse controler for the menu
Config.needAllHorseWagon = true                  --turn true to only allow wagon if all needed horses are selected
Config.refreshTimerHorseStat = 1000              --time in ms to calcul the new stat of horse. Little value = more precise but more heavy for CPU
Config.saveHorseStatTimer = 60 * 1000            --time in ms to save new horses stats in database
Config.disableHorseFlee = false                  --disable the possibility to flee horses
Config.usePromptHorseStatistics = true           --turn off the prompt to display horses statistics
Config.maxDistanceWithHorseshoes = 100           --in kilometers
Config.warningMessageHorseshoePercent = 20       --display a warning message when the horseshoes is under this value
Config.stopRunHorseshoesPercent = 10             --disable horse run when horseshoes is under this value
Config.distanceSafeSpawn = 5.0                   --minimal distance from the farest vehicle to be able to spawn a new one
Config.useHorseHolster = true                    --false to disable horse holster (only the horse owner can interact with it)
Config.showHorseLevelUp = true                   --false to turn of horse exp notifications
Config.keepHorseCoreDuration = 60 * 1000         --time in ms (duration after which stats of a horse that flee are resetting)
Config.forceDespawnAfterFleeTimer = 10 * 1000    --time in ms to delete the horse after flee
Config.uniquePriceForStableTransfer = false      -- false : transfer price depends of the distance, true : same price for all stables
Config.canTransferFromAnotherStable = true       -- false : disable the transfer of horse/wagon if they are not in the stable where you are
Config.durationTransferFromAnotherStable = 10000 -- duration to transfer horse/wagon from another stable
Config.allowStowSmallPeltOnHorse = true
Config.distanceForTraining = 100.0               --distance to list a training in paddocs
Config.durationHorseInvincibleAfterSpawn = 5000  --duration of invincibility of the horse after his spawn
Config.maxPeltOnHorse = 3                        --number of small pelt can be stow on horse (only 3 are visible)
Config.disableJumpOnHorse = true                 --turn off the prompt to jump on other horse
Config.doesWagonCanBeDamaged = false             --turn off wagon damage

Config.winExpByWalk = {                          --horse exp win by walking
	distance = 200,                                --distance to earn new points (in meters)
	point = 1                                      --amount earn by each distance
}
-- Bonding level depend of the horse breed
-- Level 1 ~ 100 points
-- Level 2 ~ 250 points
-- Level 3 ~ 800 points
-- Level 4 ~ 1500 points

Config.horseSlots = 5 -- maximum of horse for players (set -1 to unlimited)
Config.wagonSlots = 5 -- maximum of horse for players (set -1 to unlimited)

Config.commands = {   --set false to disable a command
	sidesiddle = "sidesaddle",
	fixWagon = "fixWagon",
	fleeHorse = "fleeHorse",
	callWagon = "callWagon",
	fleeWagon = "fleeWagon",
	reloadHorse = "reloadHorse",                    --To reload components of the horse
	disableAutoRideFollow = "disableAutoRideFollow", --To turn
}

Config.allowCustomColorForHorse = true --turn off to remove the prompt to allow custom color on horse coat
Config.palettesForHorseCoat = {
	tint_generic_clean = true,
	tint_hair = true,
	tint_horse = true,
	tint_horse_leather = true,
	tint_leather = true,
	tint_makeup = true
}
Config.allowCustomColorForComponent = true --turn off to remove the prompt to allow custom color on horse component
Config.palettesForComponent = {
	tint_generic_clean = true,
	tint_hair = true,
	tint_horse = true,
	tint_horse_leather = true,
	tint_leather = true,
	tint_makeup = true
}

Config.saddlebagMod = 2
-- 0 : No horse saddlebag
-- 1 : Saddlebag only for horse owner
-- 2 : Everyone can access to the saddlebag

Config.wagonLockerMod = 2
-- 0 : No wagon locker
-- 1 : Wagon locker only for wagon owner
-- 2 : Everyone can access to the wagon locker

Config.saddlebag = {
	maxWeight = 500.0,
	maxSlots = 10, --for QBR & RSG & VORP
	acceptWeapons = true
}
Config.displaySaddlebagSlotInStore = true   --Set false to hide the maxSlots
Config.displaySaddlebagWeightInStore = true --Set false to hide the maxWeight
Config.wagonLocker = {                      --default locker size for wagon
	maxWeight = 1000.0,
	maxSlots = 50,                            --for QBR & RSG & VORP
	acceptWeapons = true
}
Config.displayLockerSlotInStore = true   --Set false to hide the maxSlots
Config.displayLockerWeightInStore = true --Set false to hide the maxWeight

Config.keys = {
	enter = "INPUT_FRONTEND_ACCEPT",
	buyGold = "INPUT_INTERACT_ANIMAL",
	favourite = "INPUT_SHOP_SPECIAL",
	ride = "INPUT_FRONTEND_RB",
	bequeath = "INPUT_OPEN_SATCHEL_MENU",
	release = "INPUT_FRONTEND_RS",
	unequip = "INPUT_SHOP_SELL",
	saddlebag = "INPUT_CREATOR_ACCEPT",
	wagonLocker = "INPUT_SHOP_SPECIAL",
	takeSaddlebag = "INPUT_FRONTEND_RS",
	colorPalette = "INPUT_CREATOR_RS",
	takeLantern = "INPUT_HUD_SPECIAL",
	skipCutscene = "INPUT_SKIP_CUTSCENE",
	checkHorseshoes = "INPUT_AIM_IN_AIR"
}

Config.items = {
	feed = {
		{
			name = "carrots", --item name
			health = 30,   --health bonus for horse
			stamina = 30,  --stamina bonus for horse
			remove = true,
		},
	},
	brush = { --let empty to unlimited horse brush
		{
			name = "horsebrush",
			remove = false,
		}
	},
	horseReviver = {
		name = "horse_reviver",
		remove = true, --if the item has to be removed after used
	}
}

Config.stables = {
	{
		id = "valentine", --must be unique
		name = "Valentine",
		location = vec4(-365.15, 792.68, 115.18, 178.47),
		pedModel = `u_m_m_bwmstablehand_01`,
		blip = `blip_shop_horse`,                             --set to false to turn the blip off
		disableHorseMenu = false,                             --set to true to disable the horse menu part
		disableWagonMenu = false,                             --set to true to disable the wagon menu part
		horsesAvailable = {},                                 --let empty to allow all horses, use false to disable
		canBuyHorseComponents = true,                         --use false to disable the buying of horse components
		previewHorse = vec4(-369.59, 793.00, 115.15, 177.26), --location to preview new horse
		previewMyHorse = vec4(-371.76, 786.87, 115.16, 272.08), --location to preview your horse
		equipMyHorse = vec4(-371.76, 786.87, 115.16, 272.08), --location for the ride horse scene
		wagonsAvailable = {},                                 --let empty to allow all wagons, use false to disable
		previewWagon = vec4(-371.76, 786.87, 115.16, 272.08), --location to preview wagon
		spawnWagon = vec4(-370.69, 775.85, 116.26, 269.11),   --location to spawn wagon
		storeSaddle = vec4(-365.235, 790.888, 116.175, 0.0),
		inside = {                                            --polyzone
			vec3(-376.765, 793.418, 116.124),
			vec3(-363.036, 793.695, 116.188),
			vec3(-362.191, 784.502, 116.180),
			vec3(-376.236, 783.673, 116.177)
		},
		needInstance = true
	},
	{
		id = "saintDenis", --must be unique
		name = "Saint Denis",
		location = vector4(2512.399, -1457.067, 46.312, 87.925),
		pedModel = `u_m_m_bwmstablehand_01`,
		blip = `blip_shop_horse`,                                 --set to false to turn the blip off
		disableHorseMenu = false,                                 --set to true to disable the horse menu part
		disableWagonMenu = false,                                 --set to true to disable the wagon menu part
		horsesAvailable = {},                                     --let empty to allow all horses
		canBuyHorseComponents = true,                             --use false to disable the buying of horse components
		previewHorse = vec4(2509.034, -1449.872, 45.400, 86.799), --location to preview new horse
		previewMyHorse = vec4(2509.034, -1449.872, 45.400, 86.799), --location to preview your horse
		equipMyHorse = vec4(2502.963, -1452.935, 46.313, 174.038), --location for the ride horse scene
		wagonsAvailable = {},                                     --let empty to allow all wagons
		previewWagon = vec4(2502.689, -1441.257, 45.313, 177.895), --location to preview wagon
		spawnWagon = vec4(2502.689, -1441.257, 45.313, 348.528),  --location to spawn wagon
		storeSaddle = vec3(2510.665, -1456.786, 46.314),
		inside = {                                                --polyzone
			vec3(2499.959, -1464.172, 46.313),
			vec3(2499.969, -1436.472, 46.317),
			vec3(2510.713, -1436.171, 46.312),
			vec3(2516.296, -1463.877, 46.312)
		},
		needInstance = true
	},
	{
		id = "strawberry", --must be unique
		name = "Strawberry",
		location = vec4(-1817.261, -559.600, 156.177, 164.684),
		pedModel = `u_m_m_bwmstablehand_01`,
		blip = `blip_shop_horse`,                                   --set to false to turn the blip off
		disableHorseMenu = false,                                   --set to true to disable the horse menu part
		disableWagonMenu = false,                                   --set to true to disable the wagon menu part
		horsesAvailable = {},                                       --let empty to allow all horses
		canBuyHorseComponents = true,                               --use false to disable the buying of horse components
		previewHorse = vec4(-1820.033, -555.669, 155.177, 160.508), --location to preview new horse
		previewMyHorse = vec4(-1821.550, -561.547, 155.060, 253.239), --location to preview your horse
		equipMyHorse = vec4(-1821.550, -561.547, 155.060, 253.239), --location for the ride horse scene
		wagonsAvailable = {},                                       --let empty to allow all wagons
		previewWagon = vec4(-1821.550, -561.547, 155.060, 253.239), --location to preview wagon
		spawnWagon = vec4(-1821.550, -561.547, 155.060, 253.239),   --location to spawn wagon
		storeSaddle = vec4(-1817.614, -560.796, 156.063, 324.503),
		inside = {                                                  --polyzone
			vec3(-1826.193, -562.865, 155.063),
			vec3(-1824.735, -557.522, 155.240),
			vec3(-1813.957, -560.743, 155.145),
			vec3(-1815.262, -565.798, 155.045)
		},
		needInstance = true
	},
	{
		id = "blackwater", --must be unique
		name = "Blackwater",
		location = vec4(-878.606, -1368.115, 43.527, 276.638),
		pedModel = `u_m_m_bwmstablehand_01`,
		blip = `blip_shop_horse`,                                 --set to false to turn the blip off
		disableHorseMenu = false,                                 --set to true to disable the horse menu part
		disableWagonMenu = false,                                 --set to true to disable the wagon menu part
		horsesAvailable = {},                                     --let empty to allow all horses
		canBuyHorseComponents = true,                             --use false to disable the buying of horse components
		previewHorse = vec4(-867.165, -1371.482, 42.659, 355.048), --location to preview new horse
		previewMyHorse = vec4(-863.397, -1366.342, 42.549, 83.688), --location to preview your horse
		equipMyHorse = vec4(-863.397, -1366.342, 42.549, 83.688), --location for the ride horse scene
		wagonsAvailable = {},                                     --let empty to allow all wagons
		previewWagon = vec4(-863.397, -1366.342, 42.549, 83.688), --location to preview wagon
		spawnWagon = vec4(-863.397, -1366.342, 42.549, 83.688),   --location to spawn wagon
		storeSaddle = vec4(-878.075, -1367.790, 43.528, 99.837),
		inside = {                                                --polyzone
			vec3(-879.179, -1370.857, 41.525),
			vec3(-879.761, -1360.371, 41.921),
			vec3(-858.781, -1360.444, 41.659),
			vec3(-856.944, -1372.157, 41.538)
		},
		needInstance = true
	},
	{
		id = "tumbleweed", --must be unique
		name = "Tumbleweed",
		location = vec4(-5515.295, -3039.497, -2.388, 182.161),
		pedModel = `u_m_m_bwmstablehand_01`,
		blip = `blip_shop_horse`,                                   --set to false to turn the blip off
		disableHorseMenu = false,                                   --set to true to disable the horse menu part
		disableWagonMenu = false,                                   --set to true to disable the wagon menu part
		horsesAvailable = {},                                       --let empty to allow all horses
		canBuyHorseComponents = true,                               --use false to disable the buying of horse components
		previewHorse = vec4(-5522.499, -3038.960, -3.304, 181.992), --location to preview new horse
		previewMyHorse = vec4(-5522.063, -3044.438, -3.388, 265.561), --location to preview your horse
		equipMyHorse = vec4(-5522.063, -3044.438, -3.388, 265.561), --location for the ride horse scene
		wagonsAvailable = {},                                       --let empty to allow all wagons
		previewWagon = vec4(-5522.063, -3044.438, -3.388, 265.561), --location to preview wagon
		spawnWagon = vec4(-5522.063, -3044.438, -3.388, 265.561),   --location to spawn wagon
		storeSaddle = vec4(-5515.173, -3040.729, -2.388, 340.582),
		inside = {                                                  --polyzone
			vec3(-5511.550, -3047.357, -3.388),
			vec3(-5526.960, -3047.235, -3.388),
			vec3(-5526.293, -3037.693, -3.126),
			vec3(-5512.541, -3037.925, -3.387)
		},
		needInstance = true
	},
	{
		id = "emerald", --must be unique
		name = "Emerald",
		location = vec4(1206.332, -191.566, 101.483, 286.763),
		pedModel = `u_m_m_bwmstablehand_01`,
		blip = `blip_shop_horse`,                                 --set to false to turn the blip off
		disableHorseMenu = false,                                 --set to true to disable the horse menu part
		disableWagonMenu = false,                                 --set to true to disable the wagon menu part
		horsesAvailable = {},                                     --let empty to allow all horses
		canBuyHorseComponents = true,                             --use false to disable the buying of horse components
		previewHorse = vec4(1203.866, -196.192, 100.517, 285.963), --location to preview new horse
		previewMyHorse = vec4(1210.128, -195.117, 100.386, 19.516), --location to preview your horse
		equipMyHorse = vec4(1210.128, -195.117, 100.386, 19.516), --location for the ride horse scene
		wagonsAvailable = {},                                     --let empty to allow all wagons
		previewWagon = vec4(1210.128, -195.117, 100.386, 19.516), --location to preview wagon
		spawnWagon = vec4(1210.128, -195.117, 100.386, 19.516),   --location to spawn wagon
		storeSaddle = vec4(1207.473, -191.853, 101.389, 79.665),
		inside = {                                                --polyzone
			vec3(1208.220, -199.161, 100.549),
			vec3(1204.978, -188.366, 100.482),
			vec3(1210.377, -186.652, 100.371),
			vec3(1213.372, -197.565, 100.425)
		},
		needInstance = true
	},
}

Config.activities = {
	speed = {
		price = { money = 5, gold = 8 },
		numberRepeatToLevelUp = 2
	},
	acceleration = {
		price = { money = 5, gold = 8 },
		numberRepeatToLevelUp = 2
	},
	handling = {
		price = 5,
		numberRepeatToLevelUp = 2
	},
	bonding = {
		price = 5,
		numberRepeatToLevelUp = 1
	}
}

Config.trainings = {
	{
		inside = {
			vec3(-380.670, 767.151, 116.089),
			vec3(-398.417, 765.606, 115.804),
			vec3(-402.168, 768.392, 115.727),
			vec3(-403.746, 787.087, 115.772),
			vec3(-400.821, 790.560, 115.963),
			vec3(-385.480, 791.913, 115.882),
			vec3(-381.809, 788.601, 115.925)
		},
		blip = `blip_horse_owned_bonding_4`,                          --set to false to turn the blip off
		jobs = {},                                                    --let empty to not restrict to a specific job,
		activities = { "speed", "acceleration", "handling", "bonding" } --'speed'/'acceleration'/'handling'/'bonding'
	}
}

Config.prices = {
	horse_saddles = 5,
	horse_saddlebags = 5,
	saddle_stirrups = 5,
	saddle_horns = 5,
	horse_blankets = 5,
	horse_bedrolls = 5,
	horse_manes = 5,
	horse_tails = 5,
	horse_shoes = 5,
	horse_accessories = 5,
	horse_bridles = 5,
	saddle_lanterns = 5,
	horse_mustache = 5,
	wagon = 100,
	horse = 100,
	vehicle_tints = 10,
	vehicle_propsets = 10,
	vehicle_liveries = 10,
	vehicle_lantern_propsets = 10,
	vehicle_extras = 10,
	horse_outfits = 10,
	reviveHorse = { money = 100, gold = 23 }, --set false to disable the revive of horse
	transferStableKM = 22                    --price to transfer the horse from one stable to another by kilometers
}

Config.modelPrices = {}
for category in pairs(Config.prices) do
	Config.modelPrices[category] = {}
	Config.modelPrices[category] = {}
end

Config.modelPrices["horse_saddles"][2] = { money = 50, gold = 2 }

Config.horses = {
	[1] = {
		price = { money = 2.75, gold = 2 },
		name = "No die",
		noDieByAge = true,
		age = 2,
		variations = {
			"A_C_Horse_AmericanPaint_Greyovero",
			"A_C_Horse_AmericanPaint_Overo",
			"A_C_Horse_AmericanPaint_SplashedWhite",
			"a_c_horse_eagleflies",
			"A_C_Horse_AmericanPaint_Tobiano"
		},
		attributes = {
			speed = 4,        -- 1<>10
			maxSpeed = 8,     -- speed<>10
			acceleration = 2, -- 1<>10
			maxAcceleration = 9, -- acceleration<>10
			handling = 1,     --1 = heavy,2 = standard,3 = race,4 = elite
			maxHandling = 4,  --handling<>4
			stamina = 4,
			health = 6,
			bonding = 2
		},
		saddlebag = {
			maxWeight = 100.0,
			maxSlots = 5 --for QBR & RSG & VORP
		}
	},
	[2] = {
		price = { money = 2.75 },
		name = "Age 1",
		age = 1,
		variations = {
			"A_C_Horse_AmericanStandardbred_Black",
			"A_C_Horse_AmericanStandardbred_Buckskin",
			"A_C_Horse_AmericanStandardbred_PalominoDapple",
			"A_C_Horse_AmericanStandardbred_SilverTailBuckskin"
		},
		attributes = {
			speed = 8,
			maxSpeed = 8,     -- speed<>10
			acceleration = 8,
			maxAcceleration = 9, -- acceleration<>10
			handling = 2,     --1 = heavy,2 = standard,3 = race,4 = elite
			maxHandling = 4,  --handling<>4
		}
	},
	[3] = {
		price = { gold = 2 },
		name = "Age 3",
		age = 3,
		variations = {
			"A_C_Horse_Andalusian_DarkBay",
			"A_C_Horse_Andalusian_Perlino",
			"A_C_Horse_Andalusian_RoseGray"
		},
		attributes = {
			speed = 3,        -- 1<>10
			maxSpeed = 8,     -- speed<>10
			acceleration = 5, -- 1<>10
			maxAcceleration = 9, -- acceleration<>10
			handling = 1,     --1 = heavy,2 = standard,3 = race,4 = elite
			maxHandling = 4,  --handling<>4
		}
	},
	[4] = {
		price = { money = 25.15, gold = 2 },
		attributes = {
			speed = 4,        -- 1<>10
			maxSpeed = 8,     -- speed<>10
			acceleration = 8, -- 1<>10
			maxAcceleration = 9, -- acceleration<>10
			handling = 3,     --1 = heavy,2 = standard,3 = race,4 = elite
			maxHandling = 4,  --handling<>4
		},
		variations = {
			"A_C_Horse_Appaloosa_BlackSnowflake",
			"A_C_Horse_Appaloosa_Blanket",
			"A_C_Horse_Appaloosa_BrownLeopard",
			"A_C_Horse_Appaloosa_FewSpotted_PC",
			"A_C_Horse_Appaloosa_Leopard",
			"A_C_Horse_Appaloosa_LeopardBlanket",
			"a_c_horse_gang_charles",
			"a_c_horse_gang_uncle_endlesssummer"
		},
	},
	[5] = {
		attributes = {
			speed = 1,        -- 1<>10
			maxSpeed = 8,     -- speed<>10
			acceleration = 4, -- 1<>10
			maxAcceleration = 9, -- acceleration<>10
			handling = 4,     --1 = heavy,2 = standard,3 = race,4 = elite
			maxHandling = 4,  --handling<>4
		},
		variations = {
			"A_C_Horse_Arabian_Black",
			"A_C_Horse_Arabian_Grey",
			"A_C_Horse_Arabian_RedChestnut",
			"a_c_horse_arabian_redchestnut_pc",
			"A_C_Horse_Arabian_RoseGreyBay",
			"A_C_Horse_Arabian_WarpedBrindle_PC",
			"A_C_Horse_Arabian_White",
			"a_c_horse_gang_dutch"
		}
	},
	[6] = {
		attributes = {
			speed = 5,        -- 1<>10
			maxSpeed = 8,     -- speed<>10
			acceleration = 5, -- 1<>10
			maxAcceleration = 9, -- acceleration<>10
			handling = 1,     --1 = heavy,2 = standard,3 = race,4 = elite
			maxHandling = 4,  --handling<>4
		},
		variations = {
			"A_C_Horse_Ardennes_BayRoan",
			"A_C_Horse_Ardennes_IronGreyRoan",
			"A_C_Horse_Ardennes_StrawberryRoan",
			"a_c_horse_gang_bill"
		}
	},
	[7] = {
		attributes = {
			speed = 5,        -- 1<>10
			maxSpeed = 8,     -- speed<>10
			acceleration = 5, -- 1<>10
			maxAcceleration = 9, -- acceleration<>10
			handling = 2,     --1 = heavy,2 = standard,3 = race,4 = elite
			maxHandling = 4,  --handling<>4
		},
		variations = {
			"A_C_Horse_Belgian_BlondChestnut",
			"A_C_Horse_Belgian_MealyChestnut"
		}
	},
	[8] = {
		attributes = {
			speed = 5,        -- 1<>10
			maxSpeed = 8,     -- speed<>10
			acceleration = 5, -- 1<>10
			maxAcceleration = 9, -- acceleration<>10
			handling = 2,     --1 = heavy,2 = standard,3 = race,4 = elite
			maxHandling = 4,  --handling<>4
		},
		variations = {
			"A_C_Horse_DutchWarmblood_ChocolateRoan",
			"A_C_Horse_DutchWarmblood_SealBrown",
			"A_C_Horse_DutchWarmblood_SootyBuckskin"
		}
	},
	[9] = {
		attributes = {
			speed = 5,        -- 1<>10
			maxSpeed = 8,     -- speed<>10
			acceleration = 5, -- 1<>10
			maxAcceleration = 9, -- acceleration<>10
			handling = 3,     --1 = heavy,2 = standard,3 = race,4 = elite
			maxHandling = 4,  --handling<>4
		},
		variations = {
			"A_C_Horse_HungarianHalfbred_DarkDappleGrey",
			"A_C_Horse_HungarianHalfbred_FlaxenChestnut",
			"A_C_Horse_HungarianHalfbred_LiverChestnut",
			"A_C_Horse_HungarianHalfbred_PiebaldTobiano",
			"a_c_horse_gang_john"
		}
	},
	[10] = {
		attributes = {
			speed = 5,        -- 1<>10
			maxSpeed = 8,     -- speed<>10
			acceleration = 5, -- 1<>10
			maxAcceleration = 9, -- acceleration<>10
			handling = 1,     --1 = heavy,2 = standard,3 = race,4 = elite
			maxHandling = 4,  --handling<>4
		},
		variations = {
			"A_C_Horse_KentuckySaddle_Black",
			"A_C_Horse_KentuckySaddle_ButterMilkBuckskin_PC",
			"A_C_Horse_KentuckySaddle_ChestnutPinto",
			"A_C_Horse_KentuckySaddle_Grey",
			"A_C_Horse_KentuckySaddle_SilverBay",
			"a_c_horse_gang_uncle"
		}
	},
	[11] = {
		attributes = {
			speed = 5,        -- 1<>10
			maxSpeed = 8,     -- speed<>10
			acceleration = 5, -- 1<>10
			maxAcceleration = 9, -- acceleration<>10
			handling = 3,     --1 = heavy, 2 = standard, 3 = race, 4 = elite
			maxHandling = 4,  --handling<>4
		},
		variations = {
			"A_C_Horse_Kladruber_Black",
			"A_C_Horse_Kladruber_Silver",
			"A_C_Horse_Kladruber_Cremello",
			"A_C_Horse_Kladruber_Grey",
			"A_C_Horse_Kladruber_DappleRoseGrey",
			"A_C_Horse_Kladruber_White"
		}
	},
	[12] = {
		attributes = {
			speed = 5,        -- 1<>10
			maxSpeed = 8,     -- speed<>10
			acceleration = 5, -- 1<>10
			maxAcceleration = 9, -- acceleration<>10
			handling = 4,     --1 = heavy,2 = standard,3 = race,4 = elite
			maxHandling = 4,  --handling<>4
		},
		variations = {
			"A_C_Horse_MissouriFoxTrotter_AmberChampagne",
			"A_C_Horse_MissouriFoxTrotter_SableChampagne",
			"A_C_Horse_MissouriFoxTrotter_SilverDapplePinto",
			"a_c_horse_missourifoxtrotter_blueroan",
			"a_c_horse_missourifoxtrotter_buckskinbrindle",
			"a_c_horse_missourifoxtrotter_dapplegrey",
			"a_c_horse_gang_micah"
		}
	},
	[13] = {
		attributes = {
			speed = 5,        -- 1<>10
			maxSpeed = 8,     -- speed<>10
			acceleration = 5, -- 1<>10
			maxAcceleration = 9, -- acceleration<>10
			handling = 1,     --1 = heavy,2 = standard,3 = race,4 = elite
			maxHandling = 4,  --handling<>4
		},
		variations = {
			"A_C_Horse_Morgan_Bay",
			"A_C_Horse_Morgan_BayRoan",
			"A_C_Horse_Morgan_FlaxenChestnut",
			"A_C_Horse_Morgan_LiverChestnut_PC",
			"A_C_Horse_Morgan_Palomino"
		}
	},
	[14] = {
		attributes = {
			speed = 10,       -- 1<>10
			maxSpeed = 10,    -- speed<>10
			acceleration = 10, -- 1<>10
			maxAcceleration = 9, -- acceleration<>10
			handling = 2,     --1 = heavy,2 = standard,3 = race,4 = elite
			maxHandling = 4,  --handling<>4
		},
		variations = { "A_C_Horse_MP_Mangy_Backup" }
	},
	[15] = {
		attributes = {
			speed = 5,        -- 1<>10
			maxSpeed = 8,     -- speed<>10
			acceleration = 5, -- 1<>10
			maxAcceleration = 9, -- acceleration<>10
			handling = 1,     --1 = heavy,2 = standard,3 = race,4 = elite
			maxHandling = 4,  --handling<>4
		},
		variations = {
			"A_C_Horse_Mustang_GoldenDun",
			"A_C_Horse_Mustang_GrulloDun",
			"A_C_Horse_Mustang_TigerStripedBay",
			"A_C_Horse_Mustang_WildBay",
			"a_c_horse_mustang_buckskin",
			"a_c_horse_mustang_chestnuttovero",
			"a_c_horse_mustang_reddunovero",
			"a_c_horse_gang_lenny",
			"a_c_horse_gang_sadie_endlesssummer"
		}
	},
	[16] = {
		attributes = {
			speed = 5,        -- 1<>10
			maxSpeed = 8,     -- speed<>10
			acceleration = 5, -- 1<>10
			maxAcceleration = 9, -- acceleration<>10
			handling = 1,     --1 = heavy,2 = standard,3 = race,4 = elite
			maxHandling = 4,  --handling<>4
		},
		variations = {
			"A_C_Horse_Nokota_BlueRoan",
			"A_C_Horse_Nokota_ReverseDappleRoan",
			"A_C_Horse_Nokota_WhiteRoan",
			"a_c_horse_gang_charles_endlesssummer",
			"a_c_horse_gang_karen"
		}
	},
	[17] = {
		attributes = {
			speed = 5,        -- 1<>10
			maxSpeed = 8,     -- speed<>10
			acceleration = 5, -- 1<>10
			maxAcceleration = 9, -- acceleration<>10
			handling = 1,     --1 = heavy,2 = standard,3 = race,4 = elite
			maxHandling = 4,  --handling<>4
		},
		variations = {
			"A_C_Horse_Shire_DarkBay",
			"A_C_Horse_Shire_LightGrey",
			"A_C_Horse_Shire_RavenBlack"
		}
	},
	[18] = {
		attributes = {
			speed = 5,        -- 1<>10
			maxSpeed = 8,     -- speed<>10
			acceleration = 5, -- 1<>10
			maxAcceleration = 9, -- acceleration<>10
			handling = 1,     --1 = heavy,2 = standard,3 = race,4 = elite
			maxHandling = 4,  --handling<>4
		},
		variations = {
			"A_C_Horse_SuffolkPunch_RedChestnut",
			"A_C_Horse_SuffolkPunch_Sorrel"
		}
	},
	[19] = {
		attributes = {
			speed = 5,        -- 1<>10
			maxSpeed = 8,     -- speed<>10
			acceleration = 5, -- 1<>10
			maxAcceleration = 9, -- acceleration<>10
			handling = 1,     --1 = heavy,2 = standard,3 = race,4 = elite
			maxHandling = 4,  --handling<>4
		},
		variations = {
			"A_C_Horse_TennesseeWalker_BlackRabicano",
			"A_C_Horse_TennesseeWalker_Chestnut",
			"A_C_Horse_TennesseeWalker_DappleBay",
			"A_C_Horse_TennesseeWalker_FlaxenRoan",
			"A_C_Horse_TennesseeWalker_MahoganyBay",
			"A_C_Horse_TennesseeWalker_RedRoan",
			"A_C_Horse_TennesseeWalker_GoldPalomino_PC"
		}
	},
	[20] = {
		attributes = {
			speed = 5,        -- 1<>10
			maxSpeed = 8,     -- speed<>10
			acceleration = 5, -- 1<>10
			maxAcceleration = 9, -- acceleration<>10
			handling = 1,     --1 = heavy,2 = standard,3 = race,4 = elite
			maxHandling = 4,  --handling<>4
		},
		variations = {
			"A_C_Horse_Thoroughbred_BlackChestnut",
			"A_C_Horse_Thoroughbred_BloodBay",
			"A_C_Horse_Thoroughbred_Brindle",
			"A_C_Horse_Thoroughbred_DappleGrey",
			"A_C_Horse_Thoroughbred_ReverseDappleBlack"
		}
	},
	[21] = {
		attributes = {
			speed = 5,        -- 1<>10
			maxSpeed = 8,     -- speed<>10
			acceleration = 5, -- 1<>10
			maxAcceleration = 9, -- acceleration<>10
			handling = 1,     --1 = heavy,2 = standard,3 = race,4 = elite
			maxHandling = 4,  --handling<>4
		},
		variations = {
			"A_C_Horse_Turkoman_DarkBay",
			"A_C_Horse_Turkoman_Gold",
			"A_C_Horse_Turkoman_Silver",
			"a_c_horse_turkoman_chestnut",
			"a_c_horse_turkoman_grey",
			"a_c_horse_turkoman_perlino",
			"a_c_horse_gang_sadie"
		}
	},
	[22] = {
		attributes = {
			speed = 5,        -- 1<>10
			maxSpeed = 8,     -- speed<>10
			acceleration = 5, -- 1<>10
			maxAcceleration = 9, -- acceleration<>10
			handling = 1,     --1 = heavy,2 = standard,3 = race,4 = elite
			maxHandling = 4,  --handling<>4
		},
		variations = {
			"A_C_Horse_Criollo_Dun",
			"A_C_Horse_Criollo_MarbleSabino",
			"A_C_Horse_Criollo_BayFrameOvero",
			"A_C_Horse_Criollo_BayBrindle",
			"A_C_Horse_Criollo_SorrelOvero",
			"A_C_Horse_Criollo_BlueRoanOvero"
		}
	},
	[23] = {
		attributes = {
			speed = 5,        -- 1<>10
			maxSpeed = 8,     -- speed<>10
			acceleration = 5, -- 1<>10
			maxAcceleration = 9, -- acceleration<>10
			handling = 1,     --1 = heavy,2 = standard,3 = race,4 = elite
			maxHandling = 4,  --handling<>4
		},
		variations = {
			"A_C_Horse_Breton_SteelGrey",
			"A_C_Horse_Breton_MealyDappleBay",
			"A_C_Horse_Breton_SealBrown",
			"A_C_Horse_Breton_GrulloDun",
			"A_C_Horse_Breton_Sorrel",
			"A_C_Horse_Breton_RedRoan"
		}
	},
	[24] = {
		attributes = {
			speed = 5,        -- 1<>10
			maxSpeed = 8,     -- speed<>10
			acceleration = 5, -- 1<>10
			maxAcceleration = 9, -- acceleration<>10
			handling = 1,     --1 = heavy,2 = standard,3 = race,4 = elite
			maxHandling = 4,  --handling<>4
		},
		variations = {
			"A_C_HORSE_NORFOLKROADSTER_BLACK",
			"A_C_HORSE_NORFOLKROADSTER_SPECKLEDGREY",
			"A_C_HORSE_NORFOLKROADSTER_PIEBALDROAN",
			"A_C_HORSE_NORFOLKROADSTER_ROSEGREY",
			"A_C_HORSE_NORFOLKROADSTER_DAPPLEDBUCKSKIN",
			"A_C_HORSE_NORFOLKROADSTER_SPOTTEDTRICOLOR"
		}
	},
	[25] = {
		attributes = {
			speed = 5,        -- 1<>10
			maxSpeed = 8,     -- speed<>10
			acceleration = 5, -- 1<>10
			maxAcceleration = 9, -- acceleration<>10
			handling = 1,     --1 = heavy,2 = standard,3 = race,4 = elite
			maxHandling = 4,  --handling<>4
		},
		variations = {
			"A_C_HorseMulePainted_01"
		}
	},
	[26] = {
		attributes = {
			speed = 5,        -- 1<>10
			maxSpeed = 8,     -- speed<>10
			acceleration = 5, -- 1<>10
			maxAcceleration = 9, -- acceleration<>10
			handling = 1,     --1 = heavy,2 = standard,3 = race,4 = elite
			maxHandling = 4,  --handling<>4
		},
		variations = {
			"A_C_HorseMule_01"
		}
	},
	[27] = {
		attributes = {
			speed = 5,        -- 1<>10
			maxSpeed = 8,     -- speed<>10
			acceleration = 5, -- 1<>10
			maxAcceleration = 9, -- acceleration<>10
			handling = 1,     --1 = heavy,2 = standard,3 = race,4 = elite
			maxHandling = 4,  --handling<>4
		},
		variations = {
			"A_C_Donkey_01"
		}
	},
	[28] = {
		attributes = {
			speed = 5,        -- 1<>10
			maxSpeed = 8,     -- speed<>10
			acceleration = 5, -- 1<>10
			maxAcceleration = 9, -- acceleration<>10
			handling = 1,     --1 = heavy,2 = standard,3 = race,4 = elite
			maxHandling = 4,  --handling<>4
		},
		variations = {
			"a_c_horse_gypsycob_piebald",
			"a_c_horse_gypsycob_skewbald",
			"a_c_horse_gypsycob_splashedbay",
			"a_c_horse_gypsycob_splashedpiebald",
			"a_c_horse_gypsycob_whiteblagdon",
		}
	},
	[29] = {
		attributes = {
			speed = 5,        -- 1<>10
			maxSpeed = 8,     -- speed<>10
			acceleration = 5, -- 1<>10
			maxAcceleration = 9, -- acceleration<>10
			handling = 1,     --1 = heavy,2 = standard,3 = race,4 = elite
			maxHandling = 4,  --handling<>4
		},
		variations = {
			"a_c_horse_buell_warvets",
		}
	},
}

Config.wagons = {
	[1] = {
		price = { money = 500.0, gold = 15 },
		name = "Blue Army Wagon",
		model = "armysupplywagon",
		locker = {
			maxWeight = 5000.0,
			maxSlots = 15
		}
	},
	[2] = {
		price = 10.0,
		locker = false, --turn off the locker
		model = "bountywagon01x",
	},
	[3] = {
		price = { gold = 5 },
		model = "buggy01",
	},
	[4] = {
		model = "buggy02",
	},
	[5] = {
		model = "buggy03",
	},
	[6] = {
		model = "cart01",
	},
	[7] = {
		model = "cart02",
	},
	[8] = {
		model = "cart03",
	},
	[9] = {
		model = "cart04",
	},
	[10] = {
		model = "cart05",
	},
	[11] = {
		model = "cart06",
	},
	[12] = {
		model = "cart07",
	},
	[13] = {
		model = "cart08",
	},
	[14] = {
		model = "chuckwagon000x",
	},
	[15] = {
		model = "chuckwagon002x",
	},
	[16] = {
		model = "coach2",
	},
	[18] = {
		model = "coach3",
	},
	[19] = {
		model = "coach4",
	},
	[20] = {
		model = "coach5",
	},
	[21] = {
		model = "coach6",
	},
	[22] = {
		model = "coal_wagon",
	},
	[23] = {
		model = "gatchuck_2",
	},
	[24] = {
		model = "gatchuck",
	},
	[25] = {
		model = "huntercart01",
	},
	[26] = {
		model = "oilwagon01x",
	},
	[27] = {
		model = "oilwagon02x",
	},
	[28] = {
		model = "policewagon01x",
	},
	[29] = {
		model = "policewagongatling01x",
	},
	[30] = {
		model = "stagecoach001x",
	},
	[31] = {
		model = "stagecoach002x",
	},
	[32] = {
		model = "stagecoach003x",
	},
	[33] = {
		model = "stagecoach004_2x",
	},
	[34] = {
		model = "stagecoach004x",
	},
	[35] = {
		model = "stagecoach005x",
	},
	[36] = {
		model = "stagecoach006x",
	},
	[38] = {
		model = "supplywagon",
	},
	[39] = {
		model = "utilliwag",
	},
	[40] = {
		model = "wagon02x",
	},
	[41] = {
		model = "wagon03x",
	},
	[42] = {
		model = "wagon04x",
	},
	[44] = {
		model = "wagon05x",
	},
	[45] = {
		model = "wagon06x",
	},
	[46] = {
		model = "wagonarmoured01x",
	},
	[47] = {
		model = "wagoncircus01x",
	},
	[48] = {
		model = "wagoncircus02x",
	},
	[49] = {
		model = "wagondairy01x",
	},
	[50] = {
		model = "wagondoc01x",
	},
	[51] = {
		model = "wagonprison01x",
	},
	[52] = {
		model = "wagontraveller01x",
	},
	[53] = {
		model = "wagonwork01x",
	},
	[54] = {
		model = "warwagon2",
	},
}

exports("getConfig", function()
	return Config
end)
```

`kd_stable/shared/lang.lua`

```lua
-------------------------------------------
-- DON'T EDIT THIS FILE
-- TO TRANSLATE THE SCRIPT, USE overwriteLang.lua file instead
-------------------------------------------

Lang = {}

Lang.blipStoreName = "Stable"
Lang.blipHorse = "Your Horse"
Lang.blipLastHorse = "Your last Horse"
Lang.blipLastHorseFollow = "Your last Horse (follow)"
Lang.blipTrainingName = "Horse training"
Lang.blipWagon = "Your wagon"

--prompt
Lang.promptTitle = "Stable"
Lang.enter = "Enter"
Lang.select = "Select"
Lang.unselect = "Unselect"
Lang.back = "Back"
Lang.buy = "Buy"
Lang.turn = "Rotate"
Lang.buyGold = "Buy with ~COLOR_GOLD~gold"
Lang.favourite = "Mark as ~COLOR_GOLD~favourite"
Lang.manage = "Manage"
Lang.unequip = "Unequip"
Lang.equip = "Equip"
Lang.bequeath = "Bequeath"
Lang.release = "~COLOR_POSSE_ENEMY~Release"
Lang.ride = "~COLOR_GREEN~Ride him"
Lang.stableHorse = "Stable this horse"
Lang.stopLeading = "Stop leading"
Lang.horseStorage = "Open Saddlebag"
Lang.takeSaddlebag = "Take saddlebag"
Lang.putSaddlebag = "Put saddlebag"
Lang.colorPalette = "Color palette"
Lang.use = "use"
Lang.delete = "~COLOR_POSSE_ENEMY~Delete"
Lang.checkHorseshoes = "Check horseshoes"
Lang.stableWagon = "Stable this wagon"
Lang.startTraining = "Start training"
Lang.paddock = "Paddock"
Lang.revive = "~COLOR_GREEN~Revive"
Lang.reviveGold = "Revive with ~COLOR_GOLD~gold"
Lang.brush = "Brush"
Lang.feed = "Feed"
Lang.openLocker = "Open the safe"
Lang.skip = "Skip"
Lang.takeLantern = "Take lantern"
Lang.putLantern = "Put lantern"
Lang.destroy = "~COLOR_POSSE_ENEMY~Destroy"
Lang.transferIt = "Transfer %s"
Lang.stowPelt = "Stow Pelt"
Lang.removePelt = "Remove Pelt"
Lang.pickUpPelt = "Pick Up Pelt"
Lang.drop = "Drop"
Lang.maxSmallPeltOnHorse = "Your horse can't carry more small pelts"
Lang.maxLargePeltOnHorse = "Your horse already carries a large pelt"
Lang.close = "Close"
Lang.minutes = "min"
Lang.seconds = "s"
Lang.transferHere = "Transfer here"
Lang.transferInProgress = "Transfer in progress"

-- MENU
Lang.price = "Price"
Lang.priceToTransfer = "Price to transfer"
Lang.variation = "Variation"
Lang.color = "color"
Lang.of = "%1 of %2"
Lang.devise = "$"
Lang.number = "Number %1"
Lang.free = "Free"
Lang.headerTitle = "Stable"
Lang.listHorseOwned = "Your horses"
Lang.buyHorse = "Buy a new Horse"
Lang.buyNewHorse = "Buy Horses"
Lang.myHorse = "Manage Owned Horses"
Lang.yourHorses = "Manage your owned horses"
Lang.menu = "Menu"
Lang.horseHandlingHeavy = "Heavy"
Lang.horseHandlingStandard = "Standard"
Lang.horseHandlingRace = "Race"
Lang.hosreHandlingElite = "Elite"
Lang.selectedHorse = "Your selected horse"
Lang.buyComponent = "Buy a new component"
Lang.buyNewComponents = "Buy components"
Lang.manageComponent = "Your owned components"
Lang.manageComponentDesc = "Manage components your already bought"
Lang.equipedOn = "Equiped on <b>%s</b>"
Lang.changeComponent = "Manage equiped components"
Lang.bequeathHorse = "Bequeath %s"
Lang.bequeathHorseDesc = "Bequeath this horse to someone else.<br><span style='font-style:italic'>(Components will not be bequeathed)</span>"
Lang.releaseHorse = "Release %s"
Lang.releaseHorseDesc = "You will lose this horse.<br><span style='font-style:italic'>(Components will not be deleted)</span>"
Lang.horse_saddles = "Saddles"
Lang.horse_saddlebags = "Saddle bags"
Lang.saddle_stirrups = "Stirrups"
Lang.saddle_horns = "Horns"
Lang.horse_blankets = "Blankets"
Lang.horse_bedrolls = "Berdrolls"
Lang.horse_manes = "Manes"
Lang.horse_tails = "Tails"
Lang.horse_shoes = "Shoes"
Lang.horse_accessories = "Accessories"
Lang.horse_masks = "Masks"
Lang.horse_bridles = "Bridles"
Lang.saddle_lanterns = "Lanterns"
Lang.horse_mustache = "Mustaches"
Lang.horse_outfits = "Accessories"
Lang.listComponents = "Categories available"
Lang.listComponentsBought = "Your components bought"
Lang.isOut = "Outside"
Lang.saddlebag = "Saddlebag"
Lang.horseStatistics = "Horse statistics"
Lang.male = "Male"
Lang.female = "Female"
Lang.chooseSex = "Choose the sex"
Lang.listHorse = "List of horses"
Lang.speed = "Speed"
Lang.acceleration = "Acceleration"
Lang.handling = "Handling"
Lang.race = "Race"
Lang.sex = "Sex"
Lang.buyAndManageHorse = "Buy or Manage your horses"
Lang.buyAndManageWagon = "Buy or Manage your wagons"
Lang.horseManager = "Horse manager"
Lang.wagonManager = "Wagon manager"
Lang.numberOfSeats = "Number of Seats"
Lang.numberOfHorses = "Number of Horses"
Lang.tint_generic_clean = "Classic"
Lang.tint_hair = "Hair"
Lang.tint_horse_leather = "Horse leather"
Lang.tint_leather = "Leather"
Lang.tint_makeup = "Makeup"
Lang.palette = "Palette"
Lang.tint_horse = "Horse"
Lang.selectHorseNumber = "%d/%d horse selected"
Lang.changeHair = "Change Hair"
Lang.noComponentsBought = "No component bought"
Lang.manageHair = "Manage Hair"
Lang.manageManes = "Change the mane"
Lang.manageTails = "Change the tail"
Lang.manageMustache = "Change the mustache"
Lang.colorTitle = "Color %d"
Lang.noHorseOwned = "No Horse bought"
Lang.shoesState = "Shoes state"
Lang.customColor = "Custom color"
Lang.Color = "Color"
Lang.bondingLevel = "Bonding Level"
Lang.reviveFor = "Revive for"
Lang.customCoat = "Custom coat"
Lang.currentStable = "Current stable"
Lang.explorer = "Explorer"
Lang.holster = "Holster"
Lang.hunter = "Hunter"
Lang.longScabbardLeft = "Long Scabbard Left"
Lang.longScabbardRight = "Long Scabbard Right"
Lang.prospectors = "Prospectors"
Lang.rearSkin = "Rear skin"
Lang.skin = "Skin"
Lang.skinBears = "Skin Bears"
Lang.skinFox = "Skin Fox"
Lang.skinLoadout = "Skin Loadout"
Lang.snowLoadout = "Snow Loadout"
Lang.traveler = "Traveler"
Lang.waterLoadout = "Water Loadout"
Lang.wolf = "Wolf"
Lang.workerLoadout = "Worker Loadout"
Lang.selectNewStable = "Select the new stable"
Lang.currentStable = "Currently in this stable"
Lang.transfer = "Transfer"
Lang.transferToStable = "Transfer to the stable of %s"
Lang.transferToAnotherStable = "Transfer it to another stable"
Lang.saddlebagSize = "Saddlebag Size"
Lang.health = "Health"
Lang.stamina = "Stamina"
Lang.sack = "Sack"

--Wagons
Lang.wagon = "Wagon"
Lang.huntercart01 = "Hunting cart"
Lang.armysupplywagon = "Army Supply Wagon"
Lang.bountywagon01x = "Bounty Wagon"
Lang.buggy01 = "Buggy 1"
Lang.buggy02 = "Buggy 2"
Lang.buggy03 = "Buggy 3"
Lang.cart01 = "Cart 1"
Lang.cart02 = "Cart 2"
Lang.cart03 = "Cart 3"
Lang.cart04 = "Cart 4"
Lang.cart05 = "Cart 5"
Lang.cart06 = "Cart 6"
Lang.cart07 = "Cart 7"
Lang.cart08 = "Cart 8"
Lang.chuckwagon000x = "Chuck Wagon 1"
Lang.chuckwagon002x = "Chuck Wagon 2"
Lang.gatchuck = "Gat Chuck 3"
Lang.gatchuck_2 = "Gat Chuck Armed"
Lang.utilliwag = "Utillity Wagon 4"
Lang.wagon02x = "Wagon 5"
Lang.wagon03x = "Wagon 6"
Lang.wagon04x = "Wagon 7"
Lang.wagon05x = "Wagon 8"
Lang.wagon06x = "Wagon 9"
Lang.coach2 = "Coach 1"
Lang.coach3 = "Coach 2"
Lang.coach4 = "Coach 3"
Lang.coach5 = "Coach 4"
Lang.coach6 = "Coach 5"
Lang.coal_wagon = "Coal Wagon"
Lang.oilwagon01x = "Oil Wagon 1"
Lang.oilwagon02x = "Oil Wagon 2"
Lang.stagecoach001x = "Stage Coach 1"
Lang.stagecoach002x = "Stage Coach 2"
Lang.stagecoach003x = "Stage Coach 3"
Lang.stagecoach004x = "Stage Coach 4"
Lang.stagecoach004_2x = "Stage Coach 4 V2"
Lang.stagecoach005x = "Stage Coach 5"
Lang.stagecoach006x = "Stage Coach 6"
Lang.supplywagon = "Supply Wagon 1"
Lang.supplywagon2 = "Supply Wagon 2"
Lang.wagonarmoured01x = "Armoured Wagon"
Lang.wagoncircus01x = "Circus Wagon 1"
Lang.wagoncircus02x = "Circus Wagon 2"
Lang.wagondairy01x = "Dairy Wagon"
Lang.wagondoc01x = "Doctor Wagon"
Lang.wagonprison01x = "Prison Wagon"
Lang.wagontraveller01x = "Traveller Wagon"
Lang.wagonwork01x = "Baker Wagon"
Lang.policewagon01x = "Police wagon"
Lang.policewagongatling01x = "Police Wagon Armed"
Lang.warwagon2 = "War wagon"
Lang.tintNumber = "Tint n°%d"
Lang.tints = "Tints"
Lang.editTint = "Tint"
Lang.editPropset = "Propset"
Lang.editLivery = "Livery"
Lang.editLantern = "Lantern"
Lang.editExtra = "Extra"
Lang.noLivery = "No livery"
Lang.noTint = "No tint"
Lang.noExtra = "No extra"
Lang.noLantern = "No lantern"
Lang.noPropset = "No propset"
Lang.buyWagon = "Buy a new Wagon"
Lang.buyWagonDesc = "Buy Wagons"
Lang.myWagon = "Manage owned Wagons"
Lang.myWagonDesc = "Manage your owned wagons"
Lang.listWagonsOwned = "Your wagons"
Lang.noWagonOwned = "No Wagon bought"
Lang.changeHorseShoes = "Change Horseshoes"
Lang.changeHorseShoesDesc = "Put a new horseshoes"
Lang.newHorseshoeBought = "New horseshoe are ready for the next %.0f km"
Lang.isDead = "Dead"
Lang.listWagons = "List of wagons"
Lang.storageSize = "Storage"
Lang.storageSizeValue = "%.2f kg"
Lang.storageSizeValueSlot = "%d slots"
Lang.destroyWagon = "Destroy %s"
Lang.destroyWagonDesc = "You will lose this wagon."
Lang.bequeathWagonDesc = "Bequeath this wagon to someone else."
Lang.coat = "Coat"
Lang.noStorage = "No storage"
Lang.selectWagon = "Call a wagon"
Lang.model = "Model"
Lang.wagons = "Wagons"

--Livery
Lang.accented = "Accented"
Lang.appleseed = "Appleseed"
Lang.army = "Army"
Lang.bordered = "Bordered"
Lang.boles = "Boles"
Lang.chassis = "Chassis"
Lang.cornwall = "CornWall"
Lang.crosshatch = "Crosshatch"
Lang.detailed = "Detailed"
Lang.dot = "Dot"
Lang.double = "Double Lines"
Lang.davis = "Davis"
Lang.embellished = "Embellished"
Lang.fancy = "Fancy"
Lang.flourish = "Flourish"
Lang.flourishII = "FlourishII"
Lang.framed = "Framed"
Lang.gold = "Gold"
Lang.harris = "Harris"
Lang.heartlands = "Heartlands"
Lang.hunt = "Hunt"
Lang.jameson = "Jameson"
Lang.kauffman = "Kayffman"
Lang.leaf = "Leaf"
Lang.lemoyne = "Lemoyne"
Lang.line = "Line"
Lang.lines = "Lines"
Lang.loco = "Loco"
Lang.looped = "Looped"
Lang.ornate = "Ornate"
Lang.outlined = "Outlined"
Lang.panaled = "Panaled"
Lang.police = "Police"
Lang.rounded = "Rounded"
Lang.scrolled = "Scrolled"
Lang.simple = "Simple"
Lang.single = "Single"
Lang.squared = "Squared"
Lang.tapared = "Tapared"
Lang.taveller = "Tavaller"
Lang.trimmed = "Trimmed"
Lang.wakefield = "Wakefield"
Lang.crossed = "Crossed"
Lang.tapered = "Tapered"

--Activities
Lang.activiesAvailable = "Activities available"
Lang.activitySpeed = "Speed training"
Lang.activitySpeedDesc = "Improve the horse speed.<br>Need to repeat %d times to level up"
Lang.activityAcceleration = "Acceleration training"
Lang.activityAccelerationDesc = "Improve the horse acceleration.<br>Need to repeat %d times to level up"
Lang.activityHandling = "Handling training"
Lang.activityHandlingDesc = "Improve the horse handling.<br>Need to repeat %d times to level up"
Lang.activityBonding = "Bonding training"
Lang.activityBondingDesc = "Improve the horse bonding.<br>Need to repeat %d times to level up"
Lang.noActivityAround = "No %s around you"
Lang.noHorseForTraining = "You need to mount/lead an horse"
Lang.noTrainForThisHorse = "You can't train this horse"
Lang.currentHorseStats = "Current Horse statistics:"
Lang.noTrainMore = "You can't train more this statistic"

--Notifications
Lang.noMoney = "You don't have enough money"
Lang.enterHorseName = "Enter the horse's name"
Lang.enterWagonName = "Enter the wagon's name"
Lang.newHorseBought = "New horse bought"
Lang.newComponentBought = "New component bought"
Lang.componentEquiped = "Component Equiped"
Lang.bequeathTo = "Bequeath to: (playerID)"
Lang.yourPlayerID = "It's your player ID"
Lang.wrongPlayerID = "This player is not here"
Lang.congratulation = "congratulation"
Lang.bequeathedSucess = "You bequeathed %s to %s"
Lang.receivedHorse = "You received a new horse from %s"
Lang.releaseSuccess = "%s is now free!"
Lang.deleteSuccess = "%s is deleted!"
Lang.noFavouriteHorse = "No favourite horse selected"
Lang.noHorseOut = "You have to go in stable to get out your horse"
Lang.cantStableHorse = "You can't stable this horse"
Lang.horseOutside = "This horse is outside"
Lang.horseTooFar = "Your horse is too far to %s him"
Lang.horseWhistle = "whistle"
Lang.horseBrush = "brush"
Lang.horseFeed = "feed"
Lang.noSaddlebag = "This horse doesn't have saddlebag"
Lang.pedAlreadySatchel = "You already have a satchel"
Lang.horseAlreadySatchel = "This horse already have a saddlebag"
Lang.featureDisabled = "This feature is disabled by the server owner"
Lang.newWagonBought = "New wagon bought"
Lang.horseshoesdead = "Shattered horseshoes, the horse can't run anymore."
Lang.horseshoesVeryDamaged = "The horseshoes are very damaged. Go buy new in the stable."
Lang.horseshoesStateNotif = "Horseshoes state: %d%%"
Lang.fleeDisabled = "Flee is disabled by server owner"
Lang.levelIncrease = "Increased to Level %d"
Lang.bonding = "Bonding"
Lang.invalidJob = "You don't have the required job"
Lang.horseRevived = "%s revived"
Lang.activitiesSucess = "Training success"
Lang.statLevelUp = "level up!"
Lang.hitAllCheckpoints = "Hit all checkpoints to complete the training"
Lang.activityToastTitle = "~COLOR_GOLD~%s"
Lang.go = "~COLOR_GOLD~GO !"
Lang.noPalette = "No color palette available"
Lang.noItem = "You don't have item to %s"
Lang.favouriteAlreadyOut = "Your favourite horse is already out"
Lang.reachLimitHorse = "You already have the maximum amount of horse"
Lang.reachLimitWagon = "You already have the maximum amount of wagon"
Lang.healthIncrease = "Health levels up!"
Lang.staminaIncrease = "Stamina levels up!"
Lang.wagonDeleted = "Wagon deleted!"
Lang.receivedwagon = "You received a new wagon from %s"
Lang.wagonSpawnOccuped = "Spawn location is occuped"
Lang.noWagonAroundYou = "No wagon around you"
Lang.favouriteDied = "Your favourite horse is died"
Lang.noHorseAround = "No horse around you"
Lang.cantFleeHorse = "You can't make this horse flee"
Lang.cantChangeHorseShoes = "You can't change horseshoes of this horse"
Lang.noWagonAround = "No wagon around you"
Lang.cantFleeWagon = "You can't make this wagon flee"
Lang.horseDead = "Your horse is dead"
Lang.cantStableNPCWagon = "You can't stable this wagon"
Lang.stopTrainingByDismount = "Training canceled"
Lang.stopTrainingByHorseDeath = "Training canceled"
Lang.horseAddedToStable = "%s added to your stable"
Lang.horseNotDied = "The closest horse is not died"
Lang.notYourWagon = "It's not your wagon"
Lang.horseFleeingPleaseWait = "Your horse is fleeing, please wait to whistle it again"
Lang.cantUnequipOut = "You can't unequip this component when your horse is out"

--Commands
Lang.sidesaddleHelp = "Command to side saddle on horse"
Lang.side = "side"
Lang.sidesaddleArgs = "left/right - empty to stop"
Lang.commandFixHorse = "Fix horse prompt"
Lang.commandFixWagon = "Repair the nearest wagon"
```
## 4. Add new activity
You can add more activity to train your horse by edit the file : `overwriteActivities.lua`
```lua
table.insert(trainingTracks,{
	type = "handling", -- Type of training : "handling", "speed" or "acceleration"
	start = vec4(-386.273, 788.489, 115.865, 93.648), -- location of the start
	camPreview = { -- Camera for the trailer
		{ -- Start position
			coords = vec3(-386.293, 800.838, 117.883),
			rot = vec3(-7.000,0.000,155.131),
		},
		{ -- End position
			coords = vec3(-388.248, 800.757, 117.926),
			rot = vec3(-7.000,0.000,165.14),
		},
	},
	props = { -- list of props to spawn for the training
		{
			model = `mp001_p_mp_jump_sackshort01`,
			coords = vec3(-392.630, 768.967, 114.730),
			rotation = vec3(0, 0, -85.999),
		},
	},
	checkpoints = { -- list of checkpoints
		{
			coords = vec3(-392.8, 768.856, 116.826),
			marker = "ring", -- optional : Type of marker "ring", "cylinder" or marker hash
			size = vec2(1.0,1.0), -- optional : Size of the marker
			rotation = vec3(0,0,-85) -- optional : Rotation of the marker
			distance = 3.0 -- optional : Distance to valid the checkpoint
		},
	}
})
```
## 4. Horse statistics

### Attributes

Points required to reach all levels:

#### Acceleration
Determines how ling it takes the horse to reach its top speed
| Level:  | 0   | 1   | 2   | 3   | 4   | 5   | 6   | 7    | 8    | 9    |
| ------- | --- | --- | --- | --- | --- | --- | --- | ---- | ---- | ---- |
| Points: | 0   | 50  | 100 | 200 | 350 | 550 | 800 | 1100 | 1400 | 1700 |

#### Agility
Determines how fast the horse can turn.
| Level:  | 0   | 1   | 2   | 3   | 4   | 5   | 6   | 7    | 8    | 9    |
| ------- | --- | --- | --- | --- | --- | --- | --- | ---- | ---- | ---- |
| Points: | 0   | 50  | 100 | 200 | 350 | 550 | 800 | 1100 | 1400 | 1700 |

#### Body Heat
Determines the heat of the horse body. The affect in the game in unknown
| Level:  | 0   | 1   | 2   | ..  | 50  | ..  | 100 |
| ------- | --- | --- | --- | --- | --- | --- | --- |
| Points: | 0   | 1   | 2   | ..  | 50  | ..  | 100 |

#### Body Weight
Weight affects the top speed. The neutral value is level 50. 
| Level:  | 0   | 1   | 2   | ..  | 50  | ..  | 100 |
| ------- | --- | --- | --- | --- | --- | --- | --- |
| Points: | 0   | 1   | 2   | ..  | 50  | ..  | 100 |

#### Bonding
As you level up your horse, you will gain more ability with your horse:
* Travel through difficult area and deeper water
* New horse tricks

| Level | Functions              |	Controls For XBOX                                          |
| ----- | ---------------------- | ----------------------------------------------------------- |
| 1     | -                      | -                                                           |
| 2     | Rear                   | When stationary press **RB + tap X**                        |
| 3     | Skid Turn<br>Skid Stop |	When moving hold **RB + A**<br>When moving hold **RB + X** |
| 4     | Piaffe<br>Drift        | When stationary hold **X**<br>When moving hold **X**         |
  
Bonding level progression depending on the horse model:  
  
:::details models for <0-950>
a_c_horse_belgian_blondchestnut  
a_c_horse_belgian_mealychestnut  
a_c_horse_kentuckysaddle_buttermilkbuckskin_pc  
a_c_horse_morgan_liverchestnut_pc  
a_c_horse_morgan_bay  
a_c_horse_morgan_bayroan  
a_c_horse_morgan_flaxenchestnut  
a_c_horse_morgan_palomino  
a_c_horse_mp_mangy_backup  
a_c_horse_shire_darkbay  
a_c_horse_shire_lightgrey  
a_c_horse_suffolkpunch_redchestnut  
a_c_horse_suffolkpunch_sorrel  
a_c_horse_tennesseewalker_goldpalomino_pc  
a_c_horse_tennesseewalker_mahoganybay  
a_c_horse_tennesseewalker_redroan  
a_c_horse_gang_uncle  
a_c_horse_kentuckysaddle_black  
a_c_horse_kentuckysaddle_chestnutpinto  
a_c_horse_kentuckysaddle_grey  
a_c_horse_kentuckysaddle_silverbay  
a_c_horse_winter02_01  
:::
| Level:  | 0   | 1   | 2   | 3   | 4   |
| ------- | --- | --- | --- | --- | --- |
| Points: | 0   | 50  | 250 | 550 | 950 |
:::details models for <0-1450>
a_c_horse_americanpaint_overo  
a_c_horse_americanpaint_tobiano  
a_c_horse_americanpaint_splashedwhite  
a_c_horse_eagleflies  
a_c_horse_americanstandardbred_black  
a_c_horse_americanstandardbred_buckskin  
a_c_horse_americanstandardbred_palominodapple  
a_c_horse_andalusian_darkbay  
a_c_horse_murfreebrood_mange_03  
a_c_horse_appaloosa_blanket  
a_c_horse_appaloosa_leopardblanket  
a_c_horse_gang_charles  
a_c_horse_gang_uncle_endlesssummer  
a_c_horse_appaloosa_fewspotted_pc  
a_c_horse_breton_redroan  
a_c_horse_breton_sorrel  
a_c_horse_criollo_blueroanovero  
a_c_horse_criollo_dun  
a_c_horse_dutchwarmblood_sealbrown  
a_c_horse_dutchwarmblood_sootybuckskin  
a_c_horse_ardennes_bayroan  
a_c_horse_gang_bill  
a_c_horse_gypsycob_piebald  
a_c_horse_gypsycob_whiteblagdon  
a_c_horse_hungarianhalfbred_darkdapplegrey  
a_c_horse_gang_john  
a_c_horse_hungarianhalfbred_flaxenchestnut  
a_c_horse_hungarianhalfbred_piebaldtobiano  
a_c_horse_kladruber_black  
a_c_horse_kladruber_white  
a_c_horse_mustang_grullodun  
a_c_horse_mustang_wildbay  
a_c_horse_gang_charles_endlesssummer  
a_c_horse_gang_karen  
a_c_horse_murfreebrood_mange_02  
a_c_horse_nokota_blueroan  
a_c_horse_nokota_whiteroan  
a_c_horse_norfolkroadster_black  
a_c_horse_norfolkroadster_speckledgrey  
a_c_horse_shire_ravenblack  
a_c_horse_gang_kieran  
a_c_horse_tennesseewalker_flaxenroan  
a_c_horse_thoroughbred_bloodbay  
a_c_horse_thoroughbred_dapplegrey  
:::
| Level:  | 0   | 1   | 2   | 3   | 4    |
| ------- | --- | --- | --- | --- | ---- |
| Points: | 0   | 50  | 300 | 750 | 1450 |
:::details models for <0-1950>
a_c_horse_americanpaint_greyovero  
a_c_horse_gang_javier  
a_c_horse_americanstandardbred_lightbuckskin  
a_c_horse_americanstandardbred_silvertailbuckskin  
a_c_horse_gang_sean  
a_c_horse_andalusian_perlino  
a_c_horse_andalusian_rosegray  
a_c_horse_appaloosa_blacksnowflake  
a_c_horse_appaloosa_brownleopard  
a_c_horse_gang_trelawney  
a_c_horse_appaloosa_leopard  
a_c_horse_arabian_redchestnut  
a_c_horse_arabian_redchestnut_pc  
a_c_horse_arabian_warpedbrindle_pc  
a_c_horse_ardennes_irongreyroan  
a_c_horse_ardennes_strawberryroan  
a_c_horse_breton_grullodun  
a_c_horse_breton_sealbrown  
a_c_horse_buell_warvets  
a_c_horse_criollo_baybrindle  
a_c_horse_criollo_sorrelovero  
a_c_horse_dutchwarmblood_chocolateroan  
a_c_horse_gypsycob_palominoblagdon  
a_c_horse_gypsycob_skewbald  
a_c_horse_hungarianhalfbred_liverchestnut  
a_c_horse_john_endlesssummer  
a_c_horse_kladruber_cremello  
a_c_horse_kladruber_grey  
a_c_horse_mustang_tigerstripedbay  
a_c_horse_nokota_reversedappleroan  
a_c_horse_norfolkroadster_piebaldroan  
a_c_horse_norfolkroadster_rosegrey  
a_c_horse_thoroughbred_blackchestnut  
a_c_horse_thoroughbred_brindle  
a_c_horse_thoroughbred_reversedappleblack  
:::
| Level:  | 0   | 1   | 2   | 3   | 4    |
| ------- | --- | --- | --- | --- | ---- |
| Points: | 0   | 50  | 350 | 950 | 1950 |
:::details models for <0-2450>
a_c_horse_arabian_black  
a_c_horse_arabian_grey  
a_c_horse_arabian_rosegreybay  
a_c_horse_breton_mealydapplebay  
a_c_horse_breton_steelgrey  
a_c_horse_criollo_bayframeovero  
a_c_horse_criollo_marblesabino  
a_c_horse_arabian_white  
a_c_horse_gypsycob_splashedbay  
a_c_horse_gypsycob_splashedpiebald  
a_c_horse_kladruber_dapplerosegrey  
a_c_horse_kladruber_silver  
a_c_horse_missourifoxtrotter_blacktovero  
a_c_horse_missourifoxtrotter_blueroan  
a_c_horse_missourifoxtrotter_buckskinbrindle  
a_c_horse_missourifoxtrotter_dapplegrey  
a_c_horse_missourifoxtrotter_sablechampagne  
a_c_horse_gang_micah  
a_c_horse_missourifoxtrotter_amberchampagne  
a_c_horse_missourifoxtrotter_silverdapplepinto  
a_c_horse_mustang_goldendun  
a_c_horse_mustang_blackovero  
a_c_horse_mustang_buckskin  
a_c_horse_mustang_chestnuttovero  
a_c_horse_mustang_reddunovero  
a_c_horse_norfolkroadster_dappledbuckskin  
a_c_horse_norfolkroadster_spottedtricolor  
a_c_horse_gang_sadie  
a_c_horse_turkoman_darkbay  
a_c_horse_turkoman_gold  
a_c_horse_turkoman_black  
a_c_horse_turkoman_chestnut  
a_c_horse_turkoman_grey  
a_c_horse_turkoman_perlino  
a_c_horse_gang_hosea  
a_c_horse_turkoman_silver  
:::
| Level:  | 0   | 1   | 2   | 3    | 4    |
| ------- | --- | --- | --- | ---- | ---- |
| Points: | 0   | 50  | 400 | 1150 | 2450 |

#### Courage
Determines how your horse react to danger.
| Level:  | 0   | 1   | 2   | 3   | 4   | 5   | 6   | 7    | 8    | 9    |
| ------- | --- | --- | --- | --- | --- | --- | --- | ---- | ---- | ---- |
| Points: | 0   | 50  | 100 | 200 | 350 | 550 | 800 | 1100 | 1400 | 1700 |

#### Dirtiness
Dirtiness is a value that is reset when the horse is cleaned.
| Level:  | 0   | 1   | 2   | ..  | 50     | ..  | 100    |
| ------- | --- | --- | --- | --- | ------ | --- | ------ |
| Points: | 0   | 100 | 200 | ..  | 50.000 | ..  | 10.000 |

#### Dirtiness Hat
Dirtiness Hat is a value that is reset when the horse is cleaned.
| Level:  | 0   | 1   | 2   | ..  | 50     | ..  | 100    |
| ------- | --- | --- | --- | --- | ------ | --- | ------ |
| Points: | 0   | 100 | 200 | ..  | 50.000 | ..  | 10.000 |

#### Dirtiness Skin
Dirtiness Skin is a value that is reset when the horse is cleaned.
| Level:  | 0   | 1   | 2   | ..  | 50     | ..  | 100    |
| ------- | --- | --- | --- | --- | ------ | --- | ------ |
| Points: | 0   | 100 | 200 | ..  | 50.000 | ..  | 10.000 |

#### Fatigued
Affect the top speed of the horse.
| Level:  | 0   | 1   | 2   | ..  | 50  | ..  | 100 |
| ------- | --- | --- | --- | --- | --- | --- | --- |
| Points: | 0   | 1   | 2   | ..  | 50  | ..  | 100 |

#### Grit
Unknwon affect in the game
| Level:  | 0   | 1   | 2   | ..  | 50  | ..  | 100 |
| ------- | --- | --- | --- | --- | --- | --- | --- |
| Points: | 0   | 1   | 2   | ..  | 50  | ..  | 100 |

#### Health
Determines how much damage the horse can take.
| Level:  | 0   | 1   | 2   | 3   | 4   | 5   | 6   | 7    |
| ------- | --- | --- | --- | --- | --- | --- | --- | ---- |
| Points: | 0   | 50  | 100 | 200 | 350 | 550 | 800 | 1100 |

| Level:  | 0   | 1   | 2   | 3   | 4   | 5   | 6   | 7    | 8    | 9    |
| ------- | --- | --- | --- | --- | --- | --- | --- | ---- | ---- | ---- |
| Points: | 0   | 50  | 100 | 200 | 350 | 550 | 800 | 1100 | 1400 | 1700 |

#### Hunger
Unknwon affect in the game
| Level:  | 0   | 1   | 2   | ..  | 50  | ..  | 100 |
| ------- | --- | --- | --- | --- | --- | --- | --- |
| Points: | 0   | 1   | 2   | ..  | 50  | ..  | 100 |

#### Inebriated
Unknwon affect in the game
| Level:  | 0   | 1   | 2   | ..  | 50  | ..  | 100 |
| ------- | --- | --- | --- | --- | --- | --- | --- |
| Points: | 0   | 1   | 2   | ..  | 50  | ..  | 100 |

#### Instinct
Unknwon affect in the game
| Level:  | 0   | 1   | 2   | ..  | 50  | ..  | 100 |
| ------- | --- | --- | --- | --- | --- | --- | --- |
| Points: | 0   | 1   | 2   | ..  | 50  | ..  | 100 |

#### Poisoned
Unknwon affect in the game
| Level:  | 0   | 1   | 2   | ..  | 50  | ..  | 100 |
| ------- | --- | --- | --- | --- | --- | --- | --- |
| Points: | 0   | 1   | 2   | ..  | 50  | ..  | 100 |

#### Overfed
Unknwon affect in the game
| Level:  | 0   | 1   | 2   | ..  | 50  | ..  | 100 |
| ------- | --- | --- | --- | --- | --- | --- | --- |
| Points: | 0   | 1   | 2   | ..  | 50  | ..  | 100 |

#### Sickness
Unknwon affect in the game
| Level:  | 0   | 1   | 2   | ..  | 50  | ..  | 100 |
| ------- | --- | --- | --- | --- | --- | --- | --- |
| Points: | 0   | 1   | 2   | ..  | 50  | ..  | 100 |

#### Special Ability
Unknwon affect in the game
| Level:  | 0   | 1   | 2   | 3   | 4   | 5   | 6   | 7    |
| ------- | --- | --- | --- | --- | --- | --- | --- | ---- |
| Points: | 0   | 50  | 100 | 200 | 350 | 550 | 800 | 1100 |

#### Speed
Determines the top speed of the horse
| Level:  | 0   | 1   | 2   | 3   | 4   | 5   | 6   | 7    | 8    | 9    |
| ------- | --- | --- | --- | --- | --- | --- | --- | ---- | ---- | ---- |
| Points: | 0   | 50  | 100 | 200 | 350 | 550 | 800 | 1100 | 1400 | 1700 |

#### Stamina
Determines how long the horse can gallop or swim.
| Level:  | 0   | 1   | 2   | 3   | 4   | 5   | 6   | 7    |
| ------- | --- | --- | --- | --- | --- | --- | --- | ---- |
| Points: | 0   | 50  | 100 | 200 | 350 | 550 | 800 | 1100 |

#### Strength
Unknwon affect in the game
| Level:  | 0   | 1   | 2   | ..  | 50  | ..  | 100 |
| ------- | --- | --- | --- | --- | --- | --- | --- |
| Points: | 0   | 1   | 2   | ..  | 50  | ..  | 100 |

#### Unruliness
Determines the frequency of the horse to play its idle animation. More the value is high, more it will play it.
| Level:  | 0   | 1   | 2   | ..  | 50  | ..  | 100 |
| ------- | --- | --- | --- | --- | --- | --- | --- |
| Points: | 0   | 1   | 2   | ..  | 50  | ..  | 100 |

## 6. For developers

### API
#### `[Client]` Add a new horse to the stable
Client event to add a spawned horse to the player stable
```lua
--@param horse - int : entity ID of the horse
--@param name - string : name of the horse
--@param age - int : age of the horse (optional)
--@param noDieByAge - boolean : if true, the horse will not die by aging (optional)
TriggerEvent('kd_stable:client:addHorse',horse,name,age,noDieByAge)
```
#### `[Client]` Stop saddlebag animation
Client event to stop the saddlebag animation
```lua
TriggerEvent('kd_stable:client:closeSaddleBag')
```

#### `[Server]` Create a new wagon
Have to be call from the server side
```lua
-- @param source - int : serverID of the wagon owner
-- @param stableID - string : ID of the stable
-- @param model - string : model of the wagon
-- @param name - string : name of the wagon
TriggerEvent('kd_stable:server:AddNewWagon', source, stableID, model, name)
```
#### `[Server]` Repair horseshoes
This event has to be called from the server side.
```lua
-- @param source - int : serverID of the wagon owner
-- @param sucess - boolean : true if a horse is found around the player
-- @param horseNetId - int : Network ID of the horse
TriggerEvent('kd_stable:server:requestChangeHorseShoes', source, function(success,horseNetId)
	print(success,horseNetId)
end)
```

### Overwrite framework functions

If you need to overwrite a native function linked to the framework (custom inventory for example), you can overwrite my functions by adding them in the config file.
You don't need to use all the functions.

#### `[Client]` Initialize the framework
Function to init your framework
```lua
-- variable "Core" - global variable for core script
-- variable "CoreInv" - global variable for inventory scriot
Config.InitFramework = function()
end
```
#### `[Client]` Change notification functions
Function to use another notifications system
```lua
Config.NotifRight = function(text, dict_icon, icon, color, duration,soundset_ref,soundset_name)
end

Config.NotifLeft = function(title, text, dict_icon, icon, color, duration,soundset_ref,soundset_name)
end

Config.DisplayObjectif = function(text,duration)
end

Config.DisplayTitle = function(text)
end
```
#### `[Client]` Restrict the access to specific stable
Function to restrict access to a specific stable
```lua
-- @param stableID - ID of stable
-- @return false to cancel the access to the stable
Config.CanAccessToStable= function(stableID)
    return true
end
```
#### `[Client]` Restrict the color palette
Function to restrict the color palette
```lua
-- @param typeItem = 'horse' or 'component'
-- @return false if the player can't open the color palette
-- @return true if the player can open the color palette
Config.CanOpenColorPalette = function(typeItem)
    return true
end
```
#### `[Server]` Check money
Function to check if the player has enough money to buy something
```lua
-- @param source - serverID of the player
-- @param price - price of the cloth
-- @param moneyType - devise of the price : 0 for normal & 1 for gold
-- @return true/false to accept/deny the purchase
Config.CanBuy = function(source,price,moneyType)
end
```
#### `[Server]` Get Identifier
Function to get the identifier of player
```lua
-- @param source - serverID of the player
-- @return array with identifier and charid key
Config.GetIdentifier = function(source)
    local player = {
        identifier = identifier, --the identifier of player
        charid = charid --the charid of player. If not needed just use ''
    }
    return player
end
```
#### `[Server]` Get Job
Function to get the player's job
```lua
-- @param source - serverID of the player
-- @return the job name
Config.GetJob = function(source)
end
```
#### `[Server]` Get RP Name
Function to get the player's name
```lua
-- @param source - serverID of the player
-- @return the player name
Config.GetRPName = function(source)
end
```
#### `[Server]` Give money
Function to give money to the player
```lua
-- @param source - serverID of the player
-- @param amount - money amount
Config.GiveMoney = function(source,amount)
end
```
#### `[Server]` Initialize the framework
Function to init your framework
```lua
-- variable "Core" - global variable for core script
-- variable "CoreInv" - global variable for inventory scriot
Config.InitFramework = function()
end
```
#### `[Server]` Notification
Function to send notification to the player
```lua
-- @param source - serverID of the player
-- @param text - text of notification
Config.Notify = function(source,text)
end
```
#### `[Server]` Open saddlebag
Function to open saddlebag
```lua
-- @param source - serverID of the player
-- @param saddlebagID - ID of container
-- @param horseID - ID of the horse
Config.OpenSaddlebag = function(source,saddlebagID, horseID)
end
```
#### `[Server]` Open wagon locker
Function to open wagon locker
```lua
-- @param source - serverID of the player
-- @param wagonID - ID of container
Config.OpenWagonLocker = function(source,wagonID)
end
```
#### `[Server]` Overwrite horse slot
Function to overwrite the number of horses the player can buy
```lua
-- @param typeOrder - type of order : 'horse' or 'wagon'
-- @param source - serverID of the player
Config.overwriteMaxSlot = function(typeOrder,source)
end
```

#### `[Server]` Overwrite price
Function to overwrite order price
```lua
-- @param source - serverID of the player
-- @param typeOrder = 'horse' or 'component' or 'wagon' or 'reviveHorse'
-- @param data - identifiant of item
--       horseID for 'reviveHorse'
--       horseID for 'horse'
--       category for 'component'
--       wagonID for 'wagon'
-- @param price - default price of order
-- @return price with the price format
Config.overwritePrice = function(source,typeOrder, data, price)
    return true
end
```
#### `[Server]` Use Item
Function to use an item
```lua
-- @param source - serverID of the player
-- @param item - item name
-- @param amount - amount used
-- @param meta - meta of item
-- @param remove - if the item have to be removed or not
-- @return true if the item is used
Config.UseItem = function(source,item,amount,meta,remove)
end
```

#### `[Server]` Restrict horse buying
Function to restrict specific horse buying
```lua
-- @param source - serverID of the player
-- @param horseKey - key of Horse in Config.horses list
-- @return false to cancel the order
Config.restrictHorseBuying = function(source,horseKey)
    return true
end
```
:::details Job lock horses
You can job lock some horses by add this snippet in your `overwriteConfig.lua` file:
```lua
if IsDuplicityVersion() then
 jo.ready(function()
	 --job lock the horse number 1 & 2
	 Config.horses[1].job = "horseTrainer"
	 Config.horses[2].job = "horseTrainer"

	 --Function to restrict the horse buying
	 Config.restrictHorseBuying = function(source,horseKey)
		 --Get the horse configuration
	 	local horse = Config.horses[horseKey]
		 --Allow buy if the job lock is not set
	 	if not horse.job then return true end
		 --Get the player job
	 	local job = jo.framework:getJob(source)
 		--Compare the job
 		if job ~= horse.job then
 			--Lock the order because the player's job is not the right
		 	return false
 		end
 		--Allow buy
   return true
  end
 end) 
end
```
:::
#### `[Server]` Restrict wagon buying
Function to restrict specific wagon buying
```lua
-- @param source - serverID of the player
-- @param wagonKey - key of wagon in Config.wagons list
-- @return false to cancel the order
Config.restrictWagonBuying = function(source,wagonKey)
    return true
end
```

### Exports

#### `[Client]` Get player's horses
exports to get the list of player's horses datas
```lua
exports.kd_stable:getMyHorses()
```

#### `[Client]` Get player's wagons
exports to get the list of player's wagons datas
```lua
exports.kd_stable:getMyWagons()
```

#### `[Server]` Get script configuration
exports to get the script configuration
```lua
exports.kd_stable:getConfig()
```

#### `[Server]` Get horse data
exports to get the horse datas
```lua
-- @param horseID - ID of the horse (optional)
-- if horseID is missing, the function returns the full list of horses
exports.kd_stable:getHorses(horseID)
```

#### `[Server]` Get wagon data
exports to get the wagon datas
```lua
-- @param wagonID - ID of the wagon (optional)
-- if wagonID is missing, the function returns the full list of wagons
exports.kd_stable:getWagons(wagonID)
```

### Actions

[Actions](/DeveloperResources/actions) are the new way to modify how the script works or add new features added in the `v1.1.0`. These actions are event that occurs at a specific point in time during the execution of the script. But contrary to events, actions are **synchronous**. 

- Syntax: 
```lua
-- @param <actionName> - name of the action
-- @param <argumentList> - list of arguments which are passed
exports.kd_stable:registerAction(<actionName>, function(<argumentList>)
  -- Add your new feature here
end)
```

- Example :
```lua
exports.kd_stable:registerAction('spawnHorse', function(source,horse,horseID)
  local horseData = Horses[source][horseID]
  local lanternID = horseData.components.saddle_lanterns?.id or false
  if lanternID then
    Entity(horse).state:set('kd_stable_lanternID',tonumber(lanternID),true)
  end
end)
```
- All actions :
#### `[Client]` initHorsePrompt
Fires when the horse prompt is initialized
```lua
-- @param promptGroupId - prompt group ID
-- @param entity - entity ID of the target
exports.kd_stable:registerAction('initHorsePrompt', function(promptGroupId,entity)
end)
```
#### `[Client]` letterBox
Fires when the letter box state is switched
```lua
-- @param show - state of letter box: true/false
exports.kd_stable:registerAction('letterBox', function(show)
end)
```
#### `[Client]` loopTargeting
Fires when the player targets a registered horse
```lua
-- @param target - entity ID of the target
-- @param distance - distance between the player and the entity
exports.kd_stable:registerAction('loopTargeting', function(target,distance)
end)
```
#### `[Client]` refreshPreviewMyHorse
Fires when the horse components are refreshed
```lua
-- @param entity - entity ID of the horse
-- @param horseData - all horse's datas
exports.kd_stable:registerAction('refreshPreviewMyHorse', function(entity,horseData)
end)
```
#### `[Client]` updatePreview
Fires when user select a new item in the menu
```lua
-- @param itemMenuData - all data of menu's item
exports.kd_stable:registerAction('updatePreview', function(itemMenuData)
end)
```
#### `[Server]` bequeathHorse
Fires when the player bequeaths the horse to another player
```lua
-- @param source - serverID of the player
-- @param horseID - ID of the horse
-- @param targetID - serverID of the player targeted
exports.kd_stable:registerAction('bequeathHorse', function(source,horseID,targetID)
end)
```
#### `[Server]` bequeatWagon
Fires when the player bequeaths the wagon to another player
```lua
-- @param source - serverID of the player
-- @param wagonID - ID of the horse
-- @param targetID - serverID of the player targeted
exports.kd_stable:registerAction('bequeathWagon', function(source,wagonID,targetID)
end)
```
#### `[Server]` buyComponent
Fires when the player buys a new component
```lua
-- @param source - serverID of the player
-- @param componentData - information about the component
-- componentData.category - category of the component
-- componentData.hash - hash of the component
-- @param price - price of the horse
-- @param moneyType - devise of the price : 0 for normal & 1 for gold
exports.kd_stable:registerAction('buyComponent', function(source,componentData,price,moneyType)
end)
```
#### `[Server]` buyHorse
Fires when the player buys a new horse
```lua
-- @param source - serverID of the player
-- @param horseData - information about the horse
-- horseData.id - ID of the horse
-- horseData.model - model of the horse
-- horseData.favourite - is favourite horse
-- horseData.name - horse's name
-- horseData.stable - stable where the horse is bought
-- horseData.isFemale - is horse a female
-- horseData.speed - horse's speed statistic
-- horseData.acceleration - horse's acceleration statistic
-- horseData.handling - horse's handling statistic
-- horseData.components - array of horse's components <key: category, value: componentData>
-- horseData.birth - (need aging add-on) horse's birthday
-- horseData.deathAge - (need aging add-on) horse's age of death
-- @param price - price of the horse
-- @param moneyType - devise of the price : 0 for normal & 1 for gold
exports.kd_stable:registerAction('buyHorse', function(source,horseData,price,moneyType)
end)
```
#### `[Server]` buyWagon
Fires when the player buys a new wagon
```lua
-- @param source - serverID of the player
-- @param wagonData - information about the wagon
-- wagonData.id - ID of the wagon
-- wagonData.model - model of the wagon
-- wagonData.name - name of the wagon
-- wagonData.stable - stable where the wagon is bought
-- wagonData.vehicle_tints - tint of the wagon
-- wagonData.vehicle_extras - extra of the wagon
-- wagonData.vehicle_lantern_propsets - lantern of the wagon
-- wagonData.vehicle_propsets - propset of the wagon
-- wagonData.vehicle_liveries - livery of the wagon
-- @param price - price of the wagon
-- @param moneyType - devise of the price : 0 for normal & 1 for gold
exports.kd_stable:registerAction('buyWagon', function(source,wagonData,price,moneyType)
end)
```
#### `[Server]` deleteHorse
Fires when the player deletes a horse
```lua
-- @param source - serverID of the player
-- @param horseID - ID of the horse
exports.kd_stable:registerAction('deleteHorse', function(source,horseID)
end)
```
#### `[Server]` deleteWagon
Fires when the player deletes a wagon
```lua
-- @param source - serverID of the player
-- @param wagonID - ID of the wagon
exports.kd_stable:registerAction('deleteWagon', function(source,wagonID)
end)
```
#### `[Server]` horseDying
Fires when a horse is dying
```lua
-- @param horseID - ID of the horse
exports.kd_stable:registerAction('horseDying', function(horseID)
end)
```
#### `[Server]` horsesLoaded
Fires when the list of horses is loaded
```lua
exports.kd_stable:registerAction('horsesLoaded', function()
end)
```
#### `[Server]` initSQLValues
Fires when all database values are updated after the script is started
```lua
exports.kd_stable:registerAction('initSQLValues', function()
end)
```
#### `[Server]` newFavorite
Fires when the player assigns a new favourite horse
```lua
-- @param source - serverID of the player
-- @param horseID - ID of the horse
exports.kd_stable:registerAction('newFavorite', function(source,horseID)
end)
```
#### `[Server]` openSaddlebag
Fires when the player opens a saddlebag
```lua
-- @param source - serverID of the player
-- @param saddleID - ID of the saddlebag
exports.kd_stable:registerAction('openSaddlebag', function(source,saddleID)
end)
```
#### `[Server]` openWagonLocker
Fires when the player opens a wagon locker
```lua
-- @param source - serverID of the player
-- @param wagonID - ID of the wagon
exports.kd_stable:registerAction('openWagonLocker', function(source,wagonID)
end)
```
#### `[Server]` outHorse
Fires when the player get out a horse
```lua
-- @param source - serverID of the player
-- @param horse - entity ID of the horse (server entity)
-- @param horseID - ID of the horse
exports.kd_stable:registerAction('outHorse', function(source,horse,horseID)
end)
```
#### `[Server]` putSaddlebag
Fires when the player puts a saddlebag on a horse
```lua
-- @param source - serverID of the player
-- @param horseID - ID of the horse
-- @param saddleID - ID of the saddlebag
exports.kd_stable:registerAction('putSaddlebag', function(source,horseID,saddleID)
end)
```
#### `[Server]` reviveHorse
Fires when the player revives a horse
```lua
-- @param source - serverID of the player
-- @param horseID - ID of the horse
-- @param price - price of the wagon
-- @param moneyType - devise of the price : 0 for normal & 1 for gold
exports.kd_stable:registerAction('reviveHorse', function(source,horseID,price,moneyType)
end)
```
#### `[Server]` spawnWagon
Fires when the player spawns a wagon
```lua
-- @param source - serverID of the player
-- @param wagon - entity ID of the wagon (server entity)
-- @param wagonID - ID of the wagon
exports.kd_stable:registerAction('spawnWagon', function(source,wagon,wagonID)
end)
```
#### `[Server]` stableHorse
Fires when the player stables a horse
```lua
-- @param source - serverID of the player
-- @param horseID - ID of the horse
-- @param stableID - ID of the stable
exports.kd_stable:registerAction('stableHorse', function(source,horseID,stableID)
end)
```
#### `[Server]` stableWagon
Fires when the player stables a wagon
```lua
-- @param source - serverID of the player
-- @param wagonID - ID of the wagon
-- @param stableID - ID of the stable
exports.kd_stable:registerAction('stableWagon', function(source,wagonID,stableID)
end)
```
#### `[Server]` takeSaddlebag
Fires when the player takes a saddlebag off a horse
```lua
-- @param source - serverID of the player
-- @param horseID - ID of the horse
-- @param saddleID - ID of the saddlebag
exports.kd_stable:registerAction('takeSaddlebag', function(source,horseID,saddleID)
end)
```
#### `[Server]` updateSQLStructure
Fires when the MySQL is initialized
```lua
exports.kd_stable:registerAction('updateSQLStructure', function()
end)
```
#### `[Server]` wagonsLoaded
Fires when the list of wagons is fully loaded from the database
```lua
exports.kd_stable:registerAction('wagonsLoaded', function()
end)
```

### Filters

[Filters](/DeveloperResources/filters) are the new way to modify data used by the script added in the `v1.2.0`. These filters are fired at a specific point in time during the execution of the script. But contrary to events, filters are **synchronous**. 

- Syntax: 
```lua
-- @param <actionName> - name of the action
-- @param <argumentList> - list of arguments which are passed
exports.kd_stable:registerFilter(<actionName>, function(variable)
  -- Add your new data here
	return variable -- Don't forget to return the value
end)
```

- Example :
```lua
kd_stable:registerFilter('filterHorseData', function(horseData)
  horseData = "New name"
  return horseData
end)
```

#### `[Client]` canAccessToStable
Fires before display of the stable prompt
```lua
-- @param canAccess - boolean
-- @param stable - stable data
exports.kd_stable:registerFilter('canAccessToStable', function(canAccess, stable)
	return canAccess
end)
```
#### `[Client]` canFleeHorse
Overwrite the player's ability to make the horse flee
```lua
-- @param canFlee - boolean
-- @param entity - entity ID of the horse
exports.kd_stable:registerFilter('canFleeHorse', function(canFlee,entity)
	return canFlee
end)
```
#### `[Client]` canUseFixHorseCommand
Fires before display of the fix horse prompt with the command
```lua
-- @param canUse - boolean
exports.kd_stable:registerFilter('canUseFixHorseCommand', function(canUse)
	return canUse
end)
```
#### `[Client]` canUseFixWagonCommand
Fires before fixing a wagon with the command
```lua
-- @param canUse - boolean
exports.kd_stable:registerFilter('canUseFixWagonCommand', function(canUse)
	return canUse
end)
```
#### `[Client]` filterHorseData
Fires before generate horse item in menu
```lua
-- @param horseData - horse's datas
exports.kd_stable:registerFilter('filterHorseData', function(horseData)
	return horseData
end)
```
#### `[Client]` filterNotification
filter the notification messages
```lua
-- @param message - message's datas
-- @param message.type - string : 'notificationLeft' or 'notificationRight' (can't be change)
-- @param message.title - string : notification title
-- @param message.text - string : notification text
-- @param message.dict - string : dictionary of the icon
-- @param message.icon - string : icon name
-- @param message.color - string : color of the text
-- @param message.duration - int : duration of the notification
-- @param message.soundset_ref - string : dictionary of the sound
-- @param message.soundset_name - string : sound name
	}
exports.kd_stable:registerFilter('filterNotification', function(message)
	--return false to turn off the notification
	return message
end)
```
#### `[Client]` filterYourHorseLine
Fires after generated horse item in menu
```lua
-- @param item - menu item
-- @param horseData - horse's datas
exports.kd_stable:registerFilter('filterYourHorseLine', function(item,horseData)
	return item
end)
```
#### `[Client]` generateHorseStatisticsForMenu
Fires before the display of the horse statistics in the menu
```lua
-- @param stats - table of horse's statistics 
-- @param horseData - horse's datas
exports.kd_stable:registerFilter('generateHorseStatisticsForMenu', function(stats,horseData)
	return stats
end)
```
#### `[Client]` isSameMenu
Fires before do update actions when user select new item in menu
```lua
-- @param same - boolean value
-- same = true - Do update actions
-- same = false - Cancel all update actions
exports.kd_stable:registerFilter('isSameMenu', function(same)
	return same
end)
```
#### `[Client]` updateHorseDataBeforeSpawn
Fires before spawn an horse
```lua
-- @param horseData - horse's datas
exports.kd_stable:registerFilter('updateHorseDataBeforeSpawn', function(horseData)
	return item
end)
```
#### `[Client]` updateItemHorseAvailable
Fires before display horse owned line in the menu
```lua
-- @param item - menu item
-- @param horseID - horse ID in the database
exports.kd_stable:registerFilter('updateItemHorseAvailable', function(item, horseID)
	return item
end)
```
#### `[Client]` updateLangForNUI
Fires before update translated string
```lua
-- @param _lang - array of translated script
-- <key> is the key of string (don't edit them)
-- <value> is the translated string
exports.kd_stable:registerFilter('updateLangForNUI', function(_lang)
	return _lang
end)
```
#### `[Client]` updatePreviewPrompt
Fires after all update action to edit the current prompt
```lua
-- @param currentPrompt - name of the current prompt
-- @param itemMenuData - all data of menu's item
exports.kd_stable:registerFilter('updatePreviewPrompt', function(currentPrompt,itemMenuData)
	return currentPrompt
end)
```
#### `[Server]` buyHorse
Fires when player buy a new horse, just before the 'buyHorse' action
```lua
-- @param horseData - horse's datas filtered
-- @param horseID - horse ID in Config.horses table
-- @param source - serverID of the player
exports.kd_stable:registerFilter('buyHorse', function(horseData,horseID,source)
	return horseData
end)

```
#### `[Server]` canBuyTraining
Fires when player try to buy a training
```lua
-- @param canBuy - boolean
-- @param source - serverID of the player
-- @param activity - activity data
-- @param moneyType - the type of money used to buy the training
-- @param horseNetID - the net ID of the horse
-- @param activityIndex - The index of the activity in Config.trainings
exports.kd_stable:registerFilter('canBuyTraining', function(canBuy, source,activity,moneyType,horseNetID,activityIndex)
	return canBuy
end)
```

#### `[server]` canTrainHorse
Fires when player open the training menu
```lua
-- @param canOpen - boolean
-- @param source - serverID of the player
-- @param trainingID - the training ID
-- @param horseID - ID of the horse
exports.kd_stable:registerFilter('canTrainHorse', function(canOpen,source,trainingID,horseID)
	return canOpen
end)
```

#### `[server]` canUseWagonLocker
Manage the access to a specific wagon locker
```lua
-- @param canUse - boolean
-- @param source - int : serverID of the player
-- @param wagonID - int : ID of the wagon
-- @param model - string : model of the wagon
-- @param size - table : size of the wagon locker
-- size.maxWeight
-- size.maxSlots
exports.kd_stable:registerFilter('canUseWagonLocker', function(canUse, source, wagonID, model, size )
	return canUse
end)
```
#### `[Server]` loadHorseData
Fires at the start of the script after all horses data is loaded
```lua
-- @param horseData - horse's datas filtered
-- @param itemMenuData - horse's datas filtered from database
exports.kd_stable:registerFilter('loadHorseData', function(horseData,horseDataFromDB)
	return horseData
end)
```
#### `[Server]` updateExpByWalk
Fires when player rides a horse to update his experience
```lua
-- @param configWinExpByWalk - Config.winExpByWalk
-- @param horseID - ID of the horse
exports.kd_stable:registerFilter('updateExpByWalk', function(configWinExpByWalk,horseID)
	return configWinExpByWalk
end)
```
#### `[Server]` updateMaxStableSlot
Fires when player opens a saddlebag
```lua
-- @param maxAmount - maximum of slot
-- @param source - serverID of the player
-- @param typeOrder - 'horse' or 'wagon'
exports.kd_stable:registerFilter('updateMaxStableSlot', function(maxAmount,source,typeOrder)
	return maxAmount
end)
```
#### `[Server]` updateSaddlebagConfig
Fires when player opens a saddlebag
```lua
-- @param saddlebagConfig - saddlebag configuration
-- saddlebagConfig.maxSlots
-- saddlebagConfig.maxWeight
-- @param hash - saddlebag component hash
-- @param source - serverID of the player
-- @param horseID - ID of the horse
-- @paran invName - ID of the inventory
exports.kd_stable:registerFilter('updateSaddlebagConfig', function(saddlebagConfig,hash,source, horseID, invName)
	return saddlebagConfig
end)
```
