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

GZDoom Builder issue! (colored lighting)

Recommended Posts

I decided to try to implement colored lighting. I could not find anything on Google save for a YouTube video on how to do it in Zdoom format in Doom Builder 2, but the author left out a lot of information and I had no idea what to do.

Share this post


Link to post

ZDoom in Doom format?

For some reason, I can't find this in the ZDoom wiki but...

Make a line type 334 and tag it to a sector. Put a HEX number on the upper side def of the line to represent the colour you want in the format RRGGBB - eg FF0000 is red.

Share this post


Link to post

You know how you give lines specials to do things and these lines have numbers associated with them? The number for the type of line you need is 334.

You know how when you make a switch that affects another sector, you give the switch a sector tag and give the sector the same tag? Do that.

You know how you can put a texture on the upper side of a line? Don't do that. Instead, put a number there. The number represents how Red Green and Blue the colour of the sector lighting will be. It's a hexadecimal number so FF is the biggest number you can have. FF0000 id red. 00FF00 is green. 0000FF is blue. FFFF00 is yellow etc.

I'll whip up a quick example.

[edit] Here you go:

http://www.mediafire.com/?fdpo7av8b7krn83

[edit2] I just checked in Doom Builder 2 (I made the map in DeePsea) and DB2 doesn't seem to know about line type 334 (that doesn't stop you using it BTW). With this missing from both the Wiki and DB2 I wonder if the ancient art of colouring sectors in ZDoom in Doom format has been forgotten?

Share this post


Link to post

Thanks, this really clears up a lot of confusion and eliminates the need to write a script. Can the amount of color be changed? For instance, if I wanted the red sector to only be 20% red?

Share this post


Link to post

Sure you can. It might take a bit of messing around with the values to get the colour that you want but it's quite flexible.

Just so you know, the numbers are all hexadecimal (base 16). The number 255 (the maximum for lots of stuff in Doom) is FF in hexadecimal. 128 is 80 in hexadecimal. So a line "texture" value of FF8000 would be the same as 255 red, 128 green 0 blue in a script - which gives the orange colour in the last coloured sector in the example map.

I find the quickest way to check a hex value is to enter the normal base 10 number (eg 255) into the Windows calculator in programmers view then change the calculator to read hex instead. You can also google for a decimal to hex converter (and you'll get loads of matches) or if you are comfortable counting in base 16 you can just work it out in your head.

You may also be interested to know that if you put a hex number on the lower side instead of the upper, it will create coloured fog instead.

Share this post


Link to post

Wow, I'm surprised that isn't documented anywhere. I always assumed you needed to use an ACS library to get colored lighting in Doom format maps. That should really be added to the wiki; it's definitely the best way of having colored lighting in cross-port wads (shame vanilla chokes on unknown line specials).

Share this post


Link to post

Enjay, I appreciate the advice, but you only seem to be talking about how to change color values when I want to adjust the TRANSPARENCY of the color value.

Share this post


Link to post

It can still be done by setting the colour values. Try thinking about it this way. FFFFFF would be normal full lighting. So, instead of making your red value FF0000 try keeping red at FF but only reduce the blue and the green to, maybe, DD. FFDDDD gives an effect that is a bit redder than an uncoloured sector but it's reasonably subtle.

Share this post


Link to post
Dragonsbrethren said:

Wow, I'm surprised that isn't documented anywhere. I always assumed you needed to use an ACS library to get colored lighting in Doom format maps. That should really be added to the wiki; it's definitely the best way of having colored lighting in cross-port wads (shame vanilla chokes on unknown line specials).


How it works is explained here; but the Doom-format linedef numbers aren't documented. One of the reasons being that they can be changed.

And vanilla doesn't choke on unknown line specials. It does, however, quit abruptly when the player enters a sector with an unknown type.

Share this post


Link to post
Gez said:

And vanilla doesn't choke on unknown line specials. It does, however, quit abruptly when the player enters a sector with an unknown type.

Huh, really? I could've sworn I had trouble when I ported a Boom map of mine over to vanilla and missed a few Boom line specials. That's great to know.

Edit: Still errors out trying to read the value as a texture, though. I'd have to include dummy textures for every color I use.

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
×