[B18] Insulating Walls

Started by lperkins2, January 05, 2018, 12:55:19 AM

Previous topic - Next topic

Makani

Requesting update again. The city colony must survive!


lperkins2

Have you checked out my rewrite of this, which implements the advanced features I mentioned here?  I can probably upload an update to this in the next day or two, but the other version is configurable, and tracks temperature per cell. 

It's at https://lp-programming.com/heatmap19.zip

Makani

Quote from: lperkins2 on October 29, 2018, 02:02:58 AM
Have you checked out my rewrite of this, which implements the advanced features I mentioned here?  I can probably upload an update to this in the next day or two, but the other version is configurable, and tracks temperature per cell. 

It's at https://lp-programming.com/heatmap19.zip

Well, I'm not really looking to change the simulation's base mechanics.

lperkins2

Fair enough, I just recompiled it against version 19, which should work on version 1.0 too.
https://lp-programming.com/rwtemperature19.zip

Modo44

Insulation based on wall condition is nice, but it would also need to depend on the specific material to make sense. For a basic example, the same thickness of wooden wall will insulate way better than steel.

Also, single walls need to matter this mod is going to work in a plausible way (i.e. not require reading the manual to understand what is happening).

lperkins2

So, I'd love to make insulation depend properly on material, but doing so in a way that will work with arbitrary wall materials from other mods is non-trivial. 

That said, it's non obvious that an arbitrary wooden wall will insulate better than an arbitrary steel wall.  K for wood is around .16, for stainless, it's around 16.  So, for an equally air tight wall, of equal thickness, the steel will transfer heat about 100 times as fast as the wood.  But I am not convinced that the walls should be treated as equally built.  The total thickness is the same, but for the wooden walls to stop bullets, and considering the construction time, and the use of raw rather than processed wood, I always figured they're basically log walls, which do not insulate anywhere near as well as wooden sheeting with an air gap.  Meanwhile, the relatively low HP on the steel walls means they're probably hollow. 

All that aside, I'd happily make wooden walls better insulators if I could think of a good way to do it without breaking things with other mods.

As for single walls mattering, that is not possible with this mod.  Each room tracks a list of cells 2 away, it does not track the cells that comprise its wall.  You can see this in the debug viewer in the game.  It would have to go back to the room definition itself and work out the walls of the room, and would probably require larger changes to make it work right (and run fast enough). 

I mentioned a few posts earlier that I rewrote this mod to use a 2d heatmap, which better handles wall materials (hp% matters, maxhp does not), and properly handles single thick walls.  It's also configurable, but does take a slightly more powerful computer (it's not bad, but if RW doesn't run well for you as is, it certainly won't help).

Makani

Hmm.

Is there a detailed list of tradeoffs between this mod and heatmap?

lperkins2

Not really, but it's pretty simple. 

This mod just makes double thick walls not magically equalize temperature with the outside world.  This makes the temperature change in rooms pretty much depend only on the roof/floor temperature change.  Overhead mountain makes the temperature tend toward 15C, no matter what.  Thin rock and manufactured roof make the indoor temperature tend toward the outdoor temperature.  It doesn't really change the core mechanics at all.

HeatMap uses a 2D heat map to calculate the temperature.  This means that temperatures vary within a room, not just between rooms.  The biggest 'problem' is if you have insufficient heat to have a warm enough room, your colonists won't seek the spaces by a fire to warm up (or cool down if the opposite is true).  In practice, this isn't really any worse than the vanilla behavior, where the entire room would be too cold, and is often much better since you can simply light a campfire outdoors or stand near steam vents to warm people up when you lack buildings. 

This one could be extended a bit, for example, the temperature at the external wall cell could be queried, it would give the temperature of the next room over (or outside) if the wall is only 2 thick.  The problem is that 3-thick walls will count as outdoor, and thus insulate worse than 2-thick walls underground.  I haven't come up with a good solution for that problem.

In summary:
This mod:

  • Negligible impact on performance
  • No change to the core mechanics
  • Walls insulate more based on HP of outer wall, but effect is negligible in practice
  • Underground rooms tend toward 15C, no matter the temperature outside
  • Configuration only possible by recompiling

Heat Map:

  • Low impact on performance.  Might be an issue if you run on oversized maps, or with a computer that struggles to run the game already.
  • Bit of a learning curve.

    • Heat transfers diagonally
    • Large rooms might need distributed heat, 4 fires in one corner don't work well
  • Mountains act as heat 'tanks', their temperature changes very slowly, but will tend toward average ambient temperature.
  • Configurable

    • Heat transfer rates can be tweaked
    • Defaults should work fine on temperate or cold maps, limited testing in deserts
  • The mod that adds larger doors don't work right
  • Possible odd interactions with other mods

Both mods are safe to add and remove mid-game (by safe, I mean the game won't crash or similar, your freezer might need a redesign).

Since I don't run this mod myself anymore, I'm unlikely to add new features to it, but I will probably keep working on HeatMap from time to time.

ambivalence

Maybe I miss something, but HeatMap (now?) seems to add a temperature overlay, nothing more. So, these mods solve different problems and thus should be compatible with each other?

Kryt

Great mod but all links are dead. Can anyone reupload the mod? Pleeease!