Back to the Korax Forum Archives


Forum

Colour translations

Mon, 31 Mar 2008 09:41:21

Crimson Wizard

Well, this question if for Firebrand, how do you do colour translations? There are 2 methods I met in KA progs, first is old one which uses some calculations right in progs code, another new one which calles predefined map scripts; last one is made for flags in CTF, this implementation looks ugly, yet it works. Aren't there a way to make this without calling map script? Why can't we call same functions from progs? Anyway, what's the algorythm to make a translation?
Mon, 31 Mar 2008 13:56:15

Firebrand

[quote="Crimson Wizard":22txk3ia]how do you do colour translations? There are 2 methods I met in KA progs, first is old one which uses some calculations right in progs code, Yep, as you said there are 2 different methods (3 if you count DECORATE translations, but this aren't worth to mention IMO, if you want me to explain them, just let me know <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->), the first method (which isn't meant for translations other than the player ones) involves creating the translations by hand using a pallete.pcx file, which is then turned to a special lump in the basepak.pk3 using dj_jl's vlumpy tool, you can look the syntaxis in the basepak.ls file in the KA progs if you are curious. [quote="Crimson Wizard":22txk3ia]Anyway, what's the algorythm to make a translation? For the first method, once this lump is created you can use translations for specific player classes by simply assigning translation colours in the Hexen pallete, for example, if you look at the PlayerFighter class you'll find these two properties:
	TranslStart = 246;
	TranslEnd = 254;
These are the pallete colour entries that are "colorized" in the game, each class has these, in the engine these are known as "Default translation", but they can't be used for anything else than players. [quote="Crimson Wizard":22txk3ia]another new one which calles predefined map scripts; last one is made for flags in CTF, this implementation looks ugly, yet it works. Aren't there a way to make this without calling map script? Why can't we call same functions from progs? The second type is the script translations, for which you can get more info in the two following links <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->: [url:22txk3ia]http://www.zdoom.org/wiki/Thing_SetTranslation [url:22txk3ia]http://www.zdoom.org/wiki/CreateTranslation These are the two main ways of doing script translations. The ACS functions use engine methods to translate colours, Janis recommended the second method for CTF flags in KA, that's why the implementation is like that, I don't like it either, but if there's an easier method I'd like to hear it too, since translations are going to be really used in KRPG IMO <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->.

Back to the Korax Forum Archives