Prevent duplicate-loading of an IWAD via -file switch

Moderator: GZDoom Developers

Post Reply
User avatar
Xaser
 
 
Posts: 10772
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Prevent duplicate-loading of an IWAD via -file switch

Post by Xaser »

We've been getting a lot of bug reports for Adventures of Square where players try and launch the game and get this error on startup:

Code: Select all

Script error, "square1.pk3:cvarinfo.base" line1: cvar 'square_promo_mode' already exists
What's happening here is the player is accidentally loading square.pk3 twice: once with -iwad and a second time with -file. Obviously, this doesn't work; it happens to choke on cvarinfo before it gets any further, but if that didn't break, something else would. :P

Now, this seems like an obvious "don't do that", but the problem is that they aren't consciously making this mistake: they're either dragging-and-dropping square1.pk3 onto gzdoom, or using some kind of launcher, or using UDB's "Test" feature; i.e. all things that obscure the launcher arguments and don't make it clear at all what's going on. These are totally valid ways of loading Doom mods, and it's entirely unclear to players that they can't use the same methods to launch Square. Since the error message gives no clues as to what's going on, they come to us with a bug report -- but there's nothing we can do about this on our side, and it keeps coming up again and again.

I can't think of any legitimate reason to load the exact same file with both -iwad and -file, and it'd help greatly if -file would do a hash check and skip the load if it matches the current iwad. Can't exactly fix it in the tools either, since one of them is drag-and-drop and I don't think Microsoft accepts PRs for Windows. :P
User avatar
Rachael
Posts: 13531
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Prevent duplicate-loading of an IWAD via -file switch

Post by Rachael »

Added

There's no real good use case that I can think of where you need the same file twice - ever.

Still though - if it is somehow needed - there's an override switch for it.
User avatar
Xaser
 
 
Posts: 10772
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Re: Prevent duplicate-loading of an IWAD via -file switch

Post by Xaser »

Super-thanks! That'll save us a lot of headaches. :D
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”