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

# Configuration

The config.lua file is the heart of your jail system. Change the settings to your desire.

> Only ESX is currently supported. Do not change this unless future updates add support for additional frameworks.

***

## Locale / Language

```
Config.Locale = 'en'
```

Controls which language file the script loads.

#### Supported Languages

| Locale | Language   |
| ------ | ---------- |
| `en`   | English    |
| `de`   | German     |
| `es`   | Spanish    |
| `fr`   | French     |
| `it`   | Italian    |
| `nl`   | Dutch      |
| `pl`   | Polish     |
| `pt`   | Portuguese |
| `ru`   | Russian    |
| `tr`   | Turkish    |

#### Example

```
Config.Locale = 'fr'
```

This would load the French locale file.

***

## General Settings

```
Config.Debug = false
```

Enables or disables debug printing.

| Value   | Description            |
| ------- | ---------------------- |
| `true`  | Enable debug messages  |
| `false` | Disable debug messages |

***

```
Config.MaxPets = 3
```

Maximum number of pets a player can own.

***

```
Config.DefaultPetName = 'Pet'
```

Default name assigned to newly purchased pets.

***

## Currency & Payments

```
Config.CurrencySymbol = '£'
```

Currency symbol displayed throughout the UI and menus.

#### Examples

```
'$''€''£'
```

***

```
Config.PaymentAccount = 'money'
```

Defines which player account is used for purchases.

| Value     | Description  |
| --------- | ------------ |
| `'money'` | Cash         |
| `'bank'`  | Bank Account |

***

## Pet Settings

```
Config.DefaultPetHealth = 100
```

Default maximum health for pets.

***

```
Config.DefaultPetFood = 100
```

Default food level for pets.

***

```
Config.DefaultPetSpeed = 3.5
```

Default movement speed for pets.

> Individual pets can override this value in `Config.Pets`.

***

```
Config.IllnessChance = 5
```

Chance for a pet to become sick.

#### Example

```
5 = 5%
10 = 10%
```

***

```
Config.FeedingDuration = 10000
```

How long the pet remains eating at the food bowl. (10000 = 10 Seconds)

```
Config.VetHealingDuration = 5000
```

How long it takes to heal your pet at the vet NPC. (5000 = 5 Seconds)

***

## Interaction Distances

```
Config.TargetDistance = 2.5
```

Distance players can interact with NPCs using ox\_target.

***

```
Config.FollowDistance = 8.0
```

Distance before the pet starts following the player again.

***

```
Config.StopFollowDistance = 3.0
```

Distance the pet attempts to maintain while following.

***

```
Config.AttackDistance = 30.0
```

Maximum distance the pet can target enemies for attacks.

***

## Economy Settings

```
Config.HealPrice = 500
```

Cost to heal a pet at the vet.

***

```
Config.FoodPrice = 200
```

Price of pet food.

***

```
Config.TennisBallPrice = 100
```

Price of a tennis ball.

***

```
Config.SellPercentage = 0.5
```

Percentage refunded when selling a pet.

#### Example

```
0.5 = 50%
0.75 = 75%
```

If a pet costs `$50,000` and the sell percentage is `0.5`, the player receives `$25,000`.

***

## Pet Menu Settings

```
Config.EnablePetMenuCommand = true
```

Enables the `/petmenu` command.

***

```
Config.EnablePetMenuKeybind = true
```

Enables keyboard shortcut support.

***

```
Config.PetMenuCommand = 'petmenu'
```

Command used to open the pet menu.

#### Example

```
/petmenu
```

***

```
Config.PetMenuKeybind = 'J'
```

Keyboard key used to open the pet menu.

***

```
Config.PetMenuDescription = 'Open Pet Menu'
```

Description shown in command suggestions.

***

## Pet Name Limits

```
Config.MinPetNameLength = 3
Config.MaxPetNameLength = 12
```

Controls minimum and maximum pet name length.

***

## Inventory Items

```
Config.FoodItem = 'petfood'
Config.TennisBallItem = 'tennisball'
```

ox\_inventory item names used by the script.

> Only change these if your inventory item names are different.

***

