Automatically Setting Skybox According to IWAD

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
P.Rex
Posts: 54
Joined: Sun May 15, 2016 12:32 pm
Preferred Pronouns: They/Them
Contact:

Automatically Setting Skybox According to IWAD

Post by P.Rex »

I've created a set of skyboxes representing different weathers and times of day to replace the vanilla sky textures in Doom2, Heretic and Hexen. To keep things simple, I want to be able to use the same PK3 file across all games. The skyboxes are defined as follows:

GLDEFS file:

Code: Select all

skybox SkyDawn
{
SDAWN_N
SDAWN_E
SDAWN_S
SDAWN_W
SDAWN_T
SDAWN_B
}
skybox SkyNight
{ 
SNGTA_N
SNGTA_E
SNGTA_S
SNGTA_W
SNGTA_T
SNGTA_B
}
skybox SkyNight2
{ 
SNGTB_N
SNGTB_E
SNGTB_S
SNGTB_W
SNGTB_T
SNGTB_B
}
skybox SkyDusk
{ 
SDUSK_N
SDUSK_E
SDUSK_S
SDUSK_W
SDUSK_T
SDUSK_B
}
skybox SkyFog
{
SDAY_N
SDAY_E
SDAY_S
SDAY_W
SDAY_T
SDAY_B
}
What I would like to do is implement a system which determines automatically which IWAD I'm playing the mod with and set the skybox accordingly. So for example: if I'm playing Doom 2, I want RSKY1 = SkyDawn, if I'm playing Heretic, SKY1 = SkyFog, and if I'm playing Hexen, SKY1 = SkyDusk, without having to create a separate PK3 to run with each game. Hexen is also problematic because the SKYWALL textures don't get along with skyboxes, so in the Shadow Wood levels for example the SKYWALL textures appear against a completely black sky. The spinning SKYFOG2 texture in the Darkmere level, when replaced with a skybox, also causes the skybox to spin, which is another problem I'd like to eliminate.

Is it even possible at all to do any of this? Any help would be appreciated.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Automatically Setting Skybox According to IWAD

Post by _mental_ »

It's possible using lump filtering. You need 3 GLDEFS lumps with the same name for skybox but different textures depending on IWAD.
User avatar
P.Rex
Posts: 54
Joined: Sun May 15, 2016 12:32 pm
Preferred Pronouns: They/Them
Contact:

Re: Automatically Setting Skybox According to IWAD

Post by P.Rex »

Alright! Filtering works great. Now, is there any way within the same PK3 I can stop the skies in Hexen from rotating?
Locked

Return to “Editing (Archive)”