Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
deep

Tormentor667 - auto texture/pname deletion

Recommended Posts

I think it was you that wanted the auto-texture/pnames/lump cleanup tool?

Anyway I just got it posted at sbsoftware.com DeePsea 11.76

The tool is F7/PWAD Lump Fixing. Button is on the right side. This will delete all the textures, pnames and texture lumps that are not being referenced by anything in ALL the levels in the PWAD.

Animations that are custom (not part of DOOM) or switches need to manually excluded. This is explained in the docs (press the help button in the tool).

I suggest you use the "List all Textures and Flats not used" tool first to see what shows up. You can run it in prompt mode to skip animations and switches you want to keep.

And yes, this is unlimited and works on any size level in the shareware version.

Share this post


Link to post

I just added this feature to OMGIFOL (40 lines of code, 15 minutes of work :) and it'll be available in the next release. The procedure to use it from the console:

w = WAD(fromfile="c:/path/to/your/inputfile.wad")
w.textureCleanup()
w.save("c:/path/to/your/outputfile.wad")

Share this post


Link to post
The Merovingian said:

Deepsea's or OMGIFOL's or both?


I vote for both!

one has too much and the other not enough hehe

Share this post


Link to post

Thanks Jack, now that's something the community has needed for years!

How many of us poor modem users have downloaded a 3MB file to find the author just appended all the gothic resources and only used a few of them? I've sworn at these lazy bastards more than once, that's for sure!

Thanks for the continued development and listening to us users.

Share this post


Link to post

You are welcome Sparky - it was fun to do:)

Fredrik said:

I just added this feature to OMGIFOL (40 lines of code, 15 minutes of work :) and it'll be available in the next release.

That's cool - when I have some time, I'll look in more detail at your work - so far it looks very nice in terms of layout and documentation - keep it up and add a GUI so it has broader appeal.

Not sure if you tried out your concept yet - since a few complications arise. Here are a few things to consider (excluding the obvious):

The IWAD is required as a reference since you have to separate PWAD specific textures not used from the required ones in the IWAD (TEXTUREx contains both). So you need an IWAD select command.

The IWAD also gives you a safety check on at least stock animations, including FLATS - so you don't accidently dump them.

Be sure to cross-check to other textures before a PNAME can be deleted (since other textures can be using the PNAME) - you probably did this already.

Plus it's nice to generate a log of all the changes made - texture names, pnames and lumps deleted.

As far as looks:

The tool that does this is basically a general work horse for cleaning/arranging/analyzing PWADs - so there are a few more things crammed in there than I like - mainly because it has to fit in 800x600. I agree it's a bit busy, but they are all related. Probably would look a lot better if I make it tabbed. Next release :--))

The GUI is almost as much work as the code - so I like sharing Dialogs - saves me a lot of grunt work. I was also more interested in getting it inside an existing Dialog vs making a brand new one with one more selection. Everyone knows how complex that gets:)

Share this post


Link to post

ATM, IWAD textures aren't considered - any texture not present in any map in the WAD will get deleted.

If you want to keep the regular textures, you could first clean up, then import the IWAD textures again (single function: w.importTextures("iwad.wad")).

Another possibility would be to import the IWAD maps to your WAD, cleanup textures, then delete those maps.

That would fix the eventual problem of custom textures with stock names getting replaced which would occur with the former method.

I will implement to option to whitelist textures (by wildcards) in a config file.

Regarding PNAMES... I don't care about them. PNAMES doesn't exist to Omgifol - when loading a WAD, the ints in the texture defs get replaced with the corresponding string in PNAMES. When saving - PNAMES is re-generated.

Share this post


Link to post

Solution: Don't put textures/flats into a wad unless you intend to use them.

Heh.

Share this post


Link to post

haha wintex and sensible in the same sentence. that's a new one!

Share this post


Link to post
Cyb said:

haha wintex and sensible in the same sentence. that's a new one!

they're not in the same sentence, it's called a link you frad =P

and it sure beats the hell out of deepsea's annoying ass setup even if it is way out of date.

Share this post


Link to post

Well I'm no advocate of DeepSea by any means (for the usual discussed/argued/flamed reasons), but this does sound like a useful feature. I recently wasted hours of my life deleting all the heretic and hexen textures I wasn't using in a wad.

