Author Topic: how gender/race sprites works? [Explained]  (Read 12413 times)

Offline kikimoristan

  • Commander
  • *****
  • Posts: 647
    • View Profile
Re: how gender/race sprites works?
« Reply #15 on: March 15, 2015, 03:54:23 am »
how do you get the mutants?

Mono

  • Guest
Re: how gender/race sprites works?
« Reply #16 on: March 15, 2015, 04:01:33 am »
https://openxcom.org/forum/index.php/topic,1557.0.html
It's easy: each row of the palette is a colorGroup, starting by 0 (0-15)
color is the color number in the given palette, also starting by 0 (0-255)
first colorGroup (nr. zero) is reserved for background and shades (not really sure)

for the mutant I just monkey typed some random color, see attachment  ;)
« Last Edit: March 15, 2015, 04:10:39 am by Mono »

Offline kikimoristan

  • Commander
  • *****
  • Posts: 647
    • View Profile
Re: how gender/race sprites works?
« Reply #17 on: March 15, 2015, 04:16:28 am »
thanks Mono. this means you can also change the alien 's looks based on their ranks or stuff like that.

Mono

  • Guest
Re: how gender/race sprites works?
« Reply #18 on: March 15, 2015, 04:27:28 am »
Testing right now but: apparently not :(
only XCom soldier have color changes based on race and gender.
Rank do not qualify as race. If I find a workaround I will post.

Edit:
Quote
NICE . pink and blue for power armor. is only gender based i assume.
You can have different armors color based also on race, but this will not make much sense IMO. It will be better if we can have armor color based on rank (rookies, squaddie etc) but is not the case.

Re-Edit:
Silly me, I was spraying wrong infos   ::)
Yes it work for alien too... Hurra!
In a hurry to respond to tollworkout I have made some errors in my rule  :-[

You can change 2 palette from any alien but the result is a little weird.
  • Pic1: Original sprite, sectoid with added glassess for 2nd color
  • Pic2: Change the orange to green on glassess
  • Pic3: Change sectoid skin from grey to pink
  • Pic4: Both changes applied, but the skin is not pink anymore but kinda orange
Will test more next days...
« Last Edit: March 15, 2015, 08:27:53 am by Mono »

Offline kikimoristan

  • Commander
  • *****
  • Posts: 647
    • View Profile
Re: how gender/race sprites works?
« Reply #19 on: March 15, 2015, 07:17:46 am »
Testing right now but: apparently not :(
only XCom soldier have color changes based on race and gender.
Rank do not qualify as race. If I find a workaround I will post.

Edit:You can have different armors color based also on race, but this will not make much sense IMO. It will be better if we can have armor color based on rank (rookies, squaddie etc) but is not the case.


i wonder if yankes can make a version that can somehow link up with statstings that way you can have different guys color their armor in a different way 

Mono

  • Guest
Re: how gender/race sprites works?
« Reply #20 on: March 15, 2015, 08:10:52 am »
Hey tollworkout, we must stop writing at the same time.  :P
I already corrected my last post.

As a side note: No more need for different sprite for the muton commander  ;D

both changes applied whit no weardiness. Pink skin, green glassess
weird thing appear if the colors numbers in the arrays are not the same.
need some sleep, too many errors I made :-[
« Last Edit: March 15, 2015, 08:32:13 am by Mono »

Offline kikimoristan

  • Commander
  • *****
  • Posts: 647
    • View Profile
Re: how gender/race sprites works?
« Reply #21 on: March 15, 2015, 08:37:14 am »
that's cause colors are additive as in pink + gray/green/purple = orange.

Offline kikimoristan

  • Commander
  • *****
  • Posts: 647
    • View Profile
Re: how gender/race sprites works?
« Reply #22 on: March 15, 2015, 08:39:25 am »
hey mono. can i see the ruleset ? you should make am mod where each rank is identifiable by their tint. could be useful.  good job. :3

Mono

  • Guest
Re: how gender/race sprites works?
« Reply #23 on: March 15, 2015, 09:14:46 am »
I have no ruleset for now. Only a scratch test file.
I use the sectoid with glass cause it has 2 color to play with.
(I may have used a regular floater, but I have the sectoid at hand).

Just comment spriteFaceGroup, spriteFaceColor, spriteHairGroup, spriteHairColor and you have the original sprite (with glass).
The rule apply to all sectoids (armor is the same for all).
If you want colored ranked alien, you must give a different armor to each rank, but the sprite could remain the same.
TODO: how things change when the colors from the 2 arrays have different values.

For the mod: I will do it, but need more time  :)
Oh, and for the good job: Thank but all the credit is for Yankes!
« Last Edit: March 15, 2015, 09:20:25 am by Mono »

Offline Yankes

  • Commander
  • *****
  • Posts: 3194
    • View Profile
Re: how gender/race sprites works?
« Reply #24 on: March 15, 2015, 04:48:30 pm »
https://openxcom.org/forum/index.php/topic,1557.0.html
It's easy: each row of the palette is a colorGroup, starting by 0 (0-15)
color is the color number in the given palette, also starting by 0 (0-255)
first colorGroup (nr. zero) is reserved for background and shades (not really sure)

for the mutant I just monkey typed some random color, see attachment  ;)
Exacly.
I forbid colorGroup 0 to prevent problems with transparent index 0. I could do work around but because it's very easy avoidable I didn't do it.

And for color based on rank, I can do it but I need ask permission form Warboy if I want add this to official version.

Mono

  • Guest
Re: how gender/race sprites works?
« Reply #25 on: March 16, 2015, 10:42:36 pm »
And for color based on rank, I can do it but I need ask permission form Warboy if I want add this to official version.

Thank you Yankes. Indeed a third palette for soldier rank will be relevant to my interests :)
Adding a badge to the soldier chest or a colored stripe over a shoulder armor indicating the soldier rank are the kind of attention to details that make a game great. Like your original race recoloring hack ("Enhanced Soldier Sprite", under option). I can't think of anyone playing with this option disabled  ;D

