PRO file format

Applies to:
BG2, BG2: ToB, BGEE

General Description
This file format describes projectiles, and the files are referenced spells and projectile weapons. Projectile files can control:
  • Projectile graphics
  • Projectile speed
  • Projectile area of effect
  • Projectile sound
These files have constant length 256 bytes (no BAM), 512 bytes (single target), or 768 bytes (area of effect).

Detailed Description

Offset Size (datatype) Description
0x00000 4 (char array) Signature ('PRO ')
0x00004 4 (char array) Version ('V1.0')
0x00008 2 (word) Projectile Type
  • 0 ⟶ No Projectile
    • Suppresses: All fields except Display String and Displayed String, which function as normal.
    • No Traveling Projectile, hits instantly (truly instant – function during Time Stop).
    • Dependency: Spell Target(Creature).
    • This projectile type is functionally identical to the hardcoded projectile: #0|PROJECTL.IDS / #1|MISSILE.IDS
      • This is projectile #1|None in Near Infinity, not #0|Default.
  • 1 ⟶ No BAM
  • 2 ⟶ Single Target
    • Activates: 0x100 – 0x1ff
  • 3 ⟶ Area of Effect
    • Activates: 0x200 – 0x2ff
0x0000a 2 (word) Projectile Speed (0x01 to 0xFF)
0x0000c 4 (dword) Sparking flags Further bits are unused.
0x00010 8 (resref) Fire Sound (WAVC file) (travelling)
  • Sound begins playing immediately.
0x00018 8 (resref) Impact Sound (WAVC file) (explosion/reach destination)
  • Sound begins playing when Traveling Projectile reaches target.
0x00020 8 (resref) Source Animation (VEF > VVC > BAM)
  • Animation travels to targeted location at +50% speed.
  • Animation plays only once, terminating when it ends.
  • Looping animations continue to play until they reach the target.
0x00028 2 (word) Particle Color (from SPRKCLR.2DA)
The following fields are used by Enhanced Editions games only:
0x0002a 2 (word) Projectile Width
  • w/ Pass Target: Proximity Radius (pixels) of Traveling Projectile.
    • Value is Horizontal Pixels, ¾ value is Vertical Pixels, 16 (12) = 1 foot.
    • Radius will be 2 more pixels than specified value.
  • w/ Comet: Relative horizontal offset of Traveling Projectile origin.
    • The exact formula is unknown as of now...
0x0002c 4 (dword) Extended flags
0x00030 4 (strref) Displayed Message
  • Dependency: Activated by Display String.
  • String is displayed (by caster) twice: once when spell is selected for targeting, and again when spell is successfully cast.
0x00034 4 (dword) Pulse Color
0x00038 2 (word) Color speed
  • Dependency: Activated by Color Pulse on hit.
  • Speed (in ticks) of Color Pulse (fades to color, then fades out, entire process takes twice as long as listed value).
0x0003a 2 (word) Screen shake amount
  • Value identical to opcode #269.
  • Screen shake occurs when Traveling Projectile reaches its target.
0x0003c 2 (word) Creature Value 1
0x0003e 2 (word) Creature Type 1
0x00040 2 (word) Creature Value 2
0x00042 2 (word) Creature Type 2
0x00044 8 (resref) Default spell (SPL)
0x0004c 8 (resref) Success spell (SPL)
0x00054 2 (word) Angle increase minimum [PSTEE]
0x00056 2 (word) Angle increase maximum [PSTEE]
0x00058 2 (word) Curve minimum [PSTEE]
0x0005a 2 (word) Curve maximum [PSTEE]
0x0005c 2 (word) THAC0 bonus [PSTEE]
0x0005e 2 (word) THAC0 bonus (non-actor) [PSTEE]
0x00060 2 (word) Radius minimum [PSTEE]
0x00062 2 (word) Radius maximum [PSTEE]
0x00064 156 (bytes) Unused

The following struct is added when the projectile is a single target or area effect projectile (see Projectile Type). It has 100h (256) bytes.

