Hello, everyone. I've updated my mod to work with the latest version of the game. You can get it on the mod portal: Useful Map Colors
This cosmetic mod changes the colors of resources and constructions on the minimap to a consistent scheme which makes it easy to identify everything. Electricity-related things are yellow; oil/chemical stuff are dark purples; turrets are bright green; assemblers, belts, and inserters are colored appropriately; electric miners are sea-green; furnaces are orange; roboports are violet; beacons are magenta; oil wells are very dark red; pumpjacks are dark green; science labs are light blue; and so forth. Chests are very light-colored to improve their visibility.
Images
Before ("All I see is spaghetti")
After ("I can see clearly, now!")
Note the arrays of capacitors (top-left corner) and solar panels (mid-left), and the beacon-boosted smelting array at the bottom of the main factory. There's a chemical plant built on top of the coal field (making it a little bit hard to see), which is supplied by the little oil-pumping outpost to the east (look closely and you'll see the dotted line of underground pipes going back to the factory). The huge, dark square standing alone to the left of the science labs is a rocket silo.
A smaller factory (Attempting one of those "everything on one main belt" builds)
If you look closely at the power plant (top), you can see one of my steam generators is misaligned!
I've just about run out of colors to use, but I'm open to suggestions.
Re: [MOD 0.13.x+] Useful Map Colors
Posted: Sat Sep 10, 2016 10:45 am
by Jupiter
Taehl wrote:Electricity-related things are yellow; oil/chemical stuff are dark purples; turrets are bright green; assemblers, belts, and inserters are colored appropriately; electric miners are sea-green; furnaces are orange; roboports are violet; beacons are magenta; oil wells are very dark red; pumpjacks are dark green; science labs are light blue;
And roses are red and I love you.
For this mod
Re: [MOD 0.13.x+] Useful Map Colors
Posted: Wed Sep 14, 2016 5:07 pm
by Talguy
When are you releasing a 0.14 version?
Re: [MOD 0.13.x+] Useful Map Colors
Posted: Sat Sep 17, 2016 3:55 am
by Taehl
I'm going to release a 0.14 version when either A) 0.14 becomes the stable version, or B) Factorio allows mods to work with more than one version. If you need it now, you can extract the mod and edit info.json, changing 0.13 to 0.14. But if you use 0.14, then most mods on the portal will be disabled.
Maintaining more than one copy of the same mod would be pretty awful, and would clutter the portal.
Re: [MOD 0.13.x+] Useful Map Colors
Posted: Sat Sep 17, 2016 5:29 am
by Nexela
That was a bug in .13.18 that has since been fixed
As long as your mod Portal page has a .14 and .13 version of the mod factorio will pick the correct one (unless someone is still using .13.18 for some unknown reason)
Re: [MOD 0.13.x+] Useful Map Colors
Posted: Sun Sep 18, 2016 1:35 pm
by Pe334
Short question, did this mod support bob's-mod belts?
Thx ...
Re: [MOD 0.13.x+] Useful Map Colors
Posted: Sun Sep 18, 2016 5:50 pm
by Taehl
Currently, I've only hard-coded support for two modded items: Wooden floors and big wooden powerpole. I have yet to figure out a good way for mod items to get correct custom colors, but I'm open to suggestions.
Re: [MOD 0.13.x+] Useful Map Colors
Posted: Tue Oct 25, 2016 2:45 pm
by Ghoulish
Everything is so much cleaner and more unified with your colour scheme. Something similar should be in vanilla
I added this mod a day or so into a new factory, is there a way to force recolouring of items laid before this mods was added?
Thanks for the mod too!
EDIT FOR REFERANCE:
/c game.forces.player.rechart()
Re: [MOD 0.13.x+] Useful Map Colors
Posted: Mon Oct 31, 2016 8:32 pm
by Taehl
When the new version is out (soon), you won't have to use that command to update your map - it automatically does it for you.
It also has a config file to let you specify colors for new stuff.
Re: [MOD 0.13.x+] Useful Map Colors
Posted: Mon Nov 28, 2016 11:14 am
by Hazelninja24
Hey Taehl, I'm trying to edit the colour of Oil because the black is a bit hard to find on the map I'm on. How would I go about setting this back to magenta (or change it to an equivalent colour)? I have no experience in the code used but thought I would try the style used in your config.lua and data-final-fixes.lua (both by changing the HSL values in dat.resource["crude-oil"].map_colour = HSL(0, 1, 0.05, 0.65) in data-final-fixes.lua and by trying to add { "resource", "crude-oil", HSL(.3, 1, .5, part) }, - an attempt at fuschia - in config.lua but both failed, even after manually entering game.forces.player.rechart() ) Any help appreciated!
Re: [MOD 0.13.x+] Useful Map Colors
Posted: Tue Nov 29, 2016 3:45 am
by Taehl
Hi there. It can be a bit technical, but please allow me to explain how to specify colors. You should avoid changing anything except config.lua, just to be safe. For simplicity sake, each number should be a decimal between 0 and 1.
By default, Factorio uses RGB color where the first three numbers express color in terms of much red, green, and blue it has. Lower numbers are darker, and maxing all three gives you white. In RGB, magenta would be "full red and blue, no green" or "{ r=1, g=0, b=1 }".
I don't find RGB very convenient, so I also offer the HSL colorspace. Here, the three numbers stand for Hue (where in the color wheel the color is, from red at 0, green at .33, blue at .66, and red again at 1.0), Saturation (from grey at 0 to full vividness at 1), and Lightness (black at 0, white at 1). In this case, magenta would be "exactly between blue and red, full saturation and normal lightness", or "HSL( 5/6, 1, .5 )". You can mess around with a HSL color picker here: http://www.workwithcolor.com/hsl-color-picker-01.htm
The fourth number, which is optional, means Alpha in either case. Alpha is how transparent or opaque a color is, where 0 is completely invisible. Less than half alpha can be hard to see. For consistency with the alpha levels in UMC itself, I've specified levels for "slight", "part", and "full". If you don't specify alpha, it should default to 1.
With all that being said, the code you would want to add to your config.lua is one of these:
One final note: For some reason, Factorio accepts colors both in the range of 0-1 and 0-255. UMC is automatically compatible with both, just in case. If you have a color which is way off for no reason, double-check that none of its numbers are greater than 1 - if it is, Factorio assumes you're using the 0-255 range.
Re: [MOD 0.13.x+] Useful Map Colors
Posted: Tue Nov 29, 2016 6:46 am
by Hazelninja24
Taehl wrote:Hi there. It can be a bit technical, but please allow me to explain how to specify colors. You should avoid changing anything except config.lua, just to be safe. For simplicity sake, each number should be a decimal between 0 and 1.
By default, Factorio uses RGB color where the first three numbers express color in terms of much red, green, and blue it has. Lower numbers are darker, and maxing all three gives you white. In RGB, magenta would be "full red and blue, no green" or "{ r=1, g=0, b=1 }".
I don't find RGB very convenient, so I also offer the HSL colorspace. Here, the three numbers stand for Hue (where in the color wheel the color is, from red at 0, green at .33, blue at .66, and red again at 1.0), Saturation (from grey at 0 to full vividness at 1), and Lightness (black at 0, white at 1). In this case, magenta would be "exactly between blue and red, full saturation and normal lightness", or "HSL( 5/6, 1, .5 )". You can mess around with a HSL color picker here: http://www.workwithcolor.com/hsl-color-picker-01.htm
The fourth number, which is optional, means Alpha in either case. Alpha is how transparent or opaque a color is, where 0 is completely invisible. Less than half alpha can be hard to see. For consistency with the alpha levels in UMC itself, I've specified levels for "slight", "part", and "full". If you don't specify alpha, it should default to 1.
With all that being said, the code you would want to add to your config.lua is one of these:
One final note: For some reason, Factorio accepts colors both in the range of 0-1 and 0-255. UMC is automatically compatible with both, just in case. If you have a color which is way off for no reason, double-check that none of its numbers are greater than 1 - if it is, Factorio assumes you're using the 0-255 range.
Thank you for taking the time to explain this to me! I'm a beginner to code so being able to learn how this works has been a great help. I wasn't even aware that HSL was a thing before giving this a go and I really appreciate that you wrote the particular line I needed. (I'm gonna be honest, I'm too sure how to say thank you without it feeling a little weird for some reason, I'm just really grateful and appreciative)
EDIT: I've just tried putting that code into the config.lua within the mod .zip itself and it doesn't seem to be changing? I've tried the change with a new map but it was still black. I've tried making sure that the only version of Factorio running was the one with the edited code but it just doesn't seem to like it. I'm happy to resign this unless there's anything else that may be causing this?
Re: [MOD 0.13.x+] Useful Map Colors
Posted: Tue Nov 29, 2016 5:32 pm
by Taehl
Double-check that the mod is enabled. It should automatically redraw the map when you load a game, but the redraw can be a little slow and may need a few minutes to finish (especially in big games). If you load and open your map, you should see explored sectors lighting up one at a time, with the area around the player the last part to redraw.
The end of your config.lua should look similar to this:
Looking carefully, I think I see what may be causing an issue. Entities in Factorio have both map_color and friendly_map_color, but I think resources may ignore the latter. I've released a small update, let me know if it works for you.
Re: [MOD 0.13.x+] Useful Map Colors
Posted: Wed Nov 30, 2016 7:33 am
by onebit
The colors are really nice, but it's hard to see new oil deposits.
That mod has more support for coloring items from other mods out-of-the-box. It was also the inspiration for UMC - I loved the idea, but wanted to improve everything. Mine is more aesthetically pleasing, more informative, and lets you override colors / add your own mod support.
If oil needs better visibility, maybe I'll try changing it again. Instead of a super-dark red, perhaps a dark purple?
Re: [MOD 0.13.x+] Useful Map Colors
Posted: Thu Dec 01, 2016 8:32 am
by onebit
Maybe the original magenta? rgb(255,0,255). It fits the purple theme for oil.
I feel like it should stand it since it's valuable.
Re: [MOD 0.16] Useful Map Colors
Posted: Tue Aug 07, 2018 8:14 am
by Taehl
I finally got around to updating this thing, lol. It has colors for all the new stuff, as well as a few in-game options. For example, you can toggle between Oil Wells being high-visibility purple or the old realistic color. I hope you all enjoy it as much as I've enjoyed making it.
Re: [MOD 0.16] Useful Map Colors
Posted: Thu Aug 09, 2018 9:04 pm
by slyper52
My map is mostly desert which makes it hard for me to quickly identify my rail system. I tried to modify the config file which now looks like this
-- You can choose your own colors here, for example to add color to other mods' items.
-- Colors can be expressed in standard Factorio Red-Green-Blue table format, or in Hue-Saturation-Lightness.
return {
{ "electric-pole", "big-wooden-pole", HSL(.1, 1.0, .8, part) },
{ "tile", "wood-floor", HSL(.1, .5, .3, full) },
{ "straight-rail", "straight-rail", { r= .8, g= .43, b= .8, a=slight} },
{ "curved-rail", "curved-rail", { r= .8, g= .43, b= .8, a=slight} },
The goal was to make the rails a dark green color but it does't seam to work at all. They are still the same light gray color. any help??
Re: [MOD 0.16] Useful Map Colors
Posted: Sun Aug 12, 2018 9:01 pm
by Taehl
If it's exactly like that, you're missing a closing curly bracket at the end:
Missing curly bracket would make loading config.lua fail. When that happens, I have Useful Map Colors throw an error message in the log, but I didn't make it a game-stopping error. Maybe I should, to make it more visible?
Also, the color you describe consists mostly of red and blue - ie., it's more of a light magenta than green. Dark green would be more like:
Finally... I discovered that rails never get recolored at all. They seem to ignore both map_color AND friendly_map_color! This might be a bug in Factorio?
EDIT) It's not a bug in Factorio, merely a feature. I just released an update - now you can recolor rails!