> ## Documentation Index
> Fetch the complete documentation index at: https://rust-co.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Put RCO Steamline on the server in a few minutes.

## What you need

* A RedM server with **RSG Core** (and `rsg-inventory`) or **VORP Core** (and `vorp_inventory`).
* **oxmysql** (the database connection both frameworks already use).

## Step by step

**1. Copy the folder**

Put the `rco-steamline` folder inside your server's `resources` folder.

**2. Add it to server.cfg**

Start it **after** your database, your framework and its inventory:

```cfg theme={"dark"}
ensure oxmysql
ensure rsg-core        # or vorp_core
ensure rsg-inventory   # or vorp_inventory

ensure rco-steamline
```

**3. Let your admins use the admin command**

The `/steamline` command (admin panel, list, stop and remove trains) is for admins:

```cfg theme={"dark"}
add_ace group.admin command.steamline allow
```

**4. Add the ticket item**

The train ticket is an inventory item, so your framework has to know it. Do this once.

> [tab] RSG
>
> RCO Steamline adds the item to rsg-core's list by itself when it starts, but `rsg-inventory` only learns it after it restarts. So add it for good: open `resources/[framework]/rsg-core/shared/items.lua` and paste this line inside the list of items:
>
> ```lua theme={"dark"}
> rco_train_ticket = { name = 'rco_train_ticket', label = 'Train ticket', weight = 10, type = 'item', image = 'rco_train_ticket.png', unique = true, useable = true, shouldClose = true, description = 'A railroad ticket.' },
> ```
>
> Then copy `rco-steamline/install/rco_train_ticket.png` into `rsg-inventory/html/images/` and restart the server. Keep `unique = true`: each ticket keeps its own trip.

> [tab] VORP
>
> Nothing to import: RCO Steamline adds the item to your `items` table by itself when it starts. VORP reads its items when it starts, so restart the server once after the first start.
>
> Then copy `rco-steamline/install/rco_train_ticket.png` into `vorp_inventory/html/img/items/`.

> [!NOTE]
>
> If you change `Config.Passenger.TicketItem`, use the same name in the item line (RSG) and give the picture that name too.

While the item is missing, the server console says so when the resource starts, and the ticket counter gives the player his money back.

**5. Start the server**

The database tables (`rco_steamline_companies`, `rco_steamline_members`, `rco_steamline_fleet`, `rco_steamline_cars` and `rco_steamline_ledger`) are created by themselves on the first start. You don't need to import anything and there are no jobs to create.

**6. Test it**

Go to the Rhodes Station office and press **G** to open a company. Deposit some money in its till, then buy the engine and a car from the catalogue. Walk to the Steamline booth on the platform, press **J**, put the car on the train and call it.

## Changing things later

Every change in the files of the `config` folder needs a restart to show up.

> [!WARNING]
>
> Close your game before restarting RCO Steamline, or restart the whole server. The resource streams models, train configurations and its own track: restarting it while you are in the game can crash your game.

## Updating

Replace the folder with the new version. The `config` folder is yours: keep a copy before replacing and put your values back if the new version brings a new config. Companies, members, trains, cars and statements are kept in the database and are not touched by an update.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.