Repeating Skyboxes and light effects. Headache and Question

Ask about mapping, UDMF, using DoomBuilder/editor of choice, etc, here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Post Reply
User avatar
Khordor
Posts: 7
Joined: Wed Mar 14, 2018 3:58 pm
Contact:

Repeating Skyboxes and light effects. Headache and Question

Post by Khordor »

Hello friends,

I am fairly new to using Decorate and all that stuff on Doom, though I know how to use for mapping the scripting part is getting me fairly confused in some aspects. One of my problems is that after applying a custom skybox to the MAPINFO it kinda just repeats itself, the skybox in question is one I got from the Daggerfall resources, its a mountain at dawn, so when you look up you see more mountains.
Spoiler:
Another thing is, I wanted to do some kinda of candle light effect to one of my maps or something like it so it can lit a dark map. A quick research and I found out about GLDEFS but I am not sure how to do it exactly, so I would like more guidance on that
Spoiler:

I am mainly using SLADE3 to do the map editing and everything else since it has pretty much all I would need I guess
User avatar
ramon.dexter
Posts: 1562
Joined: Tue Oct 20, 2015 12:50 pm
Graphics Processor: nVidia with Vulkan support
Location: Kozolupy, Bohemia

Re: Repeating Skyboxes and light effects. Headache and Quest

Post by ramon.dexter »

Soo, the first thing with the skytexture - I found out that when the texture is 128 px high, it tiles exactly like this (I was actually playing with this same daggerfall skytexture :) ). I found out that it tiles correctly when its 512x140px. So you have to manually correct the sky textures to have this dimensions to work correctly.

For the second part: Yes, you need to learn the gldefs definition. But dont worry, Its easier than decorate/zscript. For this, I hardly advise you to move from decorate to zscript. Besides its basically the same as decorate, its far more mightier. The differences are that every line has to end with ; and the actor properties goes into Default{} block, plus some new conventions (like changing flags - you dont need to use function to change flag, zscript has direct access to flags).

So, the gldefs is easy. Here is small example of gldefs light:

Code: Select all

flickerlight FireMedium //flickerlight means it will flicker. Otherwise you can use Pointlight, SectorLight or Pulselight
{
	color 0.9 0.8 0.0 //describes itself, its R-G-b code
	size 32 //size 1
	secondarysize 16 //since it flickers, you have to define the second size, to which it flickers
	chance 0.2 //chance, how frenquetly it flicks. Lower are good for fires.
	offset 0 4 0 //offset. This is relative to a thing's sprite, not the world, so the Y axis is height and the Z axis is depth (x-y-z)
}
So, you have two ways of assigning the light to the actor. The older way is via gldefs:

Code: Select all

FlickerLight FLARE
{
    color 1.0 0.3 0.3
    size 42
    secondarySize 40
    Chance 0.05
    offset 0 16 0
}

object ActiveFlare
{
    frame FLAR { light FLARE }
}
The newer way is to define the light in decorate/zscript:

Code: Select all

actor skynetFire3  21021
{
	//$Category "Decorations"
	//$Title skynet Fire 3
	
	-SOLID
	+UseSpecial
	
	scale 1
	Radius 16
	Height 18
	ActiveSound "world/smallfire"
	
	States
	{
		Spawn:
		Active:
			SKF3 ABCD 4 Bright Light("FireMedium") //just put "light" in the end (even behind "bright") and name of the light you've defined in gldefs
			Loop
	}
}
You can read more here:
https://zdoom.org/wiki/GLDEFS

I hope I have helped you :)
User avatar
Khordor
Posts: 7
Joined: Wed Mar 14, 2018 3:58 pm
Contact:

Re: Repeating Skyboxes and light effects. Headache and Quest

Post by Khordor »

Hmm, I will study GLDEFS a little before I attempt anything, thanks ! As for the skybox, I don't think the problem is the height of it or anything, I used a vanilla one in the second map and the same thing happened, I think its something with my mapinfo maybe ? my hitch is the forcenoskystrech part
Spoiler:
Spoiler:
It was indeed the Forcenoskystrech part that was messing up my skyboxes
Post Reply

Return to “Mapping”