Set Items and Colors.txt

This is the place to discuss all issues relating to the manipulation of graphics/animations, sounds, music and cinematics within Diablo 2.

Moderators: Nefarius, Necrolis

Post Reply
flymethod
Posts: 2
Joined: Sun Jul 03, 2022 2:09 pm

Set Items and Colors.txt

Post by flymethod » Sun Aug 07, 2022 5:17 pm

Is there any way to find out how colors are applied to set items such as Tal Rasha's Armor?

I see the code is dpur which colors.txt calls Dark Purple, but how does the game actually apply the color transformation?

User avatar
Necrolis
Senior Admin
Throne
Posts: 9124
Joined: Sat Mar 25, 2006 1:22 pm
Location: The Land of the Dead
Contact:
South Africa

Hand-picked

Re: Set Items and Colors.txt

Post by Necrolis » Mon Aug 08, 2022 1:14 pm

Color shifts for items are done via palette remapping; the chrtransform and invtransform define which one of the global color remappings will be applied when the char/item is rendered.
If you want to understand the mechanics behind this you can look at Paul Siramys docs of state palette shifts or Joels & Nefarius' tools for monster palettes.
Image
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death | D2GFEx
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal

flymethod
Posts: 2
Joined: Sun Jul 03, 2022 2:09 pm

Re: Set Items and Colors.txt

Post by flymethod » Thu Aug 18, 2022 3:02 pm

Thanks for the info. Where would I find these docs?

Are these palettes in the game files and can I apply them to the base image like Lacquered Plate?

For more clarity what I'm trying to do is apply these palette shifts to the "base" images either manually or automated

User avatar
Necrolis
Senior Admin
Throne
Posts: 9124
Joined: Sat Mar 25, 2006 1:22 pm
Location: The Land of the Dead
Contact:
South Africa

Hand-picked

Re: Set Items and Colors.txt

Post by Necrolis » Thu Sep 15, 2022 5:56 pm

flymethod wrote:
Thu Aug 18, 2022 3:02 pm
Thanks for the info. Where would I find these docs?

Are these palettes in the game files and can I apply them to the base image like Lacquered Plate?

For more clarity what I'm trying to do is apply these palette shifts to the "base" images either manually or automated
So the basics of palette remapping can basically be summed up by this tool and accompanying source: http://paul.siramy.free.fr/_divers2/ColormapMaker.zip

the TLDR is that the item palettes act as a secondary indirection layer between the games palette and the item images (RLE encoded) 8bit palette indices; you can find the item palettes in `data\global\items\Palette\*`.
There is one file for each translvl, each file contains 21 sets of 256 bytes, each set of 256 bytes is a color shift from colors.txt.

Pauls tool should give you all the source needed to create an automated tool to remap on the fly.
Image
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death | D2GFEx
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal

Post Reply

Return to “Multimedia”