Skip to content

Configuration

Artmines edited this page Nov 3, 2025 · 1 revision

Configuration

Complete reference for customizing QC-AdvancedMedic through config.lua settings.


Core Settings

Config.MaxHealth = 600              -- Maximum player health (must match framework)
Config.DeathTimer = 300             -- Seconds before forced respawn (5 minutes)
Config.UseScreenEffects = true      -- Blood splatter, pain blur effects
Config.DeadMoveCam = true           -- Free-look death camera (⚠️ HEAVY PERFORMANCE)
Config.WipeInventoryOnRespawn = false
Config.WipeCashOnRespawn = false

Warning

Performance Impact: Config.DeadMoveCam = true runs a 16ms loop (62 FPS) while dead, adding ~0.12ms tick load. For production servers with 100+ players, set this to false.


Wound Progression

Config.WoundProgression = {
    bleedingProgressionInterval = 1,     -- Minutes between bleeding increases
    painProgressionInterval = 1,         -- Minutes between pain increases
    painNaturalHealingInterval = 5,      -- Minutes between natural pain reduction
    bandageHealingInterval = 1,          -- Accelerated healing with bandage (UNUSED)
    bleedingProgressAmount = 0.5,        -- Fixed increase per tick (UNUSED - uses 15% chance)
    painProgressAmount = 0.5,            -- Fixed increase per tick (UNUSED - uses 15% chance)
    painNaturalHealAmount = 0.5          -- Amount healed per natural tick (UNUSED - uses 1 level)
}

Note

The *Amount fields are currently unused. The system uses percentage-based progression instead (15% chance to increase by 1 level per tick).


Fall Damage Configuration

Config.FallDamage = {
    minHeight = 3.0,                    -- Meters for minor injury
    fractureHeight = 8.0,               -- Meters for fracture (non-ragdoll)
    breakHeight = 15.0,                 -- Meters for severe break (non-ragdoll)
    ragdollFractureHeight = 6.0,        -- Lower threshold when ragdolling
    ragdollBreakHeight = 10.0,          -- Lower threshold when ragdolling
    ragdollChance = 20                  -- % chance to ragdoll with leg injuries
}

Thresholds:

  • < 3m - No damage
  • 3-8m - Minor injury (pain 2-3)
  • 8-15m - Fracture (requires splint)
  • 15m+ - Bone break (requires surgery)

Infection System

Config.InfectionSystem = {
    enabled = true,
    progressionInterval = 120000,       -- 2 minutes (in milliseconds)

    stages = {
        {stage = 1, threshold = 25, effects = {stamina = -8, temp = 0.2}},
        {stage = 2, threshold = 50, effects = {stamina = -15, temp = 0.5, movement = -5}},
        {stage = 3, threshold = 75, effects = {stamina = -25, temp = 1.0, movement = -15}},
        {stage = 4, threshold = 90, effects = {stamina = -40, temp = 2.0, movement = -45, damage = 2}}
    },

    cureItems = {
        ["antibiotics"] = {
            label = "Antibiotics",
            itemName = "antibiotics",
            effectiveness = 40,          -- 40% cure progress per use
            immunityDuration = 30        -- 30 minutes immunity after cure
        },
        ["alcohol"] = {effectiveness = 25, immunityDuration = 15},
        ["cocaine"] = {effectiveness = 15, immunityDuration = 10}
    },

    baseInfectionChance = 0.15,         -- 15% base chance per tick
    gracePeriod = 60,                   -- Seconds before infection risk starts

    multipliers = {
        bullet_stuck = 2.0,              -- 2x infection risk (30% total)
        bullet_fragmented = 2.5,         -- 2.5x infection risk (37.5% total)
        bullet_through = 1.0             -- 1x infection risk (15% total)
    }
}

Wound Healing Times

Config.WoundHealing = {
    enabled = true,

    healingTimes = {
        ["cutting"] = {healTime = 10, scarType = "slash_scar"},
        ["shot_through"] = {healTime = 15, scarType = "entry_exit_scar"},
        ["post_surgery"] = {healTime = 25, scarType = "surgical_scar"},
        ["fragmented"] = {healTime = 35, scarType = "complex_scar"},
        ["explosive"] = {healTime = 40, scarType = "burn_scar"},
        ["crushing"] = {healTime = 20, scarType = "tissue_damage_scar"},
        ["default"] = {healTime = 15, scarType = "generic_scar"}
    },

    notifications = {
        healingStarted = {title = "Wound Healing", type = "success", duration = 5000},
        healingInterrupted = {title = "Healing Stopped", type = "error", duration = 5000},
        healingComplete = {title = "Scar Formed", type = "success", duration = 8000}
    },

    debugging = {
        enabled = false,
        showRequirementChecks = false,
        showHealingProgress = false
    }
}

Note

Healing System: Requires active bandage maintenance. Players must replace bandages every 3-12 minutes during the healing period (10-40 min). See Known Issues for detailed workflow.


Weapon Damage Configuration

Over 100+ weapons configured with damage profiles:

