<aside> 🚨 **A few pages are still in flux, so expect unfinished pages that will be updated as time passes. Keep checking back later for more updated info!
If you have any specific questions before a given page is finished, be sure to ask around for what you’re trying to do!**
</aside>
<aside> 🚨 It is heavily recommended to finish the tutorial for DECORATE before reading this one! ACS can be used without DECORATE, but it is truly best understood as compared to DECORATE and when used as a complement. This tutorial will refer back to information in the previous tutorial and skip past basics already covered.
</aside>
Before we can fully delve into making the weapons and player classes that we typically see in mods across the community, we also need to understand the other programming language that Zandronum gives us access to. If DECORATE is the language which deals with individual pieces of the world, ACS is the glue which allows us to manage a global state and write scripts to handle interactions between those different DECORATE pieces.
<aside> đź’ˇ Required Materials:
Generally speaking, whenever we program, the code that we read and write is not understandable to our computer directly. Instead, the code that we write is typically interpreted or “compiled” into lower level languages that computers do understand, such as machine code. Whenever we load the game, part of that load time is automatically spent parsing and interpreting our DECORATE code to turn it into something usable by the computer.
Likewise, the ACS code we’re about to write also cannot be directly understood by machines. Unlike DECORATE, however, Zandronum won’t automatically compile it, we need to do that ourselves. We do this by making use of a compiler. Different programming languages are compiled by different compilers, with some languages even having multiple compiler options. For ACS, ACC is the most popular, basic compiler.
We’ll be using SLADE 3 once again to write our ACS code, so we need to configure it to use ACC, which can be downloaded from the link at the top of this page. Once you have it downloaded, extract the entire ZIP file to any folder you want. We’ll point SLADE 3 to the acc.exe
file that you just extracted.
Once you’ve saved that preference, you should be all ready to begin compiling ACS.
<aside> đź’ˇ Making maps is another domain where programming in ACS is relevant, so you can additionally write ACS in tools such as Ultimate Doom Builder. In that instance, Ultimate Doom Builder already comes with a version of ACC preconfigured for its script editor.
</aside>
We can create our project including ACS the same as creating any DECORATE-involving project. Using SLADE, you just need to make a ZIP archive and we’ll have an empty project to begin placing code into.
Projects which include ACS will typically have two folders related to ACS, acs_source
and acs
. The acs_source
folder can have any number of subfolders and will hold our uncompiled, “source” ACS files. The acs
folder typically doesn’t have any folders and is where our compiled ACS files will end up. SLADE will automatically create our acs
folder for us if it’s missing, so we’ll only worry about creating the acs_source
folder.