# Tower Sites

This guide explains how to configure tower sites for realistic radio signal simulation in RadioLink-P25.

## Understanding Tower Sites

In RadioLink-P25, tower sites simulate real-world radio repeater towers that:

* Relay radio transmissions over greater distances
* Provide varied signal strength based on distance
* Create realistic radio coverage across the map

## Tower Sites Configuration

Tower sites are configured in the `data/towers.json` file. The file contains an array of tower objects, each with properties defining the tower's name, position, and range.

Here's an example from the default tower configuration:

```json
[
    {
        "name": "Mount Chiliad",
        "position": { "x": 500.0, "y": 5600.0, "z": 800.0 },
        "range": 8000.0
    },
    {
        "name": "Los Santos Tower",
        "position": { "x": -1075.0, "y": -250.0, "z": 200.0 },
        "range": 5000.0
    },
    {
        "name": "Vinewood Hills",
        "position": { "x": 750.0, "y": 1200.0, "z": 320.0 },
        "range": 4000.0
    }
]
```

## Tower Site Properties

Each tower site has the following properties:

<table><thead><tr><th width="148">Property</th><th width="145">Type</th><th width="89" data-type="checkbox">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code></td><td>String</td><td>true</td><td>Display name of the tower site</td></tr><tr><td><code>position</code></td><td>Object</td><td>true</td><td>X, Y, Z coordinates in the game world</td></tr><tr><td><code>range</code></td><td>Number</td><td>true</td><td>Maximum range in game units</td></tr><tr><td><code>enabled</code></td><td>Bool</td><td>false</td><td>Sets radio state, can be controlled through API</td></tr></tbody></table>

## Tower Site Behavior

Tower sites function according to the settings in the `Towers` section of the `shared/config.lua` file:

```lua
Towers = {
    LineOfSightCheck = true,         -- Enable/disable line-of-sight checks for towers
    HeightMultiplier = true,         -- Signal strength distance multiplier based on tower height
    RangeMultiplier = 1.0,           -- Default tower range multiplier
    UpdateInterval = 1000            -- Signal strength update interval (milliseconds)
}
```

These settings control:

* **`LineOfSightCheck`**: When enabled, obstacles between the player and tower will reduce signal strength
* **`HeightMultiplier`**: When enabled, towers at higher elevations will have improved range
* **`RangeMultiplier`**: A global multiplier applied to all tower ranges
* **`UpdateInterval`**: How frequently the system updates signal strength calculations

## Positioning Tower Sites

For realistic radio coverage, consider these guidelines when placing towers:

1. **High Elevations**: Place towers on mountains and tall buildings for better coverage
2. **Strategic Coverage**: Ensure important areas have good coverage
3. **Realistic Spacing**: Space towers in a way that provides overlapping coverage without too much redundancy

## Signal Propagation

The signal strength decreases as players move away from towers:

1. Players closer to towers will have better signal (indicated by more bars on the radio display)
2. Players at the edge of a tower's range will have weaker signal
3. Players outside of all tower ranges will have no signal

If `LineOfSightCheck` is enabled, buildings, mountains, and other obstacles between the player and tower will further reduce signal strength.

## Troubleshooting Tower Issues

### No Signal Anywhere

* Check if towers are defined correctly in towers.json
* Verify tower coordinates are within the game world
* Ensure tower ranges are appropriate for your map size

### Signal Drops Unexpectedly

* Check if LineOfSightCheck is enabled (obstacles may be blocking the signal)
* Look for gaps in coverage between towers
* Consider increasing tower ranges or adding additional towers

### Performance Issues

If you experience performance issues with many towers:

1. Reduce the number of towers
2. Increase the UpdateInterval value
3. Disable LineOfSightCheck if not needed
4. Optimize tower placement to require fewer towers


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.everest-community.net/fivem-resources/fivem-resources/radiolink-p25/config-overview/tower-sites.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
