Author Topic: spriteFaceColor spriteHairColor spriteRankColor  (Read 400 times)

Offline hellrazor

  • Commander
  • *****
  • Posts: 2254
  • Deep Ruleset Digger & Bughunter
    • View Profile
    • Github Account
spriteFaceColor spriteHairColor spriteRankColor
« 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?
« Last Edit: January 19, 2020, 02:46:31 am by hellrazor »

Offline The Martian

  • Colonel
  • ****
  • Posts: 345
  • "It implores you to listen to its arguments..."
    • View Profile
Re: spriteFaceColor spriteHairColor spriteRankColor
« Reply #1 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.

Offline Yankes

  • Commander
  • *****
  • Posts: 2346
    • View Profile
Re: spriteFaceColor spriteHairColor spriteRankColor
« Reply #2 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