Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
odysseyofnoises

Changing Radiation Suit Palette in GZDoom

Recommended Posts

I'm trying to make it so that the radiation suit colors the player's screen blue (for a potential underwater effect) instead of the standard light green. Colorizing palette 14 works for chocolate doom and PrBoom-plus, but as ZDoom/GZDoom uses some custom palette system, I've hit a bit of a brick wall there. I've tried using the following DECORATE script to no avail:

 

Actor RadSuitBlue : RadSuit replaces RadSuit
{
    Powerup.Color BlueMap
}

 

Any suggestions? Is what I'm trying to do possible at all in GZDoom?

Share this post


Link to post

You need to make an actor that inherits from PowerIronFeet (called, for example, PowerBlueFeet) and put your Powerup.Color BlueMap there. Then, in your actor that inherits from RadSuit put Powerup.Type "BlueFeet".

Share this post


Link to post

I tried this (not sure if this is what you meant), but it still doesn't work:

 

Actor PowerBlueFeet : PowerIronFeet
{
    Powerup.Color BlueMap
}

Actor RadSuitBlue : RadSuit replaces RadSuit
{
    Powerup.Type "PowerBlueFeet"
}

 

When using the IDBEHOLDR cheat, it just tints the screen the standard color, and when picking up an actual radiation suit, the palette doesn't change color at all.

Share this post


Link to post

I'm afraid idbeholdr will always give the standard radiation suit. The replaces effect only works on stuff that is physically spawned in the map; things added directly to the inventory aren't affected.

 

Instead of BlueMap, try

Actor BlueSuit : RadSuit replaces RadSuit { Powerup.Color 0, 0, 255, 0.125 }

It worked for me.

Share this post


Link to post

Maybe, instead of using the original radsuit you could also make a sprite for a blue radsuit to differentiate between them, for example

tgebxxK.png

Actor BlueSuit : RadSuit 16666
{
//$Category PowerUp
Powerup.Color 0, 0, 255, 0.125
states
  {
  Spawn:
    BSUT A -1
    Stop
  }
}
Spoiler

N1w3pxb.png

 

Spoiler

fV6oGsd.png

 

Share this post


Link to post

I think that change would be too subtle for most players to notice, but more to the point, the whole reason I'm doing this is to be able to swap palettes in vanilla on-the-fly. In fact, I wish there were a way not to show the radiation suit sprite at all, as well as remove the pickup sound, because when the player goes underwater, it should be completely seamless. One serious limitation to this system is that the player cannot be allowed to get out of an underwater area, since there's no way to "cancel" the radiation suit effect and revert to palette to standard one. In addition, the way GZDoom does the blue tinting looks much worse than in vanilla surprisingly, so I also wish there were a way to truly colorize the palette directly instead of just applying a fake-looking blue tint. To put it short, the whole radiation suit thing is just a big palette-swap gimmick with a whole host of limitations.

Share this post


Link to post

Oh, you want a blue tint whenever the player is under water? A blue radsuit is an awkward way to achieve that. There are several way to make underwater sectors colored, and they all have theirs benefits and problems.

You could use a swimmable 3D Floor with colored lighting in the control sector.

You could use Transfer Heights flagged as swimmable with WATERMAP as the lower texture on the control line.

You could put a WaterZone Thing in each underwater sector, and use colored lighting to make it look like you are under water.

 

With any of these, the green color of the radsuit (which would still be handy to help them last longer before drowning, like a diving suit) would only be a minor contribution to the colors the player sees.

Share this post


Link to post

As I mentioned, this system is intended to work with vanilla (though I still wanted to make sure that what I was doing also worked in GZDoom, since it would be weird to have a vanilla-exclusive feature). The whole point of what I'm trying to accomplish here is to build a wad that runs in Chocolate Doom which is completely indistinguishable from a ZDoom wad. I was inspired when I played hydra.wad, which essentially does the same thing, and I thought, "What other crazy ZDoom-like features could I add that work in vanilla?" Anyways, I think the solution I've worked out is optimal, as it's the only one possible given the constraint of having to work in vanilla.

Share this post


Link to post

The thread title says "Changing Radiation Suit Palette in GZDoom" and the first post shows DECORATE code that you had tried. Naturally, I concluded that you were making a mod for GZDoom. The transfer heights method I mentioned should work in Boom, at least.

 

OK, how abut this: Use Sector_SetColor in an ACS script. (G)ZDoom will run the script and set the color, and your other method will still work as well as it did before in vanilla. Also, don't use pure blue. I have found that an RGB of 2266FF (34 red, 102 green, and 255 blue) with no desaturation looks great for underwater. Those numbers are the result of a lot of trial-and-error to find the just-right color that looks good in Zandronum's GL mode and software mode alike.

 

Then again, I am also using Sector_SetFade with the values of 0 red, 8 green, and 32 blue, which makes GL mode look even better, but doesn't work in software mode.

Share this post


Link to post

You're right about the thread title being deceptive in that way. Anyways, since I haven't actually built any sectors for it yet, I'll keep SetColor in mind for when I build the map. I'll also keep in mind not to use regular blue and will try using the colors you've suggested. Thanks for that.

Share this post


Link to post

Actually, I'm afraid I may need a bit more assistance here, as the ACS script isn't running. Here's what I have:

 

#include "zcommon.acs"

 

Script 1 Enter
{
    Sector_SetColor(2, 34, 102, 255);
}

 

Note that I've also tried "Open" instead of "Enter," to no avail. I made sure to place the SCRIPTS file containing that text right above the lump named MAP01. I don't think the script will run unless the map is in ZDoom format, but I just wanted to make sure that's really the case and that I'm not doing anything wrong elsewhere. If it is the former, then I'm going to have to go back to the radiation suit approach.

Share this post


Link to post

Yeah, I don't know -- it's not working. I think I'm just going to go back to using the crappy radiation suit method because this is just way more work than I'm willing to put into it. Thanks anyway.

Share this post


Link to post

In case anyone is curious, attached is the final result from this, admittedly somewhat unsuccessful, experiment. This test map also includes some of the other features I made. Since I don't know if I'll ever get around to it, if somebody wants to make a proper vanilla-compatible, ZDoom-like map using some of this stuff, feel free to do so. One thing that's notably wrong is that the cyberdemon and spiderdemon drop items upon dying; that's something I haven't gotten around to fixing yet. In terms of this thread, my conclusion is that the underwater thing is just far too buggy, gimmicky, and limited, so I wouldn't recommend using it in a real map.

freezerifle.zip

Share this post


Link to post

If you wanted the effect to work in vanilla, you couldn't implement it in either ACS or DECORATE, as vanilla doesn't support them. Precisely, upon encountering them, vanilla would ignore them, but not crash, therefore they could be used to "enhance" a vanilla compatible wad with effects that would only appear when playing the wad in ZDoom.

Edited by scifista42

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×