DynamiteKaitorn Posted June 2, 2018 Okay so I've messed with ACS scripting for GZDooMBuilder (BugFix) And can do basic (and not-so basic) scripts. Is it possible to have an ACS script work without needing a fixed map and for it to work with .pk3 file format? 0 Share this post Link to post
1 Aquila Chrysaetos Posted June 2, 2018 Of course. Here's a handy link to the ZDoom Wiki providing a quick tutorial. https://zdoom.org/wiki/LOADACS 1 Share this post Link to post
1 Bauul Posted June 2, 2018 (edited) Funnily enough you do every time you write a script. The very first line, "#include zcommon.acs", is calling a whole bunch of scripts that aren't connected to a specific map. 3 Share this post Link to post
1 Bauul Posted June 3, 2018 1 hour ago, therektafire said: Wait I thought zcommon is part of the "standard library" per se of ACS and when you compile your script it gets added to it (hence the #include part). So the include is part of the acs bytecode and is executed at runtime and not a compiler directive that is executed at compile time? I didn't know that :/ Then again I'm not that experienced with acs itself so I guess of course I wouldn't know that lol No you're right. I may have misread it, but my understanding of the original question wasn't about executing scripts outside of a map, but merely storing them in the pk3 unconnected to a particular map, and subsequently running them in any map you like. 1 Share this post Link to post
0 DynamiteKaitorn Posted June 2, 2018 4 hours ago, Bauul said: Funnily enough you do every time you write a script. The very first line, "#include zcommon.acs", is calling a whole bunch of scripts that aren't connected to a specific map. They're not? Huh! Nice info to know. :D 0 Share this post Link to post
0 therektafire Posted June 3, 2018 7 hours ago, Bauul said: Funnily enough you do every time you write a script. The very first line, "#include zcommon.acs", is calling a whole bunch of scripts that aren't connected to a specific map. Wait I thought zcommon is part of the "standard library" per se of ACS and when you compile your script it gets added to it (hence the #include part). So the include is part of the acs bytecode and is executed at runtime and not a compiler directive that is executed at compile time? I didn't know that :/ Then again I'm not that experienced with acs itself so I guess of course I wouldn't know that lol 0 Share this post Link to post
0 Aquila Chrysaetos Posted June 3, 2018 zcommon.acs is the base for all your ACS work, and what you write does get compiled into it (use of #include and not #library). It functions similarly to a library, wherein it defines basic functions that your ACS code can use. When writing a library of your own, the first line should be, like in every other script, "#include zcommon.acs". With the #library command, you're adding code that's already been written, but cannot be modified by in-game code, which contains variables, arrays, and other things you've already defined, so while a given map's code may be dependent on the library in question, the library is dependent only on your included zcommon/common/vcommon (whatever you're using) ACS file. 0 Share this post Link to post
0 Gez Posted June 3, 2018 Mostly zcommon.acs provides all the identifiers needed to make legible scripts. When you forget to put that #include line, you get a ton of error messages about "function whatever used but not defined"; zcommon.acs contains these definitions. 1 Share this post Link to post
Okay so I've messed with ACS scripting for GZDooMBuilder (BugFix) And can do basic (and not-so basic) scripts. Is it possible to have an ACS script work without needing a fixed map and for it to work with .pk3 file format?
Share this post
Link to post