Request - Please stop calling 7z files PK3

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49245
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Request - Please stop calling 7z files PK3

Post by Graf Zahl »

Of course it will be loaded. Only people's ineptitude with file handling will make it fail.
User avatar
Enjay
 
 
Posts: 27145
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Request - Please stop calling 7z files PK3

Post by Enjay »

Blox wrote:The problem is that if you don't name your "PK7/7z" PK3, it won't be loaded.
Guess how nice it is when a mod forces you to change the extension to play it.
Not true. ZDoom has always been able to load any file with any extension.

Code: Select all

W_Init: Init WADfiles.
 adding C:/Doom/gzdoomSVN/gzdoom.pk3, 570 lumps
 adding C:/Doom/gzdoom/doom2.wad, 2951 lumps
 adding C:/Users/Nigel/Desktop/mook.wow-look-at-this-crazy-extension, 2 lumps
I_Init: Setting up machine state.
In fact, I *think* this ability may go right back to vanilla Doom.

However, there could be situations where unusual file extensions cause difficulty (eg if you have associated a particular extension with ZDoom using Windows associations or launchers that have file type filters in their file/open dialogues).
User avatar
printz
Posts: 2649
Joined: Thu Oct 26, 2006 12:08 pm
Location: Bucharest, Romania
Contact:

Re: Request - Please stop calling 7z files PK3

Post by printz »

Enjay wrote: There isn't really much reasoning behind the PK3 extension in ZDoom.
Retroactively, it is. The header to ZIP files (and PK3, PK4...) is PK. I know PK3 is from PAK-3 and PK might come from Phil Katz, but maybe that's why it stuck.

Why not just rename the .PK3/.PK7/.7Z/.ZIP playable files to simply .WAD? That way we won't have to type the extensions when we load the files at the command-line (Start/Run...), and the user doesn't really need to know what format is which.
User avatar
RV-007
Posts: 1501
Joined: Fri Sep 02, 2011 9:00 pm
Location: Dying w/ civilization or living after it
Contact:

Re: Request - Please stop calling 7z files PK3

Post by RV-007 »

I never seen this happened to me. I could only say that .pk3 in either .zip or .7z compressed does not seem to work for Zdoom/GZdoom execution (extraction is required). I assume that .pk3 is great for packages and hierarchy. I know that .wad in either .zip or .7z compressed works for Zdoom/GZdoom execution.
Last edited by RV-007 on Sun Dec 25, 2011 8:55 am, edited 1 time in total.
User avatar
FDARI
Posts: 1097
Joined: Tue Nov 03, 2009 9:19 am

Re: Request - Please stop calling 7z files PK3

Post by FDARI »

I have now tried various names for 7z and zip archives just because you said that. ZDoom is capable of loading them all. Most "extreme" tests: 7z without extension, 7z with .zip extension, 7z with .exe extension.
Now... I use my own little launcher that always specifies the "-file" parameter before the list of wads. In the event of drag-and-drop; zdoom might be using the extension to guess the (unspecified) purpose of listed files. If so, that would fail.

If that's a problem, my suggestion (b) still stands: Include the actual archive type before the PK3-extension.

wadname.zip.pk3
wadname.7z.pk3

Optionally: wadname-zip.pk3, wadname-7z.pk3.

Using multiple periods in a name will fool some poorly written programs, so a dash might be better.
Programs that rely on file extensions will still be fooled, but you can at least quickly see what name you need to apply before work.

For my own purposes, just using the proper archive extension might be preferable, since I don't rely on extensions with zdoom.
User avatar
Enjay
 
 
Posts: 27145
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Request - Please stop calling 7z files PK3

Post by Enjay »

printz wrote:Retroactively, it is. The header to ZIP files (and PK3, PK4...) is PK. I know PK3 is from PAK-3 and PK might come from Phil Katz, but maybe that's why it stuck.
And presumably that goes back to the DOS days where the compression tool that made zip files was called PKZip.
printz wrote:Why not just rename the .PK3/.PK7/.7Z/.ZIP playable files to simply .WAD? That way we won't have to type the extensions when we load the files at the command-line (Start/Run...), and the user doesn't really need to know what format is which.
That would make the situation worse, not better. I'm not talking about loading the files into the engine, I'm talking about when people want to edit the files or have a poke around inside to see how something was done (etc). If three different formats of files all had the same extension, you'd be even more likely to confuse your editing tools. eg there might be people with WAD files associated with something like WAD Author (yes, some people still work with that) so they would double-click the "WAD" only to find WA refusing to open it. If the file had been named PK3 or PK7 then this wouldn't have happened.

RV-007 wrote:I never seen this happened to me. I could only say that .pk3 in either .zip or .7z compressed does not seem to work for Zdoom/GZdoom execution (extraction is required). I assume that .pk3 is great for packages and hierarchy. I know that .wad in either .zip or .7z compressed works for Zdoom/GZdoom execution.
I think you are saying that a zip/7z/pk3/pk7/pkwhatever does not work if it is inside another zip (etc). If so, that is correct and is by design. Compressed WAD replacements (PK3 etc) are not meant to be run from inside a zip so you have to take them out of the zip first. However, this is not what the thread is about. The thread is about something like this:

