> For the complete documentation index, see [llms.txt](https://code-after-sex.gitbook.io/script-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://code-after-sex.gitbook.io/script-documentation/cas-halloween-map/configuration.md).

# Configuration

The config.lua reference for CAS Halloween Map - the town light, ghost, bell, howls, interior decor and haunted spots.

Everything is in `config.lua`, which stays open and editable. Restart the resource after a change.

## General

| Key                 | Default                 | Description                                                                             |
| ------------------- | ----------------------- | --------------------------------------------------------------------------------------- |
| `Config.Debug`      | `false`                 | Prints zone changes and spawns to F8, and enables `/hw_tc` and `/hw_tcvars` for tuning. |
| `Config.Night`      | `{ from = 19, to = 6 }` | Dusk and dawn, in game hours.                                                           |
| `Config.HauntRange` | `90.0`                  | Crows and bats appear when a player comes this close, and go when they leave.           |

## Town light: `Config.Timecycle`

A game timecycle faded in while you are inside a town.

| Key           | Default          | Description                              |
| ------------- | ---------------- | ---------------------------------------- |
| `enabled`     | `true`           | Switches the town light on or off.       |
| `name`        | `"Smuggler1FOG"` | Any name from the game's timecycle list. |
| `day`         | `0.35`           | Strength in daylight.                    |
| `night`       | `0.75`           | Strength from dusk to dawn.              |
| `fadeSeconds` | `4.0`            | Fade in and out.                         |

## The ghost: `Config.Ghost`

The game's own ghost, Agnes Dowd. She shows at night when you are near a graveyard, fades away when you come close, and returns somewhere else later.

| Key       | Default                  | Description                                      |
| --------- | ------------------------ | ------------------------------------------------ |
| `enabled` | `true`                   | Switches her on or off.                          |
| `alpha`   | `150`                    | How solid she looks.                             |
| `haze`    | `false`                  | The game's ghost haze around her.                |
| `range`   | `70.0`                   | She shows within this distance of a graveyard.   |
| `vanish`  | `7.0`                    | She fades when you come this close.              |
| `respawn` | `{ 40, 90 }`             | Seconds before she shows again.                  |
| `sting`   | `"AGNES_DOWD_ONESHOT_1"` | Music sting when she vanishes. `false` for none. |

## The bell: `Config.Bell`

| Key       | Default | Description                               |
| --------- | ------- | ----------------------------------------- |
| `enabled` | `true`  | The church bell tolls twelve at midnight. |
| `range`   | `400.0` | Players this close to the town hear it.   |
| `gapMs`   | `3200`  | Time between strokes.                     |

## Howls: `Config.Howls`

| Key        | Default       | Description                                             |
| ---------- | ------------- | ------------------------------------------------------- |
| `enabled`  | `true`        | A howl out past the last houses, at night, near a town. |
| `every`    | `{ 50, 130 }` | Seconds between howls.                                  |
| `distance` | `90.0`        | How far away it sounds.                                 |

## Interior decor: `Config.Interiors`

| Key       | Default | Description                                                  |
| --------- | ------- | ------------------------------------------------------------ |
| `enabled` | `true`  | Blood and candles inside the buildings.                      |
| `near`    | `6.0`   | Decor is made when a player is indoors within this distance. |

## Towns: `Config.Towns`

Each town has a `center`, a `radius`, its `haunts` (where the crows and bats gather), the ghost's spots and its bell. Change the counts in `haunts` to have more or fewer birds.

## Ground mist: `Config.Mist`

Off by default (`enabled = false`). It uses the game's `ent_amb_river_mist_gen` effect at the `mist` spots of each town.
