ZandroX modding reference
Reference documentation for everything ZandroX adds to, or changes in, the modding surface it inherits from Zandronum — DECORATE, ACS, GLDEFS and MAPINFO.
This is the modder-facing half of the documentation. It is deliberately separate from the
engineering notes in src/zandronum/src/features/, which
explain how a feature is implemented and what it cost; those are linked from each page under
Implementation notes when you need to go deeper.
How to read a page
Pages follow the ZDoom wiki's layout, because that is the reference Doom modders already know:
| Element | Meaning |
|---|---|
| Bold class name at the top | The class the function is a member of. It can only be called from that class's states (or a subclass's). |
| Signature line | Return type first, then the name, then parameters as type name = default. |
| Availability block | Whether the entry exists in stock Zandronum, and any restriction on where it works. Read this first — several ZandroX additions are single-player only. |
| Usage | What it does, what existed before it, and what it costs. |
| Parameters | One entry per parameter. Flag constants are listed under the parameter that takes them. |
| Examples | A complete, loadable DECORATE actor, with prose explaining why it is built that way. |
| Best practices, Online | How to use it well, and what runs where in a netgame. |
Anything marked ZandroX only does not exist in Zandronum 3.2 or in any other port unless the page says otherwise. A mod that uses it will not load elsewhere.
An ACS page's examples marked bcs and acs are whole libraries. The hidden <!-- example -->
comment after each names the console steps that run it and what each prints; fuactl scenarios acsdocs compiles
every bcs one with zt-bcc and every acs one with ACC, and checks them in the engine, so
they stay right as the engine changes.
Compiling ACS: zt-bcc or ACC
These pages are written for zt-bcc, and it is the compiler to use.
Its zcommon.bcs declares every ZandroX function and constant, it checks each argument's type, and it adds what
plain ACS lacks: vec2 and vec3 types, ZScript's random[Stream] spelling, function references (which trace
callbacks need), and -target builds that fall back to plain ACS on other engines.
ACC still compiles most of it. Include acs/fua.acs in place of zcommon.acs, never beside
it, as ACC stops on a name defined twice:
#library "mylib"
#include "fua.acs"
fua.acs declares everything zt-bcc's zcommon.bcs does, Zandronum's and UZDoom's names included, plus
fua_Vec and the few names only ACC's own headers have. It is generated from zcommon.bcs (fuactl acc-header --write), so it keeps up as ZandroX grows. What needs zt-bcc itself stays zt-bcc's:
| Feature | With ACC |
|---|---|
| Trace callbacks, function references | not available |
vec2 and vec3 |
call fua_Vec with a FUA_VEC_ operation |
random[Stream] |
call fua_Random, fua_FRandom and fua_SetRandomSeed by name |
| Type checks | none: a string passed as a handle compiles, and the call returns 0 |
| Action specials past 255 | not available; they need zt-bcc's -target fua |
Pages where ACC differs end their examples with one for ACC.
Categories
ACS
- Actor size properties
APROP_Radius,APROP_Height,APROP_HitRadius,APROP_HitHeight(#104) - Post-process shaders
fua_SetShaderEnabledandfua_SetShaderUniform*, for everyone or only the activator, optionally timed; the uniform calls set a texture shader'sfua_Uniformlines too. - Actor materials
fua_SetActorMaterialandfua_SetActorUniform*, one actor's material and its own uniforms. - Vector math
fua_Vec, the exact length, unit, dot and cross zt-bcc'svec2andvec3call with-target fuaorany. - Function references BCS function references compare equal between modules and last across map changes.
- UZDoom's ACS functions
CheckProximity,DamageActor,GetLineX, net ids,Floor/Round/Ceiland more, andAPROP_MaxStepHeight, at UZDoom's numbers. - Q-Zandronum's ACS functions
CheckSolidFooting,GetNetworkState,UnlaggedReconcile,TagActive,VelInterceptand more, by Q-Zandronum's names at numbers of ours. - Actor handles
fua_GetActorHandleand its siblings: an actor named by a handle instead of a TID, kept across savegames and hub maps, and how to use them in clientside scripts. - Actor fields
fua_GetFieldandfua_SetField: any DECORATE field read by name,user_variables written. - Player fields and handle checks
a player pawn's properties read and written by
name, as ZScript allows, and
fua_HandlePlayerandfua_HandleMatches: is a handle a player, a monster, a weapon or any class. - Actor data
fua_SetActorDataand its siblings: up to 64 named values kept on any actor, gone with it, kept in savegames and hub maps. - Actor queries
fua_FindActorsandfua_FindActorsOfClass: actors found by range or class, filtered and sorted, kept as handles a script reads at its own pace. - Line traces
fua_LineTraceandfua_Trace: ZScript'sLineTraceandLineTracerin ACS, rules deciding each hit, every hit property read back from a tracer, and lines and sectors read by index withfua_LineInfoandfua_SectorInfo. - Named random streams
fua_Random,fua_FRandomandfua_SetRandomSeed: sequences of their own that never moveRandom()'s, kept in savegames and demos. - HudMessage layers
HUDMSG_LAYER_FUA_TOP: HudMessages drawn over the co-op info, so a menu built from them covers it. - Hiding HUD parts
fua_SetHudHidden: the co-op info and the target's name hidden on the player's own screen while a script's menu is open. - Burrowing
fua_BurrowProbe,fua_BurrowTextureandfua_BurrowAbort: whether there is a way through a wall, the textures a burrow goes in and out by, ending one; and the four burrow properties. - Sticking
fua_Stick,fua_Unstick,fua_StickHostandfua_StickInfo: sticking an actor to another and letting it go, what holds it, finding what is stuck to an actor, andStickHostAlpha.
DECORATE — psprite layers
The A_Overlay family, restored from GZDoom in
#44. Lets a weapon draw more than the two stock
player-sprite layers.
- Psprite layers the layer model these functions operate on. Start here.
- A_Overlay create, replace, or remove a layer
- A_ClearOverlays remove a range of layers
- A_OverlayFlags
set or clear a layer's
PSPF_flags - A_OverlayOffset move a layer
- A_OverlayScale resize a layer
- A_OverlayAlpha set a layer's translucency
- A_OverlayRenderStyle set a layer's render style
- A_OverlayRotate turn a layer
- A_OverlayPivot set the point a layer turns and scales about
- A_OverlayPivotAlign pick the corner or edge that point is measured from
- A_OverlayVertexOffset move one corner of a layer
- A_OverlayTranslation recolour a layer with a named translation
- OverlayID expression function; the calling layer's id
DECORATE — ripping
Authorable ripper behaviour (#144): budgets, damage
falloff, a tier system, and a state that fires on each rip. Previously ripping was binary —
+RIPPER or nothing — with no properties attached to it at all.
- Ripping the rip system: budgets, tiers, detonation rules, netplay. Start here.
Properties — RipperMaxDamage · RipperCount · RipperMaxCount · RipperDamageFactor · RipperLevel · RipLevelMin · RipLevelMax · RipSound
Flags — +NORIPSOUND · +RIPEXPLODEONLIMIT · +RIPPERNOPAIN · +RIPSOUNDNORESTART · +USERIPSTATE
States — Rip
Functions — A_SetRipperLevel · A_SetRipMin · A_SetRipMax · A_ResetRipCounters
DECORATE — burrowing
Projectiles that go into a wall, floor, ceiling or 3D floor and come out the far side, with flags for which surfaces, times for going in and coming out, a distance limit, and states for their debris.
- Burrowing how a burrow moves, what is never burrowed, bouncers, netplay. Start here.
Properties — BurrowDistance · BurrowEnterTime · BurrowExitTime · BurrowCount
Flags — +CANBURROW and its four surfaces · +BURROWDEADENDS · +BURROWGRAVITY · +BOUNCEBEFOREBURROW
States — Burrow, Burrow.Exit, Burrow.DeadEnd
DECORATE — sticking
Projectiles that latch onto the wall, floor, ceiling or actor they hit and ride it, lifts, doors, 3D floors and polyobjects included, with flags for which surfaces and whom, states for sticking and losing the host, and actions to stick any actor to another.
- Sticking what sticks, how it rides, losing its host, netplay, and replacing a warp loop. Start here.
Flags — +STICKY and its four surfaces · +STICKENEMIESONLY · +STICKFOLLOWANGLE · +STICKPASTDEATH · +STICKFACESURFACE · +STICKPROOF
Property — StickHostAlpha
States — Stick, Stick.Actor, Stick.Wall, Stick.Floor, Stick.Ceiling, Stick.Lost
Actions — A_fua_Stick · A_fua_Unstick
DECORATE — actor properties
Attack hitboxes independent of the collision box (#62), so an actor can be shot at a different extent than it moves at.
- Attack hitbox which attack paths honour it, and the widening and narrowing rules. Start here.
- HitRadius horizontal attack extent
- HitHeight
vertical attack extent (alias:
ProjectilePassHeight) - fua_HitSides a polygon outline for the attack hitbox, so it is not hit early along diagonals
DECORATE — runtime size
Changing an actor's size after spawn (#104), rather than only at class-definition time.
- A_SetSize change the physical collision box, optionally reverting if the actor no longer fits
- A_SetHitSize change the attack hitbox only
DECORATE — state jumps
- A_JumpIfInput jump when a player is holding given buttons (#56). Puts input tests in the state sequence instead of a client-side ACS script. Unlike the overlay family, this one works in netgames.
DECORATE — UZDoom's features
- UZDoom's DECORATE features
UZDoom's math and actor queries, float user
variables, new functions, parameters and properties, and gameplay flags such as
+HITOWNER,+STOPRAILSand+NOINFIGHTSPECIES, under UZDoom's names. - ThruBits
pass-through groups: actors sharing one pass through each other, and
+ALLOWTHRUFLAGSpuffs pass actors by their own flags; ACS reaches them asAPROP_FUA_ThruBits. - Render flags
flipped, rolled, square-pixel, camera-facing and mirror-only
sprites, flat and wall sprites, lights an actor ignores or fades, and Classic Transparency's
+ZDOOMTRANS. - MBF21 in DECORATE
the MBF21 codepointers under UZDoom's
MBF21_names,A_WeaponAlert, and MBF's+AVOIDHAZARDS,+STAYONLIFTand+BLOCKASPLAYER. - RejumpDelay
Zandronum's
Player.RejumpDelay: how long a landed player waits to jump again.
Every DECORATE sample on these pages is loaded and spawned, offline and online, by fuactl scenarios decoratedocs.
GLDEFS
- Texture shaders
HardwareShaderandMaterialon a texture, flat or sprite: UZDoom's entries (SetupMaterial,ProcessMaterial,GetTexCoord,ProcessTexel,ProcessLight),TextureandDefinelines, normal, specular and PBR maps with their light models,fua_ProcessLightingto light aProcessshader as Zandronum 3.3 does or as UZDoom does, andfua_Uniformlines scripts set. - Actor materials
fua_Material: a shader an actor draws with, with uniforms of its own, given by DECORATE and changed by ACS. - Post-process shaders
UZDoom's
HardwareShader PostProcessblocks: full-screen shaders over the 3D view or the whole screen, on Vulkan and WebGPU. What a shader reads, the stages, precision, cost and the console commands.
Lumps
- MAPINFO every keyword ForkUnderA adds to MAPINFO, ZMAPINFO and GAMEINFO: intermission text and music, level redirects, gameplay and compatibility flags, skills, editor numbers, and the UZDoom keywords accepted but ignored.
- TRNSLATE
named translations, used by DECORATE's
Translation "Name"andA_SetTranslation. - UZDoom's lump keywords
CVARINFO's
nosave,cheatandlatch, skill health and armour factors, MENUDEFSize, SBARINFO'sIfCVarInt,IfWaterLevelandIfInvulnerable, and MODELDEF'sUseActorPitch.
Models
- Models
OBJ models, per-pixel dynamic lights, wide models that stay drawn, back-face
culling, and the
MODELDEFkeywords ForkUnderA adds. Start here. - FUAMODEL mark flat translucent models, such as floor rings, so monsters standing on them are drawn over them.
Mapsets
- Boom and MBF mapsets
UMAPINFO,COMPLVL, the compatmode presets, andsv_autocompat, which Boom-compatible mapsets should be hosted with. - MBF21
the DeHackEd fields, flags and codepointers, DEHEXTRA and DSDHacked, and their DECORATE
names: the boss flags,
+FULLVOLSEE, and the codepointers callable from DECORATE.
Not yet written
Merged features whose reference pages are still to be written, roughly in the order they are planned:
| Area | Feature | PR |
|---|---|---|
| DECORATE | A_NoiseAlert, A_StartSound, A_FireProjectile |
#102 |
| DECORATE | A_SpawnProjectile |
#98 |
| DECORATE | A_CheckRange gains two_dimension |
#103 |
| DECORATE | PSX / Doom 64 render-style flags | #116 |