Translation script

Archive of the old editing forum
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.
Locked
Tibi19920727
Posts: 9
Joined: Sun Jan 15, 2017 1:14 am

Translation script

Post 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
User avatar
Enjay
 
 
Posts: 26985
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Translation script

Post by Enjay »

Have you checked these wiki pages?

[wiki]translation[/wiki]
[wiki]CreateTranslation[/wiki]
[wiki]Thing_SetTranslation[/wiki]
Tibi19920727
Posts: 9
Joined: Sun Jan 15, 2017 1:14 am

Re: Translation script

Post by Tibi19920727 »

Yes,but I need to know how the script works which I wrote yesterday
Gez
 
 
Posts: 17941
Joined: Fri Jul 06, 2007 3:22 pm

Re: Translation script

Post 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.
User avatar
kodi
 
 
Posts: 1361
Joined: Mon May 06, 2013 8:02 am

Re: Translation script

Post 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:
Last edited by kodi on Mon Jan 16, 2017 11:26 am, edited 1 time in total.
Gez
 
 
Posts: 17941
Joined: Fri Jul 06, 2007 3:22 pm

Re: Translation script

Post 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.
Tibi19920727
Posts: 9
Joined: Sun Jan 15, 2017 1:14 am

Re: Translation script

Post by Tibi19920727 »

Thanks a lot :)
Locked

Return to “Editing (Archive)”