EFF file format

Applies to:
BG1: TotS, BG2, BG2: ToB, IWD, IWD:HoW, IWD:TotL, PST, BGEE

General Description
This file format describes an effect (opcode) and its parameters. The format is only ever found embedded in other files (e.g. ITM or SPL). The engine appears to roll a probability for each valid target type, rather than one probability per attack.

Overall structure:


Offset Size (datatype) Description
0x0000 2 (word)

Effect type

0x0002 1 (byte)

Target type

  • 0=None
  • 1=Self (pre-projectile)
  • 2=Pre-target
  • 3=Party
  • 4=Everyone (inc. party)
  • 5=Everyone (excl. party)
0x0003 1 (byte)

Power

0x0004 4 (dword)

Parameter 1

0x0008 4 (dword)

Parameter 2

0x000c 1 (byte)

Timing Mode

0x000d 1 (byte)

Dispel/Resistance

0x000e 4 (dword)

Duration

0x0012 1 (byte)

Probability 1

0x0013 1 (byte)

Probability 2

Note: The BG1 engine treats probability as a single word, effects are applied in the range 0-probability.
Note: Other engines treat probability as two values, effects are applied in the range probability <= x <= probability.
Probability range is 0-99

0x0014 8 (resref)

Resref key

0x001c 4 (dword)

Dice count

0x0020 4 (dword)

Dice sides

0x0024 4 (dword)

Saving throw type

0x0028 4 (dword)

Saving throw bonus