> For the complete documentation index, see [llms.txt](https://organized-chaos.gitbook.io/organized-chaos-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://organized-chaos.gitbook.io/organized-chaos-docs/the-lost-treasure/installation.md).

# Installation

Install The Lost Treasure and open your first machine.

## Requirements

|           |                                                                                                               |
| --------- | ------------------------------------------------------------------------------------------------------------- |
| Server    | A recent FXServer build                                                                                       |
| Framework | ESX Legacy or QBCore. Standalone works for testing only, because balances reset on a restart                  |
| Database  | `oxmysql`, optional. Without it credits are kept in the resource's own storage and no statistics are recorded |
| Targeting | `ox_target` or `qb-target`, optional                                                                          |

## Steps

{% stepper %}
{% step %}

### Add the resource

Put the folder into your `resources` folder as **`lost_treasure`**. See [Installation basics](/organized-chaos-docs/installation-basics.md) for the download and the licence key.

{% hint style="warning" %}
Do not rename the folder. The folder name is the resource name, and the exports and the stored credits of your players use it.
{% endhint %}
{% endstep %}

{% step %}

### Start it

Add it to your `server.cfg`, after your database and your framework:

```cfg
ensure oxmysql
ensure es_extended
ensure lost_treasure
```

{% endstep %}

{% step %}

### Restart the server

The database tables are created on the first start. There is nothing to import.

To create them yourself instead, for example because your database user may not create tables, import `sql/lost_treasure.sql`.
{% endstep %}

{% step %}

### Open the game

Type `/slot` in game. The game opens without a machine.
{% endstep %}

{% step %}

### Place machines

Add cabinets to `Config.Machines` in `config/config.lua`. See the Placing machines page.
{% endstep %}
{% endstepper %}

Art and audio ship with the resource. There is nothing to add.

Before you open the floor to players, read [Before you go live](/organized-chaos-docs/the-lost-treasure/before-you-go-live.md).