Offset Size (datatype) Description
0x00100 4 (dword) BAM projectile flags
0x00104 8 (resref) Traveling Projectile Animation (BAM)
0x0010c 8 (resref) Shadow Animation (BAM)
  • Not affected by Use Height.
  • This animation cannot be oriented.
  • Compatibility: Suppressed by Lined up AoE.
  • Compatibility: This animation does not use the vertical offset of the Traveling projectile when using Comet.
    • It travels directly horizontal at the target's vertical location.
0x00114 1 (byte) Projectile number (BAM sequence)
  • Projectile Animation uses specified Cycle/Sequence of BAM file.
  • Defaults to 0 if value exceeds number of Cycles/Sequences in BAM file.
0x00115 1 (byte) Shadow number (BAM sequence)
  • Projectile Animation Shadow uses specified Cycle/Sequence of BAM file.
  • Defaults to 0 if value exceeds number of Cycles/Sequences in BAM file.
0x00116 2 (word) Light spot intensity
0x00118 2 (word) Light spot width
0x0011a 2 (word) Light spot height
0x0011c 8 (resref) Palette (BMP)
  • STTRAVL1 = Blue
  • STTRAVL2 = Yellow
  • STTRAVL3 = Green
  • STTRAVL4 = Purple
  • STTRAVL5 = Pale purple
  • STTRAVL6 = Pink
  • STTRAVL7 = Blue
  • STTRAVL8 = Gold
0x00124 7 (bytes) Projectile colours
0x0012b 1 (byte) Smoke Puff Delay
0x0012c 7 (bytes) Smoke colours
0x00133 1 (byte) Face target granularity / "Projectile Animation" Mirroring
  • 0 ⟶ Do not mirror
  • 1 ⟶ Do not face target (Do not mirror)
  • 5 ⟶ Mirrored eastern directions (reduced granularity)
    • First 5 Cycles are Mirrored (Horizontally and/or Vertically) to reach 16 directions.
  • 9 ⟶ Mirrored eastern (full granularity)
    • First 9 Cycles are Mirrored Horizontally to reach 16 directions.
  • 16 ⟶ Not mirrored, not reduced (Do not mirror)
    • Animation contains all 16 directions.
0x00134 2 (short) Projectile smoke animation (ANIMATE.IDS)
  • Compatibility: Suppressed by Lined up AoE.
  • Compatibility: This animation follows the projectile's path when using Comet.
0x00136 8 (resref) Trailing animation 1 (BAM)
0x0013e 8 (resref) Trailing animation 2 (BAM)
0x00146 8 (resref) Trailing animation 3 (BAM)
0x0014e 2 (word) Trailing number 1 (BAM sequence)
0x00150 2 (word) Trailing number 2 (BAM sequence)
0x00152 2 (word) Trailing number 3 (BAM sequence)
0x00154 4 (dword) Flags
  • bit 0 ⟶ Puff at target
  • bit 1 ⟶ Puff at source
0x00158 168 (bytes) Unused

If the projectile is an area effect projectile then an additional struct is added to the file. It has 100h (256) bytes.

