List of codepointers: Difference between revisions

From Eternity Wiki
Jump to navigationJump to search
No edit summary
Line 62: Line 62:


==Map objects==
==Map objects==
===Simple movement===
===Explosions===
These operations perform simple effects on thing's direction, position or velocity. The available codepointers are:
These are for area-of-effect damage, common with projectiles and bombs (e.g. barrels):
*[[Explode]]: classic DOOM splash damage. Deals 128 damage in a 128 radius.
*[[Detonate]]: like [[Explode]], but uses the [[thingtype]] "damage" field.
*[[DetonateEx]]: complete parameterized explosion.
*[[HticExplode]]: Heretic-compatible explosion, with predefined special behaviour depending on parameter.
*[[Mushroom]]: large mushroom explosion, from [[MBF]].
*[[Nailbomb]]: explosion with bullet shrapnels, from [[SMMU]].
 
===Projectile control===
*[[Tracer]]: one of the required components for homing missiles
 
===Monster behaviour===
These are designed mainly for monsters and similar shootable objects. The ones here are especially useful for any generic monster.
*[[Look]]: stand in guard, looking for targets.
*[[Chase]]: pursue a target and check for attack.
*[[FaceTarget]]: turn to target, look around it if it's partly invisible.
*[[CPosRefire]]: go to seestate if target is out of sight. Typical with sustained fire monsters.
*[[SpidRefire]]: like CPosRefire but with slightly different reaction times.
*[[Pain]]: play the pain sound.
*[[Fall]]: typical during death, this removes the SOLID flag.
*[[Scream]]: plays the death sound.
*[[XScream]]: makes the extreme death (gib) sound.
*[[BossDeath]]: special monster death functions (such as Baron death in E1M8)
*[[KeenDie]]: open 666-tagged doors on death of all monsters of the same species.
 
====Generic control====
*[[Scratch]]: custom melee attack
*[[Die]]: causes suicide
 
====Classic monster actions====
These are specific to the stock DOOM monsters and should only be used in mods if the new monsters are meant to be similar.
 
=====Simple monster attacks=====
*[[PosAttack]]: former human, single inaccurate bullet attack.
*[[SPosAttack]]: sergeant, three-bullet shotgun attack.
*[[CPosAttack]]: pistol attack with "shotgn" noise (like with chaingunners).
*[[TroopAttack]]: imp attack
*[[SargAttack]]: demon and spectre bite
*[[SkullAttack]]: lost soul charge
*[[HeadAttack]]: cacodemon attack
*[[BruisAttack]]: baron and hell knight attack
*[[BspiAttack]]: arachnotron plasma attack
*[[CyberAttack]]: cyberdemon rocket attack
 
=====Movement sound=====
*[[Metal]]: metal (spiderdemon and cyberdemon) sound effect — also includes Chase!
*[[BabyMetal]]: bspwlk (arachnotron) sound effect — also includes Chase!
*[[Hoof]]: cyberdemon hoof sound — also includes Chase!
 
=====Pain elemental=====
*[[PainAttack]]: elemental lost soul spawn
*[[PainDie]]: elemental death action (3 lost souls spawn)
 
=====Revenant=====
*[[SkelWhoosh]]: revenant swing noise — also includes FaceTarget
*[[SkelFist]]: revenant punch
*[[SkelMissile]]: revenant missile
 
=====Mancubus=====
*[[FatRaise]]: mancubus warning — also includes FaceTarget
*[[FatAttack1]]: mancubus left attack
*[[FatAttack2]]: mancubus right attack
*[[FatAttack3]]: mancubus front attack
 
=====Archvile=====
*[[VileChase]]: same as Chase, but resurrecting encountered cadavers.
*[[VileStart]]: archvile heat-up noise
*[[VileTarget]]: spawn a vile fire effect on target
*[[VileAttack]]: arch vile toss
*[[StartFire]]: flamst sound effect — also includes "Fire" action!
*[[Fire]]: stick on the face of attacker's target, like the vile fire
*[[FireCrackle]]: flame sound effect — also includes "Fire" action!
 
=====DOOM 2 final boss=====
*[[BrainAwake]]: loud bossit sound effect
*[[BrainSpit]]: cube spawn
*[[SpawnFly]]: spawn cube controller
*[[SpawnSound]]: boscub sound effect — also includes SpawnFly
*[[BrainPain]]: loud bospn sound effect
*[[BrainScream]]: giant demon wall explosion sequence
*[[BrainExplode]]: brain perpetual explosion controller
*[[BrainDie]]: exits the level.
 
