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

# Configuration

Place networks, set passkeys and tune hotspots and signal items.

| File                   | What's in it                                                                                      |
| ---------------------- | ------------------------------------------------------------------------------------------------- |
| `configs/shared.lua`   | Networks on the map, hotspot settings, hacking tool and cooldown, passkey lockout, command names  |
| `configs/server.lua`   | Passkeys and breach alarms of secured networks, and the signal item effects. Stays on the server. |
| `bridge/inventory.lua` | Which inventory the items go through. Add yours here if it isn't supported.                       |

{% hint style="danger" %}
Never put passkeys in `configs/shared.lua`: that file is sent to players. Passkeys belong in `configs/server.lua`.
{% endhint %}

## Networks on the map

Each entry in `staticNetworks` is a network:

```lua
{
    id = 'legion_public',
    label = 'Legion Square Public',
    coords = vec3(150.0, -1000.0, 29.0),
    radius = 60.0,            -- metres
    ssid = 'LosSantos_Free_WiFi',
    secured = false,
    bssid = 'AA:BB:CC:DD:01:01',
    bandwidth = 25,           -- Mbps at full signal
    encryption = 0,           -- 0 for open networks, 1 to 5 for secured ones
},
```

`defaults` sets the radius, bandwidth and encryption for networks other scripts register at runtime.

## Secured networks

For a secured network, set `secured = true` and an `encryption` level in `configs/shared.lua`, then add its passkey to `networkSecrets` in `configs/server.lua`:

```lua
networkSecrets = {
    pdp_secure = {
        passkey = 'your-passkey',
        alarmOnBreach = true,
        owner = 'LSPD',
    },
},
```

`passkey` is what players type to connect. `alarmOnBreach` and `owner` are notes for your staff, listed by `/netsecrets`.

The encryption level sets how many minigame layers a hack has to get through. With ALT0 Boosting, a failed hack on a secured network alerts the police.

## Hacking and passkeys

```lua
hacking = {
    requiredItems = { 'signal_jacker' }, -- the server only accepts a hack from a player carrying one ({} = no item)
    cooldown = 20,                       -- seconds between hacks per player and network
},
passkeyAttempts = 5,  -- wrong passkeys before a lockout
passkeyLockout = 60,  -- seconds
```

## Hotspots

```lua
hotspot = {
    requiredItem = 'signal_amplifier', -- used up when the hotspot starts
    radius = 35.0,                     -- metres
    bandwidthMultiplier = 0.4,         -- 40% of the parent network's speed
    duration = 300,                    -- seconds
    cooldown = 30,                     -- seconds before a player can start another
},
```

## Signal items

In `configs/server.lua` → `items`:

| Item             | Effect                                                                      |
| ---------------- | --------------------------------------------------------------------------- |
| `signal_booster` | Raises a network's range by `magnitude` (0.5 = +50%) for `duration` seconds |
| `jammer`         | Cuts a network's range by `magnitude` for `duration` seconds                |
| `sniffer`        | Reveals more about nearby networks for `duration` seconds                   |

## Commands

```lua
commands = {
    scan = 'netscan',     -- list networks in range
    speedTest = 'nettest',
    hotspot = 'hotspot',  -- start a hotspot with a Signal Amplifier
},
```

Set a command to `false` to turn it off.

| Command                                                                                 | Who                             | What                                                  |
| --------------------------------------------------------------------------------------- | ------------------------------- | ----------------------------------------------------- |
| `/netscan`                                                                              | Everyone                        | List networks in range with signal and speed          |
| `/nettest`                                                                              | Everyone                        | Speed test on the strongest signal                    |
| `/hotspot`                                                                              | Players with a Signal Amplifier | Turn a nearby network into a hotspot that follows you |
| `/netadd`, `/netremove`, `/netmod`, `/netlist`, `/hotspots`, `/applymod`, `/netsecrets` | Admins                          | Manage networks while the server runs                 |

## Other

| Setting        | What it does                                              |
| -------------- | --------------------------------------------------------- |
| `debug`        | Draw network ranges and turn on `/netdebug` and `/netmon` |
| `versionCheck` | Print update notices in the server console                |
