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

Colored Lighting?

Recommended Posts

Which source port level editor allows for putting colored lights in sectors? Is there a .wcf or config file I can download to use with WA to do this?

Share this post


Link to post
Fredrik said:

If you mean for ZDoom, then the easiest way is using scripts (or via the related line trigger).

That would work, but do any other source port level editors allow for colored lighting, or only ZDoom? In which case, would ZETH be best or what is, objectively, the most optimal ZDoom editor?

Share this post


Link to post
Job said:

That would work, but do any other source port level editors allow for colored lighting, or only ZDoom? In which case, would ZETH be best or what is, objectively, the most optimal ZDoom editor?


For ZDoom you can use any editor that supports the Hexen map format and that is sufficiently configurable.

WadAuthor and DeepSea work too. My recommendation, however is WinZeth. It doesn't have the DOS problems of the original but works the same. DoomBuilder may also be an option but it is still in development.

Other source ports that support colored light are jDoom and Legacy but in both cases it is much more complicated to add colored light than in ZDoom.
The only problem in ZDoom is that the SetColor function is implemented in a way that makes it impossible to place it directly into the map without using some tricks. But then, scripting is one of the major reasons to use ZDoom so I don't think it's that bad. A little script like
[code]script 1 OPEN

{
Sector_SetColor (11, 0, 0, 255);
Sector_SetColor (17, 0, 255, 0);
Sector_SetColor (18, 255, 0, 0);
Sector_SetColor (19, 255, 128, 0);
Sector_SetColor (21, 255, 0, 255);
Sector_SetColor (25, 255, 255, 0);
}
[/code}

isn't really that bad, is it? I don't think that using control linedefs (standard Boom method) to do this thing is easier.

Share this post


Link to post

I don't think WinZeth was in the utilities area here at DW. Did I miss it? Also, how do you actually put the ACS for the lighting in the level? I'm not sure how to open up the dialogue or whatever does it. Thanks for the tips, by the way. I'd really like to be able to do that in DoomBuilder sometime, it's a great editor. :)

Share this post


Link to post

You can actually make a coloured sector in Zdoom using the editor. No need for scripts.

In traditional level format, it is easy enough.

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.

In ZdoomHexen mode, use an undocumneted feature.

Make a line type 190. Set arg1 to the tag of the sector you want to affect, then set arg2 to 1. Now put a colour number on the upper texture just like above.

This line type 190 is actually what zwadconv does if you use it to convert a traditional map using a type 334. I did ask Randy why the second arg has to be set to 1. His reply was something like setting it to 1 identifies that the lighting is changing. He thought other values might change gravity or wind, but couldn't remember at the time.

Whatever, line type 190 is essentially a catch all used for converting a traditional map format feature that is meant to be done in other ways in Hexen format maps. However, it works just fine if you put it into a map yourself.

Share this post


Link to post

