[Added] Prevent duplicate-loading of an IWAD via -file switch

Moderator: GZDoom Developers

Prevent duplicate-loading of an IWAD via -file switch

Postby Xaser » Wed Feb 16, 2022 5:07 pm

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 allExpand view
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
Xaser
anarchivist
 
 
 
Joined: 20 Jul 2003

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

Postby Rachael » Thu Feb 17, 2022 12:06 am

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
Rachael
^ walking stack of unfinished projects ^
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

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

Postby Xaser » Thu Feb 17, 2022 5:15 pm

Super-thanks! That'll save us a lot of headaches. :D
User avatar
Xaser
anarchivist
 
 
 
Joined: 20 Jul 2003


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: SFJake and 2 guests