# Configuration

`FPS Booster` uses a configuration file located in:

* `data/config.lua`

This file controls the command, rendering behavior, cleanup loops, and entity culling settings.

### Localization

```lua
Locale = 'en' -- 'en' or 'pl'
```

Defines which language should be used.

Supported values:

* `en`
* `pl`

To add a new language, create a new locale file matching the structure of the existing language files.

***

### Main Configuration

Example:

```lua
Locale = 'en',

Command = 'fps',

LodScale = 0.75,
ParticleFxRange = 15.0,

CleanupInterval = 300,
EntityInterval = 500,

EntityCulling = {
    pedDistance = 60.0,
    objectDistance = 90.0,
    vehicleDistance = 120.0,
    pedAlpha = 210,
    objectAlpha = 170,
}
```

***

### Command

```lua
Command = 'fps'
```

Defines the command used to open the FPS Booster panel.

This command can also be used for keybind registration depending on your implementation.

***

### Rendering

#### `LodScale`

```lua
LodScale = 0.75
```

Defines the level-of-detail scale override.

* lower value = less detail
* lower value = better performance

Recommended range:

* `0.1` to `1.0`

#### `ParticleFxRange`

```lua
ParticleFxRange = 15.0
```

Defines the radius around the player where particle effects can be removed.

This helps reduce visual clutter and improve FPS in dense areas.

***

### Loop Intervals

#### `CleanupInterval`

```lua
CleanupInterval = 300
```

Defines how often the periodic cleanup loop runs.

This value is measured in milliseconds.

The cleanup loop can remove or reset effects such as:

* glass
* blood
* wetness
* dirt
* blur
* rain
* wind

#### `EntityInterval`

```lua
EntityInterval = 500
```

Defines how often the entity culling loop runs.

This value is measured in milliseconds.

***

### Entity Culling

```lua
EntityCulling = {
    pedDistance = 60.0,
    objectDistance = 90.0,
    vehicleDistance = 120.0,
    pedAlpha = 210,
    objectAlpha = 170,
}
```

Controls how far entities can be before they are hidden or faded.

#### `pedDistance`

```lua
pedDistance = 60.0
```

Defines the distance in meters beyond which off-screen peds can be hidden.

#### `objectDistance`

```lua
objectDistance = 90.0
```

Defines the distance in meters beyond which off-screen objects can be hidden.

#### `vehicleDistance`

```lua
vehicleDistance = 120.0
```

Defines the distance in meters beyond which off-screen vehicles can be hidden.

#### `pedAlpha`

```lua
pedAlpha = 210
```

Defines the alpha used for visible peds.

Supported range:

* `0` to `255`

#### `objectAlpha`

```lua
objectAlpha = 170
```

Defines the alpha used for visible objects.

Supported range:

* `0` to `255`

#### Behavior

Entities beyond the configured threshold and outside the player’s screen can be hidden to improve performance.

Visible entities use the configured alpha values.

Vehicles return to full alpha when visible.

***

### Presets

The resource includes four built-in presets:

* `Low`
* `Medium`
* `High`
* `None`

#### Low

Maximum performance preset with most optimizations enabled.

#### Medium

Balanced preset with key optimizations enabled.

#### High

Light optimization preset with minimal visual changes.

#### None

Disables all booster optimizations and restores normal game behavior.

***

### UI Sections

The FPS Booster panel includes three main sections:

#### FPS

Displays:

* live FPS ring
* min FPS
* average FPS
* max FPS
* real-time graph
* quick preset buttons

#### Presets

Displays all preset profiles and their included optimization levels.

#### Options

Displays all individual optimization toggles grouped by category.

The search field filters options in real time.

***

### Client Exports

This resource provides the following client-side exports.

#### `SetActive`

Enables or disables the booster quickly.

```lua
exports['msk_fpsbooster']:SetActive(true)
exports['msk_fpsbooster']:SetActive(false)
```

* `true` = enable booster using the low preset
* `false` = disable booster and apply the none preset

#### `IsActive`

Returns whether any optimization is currently active.

```lua
local active = exports['msk_fpsbooster']:IsActive()
```

#### `GetSettings`

Returns the current settings table.

```lua
local settings = exports['msk_fpsbooster']:GetSettings()
```

This can be used to check which options are currently enabled.

***

### Notes

* Settings are saved client-side using KVP
* No database is required
* Cleanup runs at the configured interval
* All visual changes are reverted when the resource stops
* The draw distance option can override other active timecycle modifiers


---

# 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://mskscripts.gitbook.io/mskscripts/scripts/fps-booster/configuration.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.
