Save game editing help

Started by ZozZ, January 06, 2015, 05:00:24 AM

Previous topic - Next topic

ZozZ

I'm not sure if this is the right forum to post this stuff so i'm sorry
anyway i'm trying to change one of my colonist hair color through a save game but i don't understand the RGBA thing

<hairColor>RGBA(0.929, 0.792, 0.612, 1.000)</hairColor>

i want to use the R:255 G:255 B:255 RGB thing and i don't know if it can be converted to (RGBA?) and i can't find an RGBA color picker website or software

Asero

http://stackoverflow.com/questions/6672374/convert-rgb-rgba

Look at the accepted answer below the main post on there for an idea on how to calculate it manually 8)

ZozZ

Quote from: Asero on January 06, 2015, 06:50:14 AM
http://stackoverflow.com/questions/6672374/convert-rgb-rgba

Look at the accepted answer below the main post on there for an idea on how to calculate it manually 8)

but that just give me numbers like this: 63 64 etc... i want it to be from 0.000 to 1.000 example: 0.951 0.543 0.431

Anduin1357

Use 63/255, 64/255... and try and reduce the denominator to 1.
Input resulting value. 8)

Rikiki

It is just that your numbers are encoded on a byte (8 bits) so max value = 255, while the game accepts float value from 0.0 to 1.0.
So just divide your numbers by 255 and you are good to go.
For example:
R: 255 G: 120 B: 25 => <hairColor>RGBA(1.0, 0.471, 0.098, 1.000)</hairColor>

By the way, the "A" is alpha channel or opacity of the color (0 = totally transparent, 1 = totally opaque).