View ACS code in Slade 3?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom 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.

View ACS code in Slade 3?

Postby ::Bloodfury:: » Sat Sep 07, 2019 2:31 pm

Hi, currently makin an own addition of sorts for an existing mod.

But I kinda would have to see the ACS codes within ACS subfolder.
For the life of me I just don't know how to view them.
Using view as text just displays blank sheet with a text ACS.
I would need to have access to the code and add my own modifications
into it.

How can this be done?
User avatar
::Bloodfury::
 
Joined: 01 Aug 2011
Location: Finland
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia (Modern GZDoom)

Re: View ACS code in Slade 3?

Postby Cherno » Sat Sep 07, 2019 3:18 pm

You need the uncompiled ACS file. If the mod doesn't include it (which is shameful! :wink: ) then I think you are out of luck. I have never found an ACS decompiler that produces decent results.
User avatar
Cherno
 
Joined: 06 Dec 2016

Re: View ACS code in Slade 3?

Postby ::Bloodfury:: » Sat Sep 07, 2019 3:24 pm

well. I guess my only chance is to contact the author of SmoothDoom. :D
User avatar
::Bloodfury::
 
Joined: 01 Aug 2011
Location: Finland
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia (Modern GZDoom)

Re: View ACS code in Slade 3?

Postby Void Weaver » Sat Sep 07, 2019 9:39 pm

@Cherno:
Do you know other ACS decompilers aside from ListACS and Descript?
User avatar
Void Weaver
Keeper of the Diablo bestiary storage Also amateur DECORATE-spaghetti weaver ಠ_ಠ
 
Joined: 18 Dec 2014

Re: View ACS code in Slade 3?

Postby Tartlman » Mon Sep 09, 2019 10:49 am

::Bloodfury:: wrote:well. I guess my only chance is to contact the author of SmoothDoom. :D


Try doing some more searching - usually, files that end with .o are the compiled files, and those that don't might be the uncompiled form.
User avatar
Tartlman
 
Joined: 11 Oct 2018
Discord: Tartlman#2947

Re: View ACS code in Slade 3?

Postby Cherno » Mon Sep 09, 2019 11:09 am

Void Weaver wrote:@Cherno:
Do you know other ACS decompilers aside from ListACS and Descript?


No.
User avatar
Cherno
 
Joined: 06 Dec 2016

Re: View ACS code in Slade 3?

Postby ::Bloodfury:: » Mon Sep 09, 2019 3:52 pm

Tartlman wrote:
::Bloodfury:: wrote:well. I guess my only chance is to contact the author of SmoothDoom. :D


Try doing some more searching - usually, files that end with .o are the compiled files, and those that don't might be the uncompiled form.


There are few files with the .o and rest do not have it. and all seem to be compiled ones. none can be viewed.
User avatar
::Bloodfury::
 
Joined: 01 Aug 2011
Location: Finland
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia (Modern GZDoom)

Re: View ACS code in Slade 3?

Postby Gez » Mon Sep 09, 2019 4:22 pm

Use the "view as text" button on those without the extension.
Gez
 
 
 
Joined: 06 Jul 2007

Re: View ACS code in Slade 3?

Postby Kappes Buur » Tue Sep 10, 2019 1:33 am

::Bloodfury:: wrote:Hi, currently makin an own addition of sorts for an existing mod.

But I kinda would have to see the ACS codes within ACS subfolder.
For the life of me I just don't know how to view them.
Using view as text just displays blank sheet with a text ACS.
I would need to have access to the code and add my own modifications
into it.

How can this be done?


It's easy enough with LISTACS, for example using a batch file such as

Code: Select allExpand view
listacs -d %1 >> %1.txt

and dragging the acs lump onto it will result in a decompiled txt file, as with GunRecoil.
Result: GunRecoil.txt

Code: Select allExpand view
#include "zcommon.acs"

script 65535 (void) // addr = 8, flags=0000
{
    SetResultValue(GetCVar("retoggle"));
    Terminate;
}
User avatar
Kappes Buur
 
 
 
Joined: 17 Jul 2003
Location: British Columbia Canada

Re: View ACS code in Slade 3?

Postby ::Bloodfury:: » Wed Sep 11, 2019 3:35 pm

Thanks Kappes.

But it is not quite clear to me how to achieve this.
I downloaded all the necessary tools and latest python.

Do I need to make a batch file from a wad or a lump?

As I cannot add those lines to listacss targetline to wads or lumps as they are not executables.

And when I try to run listacs etc. It just briefly blinks the commanline window and shuts the program.

So please, If you could assist me further that would be greatly appreciated. :)
User avatar
::Bloodfury::
 
Joined: 01 Aug 2011
Location: Finland
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia (Modern GZDoom)

Re: View ACS code in Slade 3?

Postby Cherno » Wed Sep 11, 2019 5:52 pm

Try running it in a command window (Start-execute-"cmd") so you can see the parameters.
User avatar
Cherno
 
Joined: 06 Dec 2016


Return to Scripting

Who is online

Users browsing this forum: No registered users and 2 guests