Using ACS scripts in GZDoom 3

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
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!)
Castrol
Posts: 2
Joined: Sat Oct 27, 2018 6:55 am

Using ACS scripts in GZDoom 3

Post by Castrol »

Hello,
I'm here cos I have a big problem which made me to lose a huge amount of time so far.

I am trying to modify a mod, in particular I am referring to the UDV visor mod.

I installed Slade and ACC compiler and I tried to simply change a number in one of the ACS source file contained inside the .pk3 mod file.

I compiled it and I actually saw that my actions modified the byte-size of the object file associated to the source file I was editing.

I saved all in a new .pk3 file and loaded it with GZDoom but I noticed that my modification didn't show up during gameplay. Actually even big modifications that simply HAVE to do something don't create any effect in game.

I'm sure the problem isn't in my understanding of the language since I am pretty used to C++. The problem lays on how I re-pack everything in the .pk3 file or something like that.

No tutorial are avaiable that explain how to create a .pk3 archive which uses ACS script so I can't do the task alone, I need your help, please :)
User avatar
Enjay
 
 
Posts: 27306
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Using ACS scripts in GZDoom 3

Post by Enjay »

If the ACS is map specific, the compiled script should be inside the WAD for that map as the BEHAVIOR lump.

If it's a library that is not specific to any map, but loaded using the LOADACS lump, the compiled script should be inside a folder called ACS.

I'm not fully familiar with the UDV mod but it sounds like case 2 is more likely to be relevant to you. This might help: [wiki]LOADACS[/wiki] and maybe [wiki]Libraries[/wiki] and also [wiki]Namespace[/wiki].
Castrol
Posts: 2
Joined: Sat Oct 27, 2018 6:55 am

Re: Using ACS scripts in GZDoom 3

Post by Castrol »

I will try again to create a new .pk3 archive with a single 'print' function in it just to test if I can make these scripts run during the game.
That said, the problem that I have is strange because when I tried to modify the mod I didn't changed the structure of the original archive, I just modified with slade one .acs source file and then recompiled it.
As expected the compiled .o file appears inside the acs directory where all the other .o files are and even loadacs.txt is present (just under the ACS marker) so, as far as what you said there shouldn't be trubles here....but none of the changes I apply produce effect in the game. :cry:

Return to “Scripting”