–Just like it says on the tin. I want to make my plutonium gear orange, but it seems as if there is no option for that. Thus, I want to make my own custom colors to use. I’ve looked at colors.json and and attempted to reference that to make my own colors, but they never seem to work. Here is an example from colors.json: “LRED” : [255,150,150] and then what I attempted to do myself: “ORANGE”: [249, 184, 4]
As far as I can tell, you can’t add colors in json. You can define what the colors mean, but the name strings from raw/colors.json are referenced in src/color_loader.h.
You’d need to add ORANGE to the list of color names there and recompile your executable, and then other people wouldn’t be able to use your mod without making the same change and recompiling the program.
Colours are hardcoded as mlangsdorf said, the idea of the colours json is changing how the existing colours appear on-screen, not adding new ones.
–So does that mean it isn’t possible at all? I got kinda confused.
–Also, could you help a bit more in How to mod the game?
For your own personal game, it’s possible but modestly difficult because it requires recompiling the program.
For a mod that you want to share with others, adding a new color would require them to also recompile the program.
If you want to share a mod that only changes json and can be used without recompiling, adding a new color isn’t possible.
–Well, it sucks that I can’t do that. However, apparently if you use ‘light red’ it turns out to be orange! Odd, since light red would actually end up pink, not orange, but eh. It’s strange but it gets e what I want! Orange as a color option! But seriously, why isn’t it labelled orange instead? Does anyone happen to know?