Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: SCIENCE: Castes, Colors and Sprites  (Read 739 times)

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
SCIENCE: Castes, Colors and Sprites
« on: March 07, 2012, 07:22:45 am »

I dont know if this is public knowledge, but there is a workaround to more or less add custom sprites to castes. At least when it come to colors. I found out about it when I made the graphics for my blob creatures. I just made a white blob sprite and then used: ADD_COLOR instead of AS_IS in the graphic file. Then defined the caste colors, and viola, every single one of the five castes has a custom color AND a custom sprite. The sprites gets overlayed with the caste color. I did the same for my golems. One creatures, but the dark steel golem can fight a cyan candy golem now. :)

This could be usefull for all kinds of things, wizards/sorceres, colorful animals, elemental man...

Hope this is not included in the graphics 1*1 and everyone knows it. Just wanted to share this little discovery.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Courtesy Arloban

  • Bay Watcher
  • This isn't a fortress... ...It's also not a map.
    • View Profile
Re: SCIENCE: Castes, Colors and Sprites
« Reply #1 on: March 07, 2012, 09:59:55 pm »

This is a great discovery, but i don't understand how to do it.  Do you have a graphics set that you use it in?
Logged
Maybe that the dwarves never died and everyone is just shunning them.
"Wait, what are you doing?  I don't want to go in there!  No, I'm still alive, you can't do this to me!  Is Anybody listening?  Hello... Can someone let me out?  Help me!  Is anyone there?  I'm running out of air!"

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: SCIENCE: Castes, Colors and Sprites
« Reply #2 on: March 07, 2012, 10:45:57 pm »

It is quite simple.

The graphics file looks like this:
Code: [Select]
graphics_golem

[OBJECT:GRAPHICS]

[TILE_PAGE:GOLEM]
  [FILE:golem.png]
  [TILE_DIM:16:16]
  [PAGE_DIM:5:1]

[CREATURE_GRAPHICS:GOLEM]
[DEFAULT:GOLEM:2:0:ADD_COLOR:DEFAULT]

Your sprite should have a lot of white in it, the less color it has, the more color it can take from you caste_color.

If you now make a golem with 3 castes, and give the first caste CASTE_COLOR:0:0:0, the second one CASTE_COLOR:1:0:0 and the third one CASTE_COLOR 6:1:1 then you will have one black golem, one blue golem and one yellow golem. Same sprite, same creature, different colored sprites. :)
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::