Hi!
I need to know how create translation script and apply an actor like any monsters of Doom?
I want to create a random desaturated translation without typing a much much more
Translation script
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Re: Translation script
Have you checked these wiki pages?
[wiki]translation[/wiki]
[wiki]CreateTranslation[/wiki]
[wiki]Thing_SetTranslation[/wiki]
[wiki]translation[/wiki]
[wiki]CreateTranslation[/wiki]
[wiki]Thing_SetTranslation[/wiki]
-
- Posts: 9
- Joined: Sun Jan 15, 2017 1:14 am
Re: Translation script
Yes,but I need to know how the script works which I wrote yesterday
Re: Translation script
Translating colors to a desaturated variant isn't easy.
Basically, you need to start with a [wiki]TRNSLATE[/wiki] lump. Then you'll create a new translation in it, let's call it "desat". Then you will fill it with ranges to color gradient translations to change each range with a desaturated equivalent.
The tedious part is that Doom has a lot of discrete palette ranges. And even if you ignore those that have low saturation to begin with (0-15, 80-111, 168, 247, 248, 249, 250, 255) you still have a lot of discrete ranges to address.
So for example to desaturate the pink range, you'll have
Now you need to fill in with the RGB values of the start and end of the range, but desaturated. Color 16 is #ffb7b7, color 47 is #430000. Let's say you want 50% desaturation. You'll get #ffdbdb and #432222 (you can get these values with an image editing program's color selection window). So we get:
Now after the pink, you'll want to translate the tans. Same deal: start and end of range, desaturate colors.
You can skip the grays, but you'll need to cover the greens. And so on and on and on.
Basically, you need to start with a [wiki]TRNSLATE[/wiki] lump. Then you'll create a new translation in it, let's call it "desat". Then you will fill it with ranges to color gradient translations to change each range with a desaturated equivalent.
The tedious part is that Doom has a lot of discrete palette ranges. And even if you ignore those that have low saturation to begin with (0-15, 80-111, 168, 247, 248, 249, 250, 255) you still have a lot of discrete ranges to address.
So for example to desaturate the pink range, you'll have
Code: Select all
desat = "16:47=[]:[]"
Code: Select all
desat = "16:47=[255,219,219]:[67,34,34]"
Code: Select all
desat = "16:47=[255,219,219]:[67,34,34]", "48:79=[255,244,237]:[43,39,29]"
Re: Translation script
You can also do this to get the translation string for decorate, TRNSLATE or whatever.

Edit: @gez ah, pardon the misunderstanding.

Edit: @gez ah, pardon the misunderstanding.

Last edited by kodi on Mon Jan 16, 2017 11:26 am, edited 1 time in total.
Re: Translation script
The desaturation translation works by fully desaturating stuff, and then coloring it according to the range you give. If you want demons to become paler and grayer but still keep their colors (so imps are still brown and cacos are still red and blue) it won't work.