===Player avatar behaviour===
These are designed for the player-controlled thing (e.g. DoomMarine).
*[[PlayerScream]]: player-specific, health-dependent death sound, to be used instead of [[Scream]].
*[[RavenPlayerScream]]: Heretic variant.
*[[XScream]]: make the ex
 
===Various effects===
These specials are more advanced than what's available in the classic games and do not belong specifically to projectile or monster usage
*[[Face]]: face a specified angle
*[[Face]]: face a specified angle
*[[Stop]]: set velocity to 0
*[[Stop]]: set velocity to 0
*[[Turn]]: turn around a specified angle
*[[Turn]]: turn around a specified angle
*[[Spawn]]: create another object on top of this one
*[[LineEffect]]: activate a tag using a special
====Sounds====
*[[PlaySound]]: play a chosen sound
*[[PlaySoundEx]]: extended custom sound support
====Frame scripting====
*[[RandomJump]]: randomly decides to set current state to a chosen one.
*[[Jump]]: like [[RandomJump]] but compatible with the Decorate-style state syntax.
===Explosions and flames===
===Explosions and flames===
====BFG9000====
====BFG9000====
Line 73: Line 174:
*[[BFGSpray]]: BFG explosion afterglow
*[[BFGSpray]]: BFG explosion afterglow
*[[BouncingBFG]]: SMMU bouncing BFG
*[[BouncingBFG]]: SMMU bouncing BFG
====DOOM 2 Final boss====
*[[BrainExplode]]: brain perpetual explosion controller
*[[BrainScream]]: giant demon wall explosion sequence
*[[SpawnFly]]: spawn cube controller
====Explosions====
*[[Detonate]]: thing damage controlled explosion
*[[DetonateEx]]: parameterized detonate action
*[[Explode]]: rocket/barrel splash damage
*[[HticExplode]]: heretic-compatible explosion
*[[Mushroom]]: mushroom explosion
*[[Nailbomb]]: explosion with shrapnels
====Homing projectiles====
====Homing projectiles====
*[[GenTracer]]: generic tracer
*[[GenTracer]]: generic tracer
*[[HticTracer]]: like those golem skulls
*[[HticTracer]]: like those golem skulls
*[[Tracer]]: one of the required components for homing missiles
====Others====
====Others====
*[[Fire]]: stick on the face of attacker's target, like the vile fire
=====Heretic specific=====
=====Heretic specific=====
*[[BeastPuff]]: weredragon fire belch smoke
*[[BeastPuff]]: weredragon fire belch smoke
Line 104: Line 192:
===AI===
===AI===
*[[AlertMonsters]]: shout so other monsters chase the player
*[[AlertMonsters]]: shout so other monsters chase the player
*[[Chase]]: pursue a target and check for attack
*[[CPosRefire]]: go to seestate if target is out of sight
*[[FaceTarget]]: turn to target, look around it if it's partly invisible
*[[GenRefire]]: customizable refire control
*[[GenRefire]]: customizable refire control
*[[KeepChasing]]: pursue target without attacking
*[[KeepChasing]]: pursue target without attacking
*[[Look]]: stand in guard, looking for targets
*[[RandomWalk]]: random wandering for inactive enemies
*[[RandomWalk]]: random wandering for inactive enemies
*[[Sor1Chase]]: d'sparil mount specific chase
*[[Sor1Chase]]: d'sparil mount specific chase
*[[Sor1Pain]]: d'sparil mount specific twitch. Calls Pain.
*[[Sor1Pain]]: d'sparil mount specific twitch. Calls Pain.
*[[SpidRefire]]: like CPosRefire, slightly modified
*[[VileChase]]: same as Chase, but resurrecting encountered cadavers


===AI attacks===
===AI attacks===
Line 123: Line 205:
*[[MissileSpread]]: MissileAttack variation, supports shooting spread shots
*[[MissileSpread]]: MissileAttack variation, supports shooting spread shots
*[[SargAttack12]]: Old Doom 1.2 style melee attack
*[[SargAttack12]]: Old Doom 1.2 style melee attack
*[[Scratch]]: custom melee attack
*[[ThingSummon]]: customized summoning
*[[ThingSummon]]: customized summoning


====Original Doom====
*[[BrainSpit]]: cube spawn
*[[BruisAttack]]: baron/knight of hell
*[[BspiAttack]]: arachnotron
*[[CPosAttack]]: pistol attack w/ shotgn noise
*[[CyberAttack]]: rocket launching
*[[FatAttack1]]: mancubus left attack
*[[FatAttack2]]: mancubus right attack
*[[FatAttack3]]: mancubus front attack
*[[HeadAttack]]: cacodemon
*[[PainAttack]]: elemental
*[[PainDie]]: elemental death (3 souls)
*[[PosAttack]]: former human
*[[SargAttack]]: demon bite
*[[SkelFist]]: revenant punch
*[[SkelMissile]]: revenant missile
*[[SkullAttack]]: flying skull
*[[SPosAttack]]: sergeant
*[[TroopAttack]]: imp
*[[VileAttack]]: arch vile toss
*[[VileTarget]]: spawn a vile fire effect on target
====Heretic====
====Heretic====
*[[BeastAttack]]: weredragon
*[[BeastAttack]]: weredragon
Line 173: Line 233:


