TEXTURES lump utility

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
Daniel
Posts: 811
Joined: Sun Jul 04, 2004 3:21 pm
Contact:

TEXTURES lump utility

Post by Daniel »

Hello,

Is there any utility that creates an TEXTURES lump from any given directory with image files?

Thanks!
User avatar
theDooMguy47
Posts: 109
Joined: Tue Apr 14, 2009 8:05 pm
Location: Lake Titicaca, Nicaragua

Re: TEXTURES lump utility

Post by theDooMguy47 »

I don't know of any utility made specifically for this, but in SLumpEd, you can hilight a texture or group of textures, right click, and click "add to pnames", then do that again and click "add to texture1", and you're ready to go.
User avatar
Nash
 
 
Posts: 17484
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: TEXTURES lump utility

Post by Nash »

Didn't SoulPriestess write something to do this? Or was it bagheadspidey?

I recall it being a PHP script or something.
Gez
 
 
Posts: 17938
Joined: Fri Jul 06, 2007 3:22 pm

Re: TEXTURES lump utility

Post by Gez »

[wiki]TEXTUREx[/wiki] != [wiki]TEXTURES[/wiki]

The whole point of TEXTURES is that you don't have to bother with [wiki]PNAMES[/wiki].

Hey, try this:
1. Open command line window in relevant directory
2. Type

Code: Select all

dir /b *.png > textures.txt
3. Open textures.txt in a regexp-capable text editor
4. Use the following search & replace command:

Code: Select all

Search:
\([A-Za-z0-9]+\).png
Replace:
Texture \1, width, height\n{\tXScale 1.0\n\tYScale 1.0\n\tPatch \1, 0, 0 {}\n}
Now the only thing you have to do manually is replace each texture's width and height entry by the actual values. (If they all have the same size, or if most of them do, you can do that directly in the replacement expression.)
User avatar
Daniel
Posts: 811
Joined: Sun Jul 04, 2004 3:21 pm
Contact:

Re: TEXTURES lump utility

Post by Daniel »

Hi,

Sorry, but TEXTURE# won't do the desired customization; it must be TEXTURES instead.

@Gez: nice trick, I'll try that. Before I have to add about 4,000 PNGs with notepad... :3:
Gez
 
 
Posts: 17938
Joined: Fri Jul 06, 2007 3:22 pm

Re: TEXTURES lump utility

Post by Gez »

4000? Ouch. At this point a dedicated tool is needed. (Unless, as said, they're all of the same size.)
NiGHTMARE
Posts: 3463
Joined: Sat Jul 19, 2003 8:39 am

Re: TEXTURES lump utility

Post by NiGHTMARE »

Gez wrote:The whole point of TEXTURES is that you don't have to bother with [wiki]PNAMES[/wiki].
Not quite the whole point; there are plenty of other things TEXTURES can do which TEXTURE1 can't.
User avatar
Enjay
 
 
Posts: 26935
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: TEXTURES lump utility

Post by Enjay »

And, on most occasions for most textures, if all you want to do is avoid PNAMES, the TX system would work and that doesn't require a control lump at all.

Back to Nash's point, I too remember talk of someone making a "dir to TEXTURES" tool and I too would have suggested SP or BHS as likely authors.
carlcyber
Posts: 163
Joined: Thu Jan 27, 2005 1:04 am

Re: TEXTURES lump utility

Post by carlcyber »

User avatar
Enjay
 
 
Posts: 26935
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: TEXTURES lump utility

Post by Enjay »

Ah, thank you. SoulPriestess it was then.
Locked

Return to “Editing (Archive)”