EDF puff type reference: Difference between revisions

From Eternity Wiki
Jump to navigationJump to search
No edit summary
m (Rename ALWAYSPUFF to PUFFONACTORS)
 
Line 11: Line 11:
   punchhack      <frame name>
   punchhack      <frame name>
   particles      <number>
   particles      <number>
   +|-ALWAYSPUFF
   +|-PUFFONACTORS
   +|-BLOODLESS
   +|-BLOODLESS
   +|-LOCALTHRUST
   +|-LOCALTHRUST
Line 42: Line 42:
===Flags===
===Flags===
Prefix these with + or - to add or remove them.
Prefix these with + or - to add or remove them.
*'''ALWAYSPUFF''': make sure to spawn puff even when hitting a bleeding target. Common with Heretic hitscans.
*'''PUFFONACTORS''': make sure to spawn puff even when hitting a bleeding target. Common with Heretic hitscans.
*'''BLOODLESS''': avoid showing blood when hitting a bleeding target.
*'''BLOODLESS''': avoid showing blood when hitting a bleeding target.
*'''LOCALTHRUST''': when hitting shootable things, make sure to thrust them from wherever the puff appears, not from attacker.
*'''LOCALTHRUST''': when hitting shootable things, make sure to thrust them from wherever the puff appears, not from attacker.

Latest revision as of 08:25, 25 April 2020

Puffs are special effects spawned at hitscan attack impact points. Hitscan attacks are those 'projectiles' which travel instantly, which includes all gunshots from Doom and the elven wand and dragon claw from Heretic. The syntax is as follows:

pufftype <name> [ : <base> ]
{
  thingtype       <name>
  sound           <name>
  hitsound        <name>
  hitpufftype     <name>
  nobloodpufftype <name>
  upspeed         <floating-point value>
  zspread         <floating-point value>
  punchhack       <frame name>
  particles       <number>
  +|-PUFFONACTORS
  +|-BLOODLESS
  +|-LOCALTHRUST
  +|-RANDOMTICS
  +|-TARGETSHOOTER
}

Explanation of fields[edit]

  • base
Optional ancestor puff type whose attributes to inherit. If you don't want inheritance, remove both ':' and the base name.
  • thingtype
Class of thing to spawn when puff is produced. Can be omitted if no visible thing is intended.
  • sound
Optional sound to play when puff is spawned. Only works if thingtype is set. Example: the Heretic staff puff has this.
  • hitsound
Alternate sound to play if the hitscan hits a shootable thing, and if the puff is not replaced by a blood splat. Example: the dragon claw hit puff has this.
  • hitpufftype
If this one is set and a shootable thing is hit, use this alternate puff type instead of the one defined here. Example: the dragon claw spark has this.
  • nobloodpufftype
Optional alternate puff type when hitting things with the NOBLOOD flag. Note that this has priority over hitpufftype but only against NOBLOOD targets.
  • upspeed
Default: 0
Speed by which the puff thing moves up.
  • zspread
Default: 4
Vertical spread by which spawned things are randomly created.
  • punchhack
Limited use special handler for DOOM fist puff's special behaviour of switching to a different frame (as given by this field) when using the fist attack codepointer. New mods should use dedicated puff types for custom melee attacks.
  • particles
Optional number of smoke particles to spawn when enabled in the settings. Does not spawn if punchhack is active and player uses fist.

Flags[edit]

Prefix these with + or - to add or remove them.

  • PUFFONACTORS: make sure to spawn puff even when hitting a bleeding target. Common with Heretic hitscans.
  • BLOODLESS: avoid showing blood when hitting a bleeding target.
  • LOCALTHRUST: when hitting shootable things, make sure to thrust them from wherever the puff appears, not from attacker.
  • RANDOMTICS: if set, the spawned thing will have its first frame duration randomized
  • TARGETSHOOTER: sets puff thing's "target" (originator) to the shooter. In effect, it will act like a projectile explosion, and any codepointer such as DetonateEx or BFGSpray from the puff thing will use the shooter as an originator for damage purposes.

Delta structure[edit]

You can use puffdelta to modify an already defined pufftype. The syntax is:

puffdelta
{
  name <puff name>
  <fields>
}

The fields are the same as those from pufftype, modifying anything already defined in a pufftype <puff name> block.

Tips[edit]

  • If you use the TARGETSHOOTER flag and intend to turn the puff into an explosion, beware that, as with all thing types, the explosion will fail if it's triggered from the very first spawn state. Make sure to use the second one onwards.