# Crates

The Crates.yml file allows you to create crates that you can use on the /Horse buy command (Enabling the crates menu on the Config.yml file) to make players buy a crate and get a random horse. This random horses can be defined on the crate and their chances. Here you'll find how this crates are configured.

```yaml
#Default predefined crate generated by the plugin when the file is created.
Example: #Name used on the plugin to refer to the predefined crate.
  Name: Example crate #Name of the crate. & can be used to add colors.
  Lore: #Lore of the crate. In case there's no lore, it'll be assigned a default one.
  - '&eYou can win:'
  - '&8- &7Mysterious horse'
  - '&8- &7What will it be?'
  Price: 200.0 #Price of the crate.
  Horses: #Horses section.
    Horse1: #Name of the horse on the crate as identification. Nothing to do with the predefined horses.
      Description: Mysterious horse #Name that will appear on the list.
      Custom-horse: Example #Identification of the predefined horse to be used.
      Chance: 1
      #Chance of the horse. This can be any number.
      #The chance of this horse will be this name devided by the sum of all
      #the defined horses' chances. Ex. 1, including a horse with chance 4,
      #means that this horse will have a chance of 1/(1+4)
    Horse2:
      Description: What will it be?
      Custom-horse: Example
      Chance: 4

```

![Example crate on the Crates menu](https://1400641633-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M5xPtDEDRb-0n3MQoX_%2F-M9k9YPYpU2kfi19nQqr%2F-M9kARZhEqO7Uu_mVxhP%2FCrates.png?alt=media\&token=5c148305-421e-496d-9aa0-dcd39f1985e2)