## Pet Food & Starvation System

```
Config.FoodDrainRate = 1
```

Amount of food removed every cycle.

***

```
Config.FoodDrainInterval = 60000
```

How often food drains. (60000 = 1 Minute)

> Lower values update more frequently but increase resource usage.

***

```
Config.StarvationHealthDrain = 5
```

Health lost while starving.

***

```
Config.StarvationThreshold = 10
```

When food falls below this value, the pet is considered starving.

***

```
Config.PetCanDieFromStarvation = true
```

Controls whether starvation can kill pets.

| Value   | Description     |
| ------- | --------------- |
| `true`  | Pets can die    |
| `false` | Pets cannot die |

***

## Vehicle Seating

```
Config.VehicleSeat = 0
```

Seat used when pets enter vehicles.

| Value | Seat            |
| ----- | --------------- |
| `0`   | Front Passenger |
| `1`   | Rear Left       |
| `2`   | Rear Right      |

***

## NPC Locations

```
Config.Locations = {}
```

Controls where the Pet Shop and Vet NPCs spawn.

#### Structure

```
coords = vector3(x, y, z)
heading = 0.0
ped = 'ped_model'
```

#### Example

```
Config.Locations = {
    PetShop = {
        coords = vector3(607.846, 2736.962, 40.967),
        heading = 96.377,
        ped = 'a_f_y_soucent_03'
    },
    Vet = {
        coords = vector3(609.797, 2727.745, 40.866),
        heading = 96.377,
        ped = 's_f_y_sweatshop_01'
    }
}
```

***

## Blips

```
Config.Blips = {}
```

Controls map blips for the Pet Shop and Vet.

#### Options

| Setting   | Description         |
| --------- | ------------------- |
| `enabled` | Enable/disable blip |
| `coords`  | Blip location       |
| `sprite`  | GTA blip icon       |
| `colour`  | Blip color          |
| `scale`   | Blip size           |
| `label`   | Locale label        |

***

## Target Icons

```
Config.TargetIcons = {}
```

Font Awesome icons displayed with ox\_target.

#### Example

```
shop = 'fa-solid fa-paw'
vet = 'fa-solid fa-heart-pulse'
```

***

## Pet Models

```
Config.Pets = {}
```

Defines all purchasable pets.

#### Structure

```
{    name = "model_name",    label = "Display Name",    price = 50000,    speed = 3.5}
```

#### Example

```
{    name = "a_c_husky",    label = "Husky",    price = 75000,    speed = 3.5}
```

***

### Adding Custom Pets

You can add additional GTA animal models manually.

#### Example

```
{    name = "a_c_chimp",    label = "Chimp",    price = 120000,    speed = 3.5}
```

> Only add valid GTA V animal ped models.

***

## Pet Animations

```
Config.PetAnimations = {}
```

Defines sitting, barking, and idle animations for pets.

#### Structure

```
["pet_model"] = {    sitDict = "animation_dictionary",    sitAnim = "animation_name",    barkDict = "animation_dictionary",    barkAnim = "animation_name"}
```

#### Example

```
["a_c_rottweiler"] = {    sitDict = "creatures@retriever@amb@world_dog_sitting@idle_a",    sitAnim = "idle_b",    barkDict = "creatures@rottweiler@amb@world_dog_barking@idle_a",    barkAnim = "idle_a"}
```

> Do not modify animation dictionaries unless you understand GTA V animation handling.

***

## Example Configurations

#### Realistic Economy

```
Config.SellPercentage = 0.5
Config.HealPrice = 500
```

Balanced for most RP servers.

***

#### Hardcore Survival

```
Config.FoodDrainRate = 5
Config.PetCanDieFromStarvation = true
```

Pets require frequent feeding and can die from starvation.

***

#### Casual Gameplay

```
Config.FoodDrainRate = 1
Config.PetCanDieFromStarvation = false
```

Low maintenance pets.

***

## Important Notes

* Restart the resource after editing the config.
* Invalid GTA ped models may cause pets not to spawn.
* Lower food drain intervals can increase resmon usage.
* Locale files are fully customizable and can support additional languages.
