[1.2] Heat Map: Togglable temperature based colour gradient over your base

Started by falconne, June 16, 2017, 07:01:31 AM

Previous topic - Next topic

falconne

Heat Map
Adds a toggle button to show a live temperature based colour gradient over indoor areas in your base. The gradient uses the familiar colour scheme of green being the midpoint for human comfort (in the game that's 22C / 71.6F), becoming deeper blue or red for colder and hotter rooms respectively.

By default, each room's temperature is also shown in small text over the room when overlay is active (this can be turned off in mod settings).

Download from Steam Workshop
Direct Download: Github
Source: Github




By default, the green range is compressed more than usual, to make it easier to see when rooms are on the edge of comfort. The deepest blue and red are not mapped to the coldest and hottest possible map temperatures, as that would be useless inside a base where temperatures aren't that extreme. Instead they are bound from -12C to 56C (10.4F to 132.8F), so that you can tell from the colours what the temperature is.

You can set a different custom range in the mod settings for extreme maps. When using a custom range, there is no green compression.

The overlay is toggled with a button in the lower right. It can also be toggled with a keyboard shortcut; the default keybinding is \ (backslash) and can be changed in the 'Keyboard configuration' menu in Options, under a new Heat Map section.

When the overlay is turned on, it will update as the game runs. The overlay opacity and update speed can be configured in Mod Settings dialog.

The mod also adds a thermometer widget to the top right hand corner of the UI, displaying the current outdoor temperature (shaded with the same colour scheme as the overlay). This can be disabled in Mod Settings. Clicking this widget also toggles the heat map overlay.

Translation credits (GitHub usernames):
* Japanese by @Proxyer
* Spanish by @53N4


License
GPLv3 (free to do what you like, just give me credit).


SpaceDorf

Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

stigma

AWESOME mod - so simple, but so useful.
Yet another "this should have been in vanilla" type of mod with no downsides to speak of.

I do however have one thing I'd really like to see - and hopefully it is not too hard to implement:

Problem: I'd like to play with heatmap on all the time to be able to tell that something is going on before it becomes bad (like all my compost getting ruined because I forgot to build more passive coolers as tribals). heatmap is great for seing the problem - but usually it is too late by the time you check it. Unfortunately the effect is very strong - and it makes it hard/uncomfortable to look at the details in your rooms.

Solution: Add a copy of this effect that is the same but with maybe 25% to 50% (hard to guess without seeing it) opacity so that you get some rough indication of the heat level to warn of trouble, but not so much that you can't just comfortably keep it on always.

Suggestions on how to implement (in order of what I think would be the ideal implementation):
- Make the button a 3-toggle, so it just cycles the 3 states, off, normal, "light". Unless a 3-toggle is hard to make in this framework this seems like the obvious solution.
- Make the button pop out a menu you can select the state from like "cleaning area" mod does. You can probably just rip the relevant code from that project (with the authors permission obviously) to use here if it is non-trivial to implement. Not quite AS intuitive as a 3-toggle, but still easy to use, and then you could even include a few different opacity levels so users can adjust to taste - so this is a definite boon worth considering.
- Make a toggle in in-game mod menu. Cumbersome, but workable. At least doesn't need a restart.
- Make it an editable value or switch in some XML file. If all else fails...
- Make a "light" version of the mod. The nuclear option - but probably the simplest of all in terms of changes since I'm guessing it's changing a couple of values in the dll and recompiling (I'd be happy even with just this though :) )

-Stigma

falconne

Yep, the next update is going to have configurable opacity as well as update frequency.

I'll be doing it either with a setting in the mod config menu (from options) or a right click menu on the button itself. The latter is nicer but the former is faster to implement so probably end up going with that.

stigma

Quote from: falconne on July 17, 2017, 07:17:22 PM
Yep, the next update is going to have configurable opacity as well as update frequency.

I'll be doing it either with a setting in the mod config menu (from options) or a right click menu on the button itself. The latter is nicer but the former is faster to implement so probably end up going with that.

Awesome! Yea, I don't see any issue with that implementation. You won't be changing opacity that often anyway. Not sexy - but functional. Very Rimworld ;)

-Stigma

Adalah217

Just want to give a shout out and let you know this mod is fantastic! Wish I could the heatmap on all the time, but as others have said, opacity is an issue.

falconne

Just uploaded a new version.

The mod now lets you configure the opacity and update speed from the Mod Setting menu.

SpaceDorf

Thank you again.

And since inside temperatures are covered now .. and you included a Mod Menu,
I have a long standing wish for the gui.

Could you add a Display for the outside temperature that is actually visible instead of hidden and may even look nice ?

I attached a pictured of an old rpg I used to play. It has quite the modding community, too :)

[attachment deleted by admin due to age]
Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

falconne

I've just made a quick update to add a keyboard shortcut to toggle the overlay. The default keybinding is \ (backslash) and can be changed in the 'Keyboard configuration' menu in Options, under a new Heat Map section.

Quote from: SpaceDorf on July 26, 2017, 07:27:16 AM
Could you add a Display for the outside temperature that is actually visible instead of hidden and may even look nice ?

I will look into that in a future update.

SpaceDorf

Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

Rock5

Rock5 [B18] Mods
- Butchers Can Count Meat
- Sun Lamp Planner
- JTZoneButtons
- RimSearch
- JTExport

falconne

Yes all my mods will be updated to B18 soonish. Just a bit busy at the moment.


Layd

A good mod but there are no language files. People themselves translate but do at least English.