Offset Size (datatype) Description
0x00200 4 (dword) Area projectile flags Further bits are unused
0x00202 2 (word) Ray Count (EE only...?)
  • Suppresses the Secondary Projectile flag.
  • It causes the Explosion Projectile to be fired Ray Count amount of times.
    • Setting the Cone-shaped bit will cause the rays to spawn at the location of the caster. If this bit is not set and the Ray Count is nonzero, then the rays will spawn at the location of the explosion of the projectile.
    • The direction of the first ray is no longer fixed towards the southeast but is determined as follows:
      1. if the Cone-shaped bit is disabled, the first ray will continue in the same direction as the parent projectile using a vector of the caster's location to the explosion point.
      2. if the Cone-shaped bit is enabled, the first ray will travel from the caster's position towards the destination/casting point.
    • Further rays are generated based on how cone angle/angle between rays is set.
    • As of v2.6, you may nest rays in one another to construct complex-shaped areas of effect. In terms of nesting multiple rays, the point of origin of the ray one higher up the "chain" is treated as the caster's position.
  • The Explosion Projectile must be capable of hitting creatures while targeting a location or they will be just for show (Area Effect or Pass Target).
  • The Explosion Projectile's Travelling Projectile will terminate upon reaching the Explosion Size of this projectile.
    • For lightning bolt-type projectiles, this distance is used up, even as the bolt bounces (see "LIGHTB.pro" in BG1/2:EE and "IDPRO40.pro" in IWD:EE as examples).
    • For single-target projectiles, they simply travel that distance before disappearing.
    • For area-of-effect projectiles (f.i. "FIREBALL.pro"), they explode normally when reaching that distance. And as mentioned earlier, area-of-effect child projectiles can also use the ray feature themselves to generate additional rays with the direction vector determined as mentioned above.
    • This termination also applies to projectiles using Pass Target, which normally do not terminate upon reaching their destination.
  • An Explosion Projectile will explode at a distance equal to the Trap Size * "X" (see below) of this projectile.
    • Only Area Effect projectiles can explode. Those with Cone-shaped will still explode instantly.
    • The exact multiplier formula is unknown – but it's not linear.
      • The maximum trap size for an explosion size of 480 to explode before terminating is a trap size of 277 (about 1.73x).
      • The maximum trap size for an explosion size of 240 to explode before terminating is a trap size of 150 (1.6x).
      • The maximum trap size for an explosion size of 120 to explode before terminating is a trap size of 86 (about 1.39x).
      • The maximum trap size for an explosion size of 60 to explode before terminating is a trap size of 43 (about 1.39x).
      • The distance (Trap Size) to explode does NOT account for the vertical proportion of the game (where vertical distance = ¾ horizontal distance).
        • The distance (Explosion Size) for the Traveling Projectile does take the proportion into account.
        • The same value may explode a projectile going horizontal but not one going vertical, if the Explosion Size terminates it before reaching the distance.
0x00204 2 (word) Trigger Radius / Trap Size (divide by approx 8.5 to receive diameter in feet)
0x00206 2 (word) Area of effect / Explosion Size (divide by approx 8.5 to receive diameter in feet)
  • It defines the radius of the projectile.
  • Uses absolute value, or negative values use the same area as their positive counterpart.
  • Value is Horizontal Pixels, ¾ value is Vertical Pixels, 16 (12) = 1 foot.
  • Maximum effective Value: 32768 (2048 feet) // Default visual range = 448.
  • Effect Radius to trigger an Explosion Projectile on a creature.
  • Perpendicular Length (relative to casting direction) when using Rectangular AoE.
  • Terminating distance of Explosion Projectile's Traveling Projectile when using Ray Count.
    • This termination also applies to projectile using Pass Target, which normally do not terminate upon reaching their destination.
0x00208 8 (resref) Explosion Sound
  • Sound is played each tick of the projectile's duration once it explodes.
    • Should only be used for one-shot projectiles (Fireball), not be used for repeating projectiles (Web).
0x00210 2 (word) Explosion delay (Frequency)
0x00212 2 (short) Fragment Animation (ANIMATE.IDS)
  • Dependency: Activated by Fragments.
  • This animation is treated similar to the "Chunking" animation of creatures, launching the specified animation up and outward in various directions.
  • Compatibility: Triggered by Condition will only generate fragments when it explodes, once per explosion.
  • Compatibility: The direction these animation are launched is not limited by Cone-shaped.
  • Compatibility: Suppressed by a non-zero Ray Count.
0x00214 2 (word) Secondary Projectile (PROJECTL.IDS - 1)
0x00216 1 (byte) Trigger Count / # Repetitions (used if bits 8 and 9 at 0x200 are not set)
0x00217 1 (byte) Explosion Effect (FIREBALL.IDS)
0x000218 1 (byte) Explosion Color
0x000219 1 (byte) Unused
0x00021a 2 (bytes) Explosion Projectile (PROJECTL.IDS), played on affected creatures
  • This projectile is fired, originating from the point of explosion, at every valid target within range, for every explosion.
  • Compatibility: When using Ray Count:
  • For Area Effect projectiles, this is normally what delivers the spell/item effects to their target.
  • Compatibility: Projectiles using Lined up AoE will NOT function as an Explosion Projectile.
  • Compatibility: Projectiles using Multiple Projectile will ignore that flag when used as an Explosion Projectile.
    • This does NOT include the still hardcoded Magic Missile projectiles.
  • The explosion projectile otherwise functions as normal for its parameters.
