Severed bunny head
Register | 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 10:56. Post New Thread    Post A Reply
TimeOfDeath
Forum Regular


Posts: 2514
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 12-27-12 20:27 #
TimeOfDeath is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Lüt
Administrator


Posts: 9170
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 12-27-12 22:02 #
Lüt is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Nomad
Not dumb enough to get a custom title


Posts: 2583
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 12-27-12 23:53 #
Nomad is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
GreyGhost
Why don't I have a custom title by now?!


Posts: 8143
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 12-28-12 01:32 #
GreyGhost is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Kappes Buur
Forum Regular


Posts: 798
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 12-28-12 05:22 #
Kappes Buur is offline Profile || Blog || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
TimeOfDeath
Forum Regular


Posts: 2514
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 12-28-12 06:05 #
TimeOfDeath is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Vermil
Senior Member


Posts: 1637
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 12-28-12 09:13 #
Vermil is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Ribbiks
Senior Member


Posts: 1093
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 12-29-12 19:41 #
Ribbiks is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
GreyGhost
Why don't I have a custom title by now?!


Posts: 8143
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 12-30-12 01:48 #
GreyGhost is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
All times are GMT. The time now is 10:56. 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.

Message Board Statistics