Page 1 of 1

Script decompiler

PostPosted: Mon Sep 12, 2011 1:42 pm
by SFJake
Heh, okay. Simply, I wanted to edit Hexen's scripts. But the scripts in general are compiled, and not available through Doom Builder 2.

DB1 never had any trouble with it, but on a 64-bit windows 7, it tries to run deacc.exe and fails, saying its not compatible with this version of windows.

So, hum, how do I get to the scripts? Why doesn't Doom Builder 2 have that?

Re: Script decompiler

PostPosted: Mon Sep 12, 2011 1:56 pm
by Enjay
I know that DeePsea can do it under Win7. If you want a particular map's scripts I can do it for you.

It's just a shame that there isn't a decompiler for the newer format of scripts too.

Re: Script decompiler

PostPosted: Mon Sep 12, 2011 2:12 pm
by Kappes Buur
I've already done that for all 31 maps.

Re: Script decompiler

PostPosted: Mon Sep 12, 2011 2:23 pm
by SFJake
Kappes Buur wrote:I've already done that for all 31 maps.

Thats perfect, thanks.

Enjay wrote:I know that DeePsea can do it under Win7. If you want a particular map's scripts I can do it for you.

It's just a shame that there isn't a decompiler for the newer format of scripts too.

There isn't? Shame. But Hexen doesn't need it, at least.

I'll use DeepSea for the expansion scripts.

Re: Script decompiler

PostPosted: Tue Sep 13, 2011 9:15 am
by disposable_username2
Enjay wrote:It's just a shame that there isn't a decompiler for the newer format of scripts too.
What about jspenguin's listacs?

Re: Script decompiler

PostPosted: Tue Sep 13, 2011 10:31 am
by Kappes Buur
disposable_username2 wrote:What about jspenguin's listacs?


Listacs never worked for me, all it would do is generate the pcode:

Code: Select allExpand view
25: function 1 (2, 1, 0) -> 1
          25: PUSHSCRIPTVAR 1
          27: PUSHBYTE 1
          29: LT
          30: IFNOTGOTO 38
          35: PUSHBYTE 1
          37: RETURNVAL
          38: PUSHSCRIPTVAR 0
          40: ASSIGNSCRIPTVAR 2
          42: DECSCRIPTVAR 1
          44: PUSHSCRIPTVAR 1
          46: IFNOTGOTO 60
          51: PUSHSCRIPTVAR 0
          53: MULSCRIPTVAR 2
          55: GOTO 42
          60: PUSHSCRIPTVAR 2
          62: RETURNVAL


from an object file or BEHAVIOR lump.

Re: Script decompiler

PostPosted: Tue Sep 13, 2011 12:14 pm
by disposable_username2
Kappes Buur wrote:Listacs never worked for me, all it would do is generate the pcode
Even with the -d switch?

Re: Script decompiler

PostPosted: Tue Sep 13, 2011 1:22 pm
by Kappes Buur
Ah, what d'yo know, that worked :)

Code: Select allExpand view
listacs -d file.o >> file.acs


Thank you disposable_username2