Excellent. Is there a place to download WinZeth? Also, can the colored light option you (Enjay) suggested be done in DoomBuilder (I don't even know if DoomBuilder can edit for ZDoom -- it just says Legacy or Boom)?

Share this post


Link to post

WinZeth is still a work in progress. There are a couple of threads dedicated to it over at the Zdoom editing forums. Early reports seem very promising. http://zdoom.org/forum/index.php

DoomBuilder - dunno. Again a work in progress, so I guess it's just a matter of time if it isn't already possible. I'm sure Zdoom support is on the priority list.

Edit: Oooh, just found this in the rh-log.txt file that comes with the zdoom source.

December 25, 1998
- Added Static_Init special (190) to handle BOOM-like control linedefs for
setting sector properties (at the moment: color, fog, damage, and gravity)
at level load time.


Now, if I only knew enough about the source, I might be able to find where this is and work out what the other options are. Help anyone?

Share this post


Link to post

Another way to do it is to use Sector_SetColor directly in the map. Give a linedef the Sector_SetColor special and set the tag and colours as normal. If you use tag 0, then the sector the linedef is facing gets coloured.

Share this post


Link to post
The Ultimate DooMer said:

Another way to do it is to use Sector_SetColor...


Hmmm, just tried this. It does work, but it seems to need to be activated. Line type 190 colours the sector automatically at level start, whereas 212 (Sector_SetColor - I think) needs to be crossed/used/shot whatever to colour the sector. Also, when I set it to tag 0 it coloured every sector on the level with tag 0 (ie nearly all of them).

Share this post


Link to post
Enjay said:

You can actually make a coloured sector in Zdoom using the editor. No need for scripts.

In traditional level format, it is easy enough.

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.

In ZdoomHexen mode, use an undocumneted feature.

Make a line type 190. Set arg1 to the tag of the sector you want to affect, then set arg2 to 1. Now put a colour number on the upper texture just like above.

This line type 190 is actually what zwadconv does if you use it to convert a traditional map using a type 334. I did ask Randy why the second arg has to be set to 1. His reply was something like setting it to 1 identifies that the lighting is changing. He thought other values might change gravity or wind, but couldn't remember at the time.

Whatever, line type 190 is essentially a catch all used for converting a traditional map format feature that is meant to be done in other ways in Hexen format maps. However, it works just fine if you put it into a map yourself.


I always thought that 334 sets the colormap (as does 242) not the light color. I don't know why I got that wrong as the code for this is quite clear about what it does.

Anyway, here's the other Static_Init (190) stuff (args only):

(tag, 0, -, -, -): Sets gravity in tagged sectors to length of linedef (333 in Doom style maps)
(tag, 2, -, -, -): Sets damage in tagged sectors to length of linedef (335 in Doom style maps)
(tag, 255, flip, -, -): Sets upper texture as sky in tagged sectors (These are the shockingly rarely used linedefs 271/272 from MBF!)

Admittedly, gravity and damage are rather useless if you are using a script but the sky stuff is rather cool (It's a shame that there are so few maps that have used it.)

As the name Static_Init says, these specials have to be put in the map and cannot be used in scripts.

Share this post


Link to post
Graf Zahl said:

Anyway, here's the other Static_Init (190) stuff (args only):

(tag, 0, -, -, -): Sets gravity in tagged sectors to length of linedef (333 in Doom style maps)
(tag, 2, -, -, -): Sets damage in tagged sectors to length of linedef (335 in Doom style maps)
(tag, 255, flip, -, -): Sets upper texture as sky in tagged sectors (These are the shockingly rarely used linedefs 271/272 from MBF!)


Cool, thanks for that. I had a feeling you might come up trumps with the code. I didn't even know the texture/sky thing existed.

Question: Waht does "flip" mean? I'm guessing you set it to 0 for no flip and 1 to flip. I'm also guessing the "flip" means reverse the texture on the sky, in the way that textures are normally reversed when shown on the sky (why is that BTW?). Yes? No?

Share this post


Link to post
Enjay said:

Cool, thanks for that. I had a feeling you might come up trumps with the code. I didn't even know the texture/sky thing existed.

Question: Waht does "flip" mean? I'm guessing you set it to 0 for no flip and 1 to flip. I'm also guessing the "flip" means reverse the texture on the sky, in the way that textures are normally reversed when shown on the sky (why is that BTW?). Yes? No?



Flip=1 (MBF 272) means that the texture used for the sky is flipped as is normally done for sky textures in Doom. flip=0 (MBF 271) means that the sky texture is used correctly.

Regarding 334 (Set Color), you can also set a fog color with this if you put a color value into the lower texture.

Share this post


Link to post
Graf Zahl said:

stuff


Thanks again. Makes sense, and sounds like a cool feature. I'll have to go try it. :-)

I did know about the line 334/fog but had forgotten.

Edit: OK, checked it all out and it works exactly as you said it would. The sky thing is especially cool.

Edit2: OK, just posted a thread about line type 190 and an example file over at the zdoom forum http://zdoom.org/forum/viewtopic.php?t=606

Share this post


Link to post
Guest
This topic is now closed to further replies.
Sign in to follow this  
×