Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
NinjaLiquidator

Script that changes palette?

Recommended Posts

Hello, I want it to work like this: on start of Map there will be Pallete1. After crossing some line pallete changes to Pallete2, in similar way like scripts that change song (Valiant, Map27 recently). I wonder if that is possible. I will be glad for every solution, but prefer the one which will work also in PrBoom, not just Zdoom.

Share this post


Link to post
NinjaLiquidator said:

Hello, I want it to work like this: on start of Map there will be Pallete1. After crossing some line pallete changes to Pallete2, in similar way like scripts that change song (Valiant, Map27 recently). I wonder if that is possible. I will be glad for every solution, but prefer the one which will work also in PrBoom, not just Zdoom.


If you mean COLORMAP as oppose to palette (PLAYPAL), read on.

If you want it to work in PrBoom, then the only solution is Boom-based ones AFAIK, using linedef 242: http://doomwiki.org/wiki/Linedef_type#Property_transfer

For every sector that the player can stand in which you want to show a different colormap, you need to indvidually tag it and pair it with a control sector that has the same light level/floor/ceiling height. This is a lot of work for a complex map. I have some WadC stuff to make it trivial (if you were doing the whole level in WadC, which of course you are not ;)). I did have plans to write a tool to make it easy to select a collection of sectors and add control sectors and tagging automatically, but I haven't yet.

You haven't said whether you need the colormap different for existing sectors as well as newly-discovered ones after crossing the line. (Example: you have been in three rooms already. You cross a line into the fourth room. Easy(easier) is for fourth, fifth, sixth rooms etc. to have different colormap, but first, second, third to remain the same. Harder is for the colormap to change in the first rooms as well.)

This is much harder but not impossible. You basically need to create 'reservations' of light-levels that you cannot see/experience until a certain trigger, and then you can (by raising or lowering the light level everywhere) after wards. I used this to create coloured lights in vanilla doom http://jmtd.net/doom/colormap/ (note to self: that page is severely busted, the wad link is broken etc.). The same approach is used in the demo map as part of INKWORKS to mix fog and normal shadows in the same WAD.

Share this post


Link to post

Thanks, I really do not want something extra complicated - when I think about it, I dont even want the pallete to change by line. Just have one in Map01 and second in Map02. Thats maybe even easier?

Share this post


Link to post

If you're talking about changing actual palette (PLAYPAL), it's impossible.

If you're talking about changing colormap (COLORMAP), it's as easy as using the abovementioned linedef action. This solution is Boom compatible.

Share this post


Link to post

Lets say it simple - I want one map to be cyan. Not exact 00ffff, which is transparent. Cyan tones. Is that possible with COLORMAP or I need even PLAYPAL?

Share this post


Link to post

Every COLORMAP only uses color shades that already exist in PLAYPAL. And PLAYPAL can be only one in a wad and stay the same throughout. The best you can do is create a custom PLAYPAL with cyan range of colors (must replace some other colors, because you only have 256 indexes available), 1 default COLORMAP matching it, and 1 alternate COLORMAP which turns every color into cyan, then use the linedef action in your map to change the COLORMAP.

Share this post


Link to post

Keep in mind that once you make a PLAYPAL with cyan replacing default blue, you will never be able to see default blue anywhere in your wad anymore. Just to be clear, you've probably already understood it.

Share this post


Link to post

I am OK with 2 exact tones of cyan. So I replace only 2 colors. And it will not be blue, cause it would affect everything since blue is common. Maybe purple. Ill left one purple tile and one replace by cyan. :D

Share this post


Link to post

OK, hopefully you are aware that colors in PLAYPAL define all colors ever seen in the game, including color shades diminished by lesser light levels than full brightness, so that your 2-index-only cyan color will diminish rather unsmoothly.

Share this post


Link to post
NinjaLiquidator said:

Lets say it simple - I want one map to be cyan. Not exact 00ffff, which is transparent.

argh


Cyan isn't transparent, and it also isn't in the Doom palette at all. It's just an old convention used by some (but not all) tools to use cyan as a contrasting color; but others used magenta or whatever. If you edit the PLAYPAL, you can perfectly well get a pure cyan color in there and use it.

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  
×