Injuries

data/injuries/

This data file has been converted into a metatable for cleaner and more modular injury declaration, as a single injury declaration can take the vast majority of screen-space when configured. Check out the categorized examples below for a complete working example.

Example

-- id: string, data: table
Injuries("damaged_left_eye", {
    label = "Damaged Left Eye",                             -- For treatment UI and notifications.
    category = "left_eye",                                  -- Category ["head", "jaw", "left_eye", "right_eye", "torso", "left_arm", 
                                                            --           "right_arm", "left_leg", "right_leg"]
    deadly = false,                                         -- Will incorrect treatment causing this injury more then once cause death?

    icon = "fa-solid fa-eye",                               -- For treatment UI.
    description = "Your patient has a damaged left eye.",   -- For treatment UI.

    can_treat_in_field = false,                             -- Can this injury be cured while outside a hospital?
    can_stabilize_in_field = true,                          -- Can this injury be stabilized while outside a hospital?

    causes = {                                              -- Potential causes for this injury
        [BoneCategories.HEAD] = {                           -- Bone indice or bone category
            { chance = 50, required_damage_on_hit = 100, }, -- 50% Chance of acquiring this injury if hit for 100 damage
            { chance = 100, required_damage_on_hit = 200, },-- 100% Chance of acquiring this injury if hit for 200 damage
        },
        [Bones.FB_L_Eye_000] = {
            { chance = 100, required_damage_on_hit = 200, },-- 100% Chance of acquiring this injury if hit for 200 damage
            { chance = 100, required_total_damage = 500, }, -- 100% Chance of acquiring this injury if total lifetime damage is 500 or over
        },
    },

    heal_time = {                                           -- Time for this injury to heal from 100% damage once stabilized
        weeks   = 0,                                        -- (OPTIONAL) weeks to heal (default 0)
        days    = 5,                                        -- (OPTIONAL) days to heal (default 0)
        hours   = 0,                                        -- (OPTIONAL) hours to heal (default 0)
        minutes = 0,                                        -- (OPTIONAL) minutes to heal (default 0)
        seconds = 0                                         -- (OPTIONAL) seconds to heal (default 0)
    },

    treatments = {                                          -- For treatment UI: potential treatment options
        {
            text = "Poke Eye",                              -- Option Text
            stabilizes = false,                             -- (OPTIONAL) If this treatment stabilizes the injury
            cures = false,                                  -- (OPTIONAL) If this treatment cures the injury
            causes = { "infected_left_eye" },               -- (OPTIONAL) False or table of injuries to cause
            time = 1000,                                    -- (OPTIONAL) Time to heal perform this treatment.
            items = {                                       -- (OPTIONAL) Items required to perform this treatment.
                stem_cell_kit = {
                    label = "Stem Cell Kit",
                    required = 1,
                    remove = 0
                }
            }
        },
        {
            text = "Give Eye Patch",
            stabilizes = true,
        },
        {
            text = "Replace Eye",
            cures = true,
        },
    },

    effects = {                                             -- Effects to apply to the patient while they have this injury
        {
            effect = "poor_vision_left",                    -- Effect to apply (key from data/effects.lua)
            when_stabilized = true,                         -- (OPTIONAL) Only apply this effect when the injury is stabilized
        },
    }
})

Last updated