Effects

Description

In the Infinity Engine games, there is the pivotally important concept of an "effect". Effects can do many different things, but examples include modification of stats, damage, playing of a sound, display of an animation, or a number of other things. These effects are identified by "type" and by several additional parameters. The valid types in BG ranged at least from 0x00 through 0xae. Whether all the intervening values were used or not is unclear, but it appears that most of them are. This section will be devoted to a detailed explanation of the general format of effects and the specific format of different types of effects.

This file is under construction. There is much information which needs to go in this file.

The basic format of an effect is as follows. Note that some of these fields are put to differing uses by different object types. The sizes of all of the fields is known to be accurate. For ease of reference, each parameter which is referenced by the specific effects will be given a tag.

OffsetSize (datatype)Description
0x00002 (word)Effect type (varies by game)
0x00021 (byte)Target type
0x00031 (byte)Unknown
0x00044 (dword)Numeric parameter 1 (NP1). Purpose of field varies from effect to effect.
0x00084 (dword)Numeric parameter 2 (NP2). Purpose of field varies from effect to effect.
0x000c2 (word)Flags:
  • bit 0: permanent
  • other bits: TODO
0x000e4 (dword)Time parameter (Time). This determines either when the effect occurs, or when the effect wears off, if either of the two is applicable. Note that they are only applicable if the relevant flags in the Flags field are set.
0x00121 (byte)Probability (Prob) (Note: This field is actually a word in pre-Icewind Dale games -- i.e. 2 bytes, but since it is always <=100, they split it into two probabilities.)
0x00131 (byte)Unknown. Another probability?
0x00148 (resref)Resref parameter (Resource)
0x001c4 (dword)Dice count (NumDice)
0x00204 (dword)Dice sides (NumSides)
0x00244 (dword)Saving throw type (SaveType)
0x00284 (dword)Saving throw bonus (SaveBonus)
0x002c4 (dword)Unknown

Global behavior of effects

This section describes the behaviors which are invariant from effect to effect. Each effect, when the associated ability of an ITM or SPL is invoked, will be applied to some target with a certain probability, given by the Prob field. Basically, a random roll between 0 and 99 is made, and if it is less than Prob for the given effect, the effect will be invoked. When the effect is invoked, the target is given a chance to save against it according to the SaveType and SaveBonus, as well as the resistances for their particular CRE resource. If the effect is invoked and the target fails the saving throw, then the effect actually occurs. The Flags determine when the effect begins and when it ends. Typically an effect will either occur immediately and expire later or will be an instantaneous effect which occurs later. Frequently, delayed events are sound effects and such. Conventions

The following conventions will be observed below for simplicity:

Specific effects by Game

Baldur's Gate and TOTSC effects

AC: Modify Armor Class

Modifies the creature's armor class. Note that all "permanent" ACs must be in the range [-20...20]; if a bonus takes a permanent AC outside this range, it will be thresholded to the limit. This doesn't appear to apply to temporary effects which wear off after a time.

FieldPurpose/description
NP1Bonus value: how much is added to the particular AC to be modified
NP2Bonus type: determines which "AC" is to be modified. This must be one of { 0, 1, 2, 4, 8, 16 }.
  • 0: additive bonus to overall AC
  • 1: additive bonus to AC vs crushing
  • 2: additive bonus to AC vs missile
  • 4: additive bonus to AC vs piercing
  • 8: additive bonus to AC vs slashing
  • 16: threshold overall AC (i.e. AC=min(AC,NP1))
FlagsIf the effect is a Permanent effect, it is applied to the permanent AC, otherwise, it is applied to the "effective" AC.

ATTACKNO: Modify Attacks Per Round

Modifies the number of attacks per round. Upon entry here, "attacks per round" will be either in the range [0,5] or in the range (5,10]. Two types of thresholding occur in this effect, as noted below. The first, "plain thresholding" will threshold the value into [0,10], mapping negative values to 0 and values > 10 to 10. The second, "bracketed" thresholding will threshold the value into the range [0,5] if it was originally in this interval, or (5,10] if it was originally in this interval. For instance, a character with 3 attacks/round who gets a 200% bonus would have 6 attacks/round. This value would then be thresholded down to 5. Similarly, a character with 6 attacks/round who gets a penalty reducing this by 50% would have 3 attacks/round. This value would be thresholded up to 6. It will be noted below where the types of thresholding are used.

FieldPurpose/description
NP1Bonus value: Numeric parameter used by the bonus modifier type
NP2Bonus type: determines how "attacks/round" is to be modified. This must be one of { 0, 1, 2 }.
  • 0: additive bonus to "attacks/round". If Permanent, this uses bracketed thresholding. Otherwise, it uses no thresholding.
  • 1: set absolute value of "attacks/round". This is subject only to plain thresholding.
  • 2: multiplicative (percentage) bonus to attacks/round. This is always subject to bracketed thresholding.
FlagsIf the effect is a Permanent effect, it is applied to the permanent "attacks/round", otherwise, it is applied to the effective "attacks/round".

AWAKEN: Awaken Sleeping Creature

Forces a creature's state to not include the "SLEEPING" bit. (See STATE.IDS for details on the character state bits.) This ignores the permanent flag and just removes the sleeping flag from both the permanent and the effective creature status flags.

BERSERK: Berserk Creature

Planescape: Torment effects

Icewind Dale

Standby... Effects are not yet known for these games.

[ back to index ]