OpenXcom Forum

Modding => Help => Topic started by: hellrazor on January 19, 2020, 02:12:22 am

Title: spriteFaceColor spriteHairColor spriteRankColor
Post by: hellrazor on January 19, 2020, 02:12:22 am
Hi all,

would someone please be so kind to enlighten me on how palettes and the bitmask for
spriteFaceColor spriteHairColor spriteRankColor are mapped?

How do i know which value represents which color?
Title: Re: spriteFaceColor spriteHairColor spriteRankColor
Post by: The Martian on January 19, 2020, 04:54:08 am
I don't understand how this works yet myself but I believe this post in another thread is related to your question, so I shall link it in case it helps.

If you add this to the armors.rul to the corresponding armor (for mods with a standard set of soldiers):

     spriteFaceGroup: 6
     spriteFaceColor: [96, 96, 96, 96, 160, 160, 163, 163] # M0 F0 M1 F1 M2 F2 M3 F3
     spriteHairGroup: 9
     spriteHairColor: [144, 144, 164, 164, 245, 245, 164, 164] # M0 F0 M1 F1 M2 F2 M3 F3

then ethnicity will be visible on the battlescape.
Title: Re: spriteFaceColor spriteHairColor spriteRankColor
Post by: Yankes on January 19, 2020, 03:45:25 pm
This work as color replacement,
First we have `*Group` with define what color group (row of 16 colors in palette) we want replace,
If we find match in unit graphic then we take shade (column offset of row from palette) of that color and add value from `*Color` that is choose based on unit gender and look