ACS scripting: Difference between revisions

From Eternity Wiki
Jump to navigationJump to search
(Created page with "For the upcoming Hexen implementation, Eternity supports ACS scripts. Note that unlike in ZDoom, it requires the vanilla Hexen format, which can be compiled using modern ACC by u...")
 
No edit summary
Line 21: Line 21:


ACS scripts can be tested from the [[console]] by using the '''puke''' command.
ACS scripts can be tested from the [[console]] by using the '''puke''' command.
== ACS spawn IDs ==
For Hexen compatibility, parameterized specials like '''Thing_Spawn''' or '''Thing_SpawnNoFog''' use the '''acs_spawndata''' { '''num''' } properties of [[thingtype]]s, instead of using doomednum, dehackednum or EDF mnemonics.


[[Category:Editing reference]]
[[Category:Editing reference]]

Revision as of 13:18, 5 March 2012

For the upcoming Hexen implementation, Eternity supports ACS scripts. Note that unlike in ZDoom, it requires the vanilla Hexen format, which can be compiled using modern ACC by using the -h command-line switch, or by using an old version of ACC. Comprehensive information regarding the ACS language for Hexen can be found at the Official Hexen Technical Specs by Ben Morris and Ben Gokey.

All parameterized specials can be called from ACS as functions.

Back to Editing reference

Using ACS for your map

ACS scripts can be used with Doom-format maps through the help of EMAPINFO and ExtraData. The MapInfo entry for the map needs at least a specifier for its ExtraData lump and compiled ACS lump (setting the extradata and acsscript entries).

The script can be written in a text editor and compiled using acc (or, in new ACC's case, acc -h) and imported with a tool like SLADE3, which supports editing your map with Doom Builder 2 simultaneously.

Important: don't set the acs script name to BEHAVIOR and put it after BLOCKMAP. This will break forward compatibility of your map with future versions of Eternity that support the Hexen format, which can be identified by looking for the annexed BEHAVIOR lump. Only use BEHAVIOR when Hexen and/or UDMF format becomes possible in Eternity.

ACS scripts will be callable from map linedefs by using the parameterized 365 (ACS_Execute) special through an ExtraData record of the linedef. Note that currently there is no ACS_ExecuteAlways special.

Calling ACS scripts from actor frames

Eternity actors can call ACS scripts directly, by using the StartScript codepointer.

Testing ACS scripts from console

ACS scripts can be tested from the console by using the puke command.

ACS spawn IDs

For Hexen compatibility, parameterized specials like Thing_Spawn or Thing_SpawnNoFog use the acs_spawndata { num } properties of thingtypes, instead of using doomednum, dehackednum or EDF mnemonics.