[Question] Decorate, Directories, and Files?

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.
Locked
User avatar
RV-007
Posts: 1501
Joined: Fri Sep 02, 2011 9:00 pm
Location: Dying w/ civilization or living after it
Contact:

[Question] Decorate, Directories, and Files?

Post by RV-007 »

I reached to the point where I have to make folders for my wad files. There is too many files to sort thru and I figure this could make graphics processing much faster.

I know that DECORATE is the main declaration to call out methods. I am quite certain that the codes will need sprite filenames (e.g. POSS) in the immediate folder.

Code: Select all

/*
Decorate Main Declaration
*/

/*
Monsters Method
*/
#include "sprites/monsters/spawn"

/*
Projectiles Method
*/
#include "sprites/projectiles/spawn_projectile"
I saw in some mods that it is possible to keep text files in the main directory and still have the sprites in folders. How is this done? Is it possible to have text files in a folder to use sprites in another folder? Do the differences of .wad and .pk3 change how directories work?
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: [Question] Decorate, Directories, and Files?

Post by Gez »

Okay, you seem very confused, so read up on [wiki]namespaces[/wiki].
User avatar
RV-007
Posts: 1501
Joined: Fri Sep 02, 2011 9:00 pm
Location: Dying w/ civilization or living after it
Contact:

Re: [Question] Decorate, Directories, and Files?

Post by RV-007 »

I just want to confirm that any lump within the sprites folder would be considered as sprites no matter how many sub-directories are in the sprites folder (saw this in brutal doom).
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: [Question] Decorate, Directories, and Files?

Post by Gez »

Yes, only the first level of the folder hierarchy matters.
User avatar
RV-007
Posts: 1501
Joined: Fri Sep 02, 2011 9:00 pm
Location: Dying w/ civilization or living after it
Contact:

Re: [Question] Decorate, Directories, and Files?

Post by RV-007 »

Ok, no "sprites/monsters/somemonster", lol.
I'll just use the markers to categorize sprites's (first level) sub-folders.

e.g
Sprites Folder >
{
+Monster Marker
-Zombieman Marker
Zombieman Folder >
{
image files
}
-Shotgunguy Marker
Shotgunguy Folder >
{
image files
}
-Chaingunguy Marker
Chaingunguy Folder >
{
image files
}
}
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: [Question] Decorate, Directories, and Files?

Post by Gez »

What?

You are still confused.

Reread the [wiki]namespace[/wiki] article a couple of times. Among other things, you might learn that markers are only for sequential archives (like WAD files) which do not have directories.

Also, when saying that the subdirectories don't matter, it means that they will not trip up ZDoom. What matters is that the first directory is /sprites/, that's what will let ZDoom categorize the image as a sprite. You can use subdirectories to better organize the resources.
User avatar
Ijon Tichy
Posts: 104
Joined: Fri Dec 31, 2010 9:22 pm
Location: Basically I don't exist
Contact:

Re: [Question] Decorate, Directories, and Files?

Post by Ijon Tichy »

Yeah, every file in /sprites/ is treated as a sprite, no matter how many subdirectories down you go. I'd assume it's the same way with /graphics/, /patches/, /sounds/ (although I use absolute paths for SNDINFO anyawy), and whatnot.

This is a perfectly working directory structure - all the sounds are loaded as expected, as are all the sprites. Note that in /acs/, only object files (.o) are looked at. The source files (.c) aren't.
Spoiler:
By the way, positional markers make no sense in a directory structure.
User avatar
RV-007
Posts: 1501
Joined: Fri Sep 02, 2011 9:00 pm
Location: Dying w/ civilization or living after it
Contact:

Re: [Question] Decorate, Directories, and Files?

Post by RV-007 »

Sounds good, I'll just treat the directories as said in the namespace and make the necessary sub-directories.
User avatar
RV-007
Posts: 1501
Joined: Fri Sep 02, 2011 9:00 pm
Location: Dying w/ civilization or living after it
Contact:

Re: [Question] Decorate, Directories, and Files?

Post by RV-007 »

Argh, the .wad file format does not support directories. I know that .pk3 is a compressed file format that supports directories. Does .pk3 allow itself to be executed in a .zip file? I know that the doomworld archives supports .zip.
Last edited by RV-007 on Mon Jun 25, 2012 3:57 am, edited 1 time in total.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: [Question] Decorate, Directories, and Files?

Post by Gez »

RV-007 wrote:Argh, the .wad file format does not support directories.
Well, yes. Why did you think they have markers?

Quoth the wiki article I linked to twice already:

Code: Select all

The archive format matters: in sequential archives (such as WAD files), they are delimited by marker lumps; in hierarchized archives, they are in a specific directory. 
Sequential means that all the lumps follow each others. It's just a long sequence of lumps.

Zips and other hierarchized archives (7z, etc.) use directories.

So ZDoom provides two different mechanisms to mark namespaces: directories for hierarchized archives, markers for sequential archives.



And to answer what I think is your question: no, only embedded wads are opened.
User avatar
Enjay
 
 
Posts: 27135
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: [Question] Decorate, Directories, and Files?

Post by Enjay »

RV-007 wrote:I know that .pk3 is a compressed file format that supports directories. Does .pk3 allow itself to be executed in a .zip file? I know that the doomworld archives supports .zip.
Gez has already answered the main question there but it looks like you may not realise what so-called PK3 files are. They are just ZIP files that have been renamed so that their file name says "something.pk3" instead of "something.zip". Any ZIP utility should be able to, create them, open them or extract files from them. (However, SLADE does it from a very useful Doom editor's point of view.)

And to reiterate, if you want to upload it to idgames then, yes. you will still need to put your PK3 inside a ZIP and no, you cannot run it without first removing it from the ZIP (as Gez said).
Locked

Return to “Editing (Archive)”