MTrop Posted May 30, 2020 (edited) IMPORTANT: You'll need Java 8 or higher installed to run these! GitHub Repository GitHub Latest Releases Installation Unzip/untar the release to its own directory, and then add that directory to the list of directories in your PATH environment variable. Oi, what's all this, then? Howdy, y'all. It's ya boy, MTrop. I've been slaving away at a hot computer making a bunch of utilities that are pretty dang helpful for my Doom Editing nonsense, and if you want that sort of thing as well (and have a Java Runtime Environment, version 8 or higher, like the paragon of integrity that I know you are), you too can use these! Yes, indeed! From the guy who got you an amazing game that you have been putting off playing and a Java Library that exists only to give OMGIFOL competition, comes this fantastic set of command-line utilities that are guaranteed 99.9% of the time to be the perfect tool for doing a bunch of different things for whatever the heck you need. WadTex A utility that imports or exports a DEUTEX-style texture file into/from a WAD file with a set of TEXTUREx/PNAMES lumps. SLADE does an excellent job of doing texture management, but if you're the kind of weirdo that likes managing stuff via text files, this is for you! wadtex doom2.wad --export texture1.txt wadtex d2tex.wad --import texture1.txt WSWANTBL A utility that, like SWANTBLS, imports or exports SWITCHES/ANIMATED data into/from a WAD file, creating/reading a file that is formatted like DEFSWANI.DAT from way back when. Again, for big nerds that like big text files. wswantbl boomstuf.wad --export DEFSWANI.txt wswantbl boomstuf.wad --import DEFSWANI.txt WTexScan A utility that scans one or more WAD files for maps and dumps the list of flats and textures that it finds. Works for DOOM, ZDOOM/HEXEN, and UDMF maps. wtexscan maps.wad The output may look strange, because it is best used with.... WTEXport The second version of TEXtract, WTEXport is a utility that extracts a set of flats and textures from a source WAD and adds the extracted textures to a new WAD or an existing WAD, using the output piped in from WTexScan. Also uses ANIMATED/SWITCHES in order to figure out extra textures to copy over to complete full sets. wtexscan maps.wad | wtexport texturepack.wad --base-wad doom2.wad --output maps.wad --add wtexscan maps.wad | wtexport texturepack.wad --base-wad doom2.wad --output mapstex.wad --create It has some limitations though - doesn't read ANIMDEFS yet. In that case you may be better off doing things more manually via WadTex. WadMerge A utility for making simple build scripts for compiling together projects made of several files into a single WADs, or merging WADs of different kinds together. Very flexible. wadmerge build.txt You can make snazzy build scripts that look like this! create outwad datemarker outwad __VER__ # Merge in maps. mergewad outwad maps/map01.wad mergewad outwad maps/map02.wad mergewad outwad maps/map03.wad # Merge in textures. marker outwad pp_start mergedir outwad textures/patches marker outwad pp_end marker outwad ff_start mergedir outwad textures/flats marker outwad ff_end mergedeutexfile outwad textures/texture1.txt # Export to file. finish outwad build/mymod.wad end Go crazy! Hey Matt, these utilities are great and all, but I think I could probably do better. Oh yeah, hot-shot? You think you can do a better job than me? Well, guess what? ...YOU CAN! WadScript This final utility is a doozy - it employs a sophisticated scripting language called RookScript (made by yours truly) with some function extensions for manipulating WAD data! It's SO FLEXIBLE! There are even functions for doing byte-by-byte reading and streaming in case you want to do something not covered in the built-in functions! WHOA! Check this! Open a WAD and print its entry list: entry main(args) { if (args[0] === null) { return error("NoWAD", "No WAD specified."); } check (err) { wad = wadfile(args[0]); each (i, e : wad->waditerate()) { println(i + ": " + e.name + ", " + e.size + " bytes, at offset " + e.offset); } } close(wad); if (err != null) { return err; } } Then you just run the script with: wadscript filenameOfScript.wscript file.wad NOTE: The arguments after the script file are passed in via that args variable, so "file.wad" is readable from args[0]. Or if you're in MacOS/Linux/Cygwin/WSL, you can just slap #!/usr/bin/env wadscript into the first line and flag the script as executable! Wow! (You can even do a similar thing with WadMerge scripts) Built-in function documentation for WadScript is included in the release archives, or you can type: wadscript --function-help ...and send the output to a file or what-have-you. To get it in Markdown format, use --function-help-markdown. A quick guide to RookScript is here (and included in the utilities): https://blackrooksoftware.github.io/RookScript/ You also get the regular RookScript utility without the Doom extensions for FREE! rookscript [scriptfile] But Maaaaaatt, I have a hate vendetta against Oracle and don't like their Java binaries! That's cool - I don't like them either! You can either install an OpenJDK on MacOS or Linux or use an OpenJDK-compatible build like Azul Zulu. It's what I use. Anything Java 8 and higher will work. In Conclusion If you run into bugs with these tools, please add issues to the issues section on the project GitHub page. THAT'S ALL! HAVE FUN! Edited July 21, 2023 by MTrop Remove old versions. 24 Quote Share this post Link to post
MTrop Posted July 23, 2020 New Release! New links at the top post! WadMerge Changed for 1.1.0 Added - The CREATEFILE command for creating a File instead of a Buffer. Changed - If a problem occurs in any command execution, a better error message is output. Changed - The MERGEDIR command sorts files alphabetically, files first, then directories. WadScript Changed for 1.0.1 Fixed - Markdown documentation output. 1 Quote Share this post Link to post
MTrop Posted July 26, 2020 (edited) New Release! Links updated. WTEXport no longer butchers texture ordering. A sort was removed that didn't need to happen. This means it'll still preserve all the wacky stuff that mods like BTSX do where animation frames for textures and flats are added by fudging with texture/flat order. Yay! WTEXport Changed for 1.1.0 Changed - Removed an unnecessary sort step that butchered that Animation handling in flats and textures. Changed - Added some needed help. Edited July 26, 2020 by MTrop Removed newlines. 3 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.