PRJ base.xls

From Dragon Age Toolset Wiki
Jump to: navigation, search

Projectiles are a specialized visual effects that fly from one object to another object or point in the game. Projectiles are sometimes fired by the Ability system, and are used for ranged combat.

Projectile information will be linked into the main Ability 2da.

Some of the information necessary to define a projectile is:

  • Speed in m/s
  • A script to call when the projectile hits (to determine damage and effects)
  • Projectile behaviors for the 3 Stages (described in next section)
  • Other important details like sounds and VFX.

Detailed Design

The 3 Stages of a projectile are Launch, Flight and Impact. Each one of these plays an important part in how the projectile behaves:

  • Launch Stage: This is when the projectile is still attached to the owner in some form or another. For example, when using a bow, the projectile will be attached to the bow string during this stage and follow it through the firing animation.
  • Flight Stage: This stage is composed of a flight pattern that the projectile follows to reach its target. An example of a flight pattern is a Homing behavior in which the projectile will follow the target even if it moves and guarantee that it will hit.
  • Impact Stage: When the projectile makes contact with the target it will perform the action specified in the Impact Behavior. An arrow may stick to a shield if it was blocked whereas a fireball needs to explode and spawn a few VFX.

How to Use

The projectile system will be used through ranged combat and abilities. Ranged combatants, when equipped with the proper weapon and ammo will register projectiles in the Projectile Manager. These projectiles will report back to scripting when the projectile hits the target so that damage and effects can be applied. Abilities will work on a similar way, although the projectile type to use will be defined in the ABI_base 2DA as opposed to being a property of the weapon.

PRJ_base worksheet

Column Type Description
ID int A number that uniquely identifies the entry (unless creating an M2DA override). ID numbers are listed from smallest to highest within a given file but do not need to be consecutive.
Label string
ModelName string
Simulation bool Simulate physics on this projectile. The projectile will ignore the rules system in the game, meaning that it will hit objects only if they are on its path.
Mass float This value multiplied by the gravity of Ferelden will make your projectile have weight. Only useful for projectiles using simulation.
Acceleration float Acceleration value to reach the top speed in meters per second square.
InitialSpeed float Starting speed for the projectile. Value is in meters per second. Default value is 0 m/s.
MinSpeed float Min speed at which the projectile will travel. Value is in meters per second. Useful to prevent projectiles that decelerate from coming to a stop.
TopSpeed float Max speed at which the projectile will travel. Value is in meters per second. Useful to cap projectiles that accelerate.
StaticCollisions bool Enable collision detection with static objects such as placeables, trees and level geometry.
DynamicCollisions bool Report collisions with dynamic objects such as creatures along the projectile path. These collisions will not stop the projectile. The projectile is assumed to be stronger than the dynamic objects it hits.
HideLaunch bool Hide the projectile during the launch phase
ImpactTimeout float Time that it takes for the projectile to disappear after hitting its target. Value is in seconds. By default, projectiles will disappear immediately on impact.
AlphaFade bool Activate alpha blending for fading out the projectile.
SoundFlying string
SoundMatType int
DamageType int The base damage type of this projectile, used for Staff Projectiles.
DamageBonus float A bonus to projectile damage, used by Staff Projectiles.