> For the complete documentation index, see [llms.txt](https://code-after-sex.gitbook.io/script-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://code-after-sex.gitbook.io/script-documentation/cas-advanced-hunting/configuration.md).

# Configuration

All configuration is in `config.lua`.

## General

```lua
Config = {}
Config.DevMode = false        -- development features
Config.DebugMode = false      -- debug prints in console
Config.DefaultLanguage = "en" -- default language for new players
```

## XP & progression

```lua
Config.HuntingXpPerKill = math.random(1,15)  -- random XP per kill
Config.HuntingXpDeathPenalty = 25            -- XP lost on death during a hunt
```

Levels: `level = floor(xp / 100) + 1` (Level 1 = 0-99 XP, Level 2 = 100-199, etc.).

## Keybinds

```lua
Config.keys = {
    ["G"] = 0x760A9C6F,  -- Open Hunting Menu
    ["H"] = 0x24978A28,  -- Cancel Contract
    ["J"] = 0xF3830D8E,  -- Open Bait Shop
    ["L"] = 0x80F28E95,  -- Deliver Products
}
```

## Kill camera

```lua
Config.KillCam = {
    Enabled = true,
    TimeScale = 0.25,      -- slow-motion speed
    BulletTravelMs = 900,
    VictimHoldMs = 1200,
    Fov = 45.0,
    CooldownMs = 2500,
    DisableControls = true
}
```

## Tracking system

```lua
Config.TrackRadius = 200.0
Config.TrackMinDistance = 3.0

Config.TrackingSettings = {
    Enabled = true,
    Command = "tracking",
    HunterVision = { Key = 0x8AAA0AD4, UseKeyToggle = false, MaxRange = 50.0, TimeScale = 0.65, AutoInspectRange = 12.0 },
    TrackTypes = {
        FOOTPRINT = { enabled = true, name = "Footprint", prop = "mp005_s_cardt_paw", spawnInterval = 10000, lifetime = {180, 300}, detectRadius = 2.5, spawnChance = 0.85 }
    },
    Quality = {
        POOR = { score = 1, alpha = 0.4 },
        GOOD = { score = 2, alpha = 0.7 },
        PERFECT = { score = 3, alpha = 1.0 }
    },
}
```

### Trace/tracking levels

```lua
Config.TraceSettings = {
    MaxLevel = 5,
    XpPerLevel = 100,
    XpGain = { Success = 5, QualityMultiplier = { Poor = 1.0, Good = 2.0, Perfect = 3.0 } },
    Levels = {
        [0] = { title = "Novice Tracker",  details = {"species"} },
        [1] = { title = "Amateur Tracker", details = {"species", "time"} },
        [2] = { title = "Skilled Tracker", details = {"species", "time", "direction"} },
        [3] = { title = "Expert Tracker",  details = {"species", "time", "direction", "distance"} },
        [4] = { title = "Master Tracker",  details = {"species", "time", "direction", "distance", "state"} },
        [5] = { title = "Legendary Scout", details = {"species", "time", "direction", "distance", "state", "quality"} },
    }
}
```

### Weather effects on tracking

```lua
Config.TrackingSettings.WeatherEffects = {
    rain = { qualityBonus = 1.4, lifetimeMultiplier = 0.6 },
    snow = { qualityBonus = 1.5, lifetimeMultiplier = 1.8 },
    sunny = { qualityBonus = 1.0, lifetimeMultiplier = 1.0 },
    fog = { qualityBonus = 0.8, lifetimeMultiplier = 1.3 },
}
```

## Predator animals

```lua
Config.Predators = {
    [GetHashKey("A_C_BearBlack_01")] = true,
    [GetHashKey("A_C_Cougar_01")] = true,
    [GetHashKey("A_C_Wolf")] = true,
    [GetHashKey("A_C_Alligator_01")] = true,
}
```

Predators attack players instead of fleeing.

## Languages

```lua
Config.Languages = { ["en"] = "English", ["tr"] = "Turkce", ["fr"] = "Francais", ["de"] = "Deutsch" }
```

See Localization to add your own.

## Bait system

```lua
Config.BaitSystem = { PlaceBaitKey = 0xD8F73058, AttractionRadius = 150.0, BaitDuration = 300000 }
```

The **bait shop** (`Config.BaitShop`) defines categories (herbivore/predator/birds/premium) and items, each with a linked inventory item, price, duration, range, effectiveness and quality.

## NPC locations

```lua
Config.GetWorkLocations = {
    [1] = { pedCoords = vector4(-279.93, 782.39, 119.50, 91.26), pedModel = "S_M_M_UNIBUTCHERS_01", ped = nil },
}
```

## Contracts

```lua
Config.Contracts = {
    {
        id = "simple_heartlands_smallgame",
        tier = "simple",                 -- simple/advanced/epic/legendary
        label = "Heartlands Small Game",
        minLevel = 1, maxLevel = 4,
        rewardBase = 70, rewardRandom = { 15, 30 },
        animals = {
            { model = "A_C_Rabbit_01", amount = { min = 2, max = 4 } },
            { model = "A_C_TurkeyWild_01", amount = { min = 1, max = 1 } }
        },
        requiredKills = 1, requirePerfectPelts = false, difficult = "easy",
        radiusCoords = { x = -283.51, y = 792.97, z = 118.67 }, radius = 55.0,
        timeLimit = nil,
        specialRules = { onlyAtNight = false, foggyWeather = false, noDeath = false },
        bonusObjectives = { noDamageTaken = false, noDeath = false }
    },
}
```

| Tier      | Level range | Difficulty  |
| --------- | ----------- | ----------- |
| simple    | 1-4         | Easy        |
| advanced  | 3-8         | Normal-Hard |
| epic      | 6+          | Hard        |
| legendary | 10+         | Extreme     |

## Hunting map & UI

```lua
Config.MapItem = "huntingmap"
Config.HuntingMap = { Presentation = "ground", FreezePlayer = true, Scenario = "WORLD_HUMAN_WRITE_NOTEBOOK", Cam = { fov = 40.0, offset = { x = 0.0, y = 0.95, z = 0.75 }, transitionMs = 600 } }
```

`Config.DifficultyColors`, `Config.Cinematic` (kill sequence shots) and `Config.Hints` (pro tips) round out the UI customization.
