[Fixed] [3.2] Custom IWADs not launchable via -iwad

Bugs that have been investigated and resolved somehow.

Moderator: Developers

[3.2] Custom IWADs not launchable via -iwad

Postby Rachael » Wed Nov 01, 2017 3:26 pm

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.
User avatar
Rachael
QZDoom + Webmaster
 
Joined: 13 Jan 2004

Re: [3.2] Custom IWADs not launchable via -iwad

Postby gwHero » Wed Nov 01, 2017 5:39 pm

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 :D (great feature!)
User avatar
gwHero
Be your own Siddhartha
 
Joined: 08 May 2017
Location: The Netherlands

Re: [3.2] Custom IWADs not launchable via -iwad

Postby Rachael » Wed Nov 01, 2017 7:53 pm

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:
Code: Select allExpand view
gzdoom -iwad castlevania.ipk3


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)
User avatar
Rachael
QZDoom + Webmaster
 
Joined: 13 Jan 2004

Re: [3.2] Custom IWADs not launchable via -iwad

Postby gwHero » Thu Nov 02, 2017 3:07 am

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.
User avatar
gwHero
Be your own Siddhartha
 
Joined: 08 May 2017
Location: The Netherlands

Re: [3.2] Custom IWADs not launchable via -iwad

Postby _mental_ » Thu Nov 02, 2017 4:02 am

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.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: [3.2] Custom IWADs not launchable via -iwad

Postby Rachael » Thu Nov 02, 2017 4:08 am

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.
User avatar
Rachael
QZDoom + Webmaster
 
Joined: 13 Jan 2004

Re: [3.2] Custom IWADs not launchable via -iwad

Postby Graf Zahl » Thu Nov 02, 2017 4:19 am

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.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [3.2] Custom IWADs not launchable via -iwad

Postby _mental_ » Thu Nov 02, 2017 5:29 am

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.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: [3.2] Custom IWADs not launchable via -iwad

Postby Rachael » Thu Nov 02, 2017 5:49 am

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)
User avatar
Rachael
QZDoom + Webmaster
 
Joined: 13 Jan 2004

Re: [3.2] Custom IWADs not launchable via -iwad

Postby Graf Zahl » Thu Nov 02, 2017 6:07 am

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.)
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [3.2] Custom IWADs not launchable via -iwad

Postby Rachael » Thu Nov 02, 2017 6:13 am

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.
User avatar
Rachael
QZDoom + Webmaster
 
Joined: 13 Jan 2004

Re: [3.2] Custom IWADs not launchable via -iwad

Postby Korell » Thu Nov 02, 2017 7:40 am

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:
Code: Select allExpand view
gzdoom -iwad castlevania.ipk3


It will either show the IWAD box or start Doom 2. It will ignore your -iwad request.


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.
User avatar
Korell
 
Joined: 28 May 2017

Re: [3.2] Custom IWADs not launchable via -iwad

Postby drfrag » Thu Nov 02, 2017 2:09 pm

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. :)
User avatar
drfrag
ZDoom32 and ZDoom LE developer.
 
Joined: 23 Apr 2004
Location: Spain

Re: [3.2] Custom IWADs not launchable via -iwad

Postby SiFi270 » Fri Nov 17, 2017 11:53 am

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?
User avatar
SiFi270
 
Joined: 10 Feb 2015
Location: Does anyone put a serious answer here?

Re: [3.2] Custom IWADs not launchable via -iwad

Postby _mental_ » Sat Nov 18, 2017 7:39 am

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?

It was a different bug, fixed in 80b47ca.
_mental_
 
 
 
Joined: 07 Aug 2011

Next

Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests