Adjusting Environment
The environment system defines how external conditions affect plant behaviour based on altitude, weather, and ground type. These modifiers are applied dynamically during plant lifecycle checks.
Modifier Fields
Each modifier table can include the following fields:
growth
Growth rate multiplier. Higher = faster growth.
water
Water usage multiplier. Higher = faster water loss.
food
Food consumption multiplier. Higher = faster depletion.
pests
Pest chance multiplier. Higher = more frequent infestation.
disease
Disease chance multiplier. Higher = more frequent infection.
Altitude Modifiers
Altitude affects plant efficiency based on their vertical Z position.
altitudes = {
{ min = 0, max = 100, growth = 1.2, water = 1.0, food = 1.0, pests = 1.0, disease = 1.0 },
{ min = 101, max = 500, growth = 1.0, water = 1.1, food = 1.1, pests = 1.1, disease = 1.1 },
{ min = 501, max = 1000, growth = 0.9, water = 1.2, food = 1.2, pests = 1.2, disease = 1.2 },
{ min = 1001, max = 1500, growth = 0.8, water = 1.3, food = 1.3, pests = 1.3, disease = 1.4 },
{ min = 1501, max = 2500, growth = 0.6, water = 1.5, food = 1.5, pests = 1.5, disease = 1.7 }
}
Weather Modifiers
Each weather type defines multipliers applied during that weather state.
weather_modifiers = {
CLEAR = { growth = 1.0, water = 1.0, food = 1.0, pests = 1.0, disease = 1.0 },
EXTRASUNNY = { growth = 1.2, water = 1.8, food = 1.0, pests = 1.2, disease = 0.8 },
CLOUDS = { growth = 1.0, water = 0.9, food = 1.0, pests = 1.0, disease = 1.1 },
OVERCAST = { growth = 0.9, water = 0.8, food = 1.0, pests = 0.9, disease = 1.2 },
RAIN = { growth = 0.9, water = 0.5, food = 1.0, pests = 0.8, disease = 1.3 },
CLEARING = { growth = 1.0, water = 1.0, food = 1.0, pests = 1.0, disease = 1.0 },
THUNDER = { growth = 0.8, water = 0.4, food = 1.1, pests = 0.7, disease = 1.5 },
SMOG = { growth = 0.8, water = 1.2, food = 1.1, pests = 1.0, disease = 1.3 },
FOGGY = { growth = 0.9, water = 0.7, food = 1.0, pests = 1.0, disease = 1.4 },
XMAS = { growth = 0.7, water = 0.6, food = 1.0, pests = 0.5, disease = 1.2 },
SNOW = { growth = 0.6, water = 0.5, food = 1.2, pests = 0.4, disease = 1.5 },
SNOWLIGHT = { growth = 0.7, water = 0.6, food = 1.1, pests = 0.6, disease = 1.3 },
BLIZZARD = { growth = 0.5, water = 0.3, food = 1.5, pests = 0.2, disease = 1.8 },
HALLOWEEN = { growth = 1.0, water = 1.0, food = 1.0, pests = 1.5, disease = 1.2 },
NEUTRAL = { growth = 1.0, water = 1.0, food = 1.0, pests = 1.0, disease = 1.0 }
}
Ground Modifiers
Ground types are keyed by material hash and define how soil affects plant performance.
ground_modifiers = {
[1288448767] = { name = "GRASS", growth = 1.2, water = 1.2, food = 1.0, pests = 1.2, disease = 1.1 },
[1109728704] = { name = "MUD", growth = 1.0, water = 1.5, food = 1.0, pests = 1.0, disease = 1.3 },
[223086562] = { name = "SOIL", growth = 1.3, water = 1.3, food = 1.0, pests = 1.0, disease = 1.0 },
[2128369009] = { name = "SAND", growth = 0.7, water = 0.5, food = 1.2, pests = 0.8, disease = 0.9 },
[2461440131] = { name = "CLAY", growth = 0.9, water = 1.4, food = 1.1, pests = 1.1, disease = 1.3 },
[3594309083] = { name = "ROCK", growth = 0.6, water = 0.3, food = 1.2, pests = 0.9, disease = 0.8 },
[1144315879] = { name = "SNOW", growth = 0.5, water = 0.4, food = 1.3, pests = 0.5, disease = 1.5 },
[4170197704] = { name = "GRAVEL", growth = 0.8, water = 0.6, food = 1.1, pests = 1.0, disease = 1.0 },
[3008270349] = { name = "CONCRETE", growth = 0.3, water = 0.2, food = 1.5, pests = 0.5, disease = 0.7 },
[951832588] = { name = "ASPHALT", growth = 0.2, water = 0.1, food = 1.5, pests = 0.3, disease = 0.6 },
[2409420175] = { name = "WOOD", growth = 0.5, water = 0.5, food = 1.0, pests = 0.8, disease = 0.9 },
[1333033863] = { name = "LEAVES", growth = 1.1, water = 1.2, food = 1.0, pests = 1.3, disease = 1.2 },
[2352068586] = { name = "MARSH", growth = 1.0, water = 1.8, food = 1.1, pests = 1.2, disease = 1.4 },
[581794674] = { name = "TUNDRA", growth = 0.6, water = 0.7, food = 1.2, pests = 0.7, disease = 1.3 },
[3833216577] = { name = "FARM_SOIL", growth = 1.5, water = 1.2, food = 1.0, pests = 1.0, disease = 1.0 }
}
Last updated