RimWorld

RimWorld

53 ratings
Recolor Areas
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.5
File Size
Posted
1.023 MB
Nov 11, 2024 @ 10:12pm
1 Change Note ( view )

Subscribe to download
Recolor Areas

Description
This mini-mod lets you recolor Allowed Areas!

Mod Content

This mod lets you change the color of Allowed Areas by clicking on the color swatch in the Manage Areas dialogue. This allows you to freely change the color of each area as well as choose colors far brighter or darker than vanilla normally allows.

Technical Details

This mod uses a single Harmony Transpiler on Dialog_ManageAreas.DoAreaRow that replaces the call to WidgetRow.Icon with a pass-through method that catches click events and pops open a custom dialogue to alter an area's color.

Dialog_RecolorArea uses four Harmony FieldRefs to bypass encapsulation on Area, Area_Allowed, and CellBoolDrawer in order to alter said area's color and clear its cached Unity Texture and Material. This only happens when a color is actually changed (not cancelled) and said textures and materials are cached by the game's asset pools, which minimizes VRAM usage.

Dialog_RecolorArea also gives you full RGB control over Allowed Area colors; vanilla normally chooses a random color, then blends it with a 50% gray, which is why all vanilla Allowed Area colors feel faded.

Compatibility

This mod should be safe to add or remove from a running save. Any altered area colors will remain altered even if this mod is removed.

This mod appears to be incompatible with TD Enhancements Pack, which fully overlaps its functionality; if you are using that mod then you should not need this one.
11 Comments
Aelanna  [author] Nov 13, 2024 @ 9:33am 
@krzarb @Beschi - Thanks for looking into it, I'll see what I can do!
Beschi Nov 13, 2024 @ 9:27am 
@krzarb is right. You just can insert hex colour values, and I found no option to disable it in TD Enh. Pack.
Vertigo Nov 13, 2024 @ 8:00am 
@Aelanna If you are unaware of the mod I was referencing this was it.

https://steamcommunity.com/sharedfiles/filedetails/?id=1180718996
krzarb Nov 12, 2024 @ 4:22pm 
TD enhancement pack does have this functionality, although it relies on you inputting the hex value text so you need to use a colour picker in a browser to choose the colour and then copy and paste the text. The interface on your mod seems a lot more integrated. I’ll check when I get home if the colour picking option can be turned off in TD enhancement pack to make these mods compatible, but sadly they might not be.
Aelanna  [author] Nov 12, 2024 @ 2:16pm 
@Vertigo - Zones appear to be very different from Areas in terms of code structure, but I can definitely take a look!
Aelanna  [author] Nov 12, 2024 @ 2:14pm 
@Beschi - TD Enhancement Pack also claims to have this kind of functionality already, so it seems that there would be no reason to have both mods? Would be happy to look into the issue if that is not the case, but I don't see the point if there's a complete overlap.
Beschi Nov 12, 2024 @ 10:49am 
It seems TD Enhancement Pack is incompatible with your MOD. With it your changes doesn't show up, or, if loaded after TD, I get a red error saying the entry point could not be found (or something like this).
XELF SABOTEUR Nov 12, 2024 @ 10:27am 
finally!
5150 Nov 12, 2024 @ 3:13am 
Goood
Vertigo Nov 12, 2024 @ 12:24am 
any chance you could consider adding options to change the colors of stockpile zones and grow zones? There is an older mod that changes those two zones that seems to have lag issues and the author mentioned back in April that they were done with modding.