On the other hand, this new feature will go unnoticed for some time, requiring modification to all the original soldiers sprites, and will not improve the gameplay in any way. So, is up to you, your time and interests. For my side is a yes, I want badly  :P

Thanks for your works Yankes, I love it!

A call to for a poll: any modders/players are interested in this feature? Just me?  :(
« Last Edit: March 16, 2015, 10:55:02 pm by Mono »

Offline Hobbes

  • Commander
  • *****
  • Posts: 2101
  • Infiltration subroutine in progress
    • View Profile
Re: how gender/race sprites works?
« Reply #26 on: March 17, 2015, 04:40:41 am »
A call to for a poll: any modders/players are interested in this feature? Just me?  :(

I am very interested to add this to enemy human factions, but it isn't possible yet.

Offline Dioxine

  • Commander
  • *****
  • Posts: 5412
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: how gender/race sprites works? [Explained]
« Reply #27 on: March 17, 2015, 09:05:33 am »
What do you say it's impossible, I've done that already in Piratez 0.89 :) All you need is to use either hair or face option to recolor uniform. Naturally, this requires a different design of the enemy (ex. if you want their skin AND hair to differ too, you either need to use the same colour for hair as for the skin (just a darker shade), or hide their hair beneath a helmet, OR make them all uniform-haired :)

I disagree with disabling of group 0 (and 15 as far as I can tell - or am I just seeing things?), though. Your defense of modders is commendable, Yankes, but I really don't like when people try to save me from myself. Avoiding problems with colors #0 & #15 requires some agility, but I'd rather deal with minor problems than have an option blocked by a divine decree.
« Last Edit: March 17, 2015, 09:11:46 am by Dioxine »

Offline kikimoristan

  • Commander
  • *****
  • Posts: 647
    • View Profile
Re: how gender/race sprites works? [Explained]
« Reply #28 on: March 17, 2015, 12:49:44 pm »
sorry everyone been away for abit

i think yankes did a lot already and disabling 0 was a wise choice making his life easier. is not necessary. is just gray really.  use last group  (15) is also gray.

Offline Yankes

  • Commander
  • *****
  • Posts: 3194
    • View Profile
Re: how gender/race sprites works? [Explained]
« Reply #29 on: March 17, 2015, 08:57:02 pm »
I disagree with disabling of group 0 (and 15 as far as I can tell - or am I just seeing things?), though. Your defense of modders is commendable, Yankes, but I really don't like when people try to save me from myself. Avoiding problems with colors #0 & #15 requires some agility, but I'd rather deal with minor problems than have an option blocked by a divine decree.
15 should work. Problem with group 0 is that it contains index 0, using naive way it would RECOLOR all empty space. I need some way to handle it, one is test for index 0 even if you don't use it or ban it. I choose banning it. Is this that problematic? If is then I could alter handling of it.

BTW do you have problems with shade "overflow"? If you encounter this many times I could add protection for this too (it will clip to index 15).