Config.WeaponDamage = {
    ['WEAPON_REVOLVER_CATTLEMAN'] = {
        bleedingAmount = 4,              -- 0-10 scale
        painAmount = 5,                  -- 0-10 scale
        hitChance = 0.8,                 -- 80% to register hit
        canLodge = true,                 -- Can bullet lodge?
        ballisticType = 'handgun',       -- Used for distance calculations
        description = 'Gunshot wound from Cattleman Revolver'
    },
    ['WEAPON_RIFLE_BOLTACTION'] = {
        bleedingAmount = 6,
        painAmount = 7,
        hitChance = 0.9,
        canLodge = true,
        ballisticType = 'rifle',
        description = 'High-powered rifle wound'
    },
    -- ... 100+ more weapons
}

Adding Custom Weapons: See Extending the System


Ballistic Configuration

Config.BallisticRanges = {
    handgun = {
        close = 10,      -- 0-10m: pass through
        medium = 30,     -- 10-30m: 5% lodge
        long = 50        -- 30-50m: 30% lodge, 50m+: 60% lodge
    },
    rifle = {
        close = 20,
        medium = 50,
        long = 100
    },
    shotgun = {
        close = 5,
        medium = 15,
        long = 30,
        pelletCount = {min = 6, max = 12}  -- Pellets per shot
    }
}

Treatment Types Configuration

Bandages

Config.BandageTypes = {
    ["cloth"] = {
        label = "Cloth Bandage",
        itemName = "cloth_band",
        effectiveness = 60,              -- Base effectiveness %
        oneTimeHeal = 8,                 -- HP restored on application
        bleedingReduction = 2,           -- Immediate bleeding reduction
        painReduction = 2,               -- Immediate pain reduction
        decayRate = 3,                   -- Duration in minutes
        description = "Basic cloth bandage..."
    },
    ["cotton"] = {
        label = "Cotton Bandage",
        itemName = "cotton_band",
        effectiveness = 70,
        oneTimeHeal = 12,
        bleedingReduction = 4,
        painReduction = 4,
        decayRate = 5,
        description = "Improved cotton bandage..."
    },
    ["linen"] = {
        label = "Linen Bandage",
        itemName = "linen_band",
        effectiveness = 80,
        oneTimeHeal = 18,
        bleedingReduction = 6,
        painReduction = 6,
        decayRate = 8,
        description = "High-quality linen bandage..."
    },
    ["sterile"] = {
        label = "Sterile Bandage",
        itemName = "sterile_band",
        effectiveness = 95,
        oneTimeHeal = 25,
        bleedingReduction = 8,
        painReduction = 8,
        decayRate = 12,
        description = "Medical-grade sterile bandage..."
    }
}

Medicines

Config.MedicineTypes = {
    ["medicine_morphine"] = {
        label = "Morphine",
        effectiveness = 95,
        healAmount = 35,
        duration = 450,                  -- Seconds
        painReliefLevel = 8,             -- How much pain it reduces
        sideEffects = {"euphoria", "drowsiness"},
        addictionRisk = 5                -- 5% chance
    },
    ["medicine_laudanum"] = {
        label = "Laudanum",
        effectiveness = 85,
        healAmount = 25,
        duration = 300,
        painReliefLevel = 6,
        sideEffects = {"drowsiness"},
        addictionRisk = 2
    },
    ["medicine_whiskey"] = {
        label = "Whiskey",
        effectiveness = 60,
        healAmount = 10,
        duration = 180,
        painReliefLevel = 3,
        sideEffects = {"intoxication"},
        addictionRisk = 0
    },
    ["medicine_quinine"] = {
        label = "Quinine",
        effectiveness = 70,
        healAmount = 15,
        duration = 600,
        painReliefLevel = 4,
        sideEffects = {"nausea"},
        addictionRisk = 0
    }
}

Medic Job Configuration

Config.MedicJobs = {
    'doctor',
    'medic',
    'surgeon'
}

Add your custom medic job names here for permission validation.


Body Parts Configuration

Config.BodyParts = {
    ['HEAD'] = {
        label = "Head",
        maxHealth = 100,
        canLimp = false,
        bones = {31086}  -- SKEL_Head
    },
    ['LARM'] = {
        label = "Left Arm",
        maxHealth = 100,
        canLimp = false,
        bones = {51826, 61163}  -- Upper arm, hand
    },
    -- ... 15 body parts total
}

NUI Configuration

Config.NUI = {
    useInteractiveDiagram = true,
    showDetailedWoundInfo = true,
    allowSelfTreatment = true
}

← Database Schema | Next: API Reference →

📖 QC-AdvancedMedic

🏠 Home


📚 Documentation

  1. Architecture
  2. Client Systems
  3. Server Systems
  4. Database Schema

⚙️ Configuration

  1. Configuration
  2. Translation System
  3. API Reference

🛠️ Development

  1. Extending the System
  2. Performance Optimization

⚠️ Support

  1. Known Issues

🔗 Links


v0.3.1-alpha

Clone this wiki locally