> 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/admin-tab-and-locations.md).

# Admin Tab & Locations

Admins see the **Admin** tab on the left side of the farm tablet. Who is an admin is set up in [Installation, step 10](broken://pages/5f424a889b0098d2d8b9dbc80b3937f597007b1e) (ACE permission `pepper_farmer.admin` or a framework group from `Config.Admin.groups`). The server re-checks every action and writes it to the audit log (table `farmer_audit`, optionally also to the Discord webhook from `config/server.lua`).

## Sub-tabs

| Sub-tab       | Content                                                                                                                                                                                                                                                                                        |
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Overview**  | Farmers online/total, used/free fields, running productions, animals, adjusted locations, audit log                                                                                                                                                                                            |
| **Locations** | All positions with search and group filter: farm HQ, water points, workshop, seed lab, livestock yard and pens, truffle forest, processing machines, vehicle depot, merchants and shops, group order depot, farm shop counter, agricultural show – object/NPC and blip adjustable per location |
| **Fields**    | Per field name (rename), lease board, centre and shape (bed grid, lanes, tree spots); create a **New field**, delete your own fields                                                                                                                                                           |
| **Players**   | Players online and search (also offline): set level, give XP, reset farmer data, view farm                                                                                                                                                                                                     |
| **Leases**    | All fields with tenant and time left, release a lease                                                                                                                                                                                                                                          |
| **Market**    | Reset prices (all or single), trigger a market event, end all events                                                                                                                                                                                                                           |

## Why adjust locations?

**All coordinates in the config are approximations.** Depending on map mods or MLOs on your server, fields, lease boards, merchants or machines may float in the air, sit in the ground or end up inside a building. With the admin tab you fix this **in game** – without editing files and without a restart.

{% hint style="info" %}
Changes apply **immediately to all players** – zones, ox\_target options, props, NPCs and blips are rebuilt. They are stored in the database (table `farmer_locations`); the config files stay unchanged. Updates of the script therefore never overwrite your positions.
{% endhint %}

## Moving a location

Tablet (`F6`) → **Admin** → **Locations**. Find the location (search field or group filter). Each location offers these actions:

| Action                     | What happens                                                                                                             |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| **Teleport here**          | You are teleported to the currently saved location.                                                                      |
| **Set to my position**     | The location takes your position and facing, the height is set to the ground. Shapes (e.g. fields) are moved as a whole. |
| **Preview in game (15 s)** | Shows the location in the world for 15 seconds. `Backspace` ends the preview.                                            |
| **Edit in game**           | Opens the editor (see below).                                                                                            |
| **Reset to config**        | Removes your change, the value from the config applies again.                                                            |

Adjusted locations are marked **Adjusted**, unchanged ones **Config**.

### Recommended workflow

{% stepper %}
{% step %}

### Go there

Click **Teleport here** on a location.
{% endstep %}

{% step %}

### Stand in the right spot

Stand exactly where the location should be and face the desired direction (important for NPCs and boards).
{% endstep %}

{% step %}

### Apply

Open the tablet → **Set to my position**.
{% endstep %}

{% step %}

### Check

Use **Preview in game** to check that everything fits. If not: repeat or **Reset to config**.
{% endstep %}
{% endstepper %}

## Edit in game (editor)

With **Edit in game** the tablet closes and hints with the keys appear at the top of the screen. For all types:

| Key            | Effect                     |
| -------------- | -------------------------- |
| `Enter`        | save                       |
| `Backspace`    | cancel (`ESC` cancels too) |
| `Shift` (hold) | change values faster       |

### Beds, trellises, greenhouse (grid)

| Key                     | Effect                                         |
| ----------------------- | ---------------------------------------------- |
| `E`                     | first cell (corner) at your position           |
| `H`                     | heading = your facing                          |
| `←` / `→`               | select value (rows, columns, spacing, heading) |
| `↑` / `↓` / mouse wheel | change the selected value                      |

### Large fields (lanes)

| Key                     | Effect                                                                                                       |
| ----------------------- | ------------------------------------------------------------------------------------------------------------ |
| `E`                     | **start** of the first lane at your position – then walk or drive the lane – press `E` again for the **end** |
| `G`                     | switch the side on which the further lanes lie                                                               |
| `←` / `→`               | select value (number of lanes, width)                                                                        |
| `↑` / `↓` / mouse wheel | change the selected value                                                                                    |

{% hint style="warning" %}
The lanes should lie on **drivable, preferably flat ground**. Machines only recognise a field when they drive on its lanes.
{% endhint %}

### Orchards, truffle spots, spawn points

| Key | Effect                                                     |
| --- | ---------------------------------------------------------- |
| `E` | add a spot (or a spawn point with facing) at your position |
| `X` | remove the nearest spot within 5 m                         |

### Zones (pens, livestock yard, parking zone, water points …)

| Key                     | Effect                                                |
| ----------------------- | ----------------------------------------------------- |
| `E`                     | centre at your position                               |
| `H`                     | heading = your facing (only for zones with a heading) |
| `↑` / `↓` / mouse wheel | change the radius                                     |

{% hint style="danger" %}
**Leased fields:** for a field that is currently leased, the number of beds, lanes or trees must not decrease. Release the lease under **Leases** first.
{% endhint %}

{% hint style="info" %}
**Farm storage and farm shop:** ox\_inventory stashes that are already loaded keep their old coordinates after a position change until the next server restart.
{% endhint %}

## Renaming and creating fields

**Rename:** sub-tab **Fields** → click the pencil next to the field name, enter a new name (2–48 characters) and save. The name applies immediately for all players and languages (lease board, blips, tablet, messages). **Reset to config** in the same window restores the name from `config/fields.lua`.

**New field:** sub-tab **Fields** → **New field**.

1. Stand where the lease board should be. In the window pick the type (bed, large field, orchard, trellis, greenhouse, special area), size, name, minimum level, optional maximum level and lease price (24 h).
2. **Continue to editor** – the geometry editor starts at your position (keys see above).
3. `Enter` creates the field, immediately for all players. `Backspace` cancels.

Your own fields are called `custom_<n>` and can be deleted again (✕ on the card, only when not leased). Config fields can only be renamed or moved.

## Display & blip per location

Every location has a **visible object**: merchants, shops, the farm manager and the vehicle desk are **NPCs**; machines, lease boards, troughs, drinkers, workshop and farm storage are **props**. Water points show a **water tank** and have a **blip** on the map by default (as do merchants, farm HQ, depot and sites; pen points and machines have no blip).

In **Locations** and **Fields** (lease boards) the **Display & blip** button opens per location:

* **Object in the world:** type (NPC, prop or none = invisible zone), model from the checked list or free text, rotation, offset, collision, animation (NPCs), decoration props.
* **Map marker:** blip on/off, sprite, colour, size, custom label.
* **Reset display:** object and blip come from the config again.

**All blips on/off** switches the blips of a whole group. If a model is missing in game, an invisible zone is created automatically – the location stays usable. Defaults are in `config/world.lua`.

## Export as Lua

If you want to transfer your positions into the config permanently (e.g. to use them on a second server):

1. Admin → **Overview**, **Locations** or **Fields** → **Export as Lua**. You get all changed values as text (`Config.… = vec3(…)`) and can put it on your clipboard with **Copy**.
2. Alternatively in the **server console**:

   ```
   farmer_locations_export
   ```

   This writes the file `pepper_farmer/install/location_overrides.lua`.
3. Transfer the values into the matching config files and then reset the locations to **Config** in the admin tab.

{% hint style="info" %}
This is **optional**. Positions from the admin tab work permanently, even without exporting.
{% endhint %}

## Players

Under **Players** you see everyone who is currently online and can search by name or identifier (at least 2 characters, offline players too).

| Action        | Effect                                                                                                                 |
| ------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **View**      | Farm, members, leases, animals, vehicles and machines of the player                                                    |
| **Set level** | Set the level directly                                                                                                 |
| **Give XP**   | Credit XP without multipliers                                                                                          |
| **Reset**     | Reset level, XP, prestige and statistics of the character. Farm, fields, animals and items stay. **Cannot be undone.** |

For offline players, changes go straight into the database. Level rewards are only paid while the player is online.

## Leases

List of all fields with tenant and time left. **Release** ends a lease immediately: crops on the field are lost (no harvest into the farm storage), the lease fee is not refunded.

## Market

| Action                                               | Effect                                                                               |
| ---------------------------------------------------- | ------------------------------------------------------------------------------------ |
| **Reset prices** (single or **Reset entire market**) | Market pressure back to factor 1.0 (base price). Prices then develop normally again. |
| **Trigger market event**                             | Choose good and event type (or random). All players are notified immediately.        |
| **End all events**                                   | All running market events end immediately.                                           |

Admin commands for the console and chat are listed under [Commands & Exports](broken://pages/52556f3118b2fcddc36fe0fbf4d0fd402c7ccb5e).
