Author Topic: FOT sprites and color  (Read 1579 times)

FOT sprites and color
« on: February 03, 2014, 08:13:16 pm »
I see the engine supports FOT sprites but I noticed most humans have white hair. Can the sprites be colored in the game like they can be colored in FOT?

JovankaB

  • Guest
Re: FOT sprites and color
« Reply #1 on: February 04, 2014, 09:36:35 am »
I never tested it, but here is some info:

https://xp-dev.com/forum/topic/3220
(Rev.156)

Quote
Ability to affect the colors when loading Tactics sprites was added.
To make color shift, define necessary values in file name’s parameters (“$”).
Format: fileName$[index,r,g,b]animName.spr (can be any amount of shifts […])
where index – body part’s number (0 – miscellaneous, 1 – skin, 2 -hair, 3 – armor);
r,g,b – color shift for the each component, can be negative
Example: someSprite$[2,50,-30,-20]anim1.spr – load sprite someSprite.spr, with animation anim1 and hair’s color shift in RGB (50,-30,-20).
Additional flags for operating with color’s shift were added for Tactics critters (_animation.fos, animation.fos).
Use macros ANIM1_COLOR_SKIN(index), ANIM1_COLOR_HAIR(index), ANIM1_COLOR_ARMOR(index) for values defining. Index can take on value from 0 to 15, appropriate to it values of color shift look in array colorOffsets of animation.fos script.
For ability testing you can use text function void ColorOffset(Critter& cr, int skin, int hair, int armor) in test.fos.
« Last Edit: February 04, 2014, 09:41:34 am by b__B »

Re: FOT sprites and color
« Reply #2 on: February 04, 2014, 10:50:05 am »
Interesting. So I can make empty spr files with all the color info in their filenames? I will try that out today!