"How does the room temperature equalization system work internally?"
Every 120 ticks (~2 seconds game time), Verse/MapTemperature.cs calculates the temperature for every room on the map. The actual computation is delegated to Verse/RoomTempTracker.cs, which adds up 4 equalization sources per room.
TempDiffAdjusted at extreme differences.
On room rebuild, equalizeCells are collected and Shuffle() is called:
equalizeCells.Shuffle() consumes Rand calls.
If rooms rebuild at different times on different clients
→ different Rand sequence → Desync.
Heat flows through walls to neighboring rooms. Per wall cell with a neighbor room.
Rate: 0.00017f per wall cell per interval
Note: Identical for ALL wall materials — wood insulates like granite!
Verse/RoomTempTracker.cs:215-252Slow equalization with outdoor temperature through thin roof.
Rate: Very slow — significantly less than NoRoof
Open cells without roof. Near-instant equalization with outdoor temperature.
Rate: 14× door rate
Mountain roof pulls temperature towards 15°C. Only acts as cooling.
Target temperature: 15°C
UsesOutdoorTemperature when:TouchesMapEdge| Constant | Value | Meaning |
|---|---|---|
MinTemperature | -273.15°C | Absolute zero |
MaxTemperature | 1000°C | Temperature cap |
Vent_TempEqualizeRate | 14× | Vent building vs. door |
DeepUndergroundTemperature | 15°C | Mountain target temperature |
RoomEqualizeInterval | 120 Ticks | ~2 seconds |
WallEqualizeFactor | 0.00017f | Per wall cell, all materials equal |
DoorOpenTicks | 34 | Door stays open after passing |
Verse/TemperatureTuning.cs
Buildings (heater, cooler, fire) affect temperature through two APIs:
| Method | Purpose |
|---|---|
GenTemperature.PushHeat(cell, map, energy) |
Adds heat energy to a room (fire, explosions) |
GenTemperature.ControlTemperatureInRoom(cell, targetTemp, energyLimit) |
Heater/cooler steer towards target temperature |
Verse/GenTemperature.cs
ComfortableTemperatureRange = pawn stat ± 10°C buffer.
Outside this range → Hypothermia/Heatstroke hediffs via SafeTemperatureRange.
If you modify the temperature system, these systems are directly impacted:
RimWorld has ~9,200 C# files. This knowledge system analyzes them step by step by reading the decompiled source code. So far the core architectures have been captured — the systems that hold everything together (tick loop, thing hierarchy, job system, pathfinding, health, etc.).
| Namespace | Files | Analyzed | Status |
|---|---|---|---|
| Verse | 1,747 | 85 | 🔄 Core systems captured |
| Verse.AI | ~278 | 30 | 🔄 Job/ThinkTree/Combat |
| RimWorld | 5,913 | 25 | 🔄 Needs/Apparel/Recipes |
| Rest (8 namespaces) | ~1,260 | 0 | ⬜ Not started yet |
The following code locations belong to the temperature system but are not yet captured in the knowledge base. The answer above is based on what has been analyzed so far — it is correct but not complete.
WallEqualizationTempChangePerInterval — the exact formula for heat flow through wallsTempDiffAdjusted — the dampening curve at extreme temperature differencesRegenerateEqualizationData — how the equalizeCells list is builtBuilding_Vent.cs — how vents work internallyBuilding_Cooler.cs — how coolers work internally