Cold ground is the frost the game paints where the surface heat is low. In vanilla it is a pure penalty: an outdoor power consumer standing on it draws up to +100% power and can freeze. This feature turns it into a tradeoff by rewarding the buildings that, in real life, run better cold - solar, wind, and research - and by letting frost hold the dust down. The vanilla penalty is left in place. Status: Built, untested (v2.7) - in StS as Code/StS_ColdGround.lua.
A building is "on cold ground" when the heat under it is below 210
(const.DefaultPanaltyHeat), read with GetHeatAt(obj). That is the exact
same test and threshold vanilla uses to apply the cold penalty to outdoor consumers, so a
building rewarded here is one that would (if it were a consumer) be penalized there. A building
is tested at its own position; a dome is tested at its centre point.
| On cold ground | Bonus | How |
|---|---|---|
| Solar Panel, Wind Turbine | +20% power | A percent modifier on electricity_production. Neither is cold-sensitive, so they never freeze - the bonus is a clean upside. |
| Research Lab, Hawking Institute (inside a dome whose centre is on cold ground) | +20% research | A dome-level modifier on the BaseResearchLab label, boosting ResearchPointsPerDay, the same way the base game's Network Node Spire boosts a dome's labs. Labs built into a cold dome later inherit it automatically. |
| Every building | -20% dust | The maintenance points a building accumulates are scaled to 80% at the single point all dust passes through, so it covers slow passive dust, Dust Storms and Dust Devils alike, multiplicatively after every other dust modifier. |
Heat is not fixed: Cold Waves chill the whole map, Subsurface Heaters and terraforming warm the ground, so a tile can turn cold or warm mid-game. The power and research bonuses are re-evaluated every game hour by one game-time thread that walks the Solar Panels, Wind Turbines and Domes on the map and turns each bonus on or off with the current heat.
The toggles are idempotent, so the hourly re-check and any save then load can never stack a bonus twice. The power bonus uses an id-keyed modifier (setting +20% adds or keeps it, setting 0 removes it); the dome research bonus is added or cleared by checking whether the dome already carries it. The dust reduction is not on the thread at all: it is applied inside the maintenance funnel as points are added, so it is always exactly current for wherever the building stands.
The vanilla cold penalty is untouched: an outdoor power consumer on cold ground still draws its extra power and still freezes if it loses power. Solar Panels and Wind Turbines are power producers, not consumers, and are not cold-sensitive, so they were never penalized and are not at risk of freezing - this feature only adds their upside.
Applies live to whatever is on the map, so it works on a new colony and on an existing save alike, with no fixup needed: the hourly thread and the dust funnel simply start acting on the buildings that are there. The dome test uses the dome centre, so a dome only partly over a cold patch counts as cold only if its centre is.
Base game, paths relative to external/SurvivingMars.
mod-survive/Code/StS_ColdGround.lua - dust hook on ClassesBuilt (wraps RequiresMaintenance:AccumulateMaintenancePoints); one game-time thread started on CityStart/LoadGame re-evaluates power and research hourlyLua/_GameConst.lua:231 const.DefaultPanaltyHeat = 210 (the cold threshold); Lua/Buildings/ColdSensitive.lua:40-43 the same GetHeatAt(self) < penalty_heat test vanilla uses for the cold penaltyLua/Heat.lua:165-169 GetHeatAt(obj) reads the heat grid at an object's positionLua/ElectricityProducer.lua:9 electricity_production (modifiable); Lua/Buildings/SolarPanel.lua:77 SolarPanelBuilding, Lua/Buildings/WindTurbine.lua:1 WindTurbine - both derive from ElectricityProducer, neither from ColdSensitiveLua/Buildings/ResearchLab.lua:6 ResearchPointsPerDay (modifiable); :164,180 BaseResearchLab and its dome "BaseResearchLab" label; Lua/Buildings/NetworkNode.lua:12-24 the LabelModifier pattern copied; Lua/LabelContainer.lua:110 SetLabelModifierLua/RequiresMaintenance.lua:178 AccumulateMaintenancePoints (the single dust funnel); :143 AddDust for storms and devils; :125 passive per-hour accumulationLua/Modifiers.lua:180 Modifiable:SetModifier (id-keyed, idempotent - amount/percent 0 removes)