[SOLVED] How to use Translation to change the color of Sprite that has too many colours?

Ask about editing graphics, sounds, models, music, etc here!
Shaders (GLSL) and SNDINFO questions also go here!
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
User avatar
moonlighter74
Posts: 42
Joined: Thu Dec 18, 2025 7:35 am

[SOLVED] How to use Translation to change the color of Sprite that has too many colours?

Post by moonlighter74 »

So I got my sprite Runner Alien that I want to use to make ally version, just change color to sort of yellow. But notice how many colours this sprite use

Code: Select all

//Color pattern according to Doom color-range of 255-colours.

0.0 a little but on the tail
1.1 almost on the entire body
2.2 front legs, back legs, tail, and neck
5.5 very little on the jaw
6.6 literally a dot on the face
7.7 some
8.8 quite a lot on the tail
59.59 outline of the top of the head
63.63 same outline
76.76 a small part on the head
77.77 very little on the head
165.165 a lot on the head
166.166 a lot on the head
167.167 a little on the head
218.218 line on the head
237.237 a little but a line on the head
238.238 spots on the head, neck, and one on the tail
239.239 most of the body: torso, butt, front legs and paws, neck, and some parts of the head.
I tried to do this

Code: Select all

translation "239:70=238:69;237:68=165:167;71:73=218:74;63:75=59:76;0:8:65=73"
But to no effect
User avatar
moonlighter74
Posts: 42
Joined: Thu Dec 18, 2025 7:35 am

Re: [SOLVED] How to use Translation to change the color of Sprite that has too many colours?

Post by moonlighter74 »

I solved, you have to do just like this:

Code: Select all

translation "237:239=162:164,165:167=182:189,218:218=173:177,63:63=65:77,59:59=65:77,1:8=161:163"
User avatar
Enjay
 
 
Posts: 27600
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: [SOLVED] How to use Translation to change the color of Sprite that has too many colours?

Post by Enjay »

Glad you got it sorted. For future, you might be interested to know that Slade has a translation generator where you can pick colour ranges and translate them in the various ways that are possible. It will generate the code text that you can then use in your own project. It's a little fiddly but once you get the hang of it, it can be really useful.
User avatar
moonlighter74
Posts: 42
Joined: Thu Dec 18, 2025 7:35 am

Re: [SOLVED] How to use Translation to change the color of Sprite that has too many colours?

Post by moonlighter74 »

Enjay wrote: Wed Jan 14, 2026 4:57 pm Glad you got it sorted. For future, you might be interested to know that Slade has a translation generator where you can pick colour ranges and translate them in the various ways that are possible. It will generate the code text that you can then use in your own project. It's a little fiddly but once you get the hang of it, it can be really useful.
Slade had that? Pretty good, thank you
User avatar
moonlighter74
Posts: 42
Joined: Thu Dec 18, 2025 7:35 am

Re: [SOLVED] How to use Translation to change the color of Sprite that has too many colours?

Post by moonlighter74 »

Altrought I don't where that feature is
User avatar
Enjay
 
 
Posts: 27600
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: [SOLVED] How to use Translation to change the color of Sprite that has too many colours?

Post by Enjay »

Yep. Right click on a sprite - graphics/colour remap

Image
User avatar
moonlighter74
Posts: 42
Joined: Thu Dec 18, 2025 7:35 am

Re: [SOLVED] How to use Translation to change the color of Sprite that has too many colours?

Post by moonlighter74 »

Enjay wrote: Thu Jan 15, 2026 5:56 am Yep. Right click on a sprite - graphics/colour remap
Oh yes, I see it now, but that doesn't create a new recolored sprite? Translation is good because it exempts from creating new sprites that are just colour change
User avatar
Enjay
 
 
Posts: 27600
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: [SOLVED] How to use Translation to change the color of Sprite that has too many colours?

Post by Enjay »

It can alter the sprite (I think), but only if you tell it to. I've never used it to do that.
Otherwise you can just copy the translation string at the bottom of the editor and paste that into your project.
User avatar
moonlighter74
Posts: 42
Joined: Thu Dec 18, 2025 7:35 am

Re: [SOLVED] How to use Translation to change the color of Sprite that has too many colours?

Post by moonlighter74 »

Enjay wrote: Thu Jan 15, 2026 6:11 am It can alter the sprite (I think), but only if you tell it to. I've never used it to do that.
Otherwise you can just copy the translation string at the bottom of the editor and paste that into your project.
Oh that's smart
User avatar
Enjay
 
 
Posts: 27600
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: [SOLVED] How to use Translation to change the color of Sprite that has too many colours?

Post by Enjay »

Just for completeness, I just checked.

If for some reason you did want to actually alter the sprite, you'd click OK in the colour remapper and then choose to save the changes in the sprite like you would when altering any other entry in a WAD/PK3 using Slade.

If you don't save the changes to the sprite, then they are simply forgotten about.

If you just want a translation string, you can either copy the string directly from the colour remapper, or save it to a text file using the "save to file" option at the bottom.
User avatar
moonlighter74
Posts: 42
Joined: Thu Dec 18, 2025 7:35 am

Re: [SOLVED] How to use Translation to change the color of Sprite that has too many colours?

Post by moonlighter74 »

Enjay wrote: Thu Jan 15, 2026 6:23 am Just for completeness, I just checked.

If for some reason you did want to actually alter the sprite, you'd click OK in the colour remapper and then choose to save the changes in the sprite like you would when altering any other entry in a WAD/PK3 using Slade.

If you don't save the changes to the sprite, then they are simply forgotten about.

If you just want a translation string, you can either copy the string directly from the colour remapper, or save it to a text file using the "save to file" option at the bottom.
Yes, I'm utilizing that now

Return to “Assets (and other stuff)”