Skyboxes across games (F_SKY/F_SKY1)

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.

Skyboxes across games (F_SKY/F_SKY1)

Postby eharper256 » Wed Feb 03, 2021 4:18 pm

So, I've a made a testing map for my mod that works across all three games (Doom, Heretic and Hexen) by being divorced of all iwad content.

I have a single problem though. My ceiling in the map is set to be F_SKY1 so that GZDoom creates the sky for it. This is fine and works well when the map is called in Doom and Heretic. But Hexen shows us the cyan and white squares.

Obviously, looking this up it seems Hexen instead recognises F_SKY instead of F_SKY1.

So how do I apply both at once to the same map so it is recognised regardless of the game?

Or is it something I must create a skybox for? (and is a Skybox always using F_SKY1, or is that rule discarded again in Hexen?)

I tried adding a SkyPicker object to all the relevant sectors (with no arguments, so it will use the MAPINFO one), but that seems to have no effect.
Last edited by eharper256 on Fri Feb 19, 2021 5:36 pm, edited 3 times in total.
User avatar
eharper256
Author of Hexen: Walpurgis
 
Joined: 25 Feb 2018
Location: UK

Re: Making a sky in a level work across Heretic, Doom and He

Postby Mikk- » Wed Feb 03, 2021 4:35 pm

You can create a text lump called MAPINFO and insert this code:
Code: Select allExpand view
gameinfo
    
{
    
SkyFlatName "F_SKY1"
    


and that should solve your issue.
User avatar
Mikk-
yooooooooooo
 
Joined: 30 Jun 2009
Location: Somewhere off Kanagawa
Discord: Mikk0451#3922

Re: Making a sky in a level work across Heretic, Doom and He

Postby eharper256 » Wed Feb 03, 2021 4:42 pm

Mikk- wrote:You can create a text lump called MAPINFO and insert this code:
Code: Select allExpand view
gameinfo
    
{
    SkyFlatName = "F_SKY1"
    


and that should solve your issue.

Genius.
For some reason I didn't think of checking for a GAMEINFO setting, even though I've been editing mine several times over the last few weeks. Super derp. :shotty:

Nevertheless, thanks Mikk.
User avatar
eharper256
Author of Hexen: Walpurgis
 
Joined: 25 Feb 2018
Location: UK

Re: Making a sky in a level work across all games

Postby eharper256 » Fri Feb 19, 2021 5:35 pm

I'm re-opening this query because actually the above doesn't fully work after all.

Or rather, it fixes my universal level, but muggins here didn't actually test with the actual vanilla Hexen Campaign IWAD until today. Which this now breaks as all the vanilla skies are using F_SKY, of course.

I tried putting SkyFlatName = "F_SKY1", "F_SKY"
to see if I could have multiple entries, but obviously no dice.
User avatar
eharper256
Author of Hexen: Walpurgis
 
Joined: 25 Feb 2018
Location: UK

Re: Skyboxes across games (F_SKY/F_SKY1)

Postby eharper256 » Wed Feb 24, 2021 3:24 pm

So considering I've still not seen a solution to this, I'm guessing making a skybox is going to be the only way forwards.
User avatar
eharper256
Author of Hexen: Walpurgis
 
Joined: 25 Feb 2018
Location: UK

Re: Skyboxes across games (F_SKY/F_SKY1)

Postby Graf Zahl » Thu Mar 04, 2021 3:35 pm

This is fundamentally unsolvable. Internally the engine checks a single variable named "skyflatnum", so it can only contain one name. Unfortunately both Hexen and Strife chose different ones so you cannot make such a map universal without affecting other maps.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Skyboxes across games (F_SKY/F_SKY1)

Postby eharper256 » Thu Mar 04, 2021 3:55 pm

Graf Zahl wrote:This is fundamentally unsolvable. Internally the engine checks a single variable named "skyflatnum", so it can only contain one name. Unfortunately both Hexen and Strife chose different ones so you cannot make such a map universal without affecting other maps.

Figured as much; I hit a brick wall awhile ago with it, thanks for the confirmation, Graf.

Well I guess we're going with the workaround option.

For reference for anyone with the same query, what this involves is including a second copy of the testing map with F_SKY instead of F_SKY1, and then writing a section like this in my menu:
Code: Select allExpand view
Optionmenu "Testing Map"
{
   Title "Testing Map"
   StaticText "____________________________________________________________"
   IfGame(Doom, Heretic)
   {
   Command ">>Go to The Testing Map<<",         "Testaccess" //calls the alias set in KEYCONF
   }
   IfGame(Hexen)
   {
   Command ">>Go to The Testing Map<<",         "Testaccess2" //alternate call, map has F_SKY instead of F_SKY1
   }
   StaticText "------------------------------------------------------------"
   StaticText "Press this to immediately commence the testing map!"
   StaticText "This map works irregardless of what game you are currently in!" //Actually it doesn't lol. LIES!!!
   StaticText "------------------------------------------------------------"
   StaticText "Change class before activating this by using the below toggles.", "Gold"
   Command "Set Class to Myrmidon", "set playerclass \"Baratus the Myrmidon\""
   Command "Set Class to Crusader", "set playerclass \"Parias the Crusader\""
   Command "Set Class to Magister", "set playerclass \"Daedolon the Magister\""
   Command "Set Class to Druid", "set playerclass \"Illitheya the Druid\""
}

It would be nice if the variable could be altered to an array or such, but that's not going to happen. :lol:
User avatar
eharper256
Author of Hexen: Walpurgis
 
Joined: 25 Feb 2018
Location: UK

Re: Skyboxes across games (F_SKY/F_SKY1)

Postby Rachael » Thu Mar 04, 2021 3:57 pm

Maybe a possible solution for a universal sky (as a feature request) is to have a surface flag (be it floor or ceiling) that marks it as a sky.

Bonus points: The texture in the sky can then be the texture as defined in said flat - like how it works in Build. :)

--

Other than that though you might also be able to change textures in the level to the current sky texture using an event handler in ZScript, as well.
User avatar
Rachael
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Skyboxes across games (F_SKY/F_SKY1)

Postby eharper256 » Thu Mar 04, 2021 5:59 pm

Rachael wrote:Maybe a possible solution for a universal sky (as a feature request) is to have a surface flag (be it floor or ceiling) that marks it as a sky.

Bonus points: The texture in the sky can then be the texture as defined in said flat - like how it works in Build. :)
--
Other than that though you might also be able to change textures in the level to the current sky texture using an event handler in ZScript, as well.

Whilst a feature request of that sort might be nice; it would show immense hubris on my part to request that of the dev-team just to combat my one edge case. :lol:

Of course I'll not complain if Graf gets bored enough one day to implement it though; or if others can provide motive for it to be a better feature request than just 'I can't have multi-game compatible levels for a specific mod, waaa!'.

Maybe I'll come back to it at a later date; pot-pourri monster mode (mixing all three games monsters) is theoretically on the cards at a later date and if that works out, it could benefit from such a feature (maybe).

I honestly really liked the BUILD way of doing things. SECTOREFFECTORS were really versatile little widgets. I have a cache of olde levels somewhere on floppies that I can no longer access, lol.
---
I'm sure that there is some ZScript wizardry that can make it work for sure. But coding is by far my weakest field (I'm an artist and writer first and foremost) so I'll stick to my workaround for now. The Testmap is only 35 Kb, two of them in my pk3 isn't going to break the bank. :D
User avatar
eharper256
Author of Hexen: Walpurgis
 
Joined: 25 Feb 2018
Location: UK


Return to Mapping

Who is online

Users browsing this forum: No registered users and 0 guests