===Alterations===
===Alterations===
*[[BossDeath]]: special monster death functions (such as Baron death in E1M8)
*[[BrainDie]]: exits the level
*[[CasingThrust]]: movement for ejected casing
*[[CasingThrust]]: movement for ejected casing
*[[Die]]: causes suicide
*[[FadeIn]]: increments alpha
*[[FadeIn]]: increments alpha
*[[FadeOut]]: decrements alpha, DOESN'T destroy the thing
*[[FadeOut]]: decrements alpha, DOESN'T destroy the thing
*[[Fall]]: remove SOLID flag (used on dying monsters)
*[[HideThing]]: Sets DONTDRAW flag on an object
*[[HideThing]]: Sets DONTDRAW flag on an object
*[[KeenDie]]: open 666-tagged doors on death of all like-named monsters
*[[KillChildren]]: destroy all summoned things
*[[KillChildren]]: destroy all summoned things
*[[LineEffect]]: activate a tag using a special
*[[PainNukeSpec]]
*[[PainNukeSpec]]
*[[RestoreArtifact]]: Adds the SPECIAL flag back to an object, sets the object back into its spawnstate, and plays the object's seesound.
*[[RestoreArtifact]]: Adds the SPECIAL flag back to an object, sets the object back into its spawnstate, and plays the object's seesound.
Line 191: Line 245:
*[[SetTranslucent]]: modify alpha amount; setup additiveness or fuzziness
*[[SetTranslucent]]: modify alpha amount; setup additiveness or fuzziness
*[[ShowMessage]]: display text message
*[[ShowMessage]]: display text message
*[[Spawn]]: create another object on top of this one
*[[SteamSpawn]]: create steam effects
*[[SteamSpawn]]: create steam effects
*[[UnHideThing]]: Unsets DONTDRAW flag on an object
*[[UnHideThing]]: Unsets DONTDRAW flag on an object
Line 218: Line 271:
===Sound effects===
===Sound effects===
*[[AmbientThinker]]: ambient sound maintenance
*[[AmbientThinker]]: ambient sound maintenance
*[[BabyMetal]]: bspwlk sound effect — also includes Chase!
*[[BrainAwake]]: loud bossit sound effect
*[[BrainPain]]: loud bospn sound effect
*[[FatRaise]]: mancubus warning — also includes FaceTarget
*[[FireCrackle]]: flame sound effect — also includes "Fire" action!
*[[Hoof]]: cyberdemon hoof sound — also includes Chase!
*[[Metal]]: metal sound effect — also includes Chase!
*[[Pain]]: play pain sound
*[[PlayerScream]]: player-specific, health-dependent (death) sound
*[[PlaySound]]: custom sound
*[[PlaySoundEx]]: extended custom sound
*[[Scream]]: play death sound
*[[SkelWhoosh]]: revenant swing noise — also includes FaceTarget
*[[SpawnSound]]: boscub sound effect — also includes SpawnFly
*[[StartFire]]: flamst sound effect — also includes "Fire" action!
*[[VileStart]]: archvile heat-up noise
*[[XScream]]: extreme death gut noise


===Frame scripting===
===Frame scripting===
Line 247: Line 283:
*[[HealthJump]]: health-based next frame
*[[HealthJump]]: health-based next frame
*[[JumpIfTargetInLOS]]: jump to frame if target is in the field of view
*[[JumpIfTargetInLOS]]: jump to frame if target is in the field of view
*[[RandomJump]]: random next frame
*[[Jump]]
*[[SetCounter]]: set a variable
*[[SetCounter]]: set a variable
*[[SetTics]]: set frame duration
*[[SetTics]]: set frame duration

Revision as of 13:01, 23 November 2019

This list of codepointers is a list of all the action routines which can be used in EDF frames. They are common for all games, so for example Heretic codepointers can be used in Doom.

You can specify the codepointers with or without their internal A_ prefix, even inside DECORATE state syntax. For simplicity, they will be referred in this wiki without the prefix.

Note that some codepointers, inherited from MBF, use the misc1 and misc2 frame properties, instead of the more general args list. Side effects aside, this also means that they will not be usable in the DECORATE syntax, but they all have DECORATE-compatible equivalents.

IMPORTANT: Do not provide more nonzero arguments to the codepointers than specified in the reference. Doing so may break forward compatibility with versions of Eternity that implement new functionality to codepointers.

Back to EDF state reference
Back to Eternity Engine

Player guns

Attacks

Parameterized

Classic

Control

Other

Muzzle flash effects

  • GunFlash: produces gunflash sprite without firing anything
  • Light0: resets the muzzle light level
  • Light1: muzzle light level 1
  • Light2

DOOM gun sound effects

Frame scripting

Map objects

Explosions

These are for area-of-effect damage, common with projectiles and bombs (e.g. barrels):

  • Explode: classic DOOM splash damage. Deals 128 damage in a 128 radius.
  • Detonate: like Explode, but uses the thingtype "damage" field.
  • DetonateEx: complete parameterized explosion.
  • HticExplode: Heretic-compatible explosion, with predefined special behaviour depending on parameter.
  • Mushroom: large mushroom explosion, from MBF.
  • Nailbomb: explosion with bullet shrapnels, from SMMU.

Projectile control

  • Tracer: one of the required components for homing missiles

Monster behaviour

These are designed mainly for monsters and similar shootable objects. The ones here are especially useful for any generic monster.

  • Look: stand in guard, looking for targets.
  • Chase: pursue a target and check for attack.
  • FaceTarget: turn to target, look around it if it's partly invisible.
  • CPosRefire: go to seestate if target is out of sight. Typical with sustained fire monsters.
  • SpidRefire: like CPosRefire but with slightly different reaction times.
  • Pain: play the pain sound.
  • Fall: typical during death, this removes the SOLID flag.
  • Scream: plays the death sound.
  • XScream: makes the extreme death (gib) sound.
  • BossDeath: special monster death functions (such as Baron death in E1M8)
  • KeenDie: open 666-tagged doors on death of all monsters of the same species.

Generic control

Classic monster actions

These are specific to the stock DOOM monsters and should only be used in mods if the new monsters are meant to be similar.

Simple monster attacks
Movement sound
  • Metal: metal (spiderdemon and cyberdemon) sound effect — also includes Chase!
  • BabyMetal: bspwlk (arachnotron) sound effect — also includes Chase!
  • Hoof: cyberdemon hoof sound — also includes Chase!
Pain elemental
  • PainAttack: elemental lost soul spawn
  • PainDie: elemental death action (3 lost souls spawn)
Revenant
Mancubus
Archvile
  • VileChase: same as Chase, but resurrecting encountered cadavers.
  • VileStart: archvile heat-up noise
  • VileTarget: spawn a vile fire effect on target
  • VileAttack: arch vile toss
  • StartFire: flamst sound effect — also includes "Fire" action!
  • Fire: stick on the face of attacker's target, like the vile fire
  • FireCrackle: flame sound effect — also includes "Fire" action!
DOOM 2 final boss

Player avatar behaviour

These are designed for the player-controlled thing (e.g. DoomMarine).

Various effects

These specials are more advanced than what's available in the classic games and do not belong specifically to projectile or monster usage

  • Face: face a specified angle
  • Stop: set velocity to 0
  • Turn: turn around a specified angle
  • Spawn: create another object on top of this one
  • LineEffect: activate a tag using a special

Sounds

Frame scripting

  • RandomJump: randomly decides to set current state to a chosen one.
  • Jump: like RandomJump but compatible with the Decorate-style state syntax.

Explosions and flames

BFG9000

Homing projectiles

Others

Heretic specific

AI

AI attacks

Parameterized

Heretic

Alterations

  • CasingThrust: movement for ejected casing
  • FadeIn: increments alpha
  • FadeOut: decrements alpha, DOESN'T destroy the thing
  • HideThing: Sets DONTDRAW flag on an object
  • KillChildren: destroy all summoned things
  • PainNukeSpec
  • RestoreArtifact: Adds the SPECIAL flag back to an object, sets the object back into its spawnstate, and plays the object's seesound.
  • RestoreSpecialThing1: Removes the DONTDRAW flag from an object. If the object defines the itemrespawnat property, it will at this time be moved to a random spot if any such spots exist on the map (otherwise the item will remain where it spawned originally). The item will play its seesound.
  • RestoreSpecialThing2: Adds the SPECIAL flag back to an object and sets the object back into its spawnstate.
  • SetFlags: alter flags
  • SetTranslucent: modify alpha amount; setup additiveness or fuzziness
  • ShowMessage: display text message
  • SteamSpawn: create steam effects
  • UnHideThing: Unsets DONTDRAW flag on an object
  • UnSetFlags: alter flags

Heretic

Sound effects

Frame scripting