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

# Location editor

Build haunted locations, mission settings, rooms, decorations and NPCs in-game.

Type **`/ghosteditor`**. The editor opens with a free camera, a side panel and a gizmo for moving and rotating things.

{% hint style="info" %}
Access: ACE `rayn_ghosthunting.editor`, or a framework admin when `Config.Editor.frameworkAdmins = true`.
{% endhint %}

## Controls

| Input                     | Action                                               |
| ------------------------- | ---------------------------------------------------- |
| Hold **RMB** + move mouse | Look around                                          |
| **W A S D**               | Fly                                                  |
| **Q / E**                 | Down / up                                            |
| **Shift**                 | Faster                                               |
| **LMB**                   | Select / drag a gizmo axis / place (in placing mode) |
| **RMB** while placing     | Cancel placing                                       |
| **T**                     | Move gizmo                                           |
| **R**                     | Rotate gizmo                                         |
| **F**                     | Snap to ground                                       |
| **Del**                   | Delete the selection                                 |
| **Esc**                   | Cancel placing / deselect                            |

Tick **Snap** in the toolbar to move in 0.05 m steps and rotate in 15° steps (`Config.Editor.snap`, `Config.Editor.rotateSnap`).

## Locations tab

1. Click **+ New location here** or pick an existing location from the list. The camera flies there.
2. Set the **name** and the **area radius** – the search zone shown on the map.
3. **Area center** and **Base** – use *Set by click* and click in the world, then fine-tune with the gizmo. The base is where caught players respawn; its arrow shows the heading.
4. **Mission settings** – possible ghosts, allowed difficulties, time limit and reward multiplier (see below).
5. **Ghost rooms** – *+ Add room* and click where the room is. Set each room's radius. One room is picked at random for every case, so add several.
6. **Objects** – type a model name (or pick a preset) and click *+ Place object*. Move and rotate it with the gizmo, duplicate it, delete it.
7. Press **Save**.

Saved data goes to `data/locations.json` and reaches every player immediately. Locations from `config.lua` can be edited or deleted too; the file then overrides them.

{% hint style="warning" %}
A location with a running investigation cannot be saved or deleted until the case ends.
{% endhint %}

## Mission settings

Every location has its own **🎯 Mission settings** section in the Locations tab. Change them and press **Save** – they are stored with the location in `data/locations.json`.

| Setting                  | What it does                                                                                                                                                                                                   |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Possible ghosts**      | Tick the ghosts that can haunt this location. Nothing ticked = every ghost.                                                                                                                                    |
| **Allowed difficulties** | Tick the difficulties this location offers. Nothing ticked = all of them. Disallowed difficulties are greyed out on the case board, and a *random* case only picks locations that allow the chosen difficulty. |
| **Time limit (min)**     | Time for a case at this location. Empty = `Config.MaxDuration`. The difficulty's `time` multiplier is still applied on top.                                                                                    |
| **Reward multiplier**    | Multiplies the whole payout of this location (e.g. `1.5` = +50%). Stacks with the difficulty payout.                                                                                                           |

The case board shows the real time limit and payout of every difficulty for the selected location, and the reward multiplier next to the location name.

You can also set the same fields for locations in `config.lua`:

```lua
{
    id = 'farm', label = 'Abandoned farm', ...,
    ghosts = { 'spirit', 'demon', 'banshee' },   -- {} or nil = all
    difficulties = { 'normal', 'nightmare' },    -- {} or nil = all
    duration = 20,                               -- minutes, nil = Config.MaxDuration
    reward = 1.5,                                -- payout multiplier
},
```

## Hunter NPCs tab

Type a ped model and click **+ Place NPC**, then click where it should stand. Move it and set its heading with the gizmo, set the scenario (e.g. `WORLD_HUMAN_CLIPBOARD`) and the blip, then press **Save NPCs**.

You can move the NPC anywhere – the case is only cancelled for leaving the area after the team has reached the search zone at least once.

## Decoration presets

The model field suggests `Config.Editor.objectPresets`. Any prop model from the game or your streamed assets works.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://rayn-scripts.gitbook.io/rayn-scripts-docs/rayn_ghosthunting/location-editor.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
