Map scripts working without SCRIPT
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.
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.
Map scripts working without SCRIPT
So I was just looking my wad with SlumpEd when I realized that the SCRIPT-lump of my map was gone (not sure if I accidently deleted it or not). Unfortunately,I dont have a single back-up file of my wad, not even in bin, so I can't search any older versions of my wad which could possibly contain the SCRIPT. Now, the funny thing is that all the scripts are still working in the map, like they were still stored somewhere. Any ideas how I could see them?
Re: Map scripts working without SCRIPT
Despite what many people think, the SCRIPT lump is not part of the map data and is not required to run the scripts on the map. It is just a convenient way of storing the source code for your scripts that some editing programs use. It's what DB uses so most people are familiar with that convention and, as a result, many people think that the SCRIPT lump is essential for running the map. When the scripts are compiled, the compiled version is stored as the BEHAVIOR lump of your map. This is the lump that is essential to running your map properly. The SCRIPT lump is not essential and because I don't use DB I don't store my uncompiled scripts in the WAD at all. I keep separate text files and back them up regularly to try and avoid exactly what has happened to you.
However, on to your real question - can you get your scripts back. The answer is probably not. You may be lucky. If you have compiled your scripts using the old format like Hexen used to use, there are a few script decompilers available that can read the BEHAVIOR lump and decompile it to readable code that can then be edited and recompiled. However, I suspect that it is unlikely that your BEHAVIOR lump is in the old format. Unfortunately, there is no equivallent script decompiler for the newer format. I believe that there may be something that can get some information from a newer BEHAVIOR lump but this is quite different from readable, recompilable code and it would involve quite a bit of work to convert it back to usable scripts.
tl:dr You probably can't do it.
However, on to your real question - can you get your scripts back. The answer is probably not. You may be lucky. If you have compiled your scripts using the old format like Hexen used to use, there are a few script decompilers available that can read the BEHAVIOR lump and decompile it to readable code that can then be edited and recompiled. However, I suspect that it is unlikely that your BEHAVIOR lump is in the old format. Unfortunately, there is no equivallent script decompiler for the newer format. I believe that there may be something that can get some information from a newer BEHAVIOR lump but this is quite different from readable, recompilable code and it would involve quite a bit of work to convert it back to usable scripts.
tl:dr You probably can't do it.

Re: Map scripts working without SCRIPT
Well,that blows.
Thanks anyway.
