ACS IWad detection

Moderator: GZDoom Developers

Post Reply
User avatar
Ryan Cordell
Posts: 4349
Joined: Sun Feb 06, 2005 6:39 am
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia (Modern GZDoom)
Location: Capital of Explodistan

ACS IWad detection

Post by Ryan Cordell »

What I'm hopefully proposing as another feature for ACS, is a way for the game to detect which iwad you're using. I could imagine a few things that could be done with this, a weird example could be:

Code: Select all

SCRIPT 1 int mapnum (int iwad)
{
   if(iwad("Doom")==1)
   if(mapnum==13){ //Which would be E1M3 if you use Doom as an IWAD
      <insert commands and such here>
     }
}
What it could be used for is that it checks upon which IWad you are using currently, if the user is using the right wad that the script checks for, and when he steps into a certain map plotted for that IWad, it can/could execute a set of commands. More common of a usage would be without editing any other maps but being able to add to them with this method.

Another way could be is if it could even check for nomal wads, not just iwads, so if there was something also like:

Code: Select all

SCRIPT 1 int mapnum (int wad)
{
   if(wad("claust")==1)
   if(mapnum==13){ //Which would be map 13 of the wad, if it's a Doom 2 config type.
      <insert commands and such here>
     }
}
Any chance there could be something like this?
User avatar
Wills
Posts: 1446
Joined: Mon Jan 10, 2005 7:01 pm
Location: The Well of Wishes

Post by Wills »

Shouldn't it be

Code: Select all

(int mapnum, int wad)
?

I don't know maps that could be played with more than one IWAD, unless you want to change all the sidedef textures and things and stuff depending on if you're playing Heretic, Hexen, or Doom. I don't really see a need for this, though.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49237
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Wills wrote:Shouldn't it be

Code: Select all

(int mapnum, int wad)
?

I don't know maps that could be played with more than one IWAD,

Precisely. This is merely of theoretical interest so the outcome is obvious, isn't it?
User avatar
Ryan Cordell
Posts: 4349
Joined: Sun Feb 06, 2005 6:39 am
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia (Modern GZDoom)
Location: Capital of Explodistan

Post by Ryan Cordell »

JDoom's DED language had something of the sort, for ambient packs, enviroment packs and so on.

Sides, I'm not sure how those int stuff goes, last time I tried it booted at me with an error. :lol:
But that's long past now, because the way I see it, (int mapnum) could serve as checking for which map of ANY wad/iwad your on and that's where I was thinking of how (int iwad) or (int wad) could step in.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49237
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Blade Nightflame wrote:JDoom's DED language had something of the sort, for ambient packs, enviroment packs and so on.

Such add-ons rarely need ACS scripts. Besides, if you feel the need to force new stuff into existing maps better use a port which is designed to do exactly this. Zdoom isn't it.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”