Would possible that something check if the wad is runing with GZDoom or Skulltag?
Maybe a ACS function.
If (GetExecutable() == GZDOOM)
{
Print("Isn't Skulltag");
}
I know that this kind of feature need of a cooperative development between Graf and Torr.
This is possible?
Check if is GZDoom or Skulltag!
Moderator: Graf Zahl
-
- Posts: 179
- Joined: Wed Jan 04, 2006 2:52
- Location: Rio de Janeiro - BRAZIL
Check if is GZDoom or Skulltag!
So as you read this know my friends I'd love to stay with you all.
Please smile when you think of me. My body's gone that's all...
Please smile when you think of me. My body's gone that's all...
-
- Developer
- Posts: 3651
- Joined: Sat May 13, 2006 10:30
Re: Check if is GZDoom or Skulltag!
Actually, Randy would need to be involved to, and it's not so much cooperative development so much as reminding child port authors that it would need work in order to work.
So... I think this is more of an "Ask ZDoom"
Actually, I think what would be best for this feature is to simply use inheritance, i.e. if you're using Skulltag, it responds to "GZDoom", "Skulltag", and "ZDoom", whereas if you're only using GZDoom, it would respond to "ZDoom" and "GZDoom" only, etc. And of course, it would have to be called differently for that... if MyPortIsChildOf("GZDoom") for example. That's my opinion.
So... I think this is more of an "Ask ZDoom"
Actually, I think what would be best for this feature is to simply use inheritance, i.e. if you're using Skulltag, it responds to "GZDoom", "Skulltag", and "ZDoom", whereas if you're only using GZDoom, it would respond to "ZDoom" and "GZDoom" only, etc. And of course, it would have to be called differently for that... if MyPortIsChildOf("GZDoom") for example. That's my opinion.
-
- Posts: 179
- Joined: Wed Jan 04, 2006 2:52
- Location: Rio de Janeiro - BRAZIL
Re: Check if is GZDoom or Skulltag!
Sure! 
At least you got the point! ^^

At least you got the point! ^^
So as you read this know my friends I'd love to stay with you all.
Please smile when you think of me. My body's gone that's all...
Please smile when you think of me. My body's gone that's all...
-
- Developer
- Posts: 1399
- Joined: Mon Oct 22, 2007 16:47
Re: Check if is GZDoom or Skulltag!
I guess you could try [zwiki]SpawnSpot[/zwiki]ting an FS_MapSpot.
This assumes that when SpawnSpot tries to spawn a class that doesn't exist, it fails gracefully and just spawns nothing (which means it returns 0).
Code: Select all
if (SpawnSpot("FS_MapSpot", 1337))
{
Print("We're in GZDoom!");
}
else if (SpawnSpot("PointLight", 1337))
{
Print("We're in Skulltag or maybe Vavoom or something.");
}
else
{
Print("We're in ZDoom!");
}
This assumes that when SpawnSpot tries to spawn a class that doesn't exist, it fails gracefully and just spawns nothing (which means it returns 0).
-
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
Re: Check if is GZDoom or Skulltag!
Wow! That's one crude hack... 
Of course you should not forget to delete such an actor afterward...
It does.

Of course you should not forget to delete such an actor afterward...
Gez wrote: This assumes that when SpawnSpot tries to spawn a class that doesn't exist, it fails gracefully and just spawns nothing (which means it returns 0).
It does.
-
- Posts: 179
- Joined: Wed Jan 04, 2006 2:52
- Location: Rio de Janeiro - BRAZIL
Re: Check if is GZDoom or Skulltag!
I doesn't understood the logic but all right.
So as you read this know my friends I'd love to stay with you all.
Please smile when you think of me. My body's gone that's all...
Please smile when you think of me. My body's gone that's all...
-
- Developer
- Posts: 4752
- Joined: Tue Aug 30, 2005 23:19
- Location: Scotland
Re: Check if is GZDoom or Skulltag!
I think the logic is to use spawnspot to try and spawn an actor that is specific to the various engines and check if the spawn is successful. If it is, you are using that engine. If the spawn is not successful, you are using a different engine.
-
- Posts: 179
- Joined: Wed Jan 04, 2006 2:52
- Location: Rio de Janeiro - BRAZIL
Re: Check if is GZDoom or Skulltag!
I did not know that such check was possible. Interresting...Gez wrote:if (SpawnSpot("FS_MapSpot", 1337))
Thank you Gez!
So as you read this know my friends I'd love to stay with you all.
Please smile when you think of me. My body's gone that's all...
Please smile when you think of me. My body's gone that's all...
-
- Posts: 41
- Joined: Sat Jun 24, 2006 10:21
Re: Check if is GZDoom or Skulltag!
And is going to fall apart once someone defines an FS_Mapspot in his decorate.txt.
-
- Developer
- Posts: 1399
- Joined: Mon Oct 22, 2007 16:47
Re: Check if is GZDoom or Skulltag!
Why would they?jengelh wrote:And is going to fall apart once someone defines an FS_Mapspot in his decorate.txt.
-
- Posts: 41
- Joined: Sat Jun 24, 2006 10:21
Re: Check if is GZDoom or Skulltag!
Jokewads or sheer ignorance. If I remember correctly, Ghoul's Forest also had some sort of — quite annoying — ZDoom-vs-GZdoom (more like software vs GL rendering) test.
-
- Developer
- Posts: 1399
- Joined: Mon Oct 22, 2007 16:47
Re: Check if is GZDoom or Skulltag!
Well.
1. There's no reason to define custom map spots. There are already enough of them.
2. Doubly so for anything that could be put in an autoload list.
3. If a mod uses this hack and defeats it at the same time, it's its own problem.
1. There's no reason to define custom map spots. There are already enough of them.
2. Doubly so for anything that could be put in an autoload list.
3. If a mod uses this hack and defeats it at the same time, it's its own problem.
-
- Developer
- Posts: 3651
- Joined: Sat May 13, 2006 10:30
Re: Check if is GZDoom or Skulltag!
Nevertheless, I think ZDoom and its child ports, and its neighbors too (Vavoom and whatnot), could benefit from such a function. It's still more likely though that you'll have to try the ZDoom forums to ask that.