# Configuration Variables (Convars)

This document lists all configuration variables used in jo_libs, grouped by module.

Total convars: 53

## Modules

### Camera

| Convar | Side | Type | Default | Description |
|--------|------|------|---------|-------------|
| `jo_libs:camera:keys:exit` | `[Client]` | String | `INPUT_QUIT` |  |
| `jo_libs:camera:keys:moveDown` | `[Client]` | String | `INPUT_SCRIPTED_FLY_ZDOWN` | Right stick up (keyboard: F) |
| `jo_libs:camera:keys:moveUp` | `[Client]` | String | `INPUT_SCRIPTED_FLY_ZUP` | Square/X button (keyboard: SPACE) - Context-aware (Move Up / Play-Pause) |
| `jo_libs:camera:keys:moveX` | `[Client]` | String | `INPUT_SCRIPTED_FLY_LR` | A/D keys |
| `jo_libs:camera:keys:moveY` | `[Client]` | String | `INPUT_SCRIPTED_FLY_UD` | W/S keys |
| `jo_libs:camera:keys:speedDown` | `[Client]` | String | `INPUT_SELECT_NEXT_WEAPON` | Scroll down |
| `jo_libs:camera:keys:speedUp` | `[Client]` | String | `INPUT_SELECT_PREV_WEAPON` | Scroll up |
| `jo_libs:camera:movement:maxSpeed` | `[Client]` | Float | `0.5` |  |
| `jo_libs:camera:movement:minSpeed` | `[Client]` | Float | `0.01` |  |
| `jo_libs:camera:movement:speed` | `[Client]` | Float | `0.05` |  |
| `jo_libs:camera:movement:speedIncrement` | `[Client]` | Float | `0.05` |  |
| `jo_libs:camera:rotation:maxY` | `[Client]` | Float | `80.0` |  |
| `jo_libs:camera:rotation:minY` | `[Client]` | Float | `-80.0` |  |
| `jo_libs:camera:rotation:speed` | `[Client]` | Float | `5.0` |  |
| `jo_libs:camera:strings:exit` | `[Client]` | String | `Exit` |  |
| `jo_libs:camera:strings:move` | `[Client]` | String | `Move` |  |
| `jo_libs:camera:strings:moveUpDown` | `[Client]` | String | `Move Up/Down` |  |
| `jo_libs:camera:strings:speed` | `[Client]` | String | `Speed %.2f` |  |

### Emit

| Convar | Side | Type | Default | Description |
|--------|------|------|---------|-------------|
| `jo_libs:emit:bps` | `[Shared]` | Integer | `20000` | Default bit/s for latent events |

### Gizmo

