Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Palette Assignment to Graphics  (Read 289 times)

Earthbound Modder

  • Bay Watcher
  • Sewer Brew Graphical Overhaul Mod, v.50.01 and up
    • View Profile
Palette Assignment to Graphics
« on: August 21, 2023, 11:22:12 pm »



I saw a question on here about a year ago, and I have the exact same question regarding descriptor palette assignment to objects in the game. I'll quote that question here verbatim, and link to the original:

http://www.bay12forums.com/smf/index.php?topic=173474.msg8440169#msg8440169
Quote
What determines if an image uses the material color or the color straight from the .png in the steam version's tileset?

Metal Bars, Tables, and Trousers are all material colored, but cheese for example is not and has a base yellow sprite for all cheese.
If I recolor that cheese to the DEFAULT_TEMPLATE color, it doesn't recolor to material colors defined in the cheese.
I haven't located anywhere that implicates images to use palettes, but I've seen comments in the files that say different images are palette colored. Is this all hardcoded?

For a graphics overhaul mod that I'm creating, I'd like weapons and armor that dwarves are wielding/wearing to reference the descriptor palette file directly for color in the same way that many furniture items do.  This could be used to solve the issue of dwarf armor not showing up when, for example, it is produced as part of a strange mood using nickel or another non-standard armor metal not recognized in the graphics_creatures_layered graphics file by permitting me to reference the material as metal, rather than iron, bronze, steel etc. specifically.

Does anyone know if this behavior is hardcoded atm, or is it able to be referenced by the modder in a graphics file? I saw that a [PALETTE_COLOR] token was referenced in the dwarf fortress raw decompilation https://gitlab.com/df-modding-tools/df-raw-language-server/-/blob/dev/df_ls_structure/src/objects/graphics/creature_graphics.rs, but it was listed as TODO, so no luck for that working atm.
Logged