> For the complete documentation index, see [llms.txt](https://code-after-sex.gitbook.io/script-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://code-after-sex.gitbook.io/script-documentation/vip-shop/configuration/stables.md).

# Horses & Stables

Horse products are delivered by inserting directly into your stable resource's database table. The player finds the horse waiting at the stable, saddle on.

```lua
Config.Stables = {
    vorp = { table = 'stables', horseType = 'horse' },
    rsg  = { table = 'player_horses', defaultStable = 'blackwater' },
    defaultName = 'VIP Horse',
}
```

## VORP (`vorp_stables`)

The insert target is the `stables` table. The schema was verified against the official VORP database.

| Column                         | Value                                                   |
| ------------------------------ | ------------------------------------------------------- |
| `identifier`, `charidentifier` | The buyer's character                                   |
| `name`                         | `delivery.name` or `Config.Stables.defaultName`         |
| `modelname`                    | `delivery.model`, for example `A_C_Horse_Arabian_White` |
| `type`                         | `Config.Stables.vorp.horseType`, default `'horse'`      |
| `xp`, `injured`, `isDefault`   | `0`                                                     |

## RSG (`rsg-horses`)

The insert target is the `player_horses` table.

| Column                         | Value                                                                                   |
| ------------------------------ | --------------------------------------------------------------------------------------- |
| `stable`                       | `Config.Stables.rsg.defaultStable`. Set this to a stable id that exists on your server. |
| `citizenid`                    | The buyer                                                                               |
| `horseid`                      | A random 8 character id                                                                 |
| `name`, `horse`, `gender`      | From the delivery action                                                                |
| `components`, `born`, `active` | `'{}'`, `os.time()`, `0`                                                                |

## Delivery action

```lua
{ type = 'horse', model = 'A_C_Horse_Turkoman_Gold', name = 'Golden Turkoman', gender = 'male' }
```

The shipped catalog includes nine mounts with real RDR2 model hashes (Arabians, Turkomans, a Missouri Fox Trotter, a Thoroughbred and an Andalusian), each with its own rendered portrait and Speed, Stamina and Nerve stats.

{% hint style="warning" %}
If you run a custom or renamed stable resource, point `table` at the right table, or replace the horse action with a `command` or `event` delivery that calls your script's own API. Players usually need to revisit the stable to set the new horse active.
{% endhint %}
