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

Problems extracting textures from OTEX 1.1

Recommended Posts

I've almost completed a nine-map set using OTEX 1.1, and am now looking into adding the textures I used into the WAD file which contains the map geometry. I've tried to use MTrop's WTexscan and WTexport utilities to do this, but it produces an error message.

 

My input string is:

wtexscan sckrpnch2.wad | wtexport OTEX_1.1.wad --base-wad doom2.wad --output \SP2tex --add

Which produces the following output:

C:\SP2Textures>wtexscan sckrpnch2.wad | wtexport OTEX_1.1.wad --base-wad doom2.wad --output \SP2tex --add
Input texture/flat list:
Scanning doom2.wad...
    Scanning TEXTUREx/PNAMES...
        428 entries in TEXTURE1.
        469 entries in PNAMES.
    Scanning patch entries...
        475 patches.
    Scanning flat entries...
        153 flats.
    Scanning texture namespace entries...
        0 namespace textures.
Scanning OTEX_1.1.wad...
    Scanning patch entries...
        4042 patches.
    Scanning flat entries...
        1309 flats.
    Scanning texture namespace entries...
        0 namespace textures.
Exception in thread "main" java.lang.NullPointerException
        at net.mtrop.doom.tools.WTExportMain$Context.scanWAD(WTExportMain.java:278)
        at net.mtrop.doom.tools.WTExportMain$Context.doTextureExtraction(WTExportMain.java:983)
        at net.mtrop.doom.tools.WTExportMain.call(WTExportMain.java:1447)
        at net.mtrop.doom.tools.WTExportMain.main(WTExportMain.java:1462)

My guess at this point is that the problem is to do with OTEX's use of a TEXTURE2 lump. I presume other people have encountered this problem as OTEX and (I would guess) MTrop's utilities are widely used. Despite reading a number of tutorials I find texture management very confusing so would appreciate any tips on how to get these utilities to work in this case, or suggestions of an alternative approach.

Share this post


Link to post

Have you contacted @MTrop about the issue?

 

If the problem is indeed caused by the textures being in TEXTURE2, that's a big oversight for the program, but you can workaround it quite easily. Just open OTEX in SLADE, open also doom2.wad. Copy the TEXTURE1 lump from Doom II into OTEX. Open the texture editor. Select all the textures in TEXTURE2, copy them in TEXTURE1 after the Doom II textures. Save and close the texture editor. Delete the TEXTURE2 lump. Save OTEX, and then run WTexscan & WTexport again.

Share this post


Link to post
1 hour ago, Gez said:

Copy the TEXTURE1 lump from Doom II into OTEX. Open the texture editor. Select all the textures in TEXTURE2, copy them in TEXTURE1 after the Doom II textures.

 

OTEX_1.1.wad TEXTURE2 lump already contains all the vanilla texture definitions, so would it be sufficient to just rename it TEXTURE1? I asked ukiro about it some time ago, and I recall he just manually changed the number from 1 to 2 in Slade.

Share this post


Link to post

Oh no! I thought I fixed this! @Rook, what version of the tools do you have?

 

EDIT: For disclosure, I do use OTEX, but I think I exploded the set and rebuilt it for a rather large project I'm working on, heh. I'll see if I can still replicate with the current version.

Share this post


Link to post

I can confirm that this should work with the latest version of the toolset: https://github.com/MTrop/DoomTools/releases/tag/2021.03.26-RELEASE

 

Tool versions in the release include:

DECOHack v0.9.0
DImgConv v1.0.0
DMXConv v1.0.1
DoomMake v0.2.0
WadMerge v1.6.0
WadScript v1.1.0.1
WADTex v1.1.0
WSwAnTBLs v1.0.0
WTExport v1.3.0
WTexScan v1.1.1

It was fixed in version 1.3.0 for this very reason. You should be good if you upgrade without changing OTEX: https://github.com/MTrop/DoomTools/blob/master/docs/changelogs/CHANGELOG-wtexport.md

Share this post


Link to post

By using the latest version of the utilities above, I've successfully merged the textures that I used from OTEX into my WAD. However, I've encountered a crash when testing in Doom Retro and PrBoom+.

 

1145681688_DRSP2Error.PNG.d7684bd266a81d091f098a97e764c36a.PNG1473094381_PrBSP2Error.PNG.51e8d1580a00ed1a7ae28c8d1d92bcf9.PNG

 

I presume by these error messages that this has to do with switches; the WAD runs just fine in GZDoom and Eternity. Can anyone shed any light on this please?

Share this post


Link to post

Without knowing exactly how MTrop's texture tools work I can't be 100%, but I'll drop an educated guess. WTexScan did what it says on the label and scanned for all textures and flats used in your maps. However it probably did not take into account the textures that are technically unused: animation frames. In your example, the OSWTCHE family of switch textures have their "ON" state animated, but since you most likely only use the "OFF" state texture in your maps, it will not include any the textures for the "ON" state frames. The bad cycle problem relates to animated textures, more specifically that the required textures are in a different order or some of them are missing. Your case is most likely the latter.

 

A solution to this is to make a list of all the animated and switch textures you are using, then adding a dummy sector in one of the maps that contains all the animation frame and switch state textures plastered on the walls so that WTexScan won't ignore them when you run it.

Share this post


Link to post

Oh - I didn't take into account animated switches. WTEXport should pick up ANIMATED and SWITCHES, but not the textures added via ANIMATED to look up in SWITCHES. Whoops!

 

Guess I got a bug to fix.

 

Hey, @Rook - could you PM me a sample map that I could use to test the fix? You're using just OTEX 1.1, correct?

Edited by MTrop : Added request for testing material

Share this post


Link to post

No worries - thanks for a quick fix! I can recommend these tools to others. I'm not very used to command line utilities but these ones save a lot of time and hassle. I've run the new version of WTexport and the WAD now works correctly in GZDoom, PrBoom+, Doom Retro and Eternity. Now, to finish my maps...

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  
×