Page 1 of 1

ACS IWad detection

Posted: Sat Jul 29, 2006 9:46 am
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?

Posted: Sat Jul 29, 2006 9:51 am
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.

Posted: Sat Jul 29, 2006 9:58 am
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?

Posted: Sat Jul 29, 2006 10:00 am
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.

Posted: Sat Jul 29, 2006 11:02 am
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.