Using ACSUtils

Adding ACSUtils to your project

Download the latest acsutils-x.x.x.zip.

Copy acsutils.acs into your project.

Include acsutils.acs after zcommon.acs:

#include "zcommon.acs"
#include "acsutils.acs"

floor(), ceil() and round() conflicts

floor, ceil and round are ZDoom's rounding functions. They silently return 0 in Zandronum 3.0 because they are not implemented. Because of that, ACSUtils provides its own implementations of these functions that conflict with built-in ZDoom ones.

If your mod is exclusively for ZDoom, you can just remove the ACSUtils implementations from acsutils.acs.

A better option is to download zcommon for Zandronum. It renames built-in ZDoom rounding functions to ZDoom_floor, ZDoom_ceil and ZDoom_round, and also adds the latest Zandronum functions that are not present in ACC zcommon.

Once Zandronum adds built-in ZDoom rounding functions, they will be removed from ACSUtils.

Function name conflicts

If your project has functions (or even variables, if you are using ACC) with the same names as ACSUtils functions, it won't compile. Rename the functions in your project to fix it. ACSUtils functions are named to avoid some of the most annoying conflicts, but several renames are still needed in big projects.

If your project has functions that are already present in ACSUtils and do the same (for example, rounding), you can just remove them.

Optional enhancements

Copy decorate/changeflag.txt to your decorate and #include it to make ChangeFlag work.

Copy cvarinfo.acsutils to your project root to allow the server to hide ACSUtils errors from clients using the acsutils_noerrors cvar (it will automatically load and not conflict with your mod's CVARINFO because ZDoom ignores the extension).

BCC enhancements

If you are using BCC, try BCSUtils – a BCC-enhanced strictly typed version of ACSUtils with the same functions!