Page 1 of 1

Translation script

Posted: Sun Jan 15, 2017 1:51 am
by Tibi19920727
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

Re: Translation script

Posted: Sun Jan 15, 2017 11:31 am
by Enjay
Have you checked these wiki pages?

[wiki]translation[/wiki]
[wiki]CreateTranslation[/wiki]
[wiki]Thing_SetTranslation[/wiki]

Re: Translation script

Posted: Mon Jan 16, 2017 9:16 am
by Tibi19920727
Yes,but I need to know how the script works which I wrote yesterday

Re: Translation script

Posted: Mon Jan 16, 2017 10:38 am
by Gez
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

Code: Select all

desat = "16:47=[]:[]"
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:

Code: Select all

desat = "16:47=[255,219,219]:[67,34,34]"
Now after the pink, you'll want to translate the tans. Same deal: start and end of range, desaturate colors.

Code: Select all

desat = "16:47=[255,219,219]:[67,34,34]", "48:79=[255,244,237]:[43,39,29]"
You can skip the grays, but you'll need to cover the greens. And so on and on and on.

Re: Translation script

Posted: Mon Jan 16, 2017 11:02 am
by kodi
You can also do this to get the translation string for decorate, TRNSLATE or whatever.
Image

Edit: @gez ah, pardon the misunderstanding. :oops:

Re: Translation script

Posted: Mon Jan 16, 2017 11:23 am
by Gez
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.

Re: Translation script

Posted: Tue Jan 17, 2017 8:21 am
by Tibi19920727
Thanks a lot :)