attacks.ddf

Stored in attacks.ddf. Lump is DDFATK. Name gives a name to the attack, and should be unique.

Attacks.ddf allows you to change the attacks used by either players or monsters. There are three general types of attacks. Closecombat attacks (e.g punch, beserk, chainsaw), bullet attacks (e.g chaingun, pistol etc) and projectile attacks (plasma, bfg, rockets, many monster attacks). There are a number of other attacks associated with specific monsters (e.g archvile flames, lost souls, mancubus attacks) Anyway, if you want to create the world's coolest flamethrower, this is the place to start!

COMMANDTYPEDESCRIPTION
ATTACKTYPE[special] The type of attack this is, eg close combat, projectile etc
ATTACK_SPECIAL[flags] Flags for this attack.
ACCURACY_ANGLE
ACCURACY_SLOPE
[float] How accurate this attack is. The values are angles.
ATTACK_HEIGHT[float] How high above the attacking creature the attack is. If it is 0, the attack will come from the creature's foot, so it is generally a good idea to make it bigger. Most DOOM creatures have this set at 32.
HEIGHT[float] The height of the projectile.
RADIUS[float] The radius of the projectile.
SPEED[float] How fast the spawned object moves. Values from 0 to 100 will work. Most doom projectile attacks are of a speed between 20-30. High values can make projectiles behave strangely.
FAST[float] The attack speed will be multiplied by this value in nightmare mode or when using -fastparm from the command line. Therefore, if speed=2, this will make that attack twice as fast as normal if you play in nightmare mode.
SHOTCOUNT[integer] Determines the actual number of bullets fired when you use a bullet weapons. For instance, the shotguns use a high shotcount value. Note, this value does not effect how much ammo each weapon uses.
X_OFFSET[integer] Normally attacks are spawned from the centre of the attacking creature. Positive values shift the attack to the right, negative to the left. If you set the offset too wide for player attacks, projectiles and/or shots can be absorbed by nearby walls, objects etc.
Y_OFFSET[integer] Similar to X_OFFSET, but moves an attack forwards or backwards relative to the target. Positive is forwards, negative is backwards.
ANGLE_OFFSET[integer] Angles an attack in the horizontal plane. (E.g a value of 45 will make your attack fly 45 degrees to your right hand side).
SLOPE_OFFSET[integer] Changes vertical angle of attack (up or down). Good for giving grenades a realistic arc.
PUFF[special] The name of an animation to play when a bullet weapon strikes a wall. (this must be defined in things.ddf) Hence, different puff animations can be created for different weapons. If you set a rocket or other projectile as `smoking', the puff animation is used as a smoke trail.
DAMAGE[integer] a fixed amount of damage that the attack will deliver. Damage is done upon impact, and will usually only affect one player or object.
DAMAGE_MULTI
DAMAGE_RANGE.
[integer] Used to make an attack do variable damage each time. Damage is calculated by generating a random number between 1 and DAMAGE_RANGE and then multipling this number by the value of DAMAGE_MULTI. Minimum damage is DAMAGE_MULTI, maximum is DAMAGE_RANGE times DAMAGE_MULTI.
ATTACKRANGE[integer] The target must be inside this fixed range, or the attacking creature won't bother shooting, but will attempt to get closer. In player weapons, is used for autoaim purposes. (removing this value will permanently disable autoaim on that weapon) Close attacks must have an ATTACKRANGE to work properly. Make sure the attackrange is greater than the creature's radius.
TOO_CLOSE_RANGE[integer] The attacking creature won't use this attack if the target is inside this range. Used if this is a ranged attack and the creature should close for a close combat attack.
NO_TRACE_CHANCE[percentage] Specifies the chance that a homing missile will lock onto target. 0% is lock every time, 100% is fail every time.
KEEP_FIRING_CHANCE [percentage] Specifies the chance that a creature using this attack will keep firing as opposed to finding a better spot/moving etc.
ASSAULT_SPEED[integer] Used for SKULLFLY attacks -- the speed at which the skull will fly.
PROJECTILE_SPECIAL[flags] Flags that should be added to a missile.
TRANSLUCENCY[float] How translucent the missile is. 0 is invisible, 1 is completely visible. (NOTE: the may change to using percentages in a future version of EDGE).
LAUNCH_SOUND[sound] The sound to make when the projectile is launched.
ATTEMPT_SOUND[sound] The sound to make just an attack is launched.
ENGAGED_SOUND[sound] The sound to make when attacking.
ACTIVE_SOUND[sound] The sound to make while a projectile is in flight.
DEATH_SOUND[sound] The sound to make when a projectile explodes.
FUSE[time] For projectile weapons only. Projectiles will explode on contact with an object, or after the fuse time has elapsed. Hence, can be used to limit the distance projectiles can travel. The time can be specified in seconds or tics (e.g to make the projectile explode after two seconds, set this value to 2 or 70T).
LIFESPAN[time] Another word for FUSE (see above).
BOUNCE_SPEED[float] Value which sets how much a projectile will bounce off walls. 1 never loses speed, 0 completely stops, 0.5 loses 50% speed each time it bounces.
SPAWNED_OBJECT[special] Object that is generated by a spawn attack. Must be the name of an object defined in things.ddf
SPAWN_OBJECT_STATE[special] Sets the state that the spawned object will be spawned in (e.g chase, spawn or attack state)

STATES

States allow you to set the animations that play when a projectile is moving, bouncing or exploding (or dying). Obviously cannot be used for bullet weapons.

For example

STATES=
MISX:A:1:NORMAL:SMOKING,
MISX:A:7:NORMAL:NOTHING,
MISX:A:1:NORMAL:SMOKING,
MISX:A:7:NORMAL:NOTHING;

DEATHSTATES=
MISX:B:0:BRIGHT:ALTERVISIBILITY:6554,
MISX:B:8:BRIGHT:EXPLOSIONDAMAGE,
MISX:C:6:BRIGHT:NOTHING,
MISX:D:4:BRIGHT:NOTHING,#REMOVE;

States are defined using:
    sprite:frame number:duration:lighting:action

COMMANDTYPEDESCRIPTION
STATES(IDLE)[state] Frames to play when projectile is in air. Can have a single rotation (like the plasma shots that look identical from any angle) or multiple rotations (e.g rocket in flight).
STATES(BOUNCE)[state] States that a projectile enter when bouncing.
STATES(DEATH)[state] Frames to play when a projectile explodes/dies.

ATTACKTYPES

In DDF, player and monster attacks are completely interchangeable. You could make a Baron of Hell fire BFG blasts, the cyberdemon fire a stream of plasma, and give yourself a homing rocket launcher to fight back with. However, you cannot create new attack types, you can only pick one of the following attack types below.

TYPEDESCRIPTION
PROJECTILE Launch a single missile at the target, eg Rockets, Imp Fireballs.
SPAWNER Launch a creature at the target, eg Pain Elementals
TRIPLE_SPAWNER Launches three creatures of the same type, eg Pain Elemental death.
FIXED_SPREADER Launches missiles in an ordered way like the Mancubus.
RANDOM_SPREADER Launches a spread of missiles in a random pattern
SHOT Fires a bullet weapon, eg pistol, shotgun, chaingun.
TRACKER Like the arch-vile attack.
CLOSECOMBAT Any close combat attack, like the demon's bite, the baron's scratch, or the chainsaw.
SKULLFLY For an object that launches itself at the target.
SMARTPROJECTILE Launch a missile at the target on an intercept course based on the target's current speed and direction. (Makes circle strafing a dangerous sport! Don't try this with a cyberdemon unless you like outrageous pain!).
SPRAY Instantly do damage to every monster in sight. Like the BFG.
SHOOTTOSPOT Used for Spawn Cubes (used in Doom2, map30 to regularly spawn random monsters).

ATTACK SPECIALS

These are flags that are used to modify an attack in some way.
You can combine one or more terms as such
ATTACK_SPECIAL=NEED_SIGHT,FACE_TARGET;

SPECIALDESCRIPTION
SMOKING_TRACER Homing missile with a line of smoke behind it
REMOVE_FAILED_SPAWN For SPAWNER attacktypes, if the spawned object doesn't fit it will be removed. This is the default.
KILL_FAILED_SPAWN For SPAWNER attacktypes, if the spawned object doesn't fit it will be killed. Use this for rockets, so that when players shoot directly into a wall, the rocket explodes and does the damage the player deserves.
PRESTEP_SPAWN Moves a SPAWNED object slightly forward so it is not spawned on top of it's master.
NEED_SIGHT The attack will only take place if the attacker can see it's target.
FACE_TARGET The attacker will be turned to face it's target.
ANGLED_SPAWN Causes a spawner attack to have the initial angle, slope and moving speed of the spawner object.

PROJECTILE_SPECIAL

Used in a very similar way to ATTACK_SPECIAL.
For example PROJECTILE_SPECIAL=MISSILE, DROPOFF;

SPECIALDESCRIPTION
NOBLOCKMAP Allows projectiles to cross lines in a map (important!).
NOGRAVITY This means that projectiles are unaffected by gravity (e.g rockets don't drop). Remove this setting from rocket attacks to make yourself an instant grenade
NOFRICTION Projectile is never slowed down by air or ground friction.
CROSSLINES Allows the projectile to travel over any line in a map. Main use is for spawner attacks, so the spawned monsters can cross lines marked 'blockmonster' in a map editor.
BARE_MISSILE Identifies the projectile as a missile.
MISSILE Combination of MISSILE + CROSSLINES + NOFRICTION.
DROPOFF Missiles can travel over cliffs (a cliff is any part of a map where sector height varies by 32 units or so). Always specify this.
SLIDER Will make projectile slide when it hits a wall.
BOUNCE Object will bounce off walls and ceilings/floors, and enters BOUNCE states too.

ACTIONS

ACTIONDESCRIPTION
EXPLOSIONDAMAGE Makes projectile explode
MAKEACTIVESOUND Makes sounds
SMOKING Makes projectile trail smoke.

Examples:

[SHOT ATTACK]
ATTACKTYPE=SHOT;
SHOTCOUNT=1;
DAMAGE_RANGE=5;
DAMAGE_MULTI=3;
ACCURACY=0.2;
ENGAGED_SOUND=SHOTGN;
KEEP_FIRING_CHANCE=40;
ATTACK_SPECIAL=FACE_TARGET;
PUFF=PUFF;

[SPAWNER]
ATTACKTYPE=SPAWNER;
ATTACK_HEIGHT=8;
ATTACK_SPECIAL=PRESTEP_SPAWN, REMOVE_FAILED_SPAWN;
SPAWNED_OBJECT=MY_OBJECT;
SPAWN_OBJECT_STATE=MISSILE:2;
ATTACK_SPECIAL=FACE_TARGET;

[MISSILE]
ATTACKTYPE=PROJECTILE;
HEIGHT=8;
RADIUS=11;
DAMAGE_RANGE=8;
DAMAGE_MULTI=10;
ATTACK_HEIGHT=48;
SPEED=10;
NO_TRACE_CHANCE=2%;
TOO_CLOSE_RANGE=196;
PROJECTILE_SPECIAL=NOBLOCKMAP,MISSILE,DROPOFF,NOGRAVITY;

ATTACK_SPECIAL=FACE_TARGET,SMOKING_TRACER;
LAUNCH_SOUND=SKEATK;
DEATH_SOUND=BAREXP;
PUFF=PUFF;

STATES(IDLE)=
  FATB:A:2:BRIGHT:RANDOM_TRACER,
  FATB:B:2:BRIGHT:RANDOM_TRACER;

STATES(DEATH)=
  FBXP:A:8:BRIGHT:ALTERVISIBILITY:6554,
  FBXP:B:6:BRIGHT:NOTHING,
  FBXP:C:4:BRIGHT:NOTHING,#REMOVE;

[SKULLFLY_ASSAULT]
ATTACKTYPE=SKULLFLY;
DAMAGE_RANGE=8;
DAMAGE_MULTI=3;
ASSAULT_SPEED=20;
ATTEMPT_SOUND=MYSOUND;
ATTACK_SPECIAL=FACE_TARGET;

[CLOSECOMBAT]
ATTACKTYPE=CLOSECOMBAT;
DAMAGE_RANGE=8;
DAMAGE_MULTI=10;
ENGAGED_SOUND=CLAW;
ATTACKRANGE=64;
ATTACK_SPECIAL=NEED_SIGHT,FACE_TARGET;

back to top

DDF docs written by Andy Baker and Ziggy Gnarly, with updates by Andrew Apted.
Site design by Fanatic (with graphics and modifications by Ziggy Gnarly). Problems with the docs, errors and comments should be directed to the EDGE team.

© EDGE Team 1998, 1999, 2000.