EDF damagetype reference: Difference between revisions

From Eternity Wiki
Jump to navigationJump to search
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 7: Line 7:
   obituaryself <string>
   obituaryself <string>
   sourceless  <true/false>
   sourceless  <true/false>
  absolute.push <floating-point>
  absolute.hop  <floating-point>
  }
  }


Line 14: Line 17:
*'''obituaryself''': text to show when a player is killed by themselves. If missing, and '''sourceless''' is false, it will just say "Player died.".
*'''obituaryself''': text to show when a player is killed by themselves. If missing, and '''sourceless''' is false, it will just say "Player died.".
*'''sourceless''': (default false) set it to true if you want the damagetype to belong to sourceless (environmental) attackers.
*'''sourceless''': (default false) set it to true if you want the damagetype to belong to sourceless (environmental) attackers.
*'''absolute.push''', '''absolute.hop''': extra amount to push by damage horizontally and vertically, similar to how the powered Heretic staff does.


==Default damage types (means of death)==
==Default damage types (means of death)==

Latest revision as of 15:42, 22 July 2020

Defines the type of damage inflicted by a thing. It's useful for implementing such features as damage resistance and immunity (see thingtype damagefactor property), as well as providing weapon obituaries in player vs player combat.

Back to EDF
damagetype <name>
{
  num          <integer>
  obituary     <string>
  obituaryself <string>
  sourceless   <true/false>

  absolute.push <floating-point>
  absolute.hop  <floating-point>
}

Explanation[edit]

  • num: the identifier of the damage type, useful for parameterized specials such as DamageThing or Thing_Damage.
  • obituary: the text to show when a player is killed by someone or something else using this damage type. If the attacker (usually a monster) using ammunition of this damage type has its dedicated obituary, then that obituary will be used. Otherwise this obituary will be used. If this isn't defined, it will simply write "Player died.".
  • obituaryself: text to show when a player is killed by themselves. If missing, and sourceless is false, it will just say "Player died.".
  • sourceless: (default false) set it to true if you want the damagetype to belong to sourceless (environmental) attackers.
  • absolute.push, absolute.hop: extra amount to push by damage horizontally and vertically, similar to how the powered Heretic staff does.

Default damage types (means of death)[edit]

There are several built-in damage types, as defined in base/things.edf. They're useful in specials like DamageThing and Thing_Damage:

  • 0: (Unknown). Used internally by several insta-kill situations, such as PainShootSkull failures, the TOUCHY flag (which causes the thing to destroy itself) or the massacre cheats. The "vilehit" console command also uses it. Things with the dmgspecial set to MinotaurCharge or Whirlwind also use this. Parameterized special Thing_Destroy uses it.
  • 1: Fist
  • 2: Pistol
  • 3: Shotgun
  • 4: Chaingun
  • 5: Rocket
  • 6: R_Splash
  • 7: Plasma
  • 8: BFG
  • 9: BFG_Splash. Used by BFGSpray
  • 10: Chainsaw
  • 11: SShotgun
  • 12: Slime
  • 13: Lava
  • 14: Crush. Used by crushing ceilings, floors and walls (polyobjects).
  • 15: Telefrag. Used by teleport kills.
  • 16: Falling. Used by falling damage.
  • 17: Suicide. Used by the "kill" console command, but not like the Heretic "iddqd" cheating penalty.
  • 18: Barrel
  • 19: Splash
  • 20: Hit. The following codepointers always use it:
  • 21: BFG11k_Splash
  • 22: BetaBFG
  • 23: BFGBurst
  • 24: PlayerMisc
  • 25: Grenade
  • 26: Quake. Used by the Radius_Quake parameterized special.
  • 27: Fire. All inflictor things with the FIREDAMAGE flag get this damage type, overriding the current one they would use.

Gameplay features and codepointers which use the thing's mod field[edit]

Functions with user-settable damage type in their fields[edit]

ACS functions[edit]

Parameterized specials[edit]

Gameplay features and codepointers[edit]

  • Scratch
  • Sector acid damage. Uses the sector's own damage type property, which can fall back to the terrain damage type.