| Convar | Side | Type | Default | Description |
|--------|------|------|---------|-------------|
| `jo_libs:gizmo:allowRotateX` | `[Client]` | Boolean | `true` | Allow rotation on X-axis |
| `jo_libs:gizmo:allowRotateY` | `[Client]` | Boolean | `true` | Allow rotation on Y-axis |
| `jo_libs:gizmo:allowRotateZ` | `[Client]` | Boolean | `true` | Allow rotation on Z-axis |
| `jo_libs:gizmo:allowSnapToGround` | `[Client]` | Boolean | `true` | Allow snapping to ground |
| `jo_libs:gizmo:allowTranslateX` | `[Client]` | Boolean | `true` | Allow translation on X-axis |
| `jo_libs:gizmo:allowTranslateY` | `[Client]` | Boolean | `true` | Allow translation on Y-axis |
| `jo_libs:gizmo:allowTranslateZ` | `[Client]` | Boolean | `true` | Allow translation on Z-axis |
| `jo_libs:gizmo:enableCam` | `[Client]` | Boolean | `true` | Enable/Disable camera feature |
| `jo_libs:gizmo:keys:cameraSpeedDown` | `[Client]` | Integer | ``INPUT_SELECT_NEXT_WEAPON`` | Decrease camera speed |
| `jo_libs:gizmo:keys:cameraSpeedUp` | `[Client]` | Integer | ``INPUT_SELECT_PREV_WEAPON`` | Increase camera speed |
| `jo_libs:gizmo:keys:cancel` | `[Client]` | Integer | ``INPUT_GAME_MENU_TAB_RIGHT_SECONDARY`` | Cancel operation |
| `jo_libs:gizmo:keys:confirm` | `[Client]` | Integer | ``INPUT_FRONTEND_ACCEPT`` | Confirm placement |
| `jo_libs:gizmo:keys:focusEntity` | `[Client]` | Integer | ``INPUT_SHOP_SPECIAL`` | Toggle focus on entity |
| `jo_libs:gizmo:keys:moveDown` | `[Client]` | Integer | ``INPUT_FRONTEND_RUP`` | Move down |
| `jo_libs:gizmo:keys:moveUp` | `[Client]` | Integer | ``INPUT_FRONTEND_X`` | Move up |
| `jo_libs:gizmo:keys:moveX` | `[Client]` | Integer | ``INPUT_SCRIPTED_FLY_LR`` | Move left/right |
| `jo_libs:gizmo:keys:moveY` | `[Client]` | Integer | ``INPUT_SCRIPTED_FLY_UD`` | Move forward/backward |
| `jo_libs:gizmo:keys:rotationSnap` | `[Client]` | Integer | ``INPUT_FRONTEND_Y`` | Rotation snap key |
| `jo_libs:gizmo:keys:snapToGround` | `[Client]` | Integer | ``INPUT_INTERACT_OPTION1`` | Snap entity to ground |
| `jo_libs:gizmo:keys:switchMode` | `[Client]` | Integer | ``INPUT_RELOAD`` | Switch between translate/rotate modes |
| `jo_libs:gizmo:maxCamDistance` | `[Client]` | Integer | `80` | Maximum distance camera can be moved from player |
| `jo_libs:gizmo:maxDistance` | `[Client]` | Integer | `100` | Maximum distance entity can be moved from starting position (set to false to disable) |
| `jo_libs:gizmo:maxMovementSpeed` | `[Client]` | Float | `0.2` | Maximum movement speed for camera |
| `jo_libs:gizmo:maxY` | `[Client]` | Integer | `40` | Maximum Y value for camera rotation |
| `jo_libs:gizmo:minMovementSpeed` | `[Client]` | Float | `0.001` | Minimum movement speed for camera |
| `jo_libs:gizmo:minY` | `[Client]` | Integer | `-40` | Minimum Y value for camera rotation |
| `jo_libs:gizmo:movementSpeed` | `[Client]` | Float | `0.1` | Default movement speed for camera |
| `jo_libs:gizmo:movementSpeedIncrement` | `[Client]` | Float | `0.01` | Increment value when adjusting camera speed |
| `jo_libs:gizmo:onlyOnMove` | `[Client]` | Boolean | `false` |  |
| `jo_libs:gizmo:rotationSnap` | `[Client]` | Integer | `5` | Rotation snap value |

### I18n

| Convar | Side | Type | Default | Description |
|--------|------|------|---------|-------------|
| `jo_libs:i18n:allowSwitchLocale` | `[Client]` | String | `true` | Allow switching locale |
| `jo_libs:i18n:localeCommand` | `[Client]` | String | `setLocale` | Command to switch locale |
| `jo_libs:i18n:locale` | `[Shared]` | String | `en` |  |

### Raw-keys

| Convar | Side | Type | Default | Description |
|--------|------|------|---------|-------------|
| `jo_libs:keyboard_layout` | `[Client]` | String | `qwerty` |  |

## Debug
You can turn on/off the debug prints on all libraries or on a specific module with this convars:

| Convar                      | Side   | Type   | Default | Values     | Description                                                                 |
| --------------------------- | ------ | ------ | ------- | ---------- | --------------------------------------------------------------------------- |
| `<resource>:debug:<module>` | `[Shared]` | String | `off`   | `on`/`off` | Enable/Disable debug prints for **one module** running **in the resource**  |
| `<resource>:debug`          | `[Shared]` | String | `off`   | `on`/`off` | Enable/Disable debug prints for **all modules** running **in the resource** |
| `all:debug:<module>`        | `[Shared]` | String | `off`   | `on`/`off` | Enable/Disable debug prints for **all modules** running **in all resource** |

## Example Configuration in server.cfg
Here's how you can override some of the default settings in your server.cfg file:

::: code-group
```cfg [server.cfg]
## Gizmo Module Configuration
setr jo_libs:gizmo:enableCam true
setr jo_libs:gizmo:maxDistance 150
setr jo_libs:gizmo:maxCamDistance 100
setr jo_libs:gizmo:movementSpeed 0.15

## Custom key bindings
setr jo_libs:gizmo:keys:confirm "INPUT_FRONTEND_ACCEPT"
setr jo_libs:gizmo:keys:cancel "INPUT_FRONTEND_CANCEL"

## Debug
# Enable the debug of all modules in kd_stable resource
setr kd_stable:debug on 

# Enable the debug of the component module in the jo_clothingstore resource
setr jo_clothingstore:debug:component on 

# Enable the debug of all modules in the framework-bridge resource
setr all:debug:framework-bridge on 
```
