Doom Comic
User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > generating a list of used textures/flats in a map
 
Author
All times are GMT. The time now is 16:32. Post New Thread    Post A Reply
TimeOfDeath
Forum Regular


Posts: 2870
Registered: 06-06


Is there an easier way to generate a list of used textures/flats in a map than opening it in doom builder and writing down each texture/flat name by hand?

Old Post Dec 27 2012 20:27 #
TimeOfDeath is offline Youtube || Blog || PM || Post History || Add Buddy IP || Edit || Quote
Lüt
Administrator


Posts: 9173
Registered: 05-00


WinTex will display a list of textures and how many times they're used when you open a WAD and click the "Sidedefs" and "Sectors" lump entries underneath the E#M#/MAP## title, but there doesn't seem to be a way to export those lists to proper text file. You can export the individual lump entries to individual files, but it only displays a combination of texture names and garbage characters in a continuous string when viewed in a text editor.

Old Post Dec 27 2012 22:02 #
Lüt is offline || Blog || PM || Post History || Add Buddy IP || Edit || Quote
Nomad
Not dumb enough to get a custom title


Posts: 2777
Registered: 04-04


I've been hoping someone would write something like this for quite a while now. Even more it'd be great if someone could write a script or program that would even merge the appropriate files automatically. :/

Old Post Dec 27 2012 23:53 #
Nomad is offline || Blog || PM || Post History || Add Buddy IP || Edit || Quote
GreyGhost
I have a custom title now!


Posts: 9273
Registered: 01-08


XWE will generate copy/pastable texture lists for maps, but doesn't do flats. I think DeePsea does both but don't have it installed right now.

Old Post Dec 28 2012 01:32 #
GreyGhost is offline || Blog || PM || Post History || Add Buddy IP || Edit || Quote
Kappes Buur
Senior Member


Posts: 1007
Registered: 11-02


Deepsea (the freeware version) can generate a list of used texture/flat with
F7 PWAD Lump Arranging and More
and optionally export this list to your favourite text editor.
Note: not for UDMF maps.


GZDoombuilder r1659 can generate a file of missing textures with
F4 Map Analysis
which is stored as mapname_errors.txt in the folder of the map.

Old Post Dec 28 2012 05:22 #
Kappes Buur is offline || Blog || Post History || Add Buddy IP || Edit || Quote
TimeOfDeath
Forum Regular


Posts: 2870
Registered: 06-06


Thx of the help, but I can't figure out how to generate the lists with XWE or Deepsea. Got any tips? The maps reference textures/flats from external texture wads so I'm trying to figure out what textures I need to import into the map wads. WinTex works good, but it's taking a while to write out every texture name.

Old Post Dec 28 2012 06:05 #
TimeOfDeath is offline Youtube || Blog || PM || Post History || Add Buddy IP || Edit || Quote
Vermil
Senior Member


Posts: 1796
Registered: 03-04



GreyGhost said:
XWE will generate copy/pastable texture lists for maps, but doesn't do flats. I think DeePsea does both but don't have it installed right now.

Not quite, XWE generates a list of UNUSED textures.

The option is 'list unused textures' under the file menu. It will place a txt file on the root folder of the drive XWE is installed on, listing the textures that aren't used by any map in the same wad.

Old Post Dec 28 2012 09:13 #
Vermil is offline || Blog || PM || Post History || Add Buddy IP || Edit || Quote
Ribbiks
Senior Member


Posts: 1454
Registered: 02-11


I wrote a simple python script that generates a list of all unique textures/flats given a directory of wads. it was pretty trivial to implement, but who knows maybe someone will find this useful.
code:
#!/usr/bin/env python # encoding: utf-8 """ texList.py Author: Ribbiks Date: 12/29/2012 Generates list of unique textures & flats in a set of wads, given their directory USAGE: python texList.py wadFolder/ """ import os import sys import numpy as np def main(): wadDir = sys.argv[-1] wadList = os.listdir(wadDir) wadList = [n for n in wadList if n[-4:] == '.wad'] dictT = {} dictF = {} for wad in wadList: # open file, get header info f = open(wadDir+wad,'rb') [pwad,nLmp,dirP] = np.fromfile(f,'<i4',3) # find all SIDEDEFS and SECTORS lumps f.seek(dirP) todoT = [] # todo[i] = (sidedefs_pointer, num_sidedefs) todoF = [] for n in range(nLmp): [lmpP,lmpS] = np.fromfile(f,'<i4',2) name = f.read(8) if name == 'SIDEDEFS': todoT.append((lmpP,lmpS/30)) elif name[:7] == 'SECTORS': todoF.append((lmpP,lmpS/26)) # read textures from SIDEDEFS lumps for (pos,num) in todoT: f.seek(pos) for n in range(num): f.read(4) # skip offset bytes dictT[f.read(8)] = 1 dictT[f.read(8)] = 1 dictT[f.read(8)] = 1 f.read(2) # skip sector bytes # read flats from SECTORS lumps for (pos,num) in todoF: f.seek(pos) for n in range(num): f.read(4) # skip height bytes dictF[f.read(8)] = 1 dictF[f.read(8)] = 1 f.read(6) # skip light/type/tag bytes f.close() of = open('output.txt','w') of.write('### TEXTURES ###\n\n') for i in dictT.keys(): of.write(i+'\n') of.write('\n### FLATS ###\n\n') for i in dictF.keys(): of.write(i+'\n') of.close() if __name__ == '__main__': main()
not extensively tested. requires numpy (just because np.fromfile is convenient), but what self-respecting python install doesn't have numpy nowadays.

Old Post Dec 29 2012 19:41 #
Ribbiks is offline || Blog || PM || Post History || Add Buddy IP || Edit || Quote
GreyGhost
I have a custom title now!


Posts: 9273
Registered: 01-08



Vermil said:
Not quite, XWE generates a list of UNUSED textures.

The option is 'list unused textures' under the file menu. It will place a txt file on the root folder of the drive XWE is installed on, listing the textures that aren't used by any map in the same wad.

Select a map and you'll find a "List Used Textures" option in the Map menu, though it's not all that useful if there's a lot of maps in your wad.

Old Post Dec 30 2012 01:48 #
GreyGhost is offline || Blog || PM || Post History || Add Buddy IP || Edit || Quote
All times are GMT. The time now is 16:32. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > generating a list of used textures/flats in a map

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.