# Configuration

Script configuration boils down to a small set of `convars`, a config file and static data files.\
Convars overrides can be set in your `server.cfg` or you can leave them as default.&#x20;

For data configurations refer to the [**Guides**](https://docs.boii.dev/fivem-paid-resources/planting-system/guides) section.

***

## **Convar Settings**

You can override the default settings of these convars within your `server.cfg` for more about convars read: [**FiveM Docs - Convars**](https://docs.fivem.net/docs/scripting-reference/convars/).

```lua
planting.resource_name = GetCurrentResourceName()
planting.is_server = IsDuplicityVersion()
planting.version = GetResourceMetadata(planting.resource_name, "version", 0) or "unknown"
planting.debug_mode = GetConvar("planting:debug_mode", "false") == "true"
planting.language = GetConvar("planting:language", "en")
```

***

## Config

```lua
cfg.growers = {
    save_interval = 5
}

cfg.plants = {

    plant_range_check = 3.0,
    plant_limit = 5,

    critical_health_threshold = 20,
    critical_health_quality_decay = 5,
    quality_to_kill_plant = 0,
    
    save_interval = 10,

    altitude_penalty = 1.0,

    default_ground = 1288448767,
    default_weather = "CLEAR",

    pest_factor = 1.2,
    disease_factor = 1.3,
    factor_fallback = 1.0,

    base_water_loss = { min = 2, max = 5 },
    base_fert_loss = { min = 1, max = 3 },
    critical_water_threshold = 20,
    critical_fert_threshold = 10,

    base_decay_rate = { min = 1, max = 5 },

    growth_health_threshold = 21,
    growth_water_threshold = 21, 
    growth_fert_threshold = 11,

    base_growth_rate = { min = 1, max = 3 },
    
    pest_apply_chance = 0.02,
    disease_apply_chance = 0.02,

    default_water = 25.0,
    default_fert = 25.0,
    default_quality = 100.0
}
```
