> For the complete documentation index, see [llms.txt](https://pepper-scripts.gitbook.io/pepper-scripts-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pepper-scripts.gitbook.io/pepper-scripts-docs/jobs/pepper-farmer/configuration.md).

# Configuration

All settings are open in the `pepper_farmer/config/` folder. Open the files with a text editor (Visual Studio Code or Notepad++, **not** Word). **Restart the resource after every change** – a full server restart is the safest option.

{% hint style="info" %}
**Open files (Asset Escrow):** You may edit `config/`, `locales/`, `bridge/` and `install/`. All other folders (`client/`, `server/`, `shared/`, `modules/`) are encrypted and must not be changed. See [Asset Escrow](file:///getting-started/asset-escrow.md).
{% endhint %}

{% hint style="warning" %}
**Be careful when editing:** keep quotation marks, commas and brackets in place. A single missing comma can stop the resource from starting. Make a backup of the file before bigger changes.
{% endhint %}

## Files

| File                                     | Content                                                                                                                          |
| ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `config/config.lua`                      | Framework, language, command/key, accounts (cash/bank), quality tiers, security/rate limits, admin, co-op, farm storage, farm HQ |
| `config/levels.lua`                      | XP curve, ranks, mechanic unlocks, lease limit per level, level rewards, prestige                                                |
| `config/upgrades.lua`                    | Farm upgrades (tiers, minimum level, price, materials, effect)                                                                   |
| `config/crops.lua`                       | Crops (level, area, seasons, growth, water/fertilizer, yield, XP, price, diseases, props)                                        |
| `config/fields.lua`                      | Fields, beds, orchards, greenhouses, lease boards, lease rules                                                                   |
| `config/tools.lua`                       | Hand tools, fertilizer, crop protection, diseases, water points, workshop, seed lab                                              |
| `config/weather.lua`                     | Seasons, weather, temperatures, optional link to a weather script                                                                |
| `config/vehicles.lua`                    | Vehicles/implements, depot, working widths, speed, wear, repair, key in the vehicle                                              |
| `config/animals.lua`                     | Animal species, barns, feed, products, care, breeding, truffle hunting                                                           |
| `config/production.lua`                  | Processing machines, locations, recipes, machine tiers, wear                                                                     |
| `config/economy.lua`                     | Merchants, shops (`Config.Shops`), market (base prices), reputation, farm shop, agricultural show                                |
| `config/contracts.lua`                   | Contract board, group orders, state contract                                                                                     |
| `config/challenges.lua`                  | Daily and weekly challenges, weekly chest                                                                                        |
| `config/achievements.lua`                | Achievements and titles                                                                                                          |
| `config/items/*.lua`                     | All items (name DE/EN, weight, quality, buying price `price`)                                                                    |
| `config/server.lua`                      | Server only: Discord webhook, version notice – **never** sent to players                                                         |
| `locales/de/*.json`, `locales/en/*.json` | All texts in German and English                                                                                                  |

## Most important settings in `config/config.lua`

| Setting                            | Default                            | Meaning                                                                                                                         |
| ---------------------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `Config.Locale`                    | `'de'`                             | Language: `'de'` or `'en'`                                                                                                      |
| `Config.Framework`                 | `'esx'`                            | `'esx'`, `'qbcore'`, `'qbox'` or `'auto'` (see [Installation](broken://pages/5f424a889b0098d2d8b9dbc80b3937f597007b1e))         |
| `Config.Debug`                     | `false`                            | Extra console output for troubleshooting                                                                                        |
| `Config.Currency`                  | `'$'`                              | Currency symbol in the tablet                                                                                                   |
| `Config.Command`                   | `'farmer'`                         | Chat command for the tablet (`/farmer`)                                                                                         |
| `Config.Key`                       | `'F6'`                             | Default key for the tablet                                                                                                      |
| `Config.Dashboard.anywhere`        | `true`                             | Open the tablet anywhere (`false` = only at the farm HQ office)                                                                 |
| `Config.DailyResetHour`            | `5`                                | At this hour (server time) a new day starts for the daily bonus                                                                 |
| `Config.Money.sales`               | `'money'`                          | Account for sales to merchants                                                                                                  |
| `Config.Money.contracts`           | `'bank'`                           | Account for contract rewards                                                                                                    |
| `Config.Money.rewards`             | `'bank'`                           | Account for level, challenge and achievement rewards                                                                            |
| `Config.Money.purchases`           | `'cash_then_bank'`                 | Purchases: cash first, then bank                                                                                                |
| `Config.Quality.priceMult`         | `{ 1.00, 1.15, 1.35, 1.70, 2.20 }` | Price factor per quality tier 1–5                                                                                               |
| `Config.Admin.ace`                 | `'pepper_farmer.admin'`            | ACE permission for admins                                                                                                       |
| `Config.Admin.groups`              | `{ 'admin', 'superadmin', 'god' }` | Framework groups with admin rights                                                                                              |
| `Config.Admin.command`             | `'farmadmin'`                      | Name of the admin command                                                                                                       |
| `Config.Coop.maxMembers`           | `6`                                | Members of a co-op (including the owner)                                                                                        |
| `Config.Coop.membersCanUpgrade`    | `false`                            | May members buy farm upgrades?                                                                                                  |
| `Config.Storage.slots`             | `80`                               | Slots in the farm storage (weight grows with the "farm storage" upgrade)                                                        |
| `Config.Security.kickAfterStrikes` | `0`                                | `0` = never kick, otherwise kick after this many rejected requests                                                              |
| `Config.HQ`                        | Grapeseed                          | Farm HQ (blip, office, farm storage) – better moved in the [admin tab](broken://pages/52a88d6a724c08c0b288cd67655c2b029d8140c3) |

Accounts for `Config.Money`: `'money'` (cash), `'bank'` or – only for `purchases` – `'cash_then_bank'`.

## Other useful settings

| File                  | Setting                              | Default                      | Meaning                                                                            |
| --------------------- | ------------------------------------ | ---------------------------- | ---------------------------------------------------------------------------------- |
| `config/levels.lua`   | `Config.Levels.globalXpMultiplier`   | `1.0`                        | Factor on all XP (e.g. `1.5` = 50 % more)                                          |
| `config/levels.lua`   | `Config.Levels.dailyBonus`           | `{ cap = 2000, mult = 1.5 }` | The first 2,000 XP of the day count ×1.5                                           |
| `config/levels.lua`   | `Config.Levels.rewards`              | levels 5–100                 | Money rewards when reaching a level                                                |
| `config/levels.lua`   | `Config.Prestige.enabled`            | `true`                       | Prestige from level 100 on/off                                                     |
| `config/economy.lua`  | `Config.Economy.globalMultiplier`    | `1.0`                        | Factor on sales revenue, contract, challenge and achievement rewards               |
| `config/economy.lua`  | `Config.Economy.shopPriceMultiplier` | `1.0`                        | Factor on all prices in the shops                                                  |
| `config/fields.lua`   | `Config.FieldRules.leaseHours`       | `24`                         | Lease duration in hours                                                            |
| `config/fields.lua`   | `Config.FieldRules.priceMult`        | `1.0`                        | Factor on all lease prices                                                         |
| `config/weather.lua`  | `Config.Seasons.mode`                | `'cycle'`                    | `'cycle'` (each season lasts 7 real days), `'calendar'` (real calendar) or `'off'` |
| `config/weather.lua`  | `Config.Weather.game.enabled`        | `false`                      | Read the GTA weather of a weather script                                           |
| `config/vehicles.lua` | `Config.Machinery.menuKey`           | `'K'`                        | Key in the vehicle for the work menu                                               |
| `config/vehicles.lua` | `Config.Machinery.maxOutPerPlayer`   | `2`                          | Vehicles taken out at the same time per player                                     |
| `config/server.lua`   | `ServerConfig.Webhook`               | `''`                         | Discord webhook for admin and security logs (empty = off)                          |

## Examples

### Change the language

In `config/config.lua`:

```lua
Config.Locale = 'en'
```

{% hint style="warning" %}
The **item names** in the inventory come from ox\_inventory, not from the script. When you switch the language, also replace the Pepper Farmer block in `ox_inventory/data/items.lua` with the content of `install/ox_items_en.lua` (or `_de.lua`) – see [Installation, step 5](broken://pages/5f424a889b0098d2d8b9dbc80b3937f597007b1e).
{% endhint %}

### Change the tablet key

In `config/config.lua`:

```lua
Config.Key = 'F7'
```

{% hint style="info" %}
`Config.Key` is only the **default key**. Once a player has played, FiveM stores their binding. Every player can change the key themselves: **Settings → Key Bindings → FiveM → "Open farmer dashboard"**. The same applies to the machine key `K`.
{% endhint %}

### More money or more XP for everyone

```lua
-- config/economy.lua: 20 % more sales revenue and rewards
Config.Economy = {
    globalMultiplier = 1.2,
    -- … rest unchanged …
```

```lua
-- config/levels.lua: double XP (e.g. for an event)
    globalXpMultiplier = 2.0,
```

### Change individual prices

* **Selling prices on the market:** `config/economy.lua` → `Config.Market.items` (base price per good at quality "Normal").
* **Buying prices in the shops:** the item's `price` in `config/items/*.lua`. Which shop (seed store, garden tools, fertilizer & crop care, packaging & ingredients, farm & livestock supply) sells an item is set by `Config.Shops` in `config/economy.lua` (explicit list → name prefix → category; every item in exactly one shop).
* **Machines, vehicles, animals, upgrades:** the `price` in `production.lua`, `vehicles.lua`, `animals.lua`, `upgrades.lua`.

### Change the lease duration

```lua
-- config/fields.lua
Config.FieldRules = {
    leaseHours = 48,   -- instead of 24 hours
```

## Adding your own content

Unlocks are created automatically from the `level` fields in the configs. A new crop, animal or recipe therefore shows up by itself in the tablet, in the level overview and in contracts. The exact fields are described at the top of each config file and in the section **"Eigene Inhalte per Config"** (own content via config) of the included `README.md`.

| New                  | File                    | In short                                                                                                                                                                                                                                             |
| -------------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Crop**             | `config/crops.lua`      | Entry in `Config.Crops` with `label`, `level`, `area`, `seasons`, `growSec`, `water`, `fert`, `yield`, `xp`, `seed`, `item`, `price`, `props`. Add the market price in `config/economy.lua` (`Market.items`).                                        |
| **Animal**           | `config/animals.lua`    | Entry in `Config.Animals` **and** in `Config.AnimalOrder`, with `level`, `price`, `ped`, `capacity`, `feedItems`, `product`, `pen`. Barn expansion as upgrade `barn_<species>` in `config/upgrades.lua`, new products in `config/items/animals.lua`. |
| **Machine / recipe** | `config/production.lua` | Machine in `Config.Machines` (`level`, `price`, `location`, `slots`, `maxTier`), recipe in `Config.Recipes` (`machine`, `level`, `duration`, `inputs`, `outputs`, `xp`). New products in `config/items/production.lua`.                              |
| **Vehicle**          | `config/vehicles.lua`   | Entry in `Config.Vehicles` with `model` (addon models too), `kind`, `level`, `price`, `ops`, `workWidth`, `maxSpeed`.                                                                                                                                |

### Adding new items to ox\_inventory

New crops or products bring new items. This is how you add them:

1. Start the server and type into the **server console** (not in game):

   ```
   farmer_items en
   ```

   (or `farmer_items de`). The console reports e.g. `[pepper_farmer] 265 Items → install/ox_items_en.lua`.
2. Replace the old Pepper Farmer block in `ox_inventory/data/items.lua` with the new content of `install/ox_items_en.lua` (as in [Installation, step 5](broken://pages/5f424a889b0098d2d8b9dbc80b3937f597007b1e)).
3. Restart the whole server.

{% hint style="info" %}
New crop items that should fit into the harvest basket must also be added to the `whitelist` in `ox_inventory/modules/items/containers.lua`.
{% endhint %}