A person has 2 files in front of them. One is called coolmod1.pk3 and the other is called coolmod2.pk3. By the look of their extensions, these files are the same format. The user wants to open the files in turn using a modding tool of their choice. They open coolmod1.pk3 and it loads properly in the tool and the user pokes around in it for a while. The user now decides that he wants to poke around inside coolmod2.pk3. They are both PK3 files so he assumes the tool that he used for the previous file will also open coolmod2.pk3. However, the person who made coolmod2.pk3 made it as a 7z file and named it PK3. The user's editing tool does not know how to read 7z files so the loading fails. If the file had been called coolmod2.pk7 (or whatever) then the user would have known to use something else to open the file.
User avatar
Enjay
 
 
Posts: 27145
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Request - Please stop calling 7z files PK3

Post by Enjay »

FDARI wrote:In the event of drag-and-drop; zdoom might be using the extension to guess the (unspecified) purpose of listed files. If so, that would fail.
In my experience it doesn't. I have dragged and dropped various files with various extensions on to ZDoom (including individual lumps such as text-based control lumps as simple text files, MP3s as music lumps etc, archives with odd extensions, archives with the extensions of different archive types etc) and I don't recall a single instance of ZDoom failing to read a file of a format that it should be aware of.

For the some time I too used to just use the native zip or 7z extension but there have been so many PK3s released that I just got fed up renaming them. I understand that some people like the name clue that "zip is for distribution and should be unpacked but pk3 is for playing and should not be unpacked" but I personally like them both to behave in the same way. So, on my machine, files with a pk3 extension have been associated so that they behave in exactly the same way as files with a zip extension do. This, of course, is part of my problem because if a modder calls a 7z file something.pk3, my computer assumes that it is a zip rather than a 7z.
User avatar
InsanityBringer
Posts: 3392
Joined: Thu Jul 05, 2007 4:53 pm
Location: opening the forbidden box

Re: Request - Please stop calling 7z files PK3

Post by InsanityBringer »

I'm quite sure that ZDoom looks into the file to see what it is. If it's a lump container, obviously those lumps will get loaded. If it's anything else, I'm not sure what happens at this point. I'm presuming it gets added at a lump, but I don't know the internals of the way ZDoom handles files other than that it works, heh.
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: Request - Please stop calling 7z files PK3

Post by NeuralStunner »

ZDoom uses the name (pre-extension), mostly. I'm sure it tries to get a file header if it can. The subdirectory makes a lot of difference too.

Personally I don't usually want people poking around in my mod files. You know all those warnings about editing ZDoom.pk3? Similar situation. :?

I have ZIP, 7Z, PK3, PK7, PKZ and P7Z all set to open in 7-Zip file manager by default. The P* ones have a secondary option to open in Slade. It works out nicely this way - If a file fails to load, it's probably a 7Z. I open it in 7ZFM and look at the compression methods. (If the file is empty, I then know the other reason why Slade would fail to load it. ;) )
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: Request - Please stop calling 7z files PK3

Post by wildweasel »

Blox wrote:The problem is that if you don't name your "PK7/7z" PK3, it won't be loaded.
Guess how nice it is when a mod forces you to change the extension to play it.
Uh no, not true at all - I just randomly renamed one of my pk3 files to .wwdata instead. ZDoom still loaded and ran it.
User avatar
Blox
Posts: 3728
Joined: Wed Sep 22, 2010 9:35 am
Location: Apathetic Limbo

Re: Request - Please stop calling 7z files PK3

Post by Blox »

wildweasel wrote:Uh no, not true at all - I just randomly renamed one of my pk3 files to .wwdata instead. ZDoom still loaded and ran it.
Well, maybe ZDoom can do that. I just tried packing something up in a .7z, and changed the extension to .pk7.

Loaded it into skulltag, no effect.
Changed extension to .pk3, tried again, oh snap, it works!
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: Request - Please stop calling 7z files PK3

Post by NeuralStunner »

Are you by chance loading via the Skins folder? Because no, that won't work with anything but PK3 or WAD.

I've used .pkz mods in ST a number of times and they loaded fine. Same for everyone who's played said mods with me online.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: Request - Please stop calling 7z files PK3

Post by Gez »

I've read some pretty despairing stuff about how people manage to load files. One edits the ini to use the autoload section. Another moves stuff to and fro the /skins folder.

How they adopt such complicated methods instead of using a frontend, drag-and-drop, or send to, is beyond me.
User avatar
Enjay
 
 
Posts: 27145
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Request - Please stop calling 7z files PK3

Post by Enjay »

NeuralStunner wrote:Are you by chance loading via the Skins folder? Because no, that won't work with anything but PK3 or WAD.
PK3 isn't a supported extension for the skins folder either. Only the WAD extension is supported from there.
User avatar
Enjay
 
 
Posts: 27145
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Request - Please stop calling 7z files PK3

Post by Enjay »

Gez wrote:How they adopt such complicated methods instead of using a frontend, drag-and-drop, or send to, is beyond me.
Especially as two of the correct methods that you mention are standard Windows protocol and the wrong alternatives would involve trying something very non-standard.
Locked

Return to “Editing (Archive)”