> For the complete documentation index, see [llms.txt](https://docs.vames-store.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vames-store.com/assets/vms_needs/configuration-files/config.clothing.lua.md).

# config.clothing.lua

{% code fullWidth="true" %}

```lua
-- ████████╗███████╗███╗   ███╗██████╗ ███████╗██████╗  █████╗ ████████╗██╗   ██╗██████╗ ███████╗
-- ╚══██╔══╝██╔════╝████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔══██╗╚══██╔══╝██║   ██║██╔══██╗██╔════╝
--    ██║   █████╗  ██╔████╔██║██████╔╝█████╗  ██████╔╝███████║   ██║   ██║   ██║██████╔╝█████╗  
--    ██║   ██╔══╝  ██║╚██╔╝██║██╔═══╝ ██╔══╝  ██╔══██╗██╔══██║   ██║   ██║   ██║██╔══██╗██╔══╝  
--    ██║   ███████╗██║ ╚═╝ ██║██║     ███████╗██║  ██║██║  ██║   ██║   ╚██████╔╝██║  ██║███████╗
--    ╚═╝   ╚══════╝╚═╝     ╚═╝╚═╝     ╚══════╝╚═╝  ╚═╝╚═╝  ╚═╝   ╚═╝    ╚═════╝ ╚═╝  ╚═╝╚══════╝
Config = Config or {}
Config.Temperature = Config.Temperature or {}

--[[
    TEMPERATURE CLOTHING CONFIG

    This file contains all clothing-related temperature settings.

    IMPORTANT:
    - Most servers will only need to edit DrawableMap.
    - ClothingCategoryInsulation defines how effective each clothing category is.
    - BodyWeights defines which body parts have the biggest impact on temperature.
    - If a drawable is not mapped, DefaultClothingCategory will be used.

    Recommended categories:

    NONE
    - Bare chest
    - Underwear
    - Bikini tops
    - Barefoot

    VERY_LIGHT
    - Tank tops
    - Crop tops
    - Shorts
    - Flip-flops
    - Baseball caps

    LIGHT
    - T-shirts
    - Polo shirts
    - Shirts
    - Jeans
    - Sneakers

    MEDIUM
    - Hoodies
    - Sweaters
    - Long sleeves
    - Cargo pants

    HEAVY
    - Leather jackets
    - Bomber jackets
    - Thick pants
    - Work boots

    WINTER
    - Winter jackets
    - Parkas
    - Ski clothing
    - Thermal clothing
    - Winter boots
]]


---@class MenuCommand<table>
Config.Temperature.MenuCommand = {
    Enabled = true,
    Name = 'insulationmenu',
    Help = 'Open Insulation Menu',
    Groups = 'admin',
    Suggestions = {}
}


---@class ClothingCategoryInsulation<table>
-- cold = protection against cold temperatures
-- heat = heat retention (higher values increase overheating risk)
-- sun  = protection against direct sunlight
Config.Temperature.ClothingCategoryInsulation = {
    NONE        = { cold = 0.0, heat = 0.0, sun = 0.0 },        -- No clothing or almost no insulation, provides almost no protection from cold or heat
    VERY_LIGHT  = { cold = 0.05, heat = 0.05, sun = 0.05 },     -- Very light clothing - suitable for hot weather
    LIGHT       = { cold = 0.15, heat = 0.15, sun = 0.10 },     -- Standard everyday clothing
    MEDIUM      = { cold = 0.35, heat = 0.435, sun = 0.15 },    -- Warm everyday clothing - can become uncomfortable during hot weather
    HEAVY       = { cold = 0.60, heat = 0.60, sun = 0.20 },     -- Heavy clothing - good protection from cold but may cause overheating
    WINTER      = { cold = 1.00, heat = 1.00, sun = 0.25 },     -- Maximum insulation, designed for winter conditions
}


---@class DefaultClothingCategory<table>
-- Fallback clothing category used when a drawable is not mapped.
-- If a player wears a custom clothing pack and the drawable does not exist inside DrawableMap, these categories will be used.
Config.Temperature.DefaultClothingCategory = {
    torso = "LIGHT",
    legs = "LIGHT",
    shoes = "LIGHT",
    hats = "NONE",
    arms = "NONE",
}

---@class DrawableMap<table>
-- Maps clothing drawables to insulation categories.
-- If a drawable is not mapped, DefaultClothingCategory is used.
-- NOTE: Custom clothing packs require manual drawable mapping.
-- Supported categories: NONE, VERY_LIGHT, LIGHT, MEDIUM, HEAVY, WINTER
Config.Temperature.DrawableMap = {
    torso = {
        [joaat('mp_m_freemode_01')] = {
            [2] = "VERY_LIGHT",
            [3] = "MEDIUM",
            [4] = "MEDIUM",
            [5] = "VERY_LIGHT",
            [6] = "HEAVY",
            ...
        },
        [joaat('mp_f_freemode_01')] = {
            [1] = "HEAVY",
            [3] = "MEDIUM",
            [4] = "VERY_LIGHT",
            [5] = "VERY_LIGHT",
            [6] = "MEDIUM",
            ...
        }
    },

    legs = {
        [joaat('mp_m_freemode_01')] = {
            ...
        },
        [joaat('mp_f_freemode_01')] = {
            ...
        }
    },

    shoes = {
        [joaat('mp_m_freemode_01')] = {
            ...
        },
        [joaat('mp_f_freemode_01')] = {
            ...
        }
    },

    hats = {
        [joaat('mp_m_freemode_01')] = {
            ...
        },
        [joaat('mp_f_freemode_01')] = {
            ...
        }
    },

    arms = {
        [joaat('mp_m_freemode_01')] = {
            ...
        },
        [joaat('mp_f_freemode_01')] = {
            ...
        }
    }   
}

---@class BodyWeights<table>
-- Body part influence on total insulation.
-- Higher values = bigger impact on temperature calculations.
-- Recommended: torso > legs > shoes > arms > hats
-- Example: A WINTER torso affects temperature much more than a WINTER hat.
Config.Temperature.BodyWeights = {
    torso = 1.0,
    legs  = 0.8,
    shoes = 0.5,
    hats = 0.3,
    arms = 0.4,
}
```

{% endcode %}
