I guess this is asset related...
Does anyone know of a way to extract the scripts lump from a map WAD and save it as a text file?
Ideally it would be nice if there was some sort of command line tool where I could type something like:
scriptextract [WADFile] [OutputFile].
This would be perfect because I actually often want to extract the lumps from several WADs. With a tool like this, I could chain things together with a batch file and extract multiple lumps in one go.
At present, I am using Slade to extract the scripts lumps manually, and it takes a long time if I am working with a lot of files. I have to load each WAD, and extract its Scripts lump, then move on to the next WAD.
Why do I want this?
I often want to search the scripts lumps of multiple files to see which ones contain a certain instruction or whatever. The only way I've figured out to search through multiple scripts lumps is to use my text editor's "find in files" feature where I can just enter the string I'm looking for, point the text editor at a folder and a second or less later I have a readout of all files that contain the string in question.
Plus, I like having backups of the scripts lumps.
So, does anyone know of a tool that would do what I'm looking for?
Extract Scripts Lumps From Multiple WADs?
Moderators: GZDoom Developers, Raze Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Re: Extract Scripts Lumps From Multiple WADs?
If the wad has just one map and one single SCRIPTS there's a little know (Windows) command line tool TWT:
https://www.nuke24.net/projects/TWT/archives/
The downloadable file is TWT-3.0.7.tar.bz2 but it can be opened in 7zip and the exe is in TWT-3.0.7.tar.bz2\TWT-3.0.7.tar\TWT\bin. Then:
twt -x outputfile.txt "c:\some path\mywad.wad"/SCRIPTS
and it'll write the SCRIPTS lump to outputfile.txt.
Note - - - The lump name is CASE SENSITIVE, so it must be SCRIPTS or as it is written in the wad. And TWT will overwrite outputs without warning.
If a megawad has several maps and each of them have a single SCRIPTS lump, I don't know. If the levels have a MAPnn/EnMn header the individual maps can extracted with Deutex: https://github.com/Doom-Utils/deutex
deutex -doom2 "c:\path to doom2 iwad" -levels -xtract "c:\some path\mywad.wad"
UDMF is supported (I think). The -doom2 "c:\path to doom2 iwad" is as it is. The path doesn't include \doom2.wad in it. And it could be useful to make some folder "tempfolder" inside the deutex folder first, then add it to the command line. Otherways Deutex will litter the resources all around:
deutex -doom2 "c:\path to doom2 iwad" -dir tempfolder -levels -xtract "c:\some path\mywad.wad"
Then use twt to wads in tempfolder\levels.
https://www.nuke24.net/projects/TWT/archives/
The downloadable file is TWT-3.0.7.tar.bz2 but it can be opened in 7zip and the exe is in TWT-3.0.7.tar.bz2\TWT-3.0.7.tar\TWT\bin. Then:
twt -x outputfile.txt "c:\some path\mywad.wad"/SCRIPTS
and it'll write the SCRIPTS lump to outputfile.txt.
Note - - - The lump name is CASE SENSITIVE, so it must be SCRIPTS or as it is written in the wad. And TWT will overwrite outputs without warning.
If a megawad has several maps and each of them have a single SCRIPTS lump, I don't know. If the levels have a MAPnn/EnMn header the individual maps can extracted with Deutex: https://github.com/Doom-Utils/deutex
deutex -doom2 "c:\path to doom2 iwad" -levels -xtract "c:\some path\mywad.wad"
UDMF is supported (I think). The -doom2 "c:\path to doom2 iwad" is as it is. The path doesn't include \doom2.wad in it. And it could be useful to make some folder "tempfolder" inside the deutex folder first, then add it to the command line. Otherways Deutex will litter the resources all around:
deutex -doom2 "c:\path to doom2 iwad" -dir tempfolder -levels -xtract "c:\some path\mywad.wad"
Then use twt to wads in tempfolder\levels.
Re: Extract Scripts Lumps From Multiple WADs?
The wads are indeed single map wads, so twt on its own does exactly what I need. I got it working easily enough. Thank you very much.
Thanks also for letting me know that DEUTex is still alive. I assumed that it had been abandoned many years ago.
Thanks also for letting me know that DEUTex is still alive. I assumed that it had been abandoned many years ago.