[3.2] Custom IWADs not launchable via -iwad
Moderator: GZDoom Developers
Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
[3.2] Custom IWADs not launchable via -iwad
A custom .ipk3 that is properly defined will not launch in GZDoom unless it is selected in the IWAD box. It cannot be -iwad'd from the command-line.
a) Any IWAD that is internally defined does work (i.e. Doom2.wad)
b) Any archive that has the proper things to make it an IWAD but no IWADINFO definition does work (i.e. rename Doom2.wad to DoomArbitraryNameBecauseWeCan.wad)
c) Rename any archive that has a proper IWADINFO definition to lose the extension .iwad or .ipk3 and it WILL work, just without the custom IWADINFO definitions
d) -iwad any actual custom .iwad or .ipk3 file does NOT work, however.
a) Any IWAD that is internally defined does work (i.e. Doom2.wad)
b) Any archive that has the proper things to make it an IWAD but no IWADINFO definition does work (i.e. rename Doom2.wad to DoomArbitraryNameBecauseWeCan.wad)
c) Rename any archive that has a proper IWADINFO definition to lose the extension .iwad or .ipk3 and it WILL work, just without the custom IWADINFO definitions
d) -iwad any actual custom .iwad or .ipk3 file does NOT work, however.
- gwHero
- Posts: 360
- Joined: Mon May 08, 2017 3:23 am
- Graphics Processor: Intel with Vulkan/Metal Support
- Location: The Netherlands
Re: [3.2] Custom IWADs not launchable via -iwad
I have a custom game (.pk3 file) with a minimal Iwad (with the .ipk3 extension) that has a iwadinfo.txt and it loads perfectly in GZDoom 3.2 and 3.3 devbuilds.
The GAMEINFO in the pk3 contains the reference to the ipk3. It works with and without the DOOM2.wad in the folder, so no complaints from me (great feature!)
The GAMEINFO in the pk3 contains the reference to the ipk3. It works with and without the DOOM2.wad in the folder, so no complaints from me (great feature!)
Re: [3.2] Custom IWADs not launchable via -iwad
That isn't the report. Try for example Castlevania mod - what counts is launching it from the command line.
If you started Doom 2 last time you used GZDoom, and then typed the following at the command line:
It will either show the IWAD box or start Doom 2. It will ignore your -iwad request.
(Castlevania was not part of the original report because it's not minimal enough)
If you started Doom 2 last time you used GZDoom, and then typed the following at the command line:
Code: Select all
gzdoom -iwad castlevania.ipk3
(Castlevania was not part of the original report because it's not minimal enough)
- gwHero
- Posts: 360
- Joined: Mon May 08, 2017 3:23 am
- Graphics Processor: Intel with Vulkan/Metal Support
- Location: The Netherlands
Re: [3.2] Custom IWADs not launchable via -iwad
Added my comment to show that adding a small iwad to your wad is an alternative that also works; it was the scenario that I preferred over making the wad an iwad itself.
Re: [3.2] Custom IWADs not launchable via -iwad
IWAD specified after -iwad switch is completely ignored when IWAD with the same mod name (file name is irrelevant) was found in the search path.
It boils down to the same old check for duplicate names already fixed once. I'm for removing it completely.
First of all, it's not correct for explicit IWAD loading from command line and requires different handling in this case.
But even more important that it prohibits having several versions of the same mod with different file names in one folder (in the search path to be precise).
For me as a user it's really weird that some distinct files are ignored because their IWADINFO lumps have the same Name entry.
Mod versions can be easily distinguished by their actual file names.
Of course somebody can put identical IWADs in various folders used by GZDoom to load stuff.
However it's his/her task to figure out why there are several identical entries in the WAD picker window.
It boils down to the same old check for duplicate names already fixed once. I'm for removing it completely.
First of all, it's not correct for explicit IWAD loading from command line and requires different handling in this case.
But even more important that it prohibits having several versions of the same mod with different file names in one folder (in the search path to be precise).
For me as a user it's really weird that some distinct files are ignored because their IWADINFO lumps have the same Name entry.
Mod versions can be easily distinguished by their actual file names.
Of course somebody can put identical IWADs in various folders used by GZDoom to load stuff.
However it's his/her task to figure out why there are several identical entries in the WAD picker window.
Re: [3.2] Custom IWADs not launchable via -iwad
I'm for removing it as well, but have we tested what the consequences of doing so might be? I'd prefer not to remove something that may have actually been a bug fix during development - but if it was just a decision to try and make things easier (even though it clearly might not be) then there's no point.
My guess is it was done to prevent users from doing something silly like naming their archives doom.iwad and doom2.iwad and then wonder why GZDoom is listing it twice even though the search engine is getting hits from both the *.iwad scan and the internal IWADINFO.txt name search. And if that's the case, that can probably be fixed by removing any duplicate *.iwad that don't have an IWADINFO lump in it.
My guess is it was done to prevent users from doing something silly like naming their archives doom.iwad and doom2.iwad and then wonder why GZDoom is listing it twice even though the search engine is getting hits from both the *.iwad scan and the internal IWADINFO.txt name search. And if that's the case, that can probably be fixed by removing any duplicate *.iwad that don't have an IWADINFO lump in it.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49066
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [3.2] Custom IWADs not launchable via -iwad
The entire IWAD selection process is just awful. When extending it for custom IWADs I wasn't able to sanitize it entirely. It may be smart to just throw it all away and start fresh - but I simply do not have the time for such a thing right now.
Ideally it should work as follows:
1. Specifying -iwad must be absolute and do no further file name checks at all. Any file loaded this way must be fully identified before being allowed to be used.
2. The IWAD search process should only start if -iwad failed.
2. If a single WAD is being loaded with -file, it should also be checked as an IWAD to allow drag & dropping IWADs.
Ideally it should work as follows:
1. Specifying -iwad must be absolute and do no further file name checks at all. Any file loaded this way must be fully identified before being allowed to be used.
2. The IWAD search process should only start if -iwad failed.
2. If a single WAD is being loaded with -file, it should also be checked as an IWAD to allow drag & dropping IWADs.
Re: [3.2] Custom IWADs not launchable via -iwad
Rewriting IWAD detection and loading is out of scope for me. The best thing I can do at the moment is to fix bugs and this one in particular.
If the duplicate check I mentioned is needed another solution is to skip this check when -iwad is specified and the file is accessible.
If the duplicate check I mentioned is needed another solution is to skip this check when -iwad is specified and the file is accessible.
Re: [3.2] Custom IWADs not launchable via -iwad
I would've been willing to rewrite the IWAD detection mechanism but the problem is expressing my ideas on how to do it into actual C++ code is not that easy. I have absolutely zero experience with ZDoom's file manipulation systems, and I suspect that it's a spaghetti code mess where cleaning it out is going to take an effort pouring over multiple files just to remove the relevant bits out. I was all over the place across two files just implementing the zd_extra.pk3 loader, and that doesn't even count the shenanigans that occurred in the much wider codebase with some of the code making assumptions that the IWAD would never be past file #1.
(I did it the way I did because if an IWAD specifies its own resources it should never be overridden by zd_extra - that would cause its own issues)
(I did it the way I did because if an IWAD specifies its own resources it should never be overridden by zd_extra - that would cause its own issues)
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49066
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [3.2] Custom IWADs not launchable via -iwad
The right thing to do would be to take d_iwad.cpp, make some notes what actions it performs, then throw it away and redo from scratch. Essentially all it needs to output is a list of files to use which then gets passed to the resource manager (w_wad.cpp.)
Re: [3.2] Custom IWADs not launchable via -iwad
I suppose I could try it, but I can't make any promises.
I'll probably just develop simple {return 0;} functions until it reaches a state where it compiles again, and then build it up from there.
I'll probably just develop simple {return 0;} functions until it reaches a state where it compiles again, and then build it up from there.
Re: [3.2] Custom IWADs not launchable via -iwad
I had noticed this too when I tried playing Castlevania on it's release night (GZDoom 3.2.1), as I always write myself batch files to launch GZDoom and any mods I want to use. I just thought it was because it wasn't an official IWAD and so that's why the IWAD selection menu was showing up. In the end I changed my batch file to use Doom2.wad as the IWAD and load Castlevania.ipk3 with the -file parameter. I've not seen any issues loading it this way, but if this gets fixed so that I can then load it via a batch file without Doom2.wad that would be great.Rachael wrote:That isn't the report. Try for example Castlevania mod - what counts is launching it from the command line.
If you started Doom 2 last time you used GZDoom, and then typed the following at the command line:It will either show the IWAD box or start Doom 2. It will ignore your -iwad request.Code: Select all
gzdoom -iwad castlevania.ipk3
- drfrag
- Vintage GZDoom Developer
- Posts: 3141
- Joined: Fri Apr 23, 2004 3:51 am
- Location: Spain
- Contact:
Re: [3.2] Custom IWADs not launchable via -iwad
I know i'm not invited to this party but IMHO for now the best option is doing what _mental_ is proposing.
If it works it works.
If it works it works.
- SiFi270
- Posts: 451
- Joined: Tue Feb 10, 2015 2:51 am
- Location: Does anyone put a serious answer here?
Re: [3.2] Custom IWADs not launchable via -iwad
I've noticed that Rise of the Wool Ball is also subject to this despite officially being recognized without an "i" in its file extension or anything. Is that one just an oversight?
Re: [3.2] Custom IWADs not launchable via -iwad
It was a different bug, fixed in 80b47ca.SiFi270 wrote:I've noticed that Rise of the Wool Ball is also subject to this despite officially being recognized without an "i" in its file extension or anything. Is that one just an oversight?