> 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/configuration.md).

# Configuration

Every option in config.lua.

## General

| Option          | Default  | Description                                                       |
| --------------- | -------- | ----------------------------------------------------------------- |
| `Config.Locale` | `'en'`   | Language file from `locales/`                                     |
| `Config.Notify` | `'rayn'` | `rayn` (built-in, positionable), `ox`, `framework`, `gta`, `auto` |
| `Config.Prompt` | `'rayn'` | `rayn`, `ox` (text UI) or `gta` (help text)                       |
| `Config.Target` | `'auto'` | ox\_target > qb-target > \[E]. `false` = always \[E]              |
| `Config.Debug`  | `false`  | Draws the ghost room – testing only                               |

## Access

```lua
Config.Access = {
    jobs      = nil,    -- e.g. { 'ghosthunter' }
    ace       = nil,    -- e.g. 'rayn_ghosthunting.use'
    nightOnly = false,  -- only 21:00 - 05:00 game time
}
```

## Equipment

| Option                  | Description                                                                                                         |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------- |
| `Config.ToolMode`       | `items`, `virtual` or `auto`                                                                                        |
| `Config.Items`          | Tool → item name mapping                                                                                            |
| `Config.Kit`            | Mission kit given on start / taken back on end ([Items](/rayn-scripts-docs/rayn_ghosthunting/items.md#mission-kit)) |
| `Config.GiveFlashlight` | Gives `WEAPON_FLASHLIGHT` (as an item with ox\_inventory)                                                           |
| `Config.Virtual`        | Pills and crucifixes per case in virtual mode                                                                       |
| `Config.Tools`          | Hand props with `offset` / `rot` per tool                                                                           |
| `Config.PlacedProps`    | Props used for the placed book and crucifix                                                                         |

## Investigation

| Option                       | Default      | Description                                                                                                                                     |
| ---------------------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `Config.MaxTeam`             | `4`          | Players per team                                                                                                                                |
| `Config.TeamJoinRadius`      | `8.0`        | Distance from the NPC to join the team                                                                                                          |
| `Config.MaxDuration`         | `30`         | Default minutes per case – each location can set its own [time limit](/rayn-scripts-docs/rayn_ghosthunting/location-editor.md#mission-settings) |
| `Config.LeaveRadius`         | `250.0`      | Going this far from the area leaves the case (checked only after the team first reaches the area)                                               |
| `Config.HuntCooldown`        | `50`         | Seconds between hunts                                                                                                                           |
| `Config.HuntDuration`        | `{ 20, 32 }` | Hunt length in seconds                                                                                                                          |
| `Config.HuntGrace`           | `4`          | Seconds of flickering before the ghost moves                                                                                                    |
| `Config.CaughtRespawnToBase` | `true`       | Caught players are moved to the base                                                                                                            |
| `Config.Difficulties`        |              | Sanity drain, hunt threshold bonus, activity, payout, hidden evidence, time                                                                     |
| `Config.Sanity`              |              | Drain rates, pill restore, apparition loss, hallucination threshold                                                                             |
| `Config.TempUnit`            | `'C'`        | `C` or `F`                                                                                                                                      |

## Rewards

```lua
Config.Rewards = {
    account        = 'cash',
    completion     = 250,
    correctGhost   = 750,
    perEvidence    = 100,
    photo          = 200,
    speedBonus     = 300,
    deadMultiplier = 0.5,
    items = {
        -- { item = 'ectoplasm', count = 1, chance = 0.5 },
    },
}
```

The payout is multiplied by the difficulty `payout` and by the location's [reward multiplier](/rayn-scripts-docs/rayn_ghosthunting/location-editor.md#mission-settings).

## Blips

```lua
Config.Blips = {
    hunter        = { enabled = true, sprite = 274, colour = 27, scale = 0.8, shortRange = true },
    investigation = {
        enabled = true,
        radius = true, radiusAlpha = 90, colour = 27,  -- the shaded search zone
        point = false,                                 -- extra point blip in the centre
        route = false,                                 -- GPS route to the point (needs point = true)
        sprite = 274, scale = 0.9,
    },
}
```

By default only the search zone is shown while investigating – no point blip and no GPS route, so players have to search the area. Set `hunter.enabled = false` to hide the NPC blip.

Sprite ids: [FiveM blip list](https://docs.fivem.net/docs/game-references/blips/). Blips are created once and only rebuilt when their data changes, so other blips on the map never flicker.

## Audio & effects

| Option                 | Description                                               |
| ---------------------- | --------------------------------------------------------- |
| `Config.Volume`        | Music and effects volume (0.0–1.0)                        |
| `Config.Timecycle`     | Screen filter inside the area, `nil` = off                |
| `Config.FlickerLights` | Flickering city lights (local to the team)                |
| `Config.CustomSounds`  | Own `ambient`, `hunt`, `scream` files from `html/sounds/` |

All music and sounds are generated in code by default – nothing has to be uploaded.

## Default content

`Config.Hunters` and `Config.Locations` hold the default NPC and locations (including optional `ghosts`, `difficulties`, `duration` and `reward`). Anything saved in the [Location editor](/rayn-scripts-docs/rayn_ghosthunting/location-editor.md) overrides them.


---

# 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/configuration.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.