0x00021c 8 (resref) Explosion Animation (VVC)
0x000224 2 (word) Cone Width / Angle between Rays (0 – 65535, effectively capped at 359)
  • Angle is +1 specified value.
  • Dependency: This field can be activated by either Cone-shaped or Ray Count.
  • Option: With Cone-shaped
    • This value controls the Arc Size of the cone.
    • Arc Size = direction of casting +/- Cone Width / 2 degrees.
  • Option: With Ray Count > 0
    • This will generate additional rays relative to the initial direction of the first ray.
    • They will be generated on alternating sides of the first ray at angle increments set by this field.
      • For instance, if Ray Count is set to 5 and this field is set to 45, then rays will be generated at angles -90, -45, 0, 45, 90 degrees relative to the direction vector as described above.
      • Note that if Ray Count is an even number, the ray group will be asymmetrical unless you rotate them (see below).
      • In Spiritual Wrath's case ("IDPRO312.pro" in IWD:EE), there are 4 rays at 90 degree angles from one another, making them appear symmetrical.
The following fields are used by Enhanced Editions games only:
0x00226 2 (word) Rotate rays clockwise
  • Setting this field (0–359) will rotate the entire set of Rays spawned by the explosion clockwise.
0x00228 8 (resref) Spread Animation (VEF/VVC/BAM)
  • Dependency: Activated by Explosion Effect not being value 255|None.
  • This animation is played in "rings" around the point of origin, out to the Explosion Size.
  • Each of these "rings" has a radius in increments of Speed, resulting in a total number of rings equal to Explosion Size / Speed.
  • Each of these "rings" starts playing Speed ticks after the previous, starting with the innermost.
    • The animations will loop until:
      Once the outer-most "ring" has begun playing and the projectile's duration has expired, the "rings" will disappear at the same rate, starting with the outer-most "ring".
  • The density of animations in each ring is controlled by fields Animation Granularity and Animation Granularity Divider.
    • Lower values result in higher animation density, but very low values will create clear "gaps" in each of the diagonal directions.
  • This animation will play all of its cycles/sequences in order, and cannot be oriented.
  • Defunct: Paletted Animation should cause this animation to be recolored by the Explosion Color field, but instead just recolors it all black.
  • Option: Blend Area/Ring Anim will add transparency to the animation.
  • Option: Glow Area/Ring Anim will brighten the animation (generally make it "glow").
  • Option: Start Scattered will cause each of these animations to play at random intervals instead of looping continuously throughout the duration.
0x00230 8 (resref) Ring Animation (VEF/VVC/BAM)
  • Dependency: Activated by Explosion Effect not being value 255|None.
  • This animation expands outward from the point of origin, out to the Explosion Size, and a rate of Speed.
  • The density of animations is controlled by fields Animation Granularity and Animation Granularity Divider.
    • Lower values result in higher animation density, but very low values will create clear "gaps" in each of the diagonal directions.
  • Defunct: Paletted Ring should cause this animation to be recolored by the Explosion Color field, but instead just recolors it all black.
  • Option: Oriented fireball puffs will orient the animation in the direction it's travelling.
    • It can only mirror horizontally, not vertically. The animation will need at least these 9 directions to be properly oriented: S, SSW, SW, WSW, W, WNW, NW, NNW, N
  • Option: Blend Area/Ring Anim will add transparency to the animation.
  • Option: Glow Area/Ring Anim will brighten the animation (generally make it "glow").
0x00238 8 (resref) Area Sound (WAV)
0x00240 4 (dword) Extended flags
0x00244 2 (word) # dice for multiple targets
0x00246 2 (word) Dice size for multiple targets
0x00248 2 (word) Animation granularity
0x0024a 2 (word) Animation granularity divider
0x0024c 180 (bytes) Unused