Share this post


Link to post
sargebaldy said:

no, it doesn't. but i'd rather do it manually on wintex than automatically on deepsea.


ugh, wintex makes it as annoying and as much of a pain in the ass as possible when you try and delete a texture

Share this post


Link to post
Cyb said:

ugh, wintex makes it as annoying and as much of a pain in the ass as possible when you try and delete a texture

yeah, i suppose. don't you actually have to go up to the menu to cut each texture out? i'm pretty sure you can't just ctrl-x or hit DEL. and when you try cutting too many textures at once it likes to tell you over and over again:

An error occured [code T936]:
Bad command parameter.

it definitely could use some more tweaking but it works well enough for me. there really isn't an alternative out there i'd take over it anyway.

Share this post


Link to post

I've gone to great pains to remove textures with wintex and 9/10 times I'm totally unsuccessful (cutting them or even hitting 'delete texture' seems to make them disappear on a temp basis, and then they return when you check the next time)...in fact I think the only way I'm actaully able to get rid of textures is by using xwe to do it (or by sheer luck in wintex). i still use wintex tho, for whatever dumb reason, heh

Share this post


Link to post
Cyb said:

i still use wintex tho, for whatever dumb reason, heh

there's definitely more powerful things (deutex, deepsea, xwe{?}) but wintex has a superior setup. you figure by now someone might have done better (add a wintex-like GUI to omgifol damnit!)

Share this post


Link to post

Horses for courses I suppose. My biggest problem with wintex is the GUI which I was never able to get to grips with. To me it always seemed ugly, poorly laid out with the dialogues and choice boxes scattered around in a random manner, with meaningless "help" text/titles beside them. Basically it just doesn't make sense to me and must have been designed by someone whose mind works in a totally different way to mine.

Share this post


Link to post
Enjay said:

Horses for courses I suppose. My biggest problem with wintex is the GUI which I was never able to get to grips with. To me it always seemed ugly, poorly laid out with the dialogues and choice boxes scattered around in a random manner, with meaningless "help" text/titles beside them. Basically it just doesn't make sense to me and must have been designed by someone whose mind works in a totally different way to mine.


true indeed. actually it's funny but what you said is exactly how I feel about deepsea :P

Share this post


Link to post
Cyb said:

true indeed. actually it's funny but what you said is exactly how I feel about deepsea :P

same here. wintex always seemed really simple and user-friendly to me. i really can't imagine how anyone could use deepsea proficiently to deal with lumps. but each to his own i suppose.

Share this post


Link to post
sargebaldy said:

i really can't imagine how anyone could use deepsea proficiently to deal with lumps.

...

Share this post


Link to post

Heh I moved the function to a script file that can be executed from the command line:

texcleanup.py input.wad output.wad iwad.wad
The IWAD parameter is optional and may be used to whitelist the retail textures.

Share this post


Link to post
Nanami said:

...

heh, you're one to talk =P i've done a ton of little crap for you in wintex because you didn't know how to in deepsea. although i suppose now you've gotten the hang of most of it.

Share this post


Link to post

Jack does it automatically rewrite the new additional textures and pnames to save a step or two? Then insert them between start and stop in the pwad or where appropriate?

Sounds like a very cool feature.

Share this post


Link to post
Searcher said:

Jack does it automatically rewrite the new additional textures and pnames to save a step or two? Then insert them between start and stop in the pwad or where appropriate?

Sounds like a very cool feature.

Thanks. Answer is Yes and No. The final writing of the modified PWAD is up to you, since I believe the user should know when a program is about to modify a PWAD and not do it without your knowledge.

What happens is the TEXTURE1/TEXTURE2 lumps have the texture names not used removed (excluding those that belong to the IWAD). Then the PNAMES lump has all patch names that are not referenced by any remaining texture deleted, then the actual extra patches are deleted. If there are custom animations that should be left alone, run in prompt mode and press N to skip those (there's a list mode that you can use as a work sheet).

There's no need for any control names for DeePsea, but if they exist they'll be left alone.

All these mods are in internal memory and are only finalized when you press the "Save As" button. This will write all the data in the PWAD with the modified TEXTURE1/2/PNAMES less the lumps deleted. That's it - there's nothing else you have to do.

Easiest way is to just try it out:)

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
×