Configuration
Configuration
The config.lua
file allows you to define the different status effects available in the game. Each effect can have customizable parameters such as duration, strength, and optional visual effects. Each effect also has three levels to provide varying strengths.
Example Configuration
Config = {}
Config.EnableUnsuitableClothingCheck = true -- MUST BE DISABLED IF NOT USING B2_WEATHERESSENTIALS
Config.EnableWeatherEffects = true -- Toggle for weather effects
Config.EnableExtremeWeatherEffects = true -- Toggle for extreme weather effects
Config.UnsuitableClothing = {
EXTREME_HEAT = {
{component = 11, drawable = 15}, -- Example: Top with drawable 15
{component = 8, drawable = 59}, -- Example: Undershirt with drawable 59
-- Add more as needed
},
EXTREME_COLD = {
{component = 11, drawable = 11}, -- Example: Top with drawable 11
{component = 4, drawable = 21}, -- Example: Lower body with drawable 21
-- Add more as needed
}
}
Config.StatusEffects = {
health_boost_1 = {
name = 'Health Boost Level 1',
description = 'Increases health regeneration over time.',
duration = 60, -- in seconds
strength = 10, -- health points per tick
tickInterval = 5, -- in seconds
visualEffect = 'screenBlur', -- optional, can be nil or removed
visualEffectStrength = 0.5 -- strength of the visual effect
},
health_boost_2 = {
name = 'Health Boost Level 2',
description = 'Increases health regeneration over time.',
duration = 60, -- in seconds
strength = 25, -- health points per tick
tickInterval = 5, -- in seconds
visualEffect = 'screenBlur', -- optional, can be nil or removed
visualEffectStrength = 0.7 -- strength of the visual effect
},
health_boost_3 = {
name = 'Health Boost Level 3',
description = 'Increases health regeneration over time.',
duration = 60, -- in seconds
strength = 50, -- health points per tick
tickInterval = 5, -- in seconds
visualEffect = 'screenBlur', -- optional, can be nil or removed
visualEffectStrength = 1.0 -- strength of the visual effect
},
-- Other effects defined similarly
EXTREME_HEAT = {
name = 'Extreme Heat',
description = 'Causes health loss due to extreme heat.',
duration = 60, -- in seconds
strength = 5, -- health points lost per tick
tickInterval = 5, -- in seconds
visualEffect = 'screenBlur', -- optional, can be nil or removed
visualEffectStrength = 1.0 -- strength of the visual effect
},
EXTREME_COLD = {
name = 'Extreme Cold',
description = 'Causes health loss due to extreme cold.',
duration = 60, -- in seconds
strength = 5, -- health points lost per tick
tickInterval = 5, -- in seconds
visualEffect = 'screenBlur', -- optional, can be nil or removed
visualEffectStrength = 1.0 -- strength of the visual effect
},
}
-- This section is quite a heavy performance drain as it has to apply some of the status effects every frame, such as when the move speed is modified.
-- Only use this if using B2_WEATHERESSENTIALS as it only supports my system
Config.EnableWeatherEffects = true -- Toggle for weather effects
Config.EnableExtremeWeatherEffects = false -- Toggle for extreme weather effects - I don't recommend this as its a performance drain for what it is.
-- Define status effects for weather types
Config.WeatherStatusEffects = {
CLEAR = {
staminaDrain = 1.0, -- Normal stamina drain
moveSpeed = 1.0 -- Normal movement speed
},
EXTRASUNNY = {
staminaDrain = 1.0, -- Normal stamina drain
moveSpeed = 1.0 -- Normal movement speed
},
CLOUDS = {
staminaDrain = 1.0, -- Normal stamina drain
moveSpeed = 1.0 -- Normal movement speed
},
OVERCAST = {
staminaDrain = 1.0, -- Normal stamina drain
moveSpeed = 1.0 -- Normal movement speed
},
RAIN = {
staminaDrain = 0.9, -- 10% increased stamina drain
moveSpeed = 0.9 -- 10% slower movement speed
},
CLEARING = {
staminaDrain = 1.0, -- Normal stamina drain
moveSpeed = 1.0 -- Normal movement speed
},
THUNDER = {
staminaDrain = 0.8, -- 20% increased stamina drain
moveSpeed = 0.8 -- 20% slower movement speed
},
SMOG = {
staminaDrain = 1.0, -- Normal stamina drain
moveSpeed = 1.0 -- Normal movement speed
},
FOGGY = {
staminaDrain = 1.0, -- Normal stamina drain
moveSpeed = 0.95 -- 5% slower movement speed
},
XMAS = {
staminaDrain = 1.0, -- Normal stamina drain
moveSpeed = 1.0 -- Normal movement speed
},
SNOWLIGHT = {
staminaDrain = 0.9, -- 10% increased stamina drain
moveSpeed = 0.9 -- 10% slower movement speed
},
BLIZZARD = {
staminaDrain = 0.7, -- 30% increased stamina drain
moveSpeed = 0.7 -- 30% slower movement speed
}
}
-- DO NOT TOUCH UNLESS YOU KNOW WHAT YOU ARE DOING. THIS MUST MATCH B2_WEATHERESSENTIALS
Config.WeatherTypes = {
CLEAR = "CLEAR", EXTRASUNNY = "EXTRASUNNY", CLOUDS = "CLOUDS", OVERCAST = "OVERCAST",
RAIN = "RAIN", CLEARING = "CLEARING", THUNDER = "THUNDER", SMOG = "SMOG",
FOGGY = "FOGGY", XMAS = "XMAS", SNOWLIGHT = "SNOWLIGHT", BLIZZARD = "BLIZZARD"
}
-- DO NOT TOUCH UNLESS YOU KNOW WHAT YOU ARE DOING. THIS MUST MATCH B2_WEATHERESSENTIALS
Config.ExtremeEvents = {
EARTHQUAKE = true,
STORM = true,
EXTREME_COLD = true,
EXTREME_HEAT = true,
TSUNAMI = true
}
Enabling or Disabling Unsuitable Clothing Check
You can enable or disable the unsuitable clothing check by setting the Config.EnableUnsuitableClothingCheck
option in the config.lua
file.
Config.EnableUnsuitableClothingCheck = true -- Set to false to disable the check
Last updated