Truinto / ONI-Modloader-SimpleMods

OxygenNotIncluded Mods
MIT License
16 stars 6 forks source link

Piped Everything: Colour option (GUI) #61

Open ECHOSUD opened 3 months ago

ECHOSUD commented 3 months ago

Input & Output Port Colour

I failed to recognise the ports when using the relevant overlay that are darker in colour, such as coal and carbon dioxide.

Vanilla Port Colours

Have an option in game to revert the port colours to the game default: White for Input and Green for Output. Using the overlays, there is reduced cases where there are multiple input or output ports for that overlay. Vanilla uses Orange to represent a filtered port, so if there is only one additional port Orange can be used.

Compromises

Screenshots

I failed to see:

Carbon Dioxide (Gas Range, Coal Generator)

Coal (Coal Generator)

Truinto commented 2 months ago

You can set multiple elements for inputs. I think to remember that you can set it to accept any element (probably empty string it's Solid Liquid Gas, since the port needs to know which pipe to use). I am not sure if that works for outputs. It's not as useful and since the pipe/rail cannot accept more than one packet, it usually is always occupied by one element anyway.

Truinto commented 2 months ago

You can set the colour with the "Color" property to any RGB you like. If you think there are specific ports that should have specific colours, I am happy to change the default. I don't have any strong opinions there.

Btw, if no colour is defined, it will look up the element table and use that colour. All elements have a predefined colour, primarily used for the element overlay view.

Truinto commented 2 months ago

You mentioned Gas Range. Does this work for you? I got complains that it's dumping gas canisters. Which is weird, because I fixed that bug very early.

ECHOSUD commented 2 months ago

You mentioned Gas Range. Does this work for you? I got complains that it's dumping gas canisters. Which is weird, because I fixed that bug very early.

I haven't had the time to test it, I mainly made this post because I had not noticed it at first, and wanted to gauge if it was reasonable for me to not notice it.

You can set the colour with the "Color" property to any RGB you like. If you think there are specific ports that should have specific colours, I am happy to change the default. I don't have any strong opinions there.

I reliase it looks nice to have unique colours for each element. My issue though is within the overlay display, dark colours are much harder to see on the dark background (Compared to the White and Green (and Orange) of the vanilla coloured ports).

If it is a single solid colour, maybe having it be brighter would be nice, but thats just what I think. If it isntead can be more complex, such that the border of the port is the same colours as vanilla, while the interioir is the element colour, I think would increase the visibility greatly.

mockup
Truinto commented 2 months ago

CO2's game color is actually pitch black. I use some code to disallow all black colors. The question is what are the exact colours that should be used on each port. I am fine with setting new defaults. I just need to know what exactly you want.

I will need to check if the code allows for multi colouring of icons (without being a huge pain).

ECHOSUD commented 2 months ago

If it is too dificult for the icons to support transparency/multicolour, or having a GUI option to change all the port colours to White or Green, this would be my default preference:

Carbon Dioxide

rgb(161, 84, 134) Carbon Dioxide Colour derived from the vanilla oxygen overlay key for Barely Breathable. I'd rather see the Carbon Dioxide port and derive what the element is from the building, rather than it being very difficult to see the Carbon Dioxide port.

Comparisions

It seems in the overlay that anything not belonging to the overlay is in greyscale (where R=G=B).

Coal

rgb(140, 125, 154) Coal

Comparisions

Truinto commented 2 months ago

It is indeed a pain to have mixed colors. But I got an idea how to do it. Will see if it works.

Truinto commented 2 months ago

Well... almost

Truinto commented 2 months ago

I figured out how to make the sprite readable from GPU space and apply all the color operations (only done once at bootup). But if I create a new sprite object, the pixel alignment is all screwed up. I am not familiar with mipmaps and what not. No idea what to do.

pic2

ECHOSUD commented 2 months ago

I figured out how to make the sprite readable from GPU space and apply all the color operations (only done once at bootup). But if I create a new sprite object, the pixel alignment is all screwed up. I am not familiar with mipmaps and what not. No idea what to do.

I consider the colours of the ports to be a minor issue, was just hoping if multi colour was easy to implement that would be ideal.