Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
insertwackynamehere

Technical Wad Question about directory structure

Recommended Posts

I have a question about the format of a wad file. Certain lumps need to be in order so that Doom will operate correctly (a series a map lumps for example, must be in the order of lump ExMx or MAPxx followed by the lumps THINGS, LINEDEFS, SIDEDEFS, VERTEXES, SEGS, SSECTORS, NODES, SECTORS and REJECT). These lumps, according to the Doom wiki, must be in this exact order or else Maps will not be valid. However, what defines the order? Is it the position of the lump in the wad file or in the wad directory? Does each actual lump have to be in the stated order, or is it only the directory entries that have to be in this set order? Thank you!

Share this post


Link to post

do you mean wad directories like a pk3? im pretty sure the position of the lump in the wad file itself, like when you open a wad in slumped or something.

Share this post


Link to post

It's only the directory entries that matter. Otherwise there'd be no need to even have a directory for the isolated parts of a map.

Share this post


Link to post

@Graf: Okay thanks :) So just to clarify, the directory needs to be E1M1->THINGS->etc... but in the WAD it could be E1M1->ENDOOM->SIDEDEFS for all it matters.

@Butts: I'm talking about the internal directory structure of a WAD file. A WAD file is made up of a header, a directory and lumps. But thanks :)

@Ajapted: I'll check that link out because it may prove useful for other reasons.

Share this post


Link to post
insertwackynamehere said:

@Graf: Okay thanks :) So just to clarify, the directory needs to be E1M1->THINGS->etc... but in the WAD it could be E1M1->ENDOOM->SIDEDEFS for all it matters.


Though that doesn't make much sense you could do that, and hope that all Doom utilities don't mind it either. IIRC the only things that need to be in a particular order are lumps that belong to a map (E1M1 is followed by THINGS, BLOCKMAP, SEG and whatnot) and patches, sprites and flats need to be between their marker lumps (SS_START <100000 sprite lumps> SS_END for example).

Share this post


Link to post
insertwackynamehere said:

@Graf: Okay thanks :) So just to clarify, the directory needs to be E1M1->THINGS->etc... but in the WAD it could be E1M1->ENDOOM->SIDEDEFS for all it matters.


Yes, but who would want to write a WAD manager to do that...?

However, if this is about quick replacement of lumps by appending them to the WAD, yes that could be done.

Share this post


Link to post

i guess i didnt know what the hell i was talking about. what is a wad directory?

Share this post


Link to post

@exl and Graf: Yeah I know, what I'm working on wouldn't do that on it's own. It would write lumps in a more logical order. What I'm dealing with is WAD files that are already in some crazy order and trying to figure out if they would be valid. My util would try and preserve lump order, but I just want to know how I should deal with WADs that are in some crazy order. But yeah, ignoring lump location, it is the location in the directory that matters for things like series of map lumps. E1M1 must be followed by THINGS and THINGS must be followed by LINEDEFS, etc. but only in the directory. The lumps can be in different random parts of the WAD but their directory location must be in order.

@Butts: http://doom.wikia.com/wiki/WAD That explains the basic structure of a WAD file. The directory in the WAD file is a series of entries containing information about each lump in the WAD including it's size, location and name.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×