RimWorld

RimWorld

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

Subscribe to download
Recolor Areas

Description
UPDATE: Recoloring areas is now vanilla in RimWorld v1.6! This mod should no longer be needed.

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.
17 Comments
THEZOLF 17 Jul @ 4:21pm 
o7
Eokai 15 Jul @ 2:58pm 
o7
IA-3S 28 Jun @ 2:26am 
o7
구양 18 Jun @ 5:56pm 
o7
Malware 14 Jun @ 8:11am 
o7
Justacommonegg 12 Jun @ 12:15pm 
o7
Aelanna  [author] 13 Nov, 2024 @ 9:33am 
@krzarb @Beschi - Thanks for looking into it, I'll see what I can do!
Beschi 13 Nov, 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 13 Nov, 2024 @ 8:00am 
@Aelanna If you are unaware of the mod I was referencing this was it.

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1180718996
krzarb 12 Nov, 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.