File names and structure

Discuss anything EDGE-related that doesn't fall into the categories.
Post Reply
User avatar
Marscaleb
Posts: 89
Joined: Sat Jun 25, 2016 12:57 pm
Location: California or Utah
Contact:

File names and structure

Post by Marscaleb »

Something just clicked with me, a mistake I've been assuming for a while.

There's basically no requirement for file structures in this program, is there? Anything that is referenced as a texture for a wall or a sprite for a weapon effect or really anything else that appears in the game, these are all referenced solely by a name.

Because of all the time I've spent with other games and engines, I am used to the location of a file being critical to its use in the game. If I use a texture on a wall and it's in one package, but then I change the name of the package, or move that package to a different folder or sub-folder, the walls that originally used that texture are now broken.
But this isn't the case with Doom and 3DGE, is it? Here things are just referenced by a name, with no direction to a path. If I load a dozen wads, it won't matter which wad file a texture is in, because the engine is just going to look for that name. The only confusion that can arise is if multiple files have the same name, in which case, there is a logical search order and the last such name found will be used.

This revelation means a bit to me because I have been wanting to re-organize the file structure I'm using in my project. Having everything dumped into one massive wad file makes it inconvenient to navigate, and I'd much prefer to put things into little folders. But as of yet, I'm not certain what structure of folders to use, because I'm still getting them all together. But if the game doesn't search for things at specific locations, I am free to completely re-organize how things are organized if I so decide. I could even divide the expected content of the iWads into a new structure, like put all the monster sprites in their own wad, all the weapon sprites in another wad, and then put all these into a pk3 file. As long as I properly instruct the exe to include all my wads and pk3 files, I'm good. Right?

Correct me if I'm wrong.

User avatar
3rd_3ye
Community Manager
Posts: 291
Joined: Sat Jun 09, 2012 5:58 am

Re: File names and structure

Post by 3rd_3ye »

Annnd my post gets deleted. Great. Sorry MC.
The banlist has been updated successfully.

User avatar
Corbachu
Site Admin
Posts: 778
Joined: Fri Jun 08, 2012 11:22 am
Gender:
Contact:

Re: File names and structure

Post by Corbachu »

Marscaleb wrote: This revelation means a bit to me because I have been wanting to re-organize the file structure I'm using in my project. Having everything dumped into one massive wad file makes it inconvenient to navigate, and I'd much prefer to put things into little folders. But as of yet, I'm not certain what structure of folders to use, because I'm still getting them all together. But if the game doesn't search for things at specific locations, I am free to completely re-organize how things are organized if I so decide. I could even divide the expected content of the iWads into a new structure, like put all the monster sprites in their own wad, all the weapon sprites in another wad, and then put all these into a pk3 file. As long as I properly instruct the exe to include all my wads and pk3 files, I'm good. Right?

Correct me if I'm wrong.
The newer builds of the engine (so DevBuilds of 3DGE only) have a structure that PAK, PK3, and PK7 archives should adhere to:

http://3dfxdev.net/edgewiki/index.php/U ... e Handling

It works similar, but not /exactly/, like ZDoom's archive file-handling.

This is not mentioned in the readme, but archives that are solely meant for 3DGE (as in, you can have a PK3 be compatible with multiple ports based on the lumps/folders it recursively scans/etc), but 3DGE mods preferably need to be in the following format:

.EPK

Stands for EDGE PACKAGE, but in reality this needs to be in PAK, PK3, or PK7 format; just with a different extension that 3DGE "matches" to the archive container format it originally was created in. So, a simple extension rename to let people know it's SOLELY for 3DGE mods will really help keep exclusive mods, well, exclusive. This isn't exactly new practice either: Eternity mods, for example, has PKE, and I think Doomsday mods have a different format as well.

The next devbuild will see the main 3DGE data file, EDGE.PAK, be renamed to EDGE.EPK -- in reality, it will retain the original PAK format (will be exactly the same, except for the file extension). Also you should remember that no matter what archive format your mod actually is, you should rename the extension to EPK.

None of this is applied to the normal WAD format, I know you guys already know that -- just wanted to make crystal clear! ;-)

And, one last thing, if anyone is new to this idea:

MAP LUMPS contained in a WAD file EXPLICITLY NEED to be kept in the WAD format inside of your archive.
That means, if you have for instance, a setup as seen in SLADE -- we navigate to the /maps/ namespace:
slade.png
slade.png (25.86 KiB) Viewed 8645 times
The actual physical WAD containing the map lumps need to be either in a group WAD, or if easier to organize on your part, separate files (e.g. map01.wad, map02.wad). You could even be crazy and have them map episode sets -- mapsX-X.wad, or episodeX.wad, just the most common examples to be named.

All other entries (or any of those entries in general) can be in the /ROOT of your archive. So other kinds of lumps (PLAYPAL, COLORMAP, FUZZMAP, etc.) can also be stored there. Eventually I will create another namespace called /utility -- that way these lumps can be present and accounted for first -- pretty much any lump that is vital to a legal IWAD setup, or if you are planning on replacing a palette or anything like that. ^_^

^__^ So this turned into some kind of tutorial, ooops :S Just wanted to make the most out of my limited time to write up a proper explanation. =)

Let me know if I've made any errors and I'll adjust/update the post as needed! Enjoy fam. ^_^
\(סּںסּَ` )/ۜ

User avatar
Marscaleb
Posts: 89
Joined: Sat Jun 25, 2016 12:57 pm
Location: California or Utah
Contact:

Re: File names and structure

Post by Marscaleb »

So what I'm gathering from this:

1) I can package my content designed for 3DGE in a zip folder with the EPK package, so other engines won't touch it, and users will (probably) know what its for.
But of course, using that extension is completely optional. It's just useful if I got content that other engines interpret wrong.

2) Maps still gotta be in a wad file.

But basically everything I stated still stands true. I can organize my content however I want, and freely change it without facing problems. I can have a texture be in a wad file named textures.wad and then move it to a folder named GuessWhat in a pak file named ChickenButt.pk3 and nothing will change (so long as I properly instruct the engine to load ChickenButt.pk3) I could have it saved as a Doom graphic in a wad or a png in a pk3, and that won't change it showing up in my level, so long as the name of the texture is the same.
I can have all my maps in one wad or a wad for each map. I can have my map files in a folder called maps or a folder called arenas or the root folder or whatever, and change it around as I see fit.

It may seem like this is obvious stuff, but this is NOT the way things work in every engine that isn't Doom, so it just took a while before it clicked to me.

Return to “General Discussion”