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.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
::Bloodfury::
Posts: 310
Joined: Mon Aug 01, 2011 7:39 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: Finland

View ACS code in Slade 3?

Post by ::Bloodfury:: »

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
Cherno
Posts: 1309
Joined: Tue Dec 06, 2016 11:25 am

Re: View ACS code in Slade 3?

Post by Cherno »

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
::Bloodfury::
Posts: 310
Joined: Mon Aug 01, 2011 7:39 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: Finland

Re: View ACS code in Slade 3?

Post by ::Bloodfury:: »

well. I guess my only chance is to contact the author of SmoothDoom. :D
User avatar
Void Weaver
Posts: 724
Joined: Thu Dec 18, 2014 7:15 am
Contact:

Re: View ACS code in Slade 3?

Post by Void Weaver »

@Cherno:
Do you know other ACS decompilers aside from ListACS and Descript?
User avatar
Tartlman
Posts: 226
Joined: Thu Oct 11, 2018 5:24 am
Location: meme hell
Contact:

Re: View ACS code in Slade 3?

Post by Tartlman »

::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
Cherno
Posts: 1309
Joined: Tue Dec 06, 2016 11:25 am

Re: View ACS code in Slade 3?

Post by Cherno »

Void Weaver wrote:@Cherno:
Do you know other ACS decompilers aside from ListACS and Descript?
No.
User avatar
::Bloodfury::
Posts: 310
Joined: Mon Aug 01, 2011 7:39 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: Finland

Re: View ACS code in Slade 3?

Post by ::Bloodfury:: »

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.
Gez
 
 
Posts: 17833
Joined: Fri Jul 06, 2007 3:22 pm

Re: View ACS code in Slade 3?

Post by Gez »

Use the "view as text" button on those without the extension.
User avatar
Kappes Buur
 
 
Posts: 4114
Joined: Thu Jul 17, 2003 12:19 am
Graphics Processor: nVidia (Legacy GZDoom)
Location: British Columbia, Canada
Contact:

Re: View ACS code in Slade 3?

Post by Kappes Buur »

::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 all

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 all

#include "zcommon.acs"

script 65535 (void) // addr = 8, flags=0000
{
    SetResultValue(GetCVar("retoggle"));
    Terminate;
}
User avatar
::Bloodfury::
Posts: 310
Joined: Mon Aug 01, 2011 7:39 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: Finland

Re: View ACS code in Slade 3?

Post by ::Bloodfury:: »

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
Cherno
Posts: 1309
Joined: Tue Dec 06, 2016 11:25 am

Re: View ACS code in Slade 3?

Post by Cherno »

Try running it in a command window (Start-execute-"cmd") so you can see the parameters.
User avatar
Jack in the Nox
Posts: 2
Joined: Sat Apr 01, 2023 11:03 am
Preferred Pronouns: He/Him

Re: View ACS code in Slade 3?

Post by Jack in the Nox »

Hello everyone!
I am trying to open this ACS file (the extension TXT is just so I could upload it)
When I open it using the instruction you gave I get a text file reading this:

Could not open -d

Can anyone help me please? :D
Attachments
test.o.txt
(4.14 KiB) Downloaded 12 times
Post Reply

Return to “Scripting”