List of codepointers: Difference between revisions

From Eternity Wiki
Jump to navigationJump to search
m (Add new codepointer, A_CounterSwitchEx.)
(44 intermediate revisions by 15 users not shown)
Line 1: Line 1:
This '''list of codepointers''' is a list of all the action routines which can be used in [[EDF]] [[frame]]s.
This '''list of codepointers''' is a list of all the action routines which can be used in [[EDF]] [[frame]]s. They are common for all games, so for example Heretic codepointers can be used in Doom.


==Player gun frame code pointers==
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.
===Maintenance===
 
*[[Light0]]
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.
*[[Light1]]
 
*[[Light2]]
'''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.
*[[WeaponReady]]
 
*[[Lower]]
{{backto|EDF state reference}}
*[[Raise]]
{{backto|Eternity Engine}}
*[[ReFire]]
*[[CheckReload]]
*[[GunFlash]]


===Attack===
=Player guns=
*[[Punch]]
==Attacks==
*[[CustomPlayerMelee]]
*[[FireBFG]]
*[[FireCGun]]
*[[FireCustomBullets]]
*[[FireMissile]]: rocket launcher attack
*[[FireOldBFG]]: alpha Doom BFG attack
*[[FirePistol]]
*[[FirePistol]]
*[[FirePlasma]]
*[[FirePlayerMissile]]: custom missile attack
*[[FireShotgun]]
*[[FireShotgun]]
*[[FireShotgun2]]
*[[FireShotgun2]]: super shotgun attack
*[[FireCGun]]
*[[PlayerThunk]] {{deprecated}}
*[[FireMissile]]
*[[Punch]]: fist attack
*[[Saw]]
*[[Saw]]: chainsaw attack
*[[FirePlasma]]
 
*[[FireBFG]]
==Control==
*[[CheckReload]]: super shotgun reload check
*[[CheckReloadEx]]: extended version that allows counter comparison
*[[JumpIfNoAmmo]]: as it says
*[[Lower]]: "lower" effect & frame
*[[Raise]]: "raise" effect & frame
*[[ReFire]]: skip frame if shooting is maintained (plasma gun cooldown effect)
*[[WeaponReady]]: "bob" effect, ready frame
 
==Other==
*[[EjectCasing]]: throw casing


====Parameterized====
==Muzzle flash effects==
*[[FireCustomBullets]]
*[[GunFlash]]: produces gunflash sprite without firing anything
*[[FirePlayerMissile]]
*[[Light0]]: resets the muzzle light level
*[[CustomPlayerMelee]]
*[[Light1]]: muzzle light level 1
*[[PlayerThunk]]
*[[Light2]]


===Special sound===
==Sound effects==
*[[BFGSound]]
*[[BFGSound]]
*[[CloseShotgun2]]: this one also includes ReFire
*[[LoadShotgun2]]: ...these two don't
*[[OpenShotgun2]]
*[[OpenShotgun2]]
*[[LoadShotgun2]]
*[[CloseShotgun2]]
===Frame scripting===
These pointers allow a degree of programmatic control over an weapon's behavior, and are therefore termed "frame scripting" codepointers.
Counter fields may have values from -32768 to 32767 (or -2147483648 to 2147483647 in development versions). Values above or below this range will wrap around.


==Frame scripting==
*[[PlayerStartScript]]: start map script
*[[WeaponCopyCtr]]
*[[WeaponCtrOp]]
*[[WeaponCtrJump]]
*[[WeaponCtrJump]]
*[[WeaponCtrSwitch]]
*[[WeaponCtrSwitch]]
*[[WeaponSetCtr]]
*[[WeaponSetCtr]]
*[[WeaponCtrOp]]
*[[WeaponCopyCtr]]
==General Code Pointers==
===Miscellaneous Pointers===
*[[BFGSpray]]
*[[BFG11KHit]]
*[[BouncingBFG]]
*[[BFGBurst]]
*[[Mushroom]]
*[[Nailbomb]]
*[[SetFlags]]
*[[UnSetFlags]]
*[[Fall]]
*[[Die]]
*[[BrainScream]]
*[[BrainExplode]]
*[[SpawnFly]]
*[[Fire]]
*[[Spawn]]
*[[SteamSpawn]]
*[[Turn]]
*[[Face]]
*[[LineEffect]]
*[[Stop]]
===Heretic miscellaneous pointers===
*[[PlayerSkull]]
*[[SpawnGlitter]]
*[[AccelGlitter]]
*[[SpawnAbove]]
*[[MummySoul]]
*[[BlueSpark]]
*[[GenWizard]]
*[[Sor2DthInit]]
*[[Sor2DthLoop]]
*[[PodPain]]
*[[RemovePod]]
*[[MakePod]]
*[[DripBlood]]
===Hexen miscellaneous pointers===
'''''Not implemented yet.'''''
*[[SetInvulnerable]]
*[[UnSetInvulnerable]]
*[[SetReflective]]
*[[UnSetReflective]]
*[[RaiseFloorClip]]
*[[LowerFloorClip]]
*[[DropEquipment]]
*[[BishopMissileWeave]]
===Miscellaneous / Sound Pointers===
*[[StartFire]]
*[[FireCrackle]]
*[[SkelWhoosh]]
*[[FatRaise]]
*[[SpawnSound]]
===Heretic Misc / Sound Pointers===
*[[Sor1Pain]]
===Object sound pointers===
*[[PlaySound]]
*[[Pain]]
*[[Scream]]
*[[XScream]]
*[[PlayerScream]]
*[[BrainPain]]
*[[BrainAwake]]
*[[VileStart]]
===Hexen object sound pointers===
'''''Not implemented yet.'''''
*[[PigPain]]
===AI Pointers===
*[[Look]]
*[[Chase]]
*[[VileChase]]
*[[FaceTarget]]
*[[KeepChasing]]
*[[RandomWalk]]
===Heretic AI pointers===
*[[Sor1Chase]]
===Hexen AI pointers===
'''''Not implemented yet.'''''
*[[CentaurDefend]]
*[[PigLook]]
*[[PigChase]]
*[[SerpentUnHide]]
*[[SerpentHide]]
*[[BishopDoBlur]]
===AI Pointers with Walking Sounds===
*[[Metal]]
*[[BabyMetal]]
*[[Hoof]]
===Blast Radius Attack Pointers===
*[[Explode]]
*[[Detonate]]
===Heretic Blast Radius Attack Pointers===
*[[HticExplode]]
===Monster Attack Pointers===
*[[PosAttack]]
*[[SPosAttack]]
*[[VileTarget]]
*[[VileAttack]]
*[[SkelFist]]
*[[SkelMissile]]
*[[FatAttack1]]
*[[FatAttack2]]
*[[FatAttack3]]
*[[CPosAttack]]
*[[TroopAttack]]
*[[SargAttack]]
*[[HeadAttack]]
*[[BruisAttack]]
*[[SkullAttack]]
*[[BspiAttack]]
*[[CyberAttack]]
*[[PainAttack]]
*[[BrainSpit]]
===Parameterized Monster Attacks===
*[[BetaSkullAttack]]
*[[Scratch]]
*[[MissileAttack]]
*[[MissileSpread]]
*[[BulletAttack]]
*[[ThingSummon]]
===Heretic monster attack pointers===
*[[MummyAttack]]
*[[MummyAttack2]]
*[[ClinkAttack]]
*[[WizardAtk1]]
*[[WizardAtk2]]
*[[WizardAtk3]]
*[[Srcr2Decide]]
*[[Srcr2Attack]]
*[[KnightAttack]]
*[[BeastAttack]]
*[[BeastPuff]]
*[[SnakeAttack]]
*[[SnakeAttack2]]
*[[Srcr1Attack]]
*[[VolcanoBlast]]
*[[VolcBallImpact]]
*[[MinotaurAtk1]]
*[[MinotaurDecide]]
*[[MinotaurAtk2]]
*[[MinotaurAtk3]]
*[[MinotaurCharge]]
*[[MntrFloorFire]]
*[[LichFire]]
*[[LichWhirlwind]]
*[[LichAttack]]
*[[LichIceImpact]]
*[[LichFireGrow]]
*[[ImpChargeAtk]]
*[[ImpMeleeAtk]]
*[[ImpMissileAtk]]
===Hexen monster attack pointers===
'''''Not implemented yet.'''''
*[[CentaurAttack]]
===Homing Missile Maintenance Pointers===
*[[Tracer]]
*[[GenTracer]]


===Heretic Homing Missile Maintenance Pointers===
=Map objects=
*[[HticTracer]]
==Explosions and flames==
*[[WhirlwindSeek]]
*[[BFG11KHit]]: [[SMMU]] BFG variant
*[[BFGBurst]]: produce a burst of smaller plasma objects
*[[BFGSpray]]: BFG explosion afterglow
*[[BouncingBFG]]: SMMU bouncing BFG
*[[BrainExplode]]: brain perpetual explosion controller
*[[BrainScream]]: giant demon wall explosion sequence
*[[Detonate]]: thing damage controlled explosion
*[[DetonateEx]]: parameterized detonate action
*[[Explode]]: rocket/barrel splash damage
*[[Fire]]: stick on the face of attacker's target, like the vile fire
*[[GenTracer]]: generic tracer
*[[Mushroom]]: mushroom explosion
*[[Nailbomb]]: explosion with shrapnels
*[[SpawnFly]]: spawn cube controller
*[[Tracer]]: one of the required components for homing missiles
===Heretic===
*[[BeastPuff]]: weredragon fire belch smoke
*[[BlueSpark]]: create a blue d'sparil attack spark
*[[GenWizard]]: create a disciple
*[[HticExplode]]: heretic-compatible explosion
*[[HticTracer]]: like those golem skulls
*[[LichFireGrow]]: how the fire column expands
*[[LichIceImpact]]: how an ice globe explodes into shards
*[[MntrFloorFire]]: used by the straight flame snake
*[[PhoenixPuff]]: missile trail
*[[PodPain]]: pod goo splash on being hit
*[[VolcBallImpact]]: how a volcano ball fragments on impact
*[[WhirlwindSeek]]: used by the tornados


===Line of Sight Checking Pointers===
==AI==
*[[CPosRefire]]
*[[AlertMonsters]]: shout so other monsters chase the player
*[[SpidRefire]]
*[[Chase]]: pursue a target and check for attack
*[[CPosRefire]]: go to seestate if target is out of sight
*[[Face]]: face a specified angle
*[[FaceTarget]]: turn to target, look around it if it's partly invisible
*[[GenRefire]]: customizable refire control
*[[KeepChasing]]: pursue target without attacking
*[[Look]]: stand in guard, looking for targets
*[[RandomWalk]]: random wandering for inactive enemies
*[[Sor1Chase]]: d'sparil mount specific chase
*[[Sor1Pain]]: d'sparil mount specific twitch. Calls Pain.
*[[SpidRefire]]: like CPosRefire, slightly modified
*[[Turn]]: turn around a specified angle
*[[VileChase]]: same as Chase, but resurrecting encountered cadavers


===Special Monster Death Effects===
==AI attacks==
*[[PainDie]]
===Parameterized===
*[[KeenDie]]
*[[BetaSkullAttack]]: remote melee attack
*[[BossDeath]]
*[[BulletAttack]]: custom bullet shooting
*[[BrainDie]]
*[[MissileAttack]]: custom missile shooting
*[[KillChildren]]
*[[MissileSpread]]: MissileAttack variation, supports shooting spread shots
*[[SargAttack12]]: Old Doom 1.2 style melee attack
*[[Scratch]]: custom melee attack
*[[ThingSummon]]: customized summoning


===Heretic Special Monster Death Effects===
===Original Doom===
*[[HticBossDeath]]
*[[BrainSpit]]: cube spawn
*[[SorcererRise]]
*[[BruisAttack]]: baron/knight of hell
*[[ImpDeath]]
*[[BspiAttack]]: arachnotron
*[[ImpXDeath1]]
*[[CPosAttack]]: pistol attack w/ shotgn noise
*[[ImpXDeath2]]
*[[CyberAttack]]: rocket launching
*[[ImpExplode]]
*[[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===
*[[BeastAttack]]: weredragon
*[[ClinkAttack]]: sabre
*[[ImpChargeAtk]]: gargoyle charge
*[[ImpMeleeAtk]]: gargoyle scratch
*[[ImpMissileAtk]]: gargoyle fire
*[[KnightAttack]]: undead warrior
*[[LichAttack]]: iron lich random attack **only one which includes ice globes**
*[[LichFire]]: iron lich fire column
*[[LichWhirlwind]]: iron lich tornado
*[[MinotaurAtk1]]: maulotaur melee damage
*[[MinotaurAtk2]]: spreadshot
*[[MinotaurAtk3]]: straight flame snake
*[[MinotaurCharge]]: maulotaur charge
*[[MinotaurDecide]]: maulotaur ranged attack choosing
*[[MummyAttack]]: golem melee
*[[MummyAttack2]]: nitrogolem range
*[[SnakeAttack]]: ophidian blue spark
*[[SnakeAttack2]]: ophidian yellow shot
*[[Srcr1Attack]]: d'sparil mount attack
*[[Srcr2Attack]]: d'sparil sorcerer attack
*[[Srcr2Decide]]: d'sparil decide whether to teleport
*[[VolcanoBlast]]: volcano burst
*[[WizardAtk3]]: disciple tri-ball


===Massacre Cheat Specials===
==Alterations==
*[[BossDeath]]: special monster death functions (such as Baron death in E1M8)
*[[BrainDie]]: exits the level
*[[CasingThrust]]: movement for ejected casing
*[[Die]]: causes suicide
*[[FadeIn]]: increments alpha
*[[FadeOut]]: decrements alpha, DOESN'T destroy the thing
*[[Fall]]: remove SOLID flag (used on dying monsters)
*[[HideThing]]: Sets DONTDRAW flag on an object
*[[KeenDie]]: open 666-tagged doors on death of all like-named monsters
*[[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.
*[[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
*[[Spawn]]: create another object on top of this one
*[[SteamSpawn]]: create steam effects
*[[Stop]]: set velocity to 0
*[[UnHideThing]]: Unsets DONTDRAW flag on an object
*[[UnSetFlags]]: alter flags
===Heretic===
*[[AccelGlitter]]: accelerate upwards
*[[DripBlood]]: spawn heretic blood
*[[HticBossDeath]]: special monster death functions for Heretic
*[[ImpDeath]]: special death for gargoyle
*[[ImpExplode]]: crash for gargoyle
*[[ImpXDeath1]]: special extreme death for gargoyle, stage 1
*[[ImpXDeath2]]: special extreme death for gargoyle, stage 2
*[[MakePod]]: generate a pod
*[[MummySoul]]: create raising soul
*[[PlayerSkull]]: player death effect, when the skull tosses in air
*[[RemovePod]]: notifies the generator that this pod was destroyed
*[[Sor2DthInit]]: d'sparil death maintenance
*[[Sor2DthLoop]]: d'sparil death maintenance
*[[SorcererRise]]: d'sparil waking up after mount crash
*[[SorcNukeSpec]]
*[[SorcNukeSpec]]
*[[SpawnAbove]]: spawns above the summoner
*[[SpawnGlitter]]: create teleportation sparkle
*[[WizardAtk1]]: face target and clear GHOST flag
*[[WizardAtk2]]: face target and set GHOST flag


===Frame scripting pointers===
==Sound effects==
 
*[[AmbientThinker]]: ambient sound maintenance
These pointers allow a degree of programmatic control over an object's behavior, and are therefore termed "frame scripting" codepointers. Note that some other codepointers utilize the Counter fields of a thing, and so using those pointers along with these will cause interference. Codepointer descriptions now make note of which Counter fields they utilize, so be sure to check for conflicts. There are eight counters available for each individual map object, numbered from 0 to 7.
*[[BabyMetal]]: bspwlk sound effect -- also includes Chase!
 
*[[BrainAwake]]: loud bossit sound effect
Counter fields may have values from -32768 to 32767 (or -2147483648 to 2147483647 in development versions). Values above or below this range will wrap around.
*[[BrainPain]]: loud bospn sound effect
 
*[[FatRaise]]: mancubus warning -- also includes FaceTarget
*[[RandomJump]]
*[[FireCrackle]]: flame sound effect -- also includes "Fire" action!
*[[HealthJump]]
*[[Hoof]]: cyberdemon hoof sound -- also includes Chase!
*[[TargetJump]]
*[[Metal]]: metal sound effect -- also includes Chase!
*[[CounterJump]]
*[[Pain]]: play pain sound
*[[CounterSwitch]]
*[[PlayerScream]]: player-specific, health-dependent (death) sound
*[[SetCounter]]
*[[PlaySound]]: custom sound
*[[CounterOp]]
*[[PlaySoundEx]]: extended custom sound
*[[CopyCounter]]
*[[Scream]]: play death sound
*[[SetTics]]
*[[SkelWhoosh]]: revenant swing noise -- also includes FaceTarget
*[[AproxDistance]]
*[[SpawnSound]]: boscub sound effect -- also includes SpawnFly
 
*[[StartFire]]: flamst sound effect -- also includes "Fire" action!
===Hexen frame scripting pointers===
*[[VileStart]]: archvile heat-up noise
*[[SubTics]]
*[[XScream]]: extreme death gut noise
 
===Small Scripting System===
 
These codepointers allow execution of Small functions in either of the Gamescript or Levelscript VMs. See the [[Small]] Usage Documentation and the Small Function Reference for full information.
 
*[[StartScript]]
*[[PlayerStartScript]]
 
===EDF-Related Pointers===
 
These pointers interact directly with parts of the EDF system. For more information on EDF, see the [[EDF]] Documentation.


*[[ShowMessage]]
==Frame scripting==
*[[AproxDistance]]: assign distance from target to a variable
*[[CheckPlayerDone]]: jump to a frame if not under player control
*[[CopyCounter]]: copy a variable to another variable
*[[CounterJump]]: counter-based next frame
*[[CounterJumpEx]]: DECORATE-compatible counter-based next frame
*[[CounterOp]]: set a variable to an operation of another 2 variables
*[[CounterSwitch]]: counter-based set of frames
*[[CounterSwitchEx]]: DECORATE-compatible counter-based set of states
*[[HealthJump]]: health-based next frame
*[[JumpIfTargetInLOS]]: jump to frame if target is in the field of view
*[[RandomJump]]: random next frame
*[[Jump]]
*[[SetCounter]]: set a variable
*[[SetTics]]: set frame duration
*[[StartScript]]: run map script
*[[StartScriptNamed]]: run named map script
*[[TargetJump]]: go to designated frame if having a target


[[Category:Codepointers|*]]
[[Category:Codepointers|*]]
[[Category:EDF]]

Revision as of 13:31, 19 September 2016

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

Control

Other

Muzzle flash effects

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

Sound effects

Frame scripting

Map objects

Explosions and flames

Heretic

AI

  • 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
  • Face: face a specified angle
  • FaceTarget: turn to target, look around it if it's partly invisible
  • GenRefire: customizable refire control
  • KeepChasing: pursue target without attacking
  • Look: stand in guard, looking for targets
  • RandomWalk: random wandering for inactive enemies
  • Sor1Chase: d'sparil mount specific chase
  • Sor1Pain: d'sparil mount specific twitch. Calls Pain.
  • SpidRefire: like CPosRefire, slightly modified
  • Turn: turn around a specified angle
  • VileChase: same as Chase, but resurrecting encountered cadavers

AI attacks

Parameterized

Original Doom

Heretic

Alterations

  • BossDeath: special monster death functions (such as Baron death in E1M8)
  • BrainDie: exits the level
  • CasingThrust: movement for ejected casing
  • Die: causes suicide
  • FadeIn: increments alpha
  • FadeOut: decrements alpha, DOESN'T destroy the thing
  • Fall: remove SOLID flag (used on dying monsters)
  • HideThing: Sets DONTDRAW flag on an object
  • KeenDie: open 666-tagged doors on death of all like-named monsters
  • KillChildren: destroy all summoned things
  • LineEffect: activate a tag using a special
  • 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
  • Spawn: create another object on top of this one
  • SteamSpawn: create steam effects
  • Stop: set velocity to 0
  • UnHideThing: Unsets DONTDRAW flag on an object
  • UnSetFlags: alter flags

Heretic

Sound effects

  • 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