Parameter #1: AC Modifier
Parameter #2: Type
AC Modifier
field to the category specified
by the Type
field.Known values for
Type
are:
- 0 ⟶ All
- 1 ⟶ Crushing
- 2 ⟶ Missile
- 4 ⟶ Piercing
- 8 ⟶ Slashing
-
16 ⟶ Base AC setting
- Sets the targets AC to the value specified by the
AC Modifier
field. If the targets AC is alreadyAC Modifier
or below, this effect will do nothing.
- Sets the targets AC to the value specified by the
Each modifier type to AC from this opcode is capped to the range [-20,20]
. Each AC type total is capped to the range [-32768,32767]
.
IWD2 uses different parameters altogether.
-
Type=0
:- Modifies ARMORCLASS.
- With
Timing Mode
s1/4/7
, alters target's baseArmor Class
.
-
Type=1
:- Modifies ACCRUSHINGMOD.
- With
Timing Mode
s1/4/7
, alters target's baseCrushing AC
.
-
Type=2
:- Modifies ACMISSILEMOD.
- With
Timing Mode
s1/4/7
, alters target's baseMissile AC
.
-
Type=4
:- Modifies ACPIERCINGMOD.
- With
Timing Mode
s1/4/7
, alters target's basePiercing AC
.
-
Type=8
:- Modifies ACSLASHINGMOD.
- With
Timing Mode
s1/4/7
, alters target's baseSlashing AC
.
-
Type=16
:- Modifies ARMORCLASS.
- With
Timing Mode
s1/4/7
, alters target's baseArmor Class
, still subject to "only if better/lower", checked against base value, not current effective value.
Parameter #1: Key Modifier
Parameter #2: Type
Key | Attacks per Round |
---|---|
0 | 0 |
1 | 1 |
2 | 2 |
3 | 3 |
4 | 4 |
5 | 5 |
6 | 0.5 |
7 | 1.5 |
8 | 2.5 |
9 | 3.5 |
10 | 4.5 |
Known values for 'Type' are:
0 Cumulative Modifier -> Key = Key + 'Key Modifier' value
1 Flat Value Modifier -> Key = 'Key Modifier' value
2 Percentage Modifier -> Key = (Key * 'Key Modifier' value) / 100
3 Cumulative Modifier -> Same as 0
Parameter #1: Irrelevant
Parameter #2: Irrelevant
This effect ignores durations attributed to it.
Parameter #1: Irrelevant
Parameter #2: Type
Type
field.
Target will uncontrollably attack enemies if any are in view, and will occasionally attack neutral creatures.
Known values for
Type
are:
- 0 ⟶ Default/In Combat: only berserk while in combat.
- 1 ⟶ Constant: always berserk, maintains BERSERK_ALWAYS_ACTIVE and sets BERSERKSTAGE2 to 1.
- 2 ⟶ Blood Rage: doesn't exist in EE's, values
2+
function the same as0
.
This opcode sets the STATE_BERSERK flag.
- Grants a +2 bonus to THAC0 and Damage.
-
While "in combat" or "Constant":
- Creature is unseletectable, Inventory is disabled.
- The creature's AI scripts are disabled.
- The creature will randomly execute action ~ AttackReevaluate([ANYONE],15) (or similar, the exact attack action is unknown).
- Disables Saving while affecting a Party Member (Displayed message: "You do not control all your Party Members")
-
Forces creature(s) to use a melee weapon if possible.
- If a certain creature is equipped with a
Cursed
ranged weapon, this opcode will not force it to switch to a melee weapon.
- If a certain creature is equipped with a
Timing Mode
s 1/4/7
results in setting STATE_BERSERK
when it triggers (and using its default behavior), rather than attaching a removable effect with selected behavior.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
This effect ignores durations attributed to it.
0
(zero).
Parameter #1: General Type
Parameter #2: Charm Type
Charm Type
field, if the target is matched by the value in the General Type
field. Values for General Type
are from GENERAL.IDS.
Known values for
Charm Type
are:
-
0 ⟶ Neutral Charm
- Does not alter targets allegiance stat.
- Maintains REALLYCHARMED on the target if the caster is GOODCUTOFF.
- Maintains CHARMED_PC on the target if the caster is NOTGOOD.
- Maintains Portrait Icon
Charm
on the target. - Effect ends if the creature is attacked by GOODCUTOFF.
- Target displays "charmed" string.
-
1 ⟶ Hostile Charm
- Sets targets allegiance to GOODCUTOFF if the caster is EVILCUTOFF.
- Sets targets allegiance to EVILCUTOFF if the caster is NOTEVIL.
- Maintains REALLYCHARMED on the target if the caster is GOODCUTOFF.
- Maintains CHARMED_PC on the target if the caster is NOTGOOD.
- Maintains Portrait Icon
Charm
on the target. - Effect ends if the creature is attacked by GOODCUTOFF.
- Target displays "Charmed" string.
-
2 ⟶ Neutral Dire Charm
- Does not alter targets allegiance stat.
- Maintains CONTROLLED on the target if the caster is GOODCUTOFF.
- Maintains ENEMY on the target if the caster is NOTGOOD.
- Maintains Portrait Icon
Dire Charm
on the target. - Effect ends if the creature is attacked by GOODCUTOFF.
- Target displays "dire charmed" string.
-
3 ⟶ Hostile Dire Charm
- Sets targets allegiance to GOODCUTOFF if the caster is EVILCUTOFF.
- Sets targets allegiance to EVILCUTOFF if the caster is NOTEVIL.
- Maintains CONTROLLED on the target if the caster is GOODCUTOFF.
- Maintains ENEMY on the target if the caster is NOTGOOD.
- Maintains Portrait Icon
Dire Charm
on the target. - Effect ends if the creature is attacked by GOODCUTOFF.
- Target displays "dire charmed" string.
-
4 ⟶ Controlled by Cleric
- Sets targets allegiance to GOODCUTOFF if the caster is EVILCUTOFF.
- Sets targets allegiance to EVILCUTOFF if the caster is NOTEVIL.
- Maintains CONTROLLED on the target if the caster is GOODCUTOFF.
- Maintains ENEMY on the target if the caster is NOTGOOD.
- Target displays "turned" string.
-
5 ⟶ Thrull Charm
- Does not alter targets allegiance stat.
- Maintains ENEMY on the target (regardless of casters Allegience).
- Sets THRULLCHARM to
1
. - Maintains Portrait Icon
Charm
on the target. - Target displays "Charmed" string.
-
1000 ⟶ Neutral Charm (no Feedback)
- Same as
0
, but target does not display any string.
- Same as
-
1001 ⟶ Hostile Charm (no Feedback)
- Same as
1
, but target does not display any string.
- Same as
-
1002 ⟶ Neutral Domination. Same as
2
, except:- Maintains Portrait Icon
Domination
on the target. - Target does not display any string.
- Maintains Portrait Icon
-
1003 ⟶ Hostile Domination. Same as
3
, except:- Maintains Portrait Icon
Domination
on the target. - Target does not display any string.
- Maintains Portrait Icon
-
1004 ⟶ Controlled by Cleric (no Feedback)
- Same as
4
, but target does not display any string.
- Same as
-
1005 ⟶ Thrull Charm (no Feedback)
- Same as
5
, but target does not display any string.
- Same as
Dice Thrown
parameter can be used to override the maintained EA
Value. It is used in all but the first application of the effect.
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Charisma = Charisma + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Charisma = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Charisma = (Charisma * 'Statistic Modifier' value) / 100
Statistic Modifier
can be positive or negative.
The effect modifies CHR.
- With a Timing Modes of Permanent or Delayed, if
Type = 0
andStatistic Modifier
is positive, the statistic will alter and remain shown in white text, and a message 'Charisma raised permanently' will be shown. - With a Timing Modes of Permanent or Delayed, if
Type
is1
or2
, orStatistic Modifier
is negative, the statistic will alter and remain shown in white text, though no message is shown. - With all other Timing Modes, the statistic will alter and be shown in red text.
- There's no feedback message about stat being raised permanently in the EE's – it must be done separately with opcode #139.
-
The opcode itself provides no coloring anymore (it's been externalized through "UI.menu")
- An effective value > base value ⟶ green.
- An effective value < base value ⟶ red.
- An effective value = base value ⟶ white/default.
Timing Mode
s 1/4/7
, the creature's base Charisma
is altered, leaving behind no removable effect.
(0,25)
in game (40
in IWD2).
Parameter #1: Gradient Number
Parameter #2: Location
Location
field, to the colour gradient specified by the Gradient Number
field.
Known values for
Location
are:
-
0 – 6: Avatar/Armor
- 00 ⟶ Belt Buckle (on armour) or amulets (on robes) – entire body for some animations
- 01 ⟶ Minor colour
- 02 ⟶ Major colour
- 03 ⟶ Skin colour
- 04 ⟶ Strap colour (on armour) or minor trimming (on robes – the centre strip down a robe and the hem on some robes)
- 05 ⟶ Armor colour (and major trimming on robe – cross trim and cape trim on Robe of Archmagi)
- 06 ⟶ Hair colour
-
16 – 22: Weapon
- 16 ⟶ Quillons or Crossguard
- 20 ⟶ Grip (usually not visible as it's in the characters hand)
- 21 ⟶ Blade or major portion of weapon
-
32 – 40: Shield
- 32 ⟶ Shield hub
- 33 ⟶ Shield interior
- 34 ⟶ Shield panelling
- 37 ⟶ Shield rim
-
48 – 54: Helmet
- 48 ⟶ Helm ornamentation – i.e. wings
- 49 ⟶ Helm ornamentation – i.e. feathers/horsehair
- 50 ⟶ Helm ornamentation – i.e. feathers/horsehair
- 52 ⟶ Helm face
- 53 ⟶ Helm – the main covering
- 255 ⟶ Whole Body (at least in IWD2 and EEs)
- Each Item Type has 7 slots/locations, corresponding to a different set of Palette indexes that they will replace.
- Near Infinity lists them as Grey, Cyan/Teal, Magenta/Pink, Yellow, Red, Blue, and Green.
While these colors are arbitrary, they best represent the palette used in animation/paperdoll BAMs by default (before being recolored), so you can look at the BAM file and know which colors will be replaced. -
0=Grey, 1=Cyan, 2=Magenta, 3=Yellow, 4=Red, 5=Blue, 6=Green
.
+16
for weapons,+32
for shields,+48
for helmets. - The names already listed for some of these locations in IESDP are accurate, as they correspond to their general use in the vanilla game, but all 7 slots can be used for each item, provided their BAM file makes use of them.
-
Palette indexes will be replaced by the gradient specified for those locations:
- Index 0–3 are reserved for Transparency and Shadows, they are not replaced.
- Index 4–15: Grey
- Index 16–27: Cyan
- Index 28–39: Pink
- Index 40–51: Yellow
- Index 52–63: Red
- Index 64–75: Blue
-
Index 76–87: Green
(7 groups of 12 indexes, each exclusive to one location) - Index 88–95: (Grey + Cyan)
- Index 96–103: (Grey + Magenta)
- Index 104–111: (Grey + Yellow)
- Index 112–119: (Grey + Red)
- Index 120–127: (Grey + Blue)
- Index 128–135: (Grey + Green)
- Index 136–143: (Cyan + Magenta)
- Index 144–151: (Cyan + Yellow)
- Index 152–159: (Cyan + Red)
- Index 160–167: (Cyan + Blue)
- Index 168–175: (Cyan + Green)
- Index 176–183: (Magenta + Yellow)
- Index 184–191: (Magenta + Red)
- Index 192–199: (Magenta + Blue)
- Index 200–207: (Magenta + Green)
- Index 208–215: (Yellow + Red)
- Index 216–223: (Yellow + Blue)
- Index 224–231: (Yellow + Green)
- Index 232–239: (Red + Blue)
- Index 240–247: (Red + Green)
-
Index 248–255: (Blue + Green)
(21 groups of 8 indexes, each shared by a different combination of two locations)
Parameter #1: RGB Colour
Parameter #2: Location
The 'RGB Colour' field is handled as follows:
Second byte = Red (0-255)
Third byte = Green (0-255)
Fourth byte = Blue (0-255)
Known values for 'Location' are:
00 Belt Buckle (on armour) or amulets (on robes) - entire body for some animations
01 Minor colour
02 Major colour
03 Skin colour
04 Strap colour (on armour) or minor trimming (on robes - the centre strip down a robe and the hem on some robes)
05 Armor colour (and major trimming on robe - cross trim and cape trim on robe of archmagi)
06 Hair colour
16 Quillons or Crossguard
20 Grip (usually not visible as it's in the characters hand)
21 Blade or major portion of weapon
32 Shield hub
34 Shield panelling
37 Shield rim
48 Helm ornamentation - i.e. wings
49 Helm ornamentation - i.e. feathers/horsehair
50 Helm ornamentation - i.e. feathers/horsehair
52 Unknown but listed in helm01
53 Helm - the main covering
Parameter #1: RGB Colour
Parameter #2: Location and Speed
The 'RGB Colour' field is handled as follows:
Second byte = Red (0-255)
Third byte = Green (0-255)
Fourth byte = Blue (0-255)
The 'Location' field is handled as follows:
First byte = Location
Third byte = Speed (0-255)
A speed of 0 does not pulsate. A speed of 1 is fastest, and a speed of 255 is slowest.
Known values for 'Location' are:
00 Belt Buckle (on armour) or amulets (on robes) - entire body for some animations
01 Minor colour
02 Major colour
03 Skin colour
04 Strap colour (on armour) or minor trimming (on robes - the centre strip down a robe and the hem on some robes)
05 Armor colour (and major trimming on robe - cross trim and cape trim on robe of archmagi)
06 Hair colour
16 Quillons or Crossguard
20 Grip (usually not visible as it's in the characters hand)
21 Blade or major portion of weapon
32 Shield hub
34 Shield panelling
37 Shield rim
48 Helm ornamentation - i.e. wings
49 Helm ornamentation - i.e. feathers/horsehair
50 Helm ornamentation - i.e. feathers/horsehair
52 Unknown but listed in helm01
53 Helm - the main covering
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Constitution = Constitution + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Constitution = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Constitution = (Constitution * 'Statistic Modifier' value) / 100
Statistic Modifier
can be positive or negative.
The effect modifies CON.
- With a Timing Modes of Permanent or Delayed, if
Type = 0
andStatistic Modifier
is positive, the statistic will alter and remain shown in white text, and a message 'Constitution raised permanently' will be shown. - With a Timing Modes of Permanent or Delayed, if
Type
is1
or2
, orStatistic Modifier
is negative, the statistic will alter and remain shown in white text, though no message is shown. - With all other Timing Modes, the statistic will alter and be shown in red text.
- There's no feedback message about stat being raised permanently in the EE's – it must be done separately with opcode #139.
-
The opcode itself provides no coloring anymore (it's been externalized through "UI.menu")
- An effective value > base value ⟶ green.
- An effective value < base value ⟶ red.
- An effective value = base value ⟶ white/default.
Timing Mode
s 1/4/7
, the creature's base Constitution
is altered, leaving behind no removable effect.
(0,25)
in game (40
in IWD2).
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Parameter #1: Damage Amount
Parameter #2: Type
Known values for 'Type' are:
0 Crushing
1 Crushing Set to Value
2 Crushing Set to Percentage
65536 Acid
65537 Acid Set to Value
65538 Acid Set to Percentage
131072 Cold
131073 Cold Set to Value
131074 Cold Set to Percentage
262144 Electricity
262145 Electricity Set to Value
262146 Electricity Set to Percentage
524288 Fire
524289 Fire Set to Value
524290 Fire Set to Percentage
1048576 Piercing
1048577 Piercing Set to Value
1048578 Piercing Set to Percentage
2097152 Poison
2097153 Poison Set to Value
2097154 Poison Set to Percentage
4194304 Magic
4194305 Magic Set to Value
4194306 Magic Set to Percentage
8388608 Missile
8388609 Missile Set to Value
8388610 Missile Set to Percentage
16777216 Slashing
16777217 Slashing Set to Value
16777218 Slashing Set to Percentage
33554432 Magic Fire
33554433 Magic Fire Set to Value
33554434 Magic Fire Set to Percentage
67108864 Magic Cold
67108865 Magic Cold Set to Value
67108866 Magic Cold Set to Percentage
134217728 Stunning
134217729 Stunning Set to Value
134217730 Stunning Set to Percentage
268435456 Soul Eater
268435457 Soul Eater Set to Value
268435458 Soul Eater Set to Percentage
1073741824 Disease
1073741825 Disease Set to Value
1073741826 Disease Set to Percentage
The Dice values can be used to inflict varying damage amounts - e.g. 2d6 would do 2-12 damage (Damage type is still specified by the 'Type' value).
If 'Damage Amount' and the Dice values are both non-zero, the total damage inflicted is: 'Damage Amount' + Dice value.
'Damage Amount' can be positive or negative (though the damage sound will play in either case).
Parameter #1: Text Notification
Parameter #2: Death Type
Known values for 'Text Notification' are:
0 Show death message
1 Don't show death message
Known values for 'Death Type' are:
0 Acid death
1 Burning death
2 Crushed death
4 Normal death
8 Chunked death
16 Stoned death
32 Freezing death
64 Exploding stoned death
128 Exploding freezing death
256 Electrified death
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Dexterity = Dexterity + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Dexterity = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Dexterity = (Dexterity * 'Statistic Modifier' value) / 100
- 3 ⟶ Cat's Grace (EE only)
Statistic Modifier
can be positive or negative.
The effect modifies DEX.
- With a Timing Modes of Permanent or Delayed, if
Type
is0
andStatistic Modifier
is positive, the statistic will alter and remain shown in white text, and a message 'Dexterity raised permanently' will be shown. - With a Timing Modes of Permanent or Delayed, if
Type
is1
or2
, orStatistic Modifier
is negative, the statistic will alter and remain shown in white text, though no message is shown. - With all other Timing Modes, the statistic will alter and be shown in red text.
- There's no feedback message about stat being raised permanently in the EE's – it must be done separately with opcode #139.
-
The opcode itself provides no coloring anymore (it's been externalized through "UI.menu")
- An effective value > base value ⟶ green.
- An effective value < base value ⟶ red.
- An effective value = base value ⟶ white/default.
Type=3
:
Statistic Modifier
is unused: it uses the value listed in CLSSPLAB.2da for the creature's base class, or defaults to1
if the file isn't present (it only exists by default in IWDEE).-
A single instance of this opcode (using
Type=3
) cannot raise Dexterity above 20 (hardcoded), but multiple instances of it can.- This is because it only checks the limit against the creature's base score, not its effective score.
- Like the other modes, applying the effect with Timing Mode 1 will affect the creature's base stat, leaving no removable effect.
- Once applied to a creature,
Statistic Modifier
will store the exact DEX increase granted (only useful for lookup/editing through EEkeeper/NI). -
When you apply this effect in an External EFF, (via op177 / op283):
Parameter1
in the EFF will determine the exact Dexterity increase (so it must be set manually, and ignores any limit).
Timing Mode
s 1/4/7
, the creature's base Dexterity
is altered, leaving behind no removable effect.
(0,25)
in game (40
in IWD2).
Parameter #1: Irrelevant
Parameter #2: Type
Type
value.
Known values for
Type
are:
- 0 ⟶ Normal Haste – double the movement rate and grants an additional Attack Per Round (APR), rounded down (capped at
6
) - 1 ⟶ Improved Haste – double the movement rate and doubles APR (capped at
10
) - 2 ⟶ Weak Haste – Speed haste without attack bonuses, round APR up (capped at
5
)
All of them set STATE_HASTED.
Improved/Weak
function by setting an additional STAT
value, which modifies the behavior of STATE_HASTED:
The Normal
and Improved
haste types grant a -2
initiative (Weapon Speed) bonus. All types:
- grant portrait icons (
Haste
/Improved Haste
) - increase the creature's animation speed and the animation speed of opcode 140 effects
- halve the creature's round timer used by attacks, modal abilities and "Auto-Pause: End of Round"
- increase frequency of application of poison, disease, regeneration, Cast on Condition and Use EFF File (at Frequency), but not below
1s
0
.This opcode will set the
STATE_HASTED
flag and nothing else when applied with Timing Mode 1
, and cannot be removed within the game by any means, only suppressed by Slow.This only works when applying
Normal/Improved
haste (there’s no difference, since the STAT
for Improved
haste doesn’t get set this way), Weak
haste does not do anything with Timing Mode 1
.
Parameter #1: Statistic Modifier
Parameter #2: Type
Known values for 'Type' are:
- 0 ⟶ Cumulative Modifier: HP = HP + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier: HP = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier: HP = (HP * 'Statistic Modifier' value) / 100
'Statistic Modifier' can be positive or negative.
Parameter #1: Statistic Modifier
Parameter #2: Type
Special: Mode
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
HP = HP + 'Statistic Modifier' value
(affects current and max HP) - 1 ⟶ Flat Value Modifier:
HP = 'Statistic Modifier' value
(affects current and max HP) - 2 ⟶ Percentage Modifier:
HP = (HP * 'Statistic Modifier' value) / 100
(affects current and max HP) - 3 ⟶ As
0
(does not affect current HP) - 4 ⟶ As
1
(does not affect current HP) - 5 ⟶ As
2
(does not affect current HP) - 6 ⟶ Non-cumulative Modifier:
HP = HP + 'Statistic Modifier' value
(affects current and max HP) (EE only)
Statistic Modifier
can be positive or negative.
Known values for
Mode
are:
- 0 ⟶ Normal: Effect functions as dictated by the
Type
field. -
1 ⟶ Do not update current HP.
- This value is set automatically once the effect has been initially processed on a creature.
- For normal operation, the special field MUST be zero.
Type
is set internally to 6
. As mentioned here, multiple effects of Type=6
can be carried by the creature at the same time and only the largest value is used when calculating extra HP. Hence the term “noncumulative coexisting”. This functionality doesn’t interact with other forms (Type != 6
) of HP gain, and cumulative HP drain doesn’t use Type=6
.
Type
2
or 5
use the base maximum HP value, and therefore override other Type
2
or 5
modifiers.
Statistic Modifier
and the Dice values are both non-zero, the total HP change is: 'Statistic Modifier' + Dice value
.
- Maximum HP cannot be reduced below a creature's level/HD (average level rounded up for multiclasses).
- It is still able to reduce current HP below the creature's level/HD, and has the same bugged death as opcode #17 if it reduces a creature to zero or less HP.
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Intelligence = Intelligence + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Intelligence = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Intelligence = (Intelligence * 'Statistic Modifier' value) / 100
Statistic Modifier
can be positive or negative.
The effect modifies INT.
- With a Timing Modes of Permanent or Delayed, if
Type
is0
andStatistic Modifier
is positive, the statistic will alter and remain shown in white text, and a message 'Intelligence raised permanently' will be shown. - With a Timing Modes of Permanent or Delayed, if
Type
is1
or2
, orStatistic Modifier
is negative, the statistic will alter and remain shown in white text, though no message is shown. - With all other Timing Modes, the statistic will alter and be shown in red text.
- There's no feedback message about stat being raised permanently in the EE's – it must be done separately with opcode #139.
-
The opcode itself provides no coloring anymore (it's been externalized through "UI.menu")
- An effective value > base value ⟶ green.
- An effective value < base value ⟶ red.
- An effective value = base value ⟶ white/default.
Timing Mode
s 1/4/7
, the creature's base Intelligence
is altered, leaving behind no removable effect.
(0,25)
in game (40
in IWD2).
Parameter #1: Irrelevant
Parameter #2: Type
Known values for 'Type' are :
0 Normal Invisibility -> affected creature makes the first attack with +4
1 Improved Invisibility -> affected creature stays invisible after attack
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Lore = Lore + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Lore = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Lore = (Lore * 'Statistic Modifier' value) / 100
Statistic Modifier
can be positive or negative.
The effect modifies LORE.
Timing Mode 1
.
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field. Luck affects the minimum damage caused by a weapon (up to the normal maximum damage of the weapon) and the attack roll modifier (up to a maximum of 20, excluding natural attack roll modifiers, e.g. high STR, invisibility etc) by Statistic Modifier
amount. Statistic Modifier
also affects the damge rolls of opponents (in feature blocks, not extension headers). The effect does not set STATE_LUCK.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Luck = Luck + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Luck = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Luck = (Luck * 'Statistic Modifier' value) / 100
- Modifies a creature's weapon damage die rolls (up/down to its maximum/minimum).
- Modifies a creatures's attack roll
[1d20]
(up/down to its maximum/minimum). - Modifies non-weapon damage die rolls dealt to the creature (up/down to its maximum/minimum).
- Modifies a creatures's initiative roll
[1d6 - 4]
for weapon attacks (up/down to its maximum/minimum). See opcode #190 for further details about weapon/attack speed. - Modifies a creatures's initiative roll
[1d8 - 1]
for movement (up/down to its maximum/minimum). - Modifies a creatures's skill roll
[1d100]
for Hiding in Shadows (up/down to its maximum/minimum). - Modifies a creatures's skill roll
[1d100]
for Set Traps (up/down to its maximum/minimum). - Modifies a creatures's skill roll
[1d10]
for Open Locks (up/down to its maximum/minimum). - Modifies a creatures's skill roll
[1d10]
for Bash Doors (up/down to its maximum/minimum). - Modifies a creatures's skill roll
[1d10]
for Disarm Trap (up/down to its maximum/minimum). - Modifies the chance for a Mirror Image to be struck,
chance = ('number of images' + 'Statistic Modifier') / ('number of images' + 1)
.
-
Apparently, there is intentionally a random wait time between when a creature attempts to move to another creature, and when they will actually start pathing. Luck helps with this...
Wait Time = 0, when roll = 0
Wait Time = (8 - roll), when roll != 0
- The natural roll range is
[0,7]
, but like many other rolls Luck alters this slightly. For every point in Luck the highest bound of the roll is converted into the lower bound. - So with
1
Luck the roll becomes[0,6]
, with0
having a probability of 25% instead of 12.5%. Negative luck works the same, but in reverse. -
1
is the worst roll you can get, yet it is neither of the extremes. So,-1
Luck is bad because it prevents you from bypassing the wait time, (rolling a0
), but if Luck must be negative, the lower the better.Luck = "-1"
: Worst roll possible is a1
, you will be waiting for 7 AI updates (or, if you prefer, 7⁄15ths of a second).Luck = "-7"
: Worst roll possible is a7
, you will be waiting for 1 AI update (or, if you prefer, 1⁄15th of a second)!!
- Positive Luck will always increase the likelihood of instantaneous pathing.
- Note that this wait time is only applied to creature-to-creature pathing, and never to on-the-ground destinations.
- Also, every creature rolls for their own delay when they go to target a creature.
Parameter #1: Statistic Modifier
Parameter #2: Type
Special: Mode
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Morale = Morale + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Morale = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Morale = (Morale * 'Statistic Modifier' value) / 100
Statistic Modifier
can be positive or negative.
At least in EEs, known values for
Mode
are:
-
0 ⟶ BG2 mode – It's hardcoded to fill the following values:
Statistic Modifier = 10
Type = 1
m_done = 1
(internal field that immediately removes the effect from creature, no matterduration
)- In addition, it checks if the creature is berserking, and if it is, it returns without doing anything.
- 1 ⟶ BG1 mode – Default (functions as expected)
Parameter #1: Irrelevant
Parameter #2: Type
Type
field, which is suspected to be an EE extension. It sets the STATE_PANIC state.
Known values for
Type
are:
- 0 ⟶ Default
- Non-zero ⟶ Bypass opcode #101 (Immunity to effect)
Parameter #1: Damage Amount
Parameter #2: Type
Known values for 'Type' are:
0 Inflict 'Damange Amount' per second
1 Inflict 'Damage Amount' as a percentage of total HP
2 Inflict 'Damage Amount' per second
3 Inflict 'Damage Amount' per round
4 Inflict Param 3 Damage every Param 1 seconds
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Cursed
items in addition to all opcode #283 effects from the targeted creature(s).
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Resistance = Resistance + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Resistance = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Resistance = (Resistance * 'Statistic Modifier' value) / 100
Statistic Modifier
can be positive or negative.
The effect modifies RESISTACID.
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Resistance = Resistance + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Resistance = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Resistance = (Resistance * 'Statistic Modifier' value) / 100
Statistic Modifier
can be positive or negative.
The effect modifies RESISTCOLD.
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Resistance = Resistance + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Resistance = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Resistance = (Resistance * 'Statistic Modifier' value) / 100
Statistic Modifier
can be positive or negative.
The effect modifies RESISTELECTRICITY.
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Resistance = Resistance + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Resistance = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Resistance = (Resistance * 'Statistic Modifier' value) / 100
Statistic Modifier
can be positive or negative.
The effect modifies RESISTFIRE.
Parameter #1: Statistic Modifier
Parameter #2: Type
Known values for 'Type' are:
0 Cumulative Modifier -> Resistance = Resistance + 'Statistic Modifier' value
1 Flat Value Modifier -> Resistance = 'Statistic Modifier' value
2 Percentage Modifier -> Resistance = (Resistance * 'Statistic Modifier' value) / 100
'Statistic Modifier' can be positive or negative.
Parameter #1: Irrelevant
Parameter #2: Restore creature animation?
Known values for
Restore creature animation?
are:
- 0 ⟶ No
- 1 ⟶ Yes
This effect ignores durations attributed to it.
Base Animation = 0x6000
-
+ Class:
0x0000
(Cleric/Druid/Shaman/Default)0x0100
(Fighter/Paladin/Ranger)0x0200
(Mage/Sorcerer)0x0300
(Thief/Bard)0x0500
(Monk)- Mutliclasses prioritize (Warrior > Priest > Rogue > Wizard)
-
+ Gender:
0x0000
(Male/Default)0x0010
(Female)
-
+ Race:
0x0000
(Human/Default)0x0001
(Elf/Half-Elf/Tiefling)0x0002
(Dwarf)0x0003
(Halfling)0x0004
(Gnome)0x0005
(Halforc)
- This opcode will only restore life to creatures with STATE_DEAD. Frozen and Petrified creatures do not qualify until after they shatter (at which point you can no longer target them outside of scripts, so it doesn't really matter).
- The animation reset is not dependent on the target's death state.
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Save = Save + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Save = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Save = (Save * 'Statistic Modifier' value) / 100
- 3 ⟶ Increment Instantly:
Save = Save + 'Statistic Modifier' value
(EE only)
Statistic Modifier
can be positive or negative.
The effect modifies SAVEVSDEATH.
Type = 3
, this opcode processes before saving throws are checked for effects proceeding it in the same effect stack; when Type = 0
, it processes after.
Type = 3
modifies instantly SAVEVSWANDS instead of SAVEVSDEATH.As a result, saving throws for effects in the same effect stack and after this opcode are not processed as expected.
Effects proceeded after the stack are treated normaly like
Type = 0
.
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Save = Save + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Save = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Save = (Save * 'Statistic Modifier' value) / 100
- 3 ⟶ Increment Instantly:
Save = Save + 'Statistic Modifier' value
(EE only)
Statistic Modifier
can be positive or negative.
The effect modifies SAVEVSWANDS.
Type = 3
, this opcode processes before saving throws are checked for effects proceeding it in the same effect stack; when Type = 0
, it processes after.
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Save = Save + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Save = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Save = (Save * 'Statistic Modifier' value) / 100
- 3 ⟶ Increment Instantly:
Save = Save + 'Statistic Modifier' value
(EE only)
Statistic Modifier
can be positive or negative.
The effect modifies SAVEVSPOLY.
Type = 3
, this opcode processes before saving throws are checked for effects proceeding it in the same effect stack; when Type = 0
, it processes after.
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Save = Save + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Save = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Save = (Save * 'Statistic Modifier' value) / 100
- 3 ⟶ Increment Instantly:
Save = Save + 'Statistic Modifier' value
(EE only)
Statistic Modifier
can be positive or negative.
The effect modifies SAVEVSBREATH.
Type = 3
, this opcode processes before saving throws are checked for effects proceeding it in the same effect stack; when Type = 0
, it processes after.
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Save = Save + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Save = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Save = (Save * 'Statistic Modifier' value) / 100
- 3 ⟶ Increment Instantly:
Save = Save + 'Statistic Modifier' value
(EE only)
Statistic Modifier
can be positive or negative.
The effect modifies SAVEVSSPELL.
Type = 3
, this opcode processes before saving throws are checked for effects proceeding it in the same effect stack; when Type = 0
, it processes after.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
A silenced creature cannot cast spells / use special abilities (unless flagged as
Castable when silenced
), bard song or initiate dialog.The engine is hard-coded to allow these spells to be cast by a silenced creature:
"SPWI219"
(Vocalize)"SPIN649"
(Teleport to Pocket Plane) in BG2/BGEE
Parameter #1: Irrelevant
Parameter #2: Wake on Damage?
Special: Icon
Known values for
Wake on Damage?
are (only in EEs):
- 0 ⟶ Yes
- 1 ⟶ No
Icon
defines the index from STATDESC.2DA for custom portrait icons (EE only). Default value is Sleep
. If it is set, also spell state PRONE
will be set. Otherwise the creature will be moved to the backlist and become untargettable by most scripts.
This opcode sets the STATE_SLEEPING
and STATE_HELPLESS
flag bits.
Timing Mode
s 1/4/7
the bits cannot be removed in-game.Moreover, the
STATE_SLEEPING
works as the Wake on Hit
option. It’s just not usable because of the unremovable STATE_HELPLESS
.
stunning
damage done by normal fists.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Slow
portrait icon.
Casting Time
of all spells. Not verified for IWD2.
STATE_SLOWED
flag and nothing else when applied with Timing Mode 1
, and cannot be removed within the game by any means, only suppressed by Haste.
Parameter #1: Colour
Parameter #2: Type
Known values for 'Colour' are:
0 Crash
1 No effect / Black
2 White / White -> Blue
3 Purple -> White / Purple -> White
4
.. White
12
13 Crash
Known values for 'Type' are:
1 Sparkle Puff
2 No effect?
3 Sparkle Shower
Parameter #1: Slot Amount Modifier
Parameter #2: Spell Level
Slot Amount Modifier
field, at the level specified by the Spell Level
field. Wizard spells are used by Bards, Sorcerers and Wizards in IWD2.Known values for
Spell Level
are:
-
0 ⟶ Double spells
- The amount of spell slots is doubled for the level specified by the
Slot Amount Modifier
value and all levels below
- The amount of spell slots is doubled for the level specified by the
- BIT0 ⟶ Level 1
- BIT1 ⟶ Level 2
- BIT2 ⟶ Level 3
- BIT3 ⟶ Level 4
- BIT4 ⟶ Level 5
- BIT5 ⟶ Level 6
- BIT6 ⟶ Level 7
- BIT7 ⟶ Level 8
- BIT8 ⟶ Level 9
The target creature(s) must have at least 1 slot at the selected level to have their slot count changed.
Negative slots start at 65535 (-1)
, and go from there. Even though the spellbook has room to display only 12 slots at once, the slots are still there and usable.
Slot Amount Modifier
can be positive or negative.
-
If the number of current spell slots is 1:
- applying a
-1
modifier will result in zero current slots and prevent further applications of this opcode from altering spell slots (until this effect terminates or is removed, or the base amount changes). - applying a
-2
modifier instead would bypass zero and result in65535 (-1)
. Then applying a+1
modifier would result in zero current slots and a repeat of the above.
- applying a
- Regardless of whether the value can be altered, the effect is still attached to the creature, rather than being discarded entirely. They can still take effect should the creature's base spell slots be altered (such as from leveling up).
- Applying multiple effects in increments of
-1
will insure that spell slots do not go below zero (and thus will not wrap around to maximum).
Parameter #1: Irrelevant
Parameter #2: Irrelevant
- Will not remove a currently delayed (untriggered) Petrification effect.
- Nor will it remove the False Petrification mode of opcode #109.
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Strength = Strength + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Strength = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Strength = (Strength * 'Statistic Modifier' value) / 100
- 3 ⟶ Bull's Strength (EE only)
Statistic Modifier
can be positive or negative.
The effect modifies STR.
- With a Timing Modes of Permanent or Delayed, if
Type
is0
andStatistic Modifier
is positive, the statistic will alter and remain shown in white text, and a message 'Strength raised permanently' will be shown. - With a Timing Modes of Permanent or Delayed, if
Type
is1
or2
, orStatistic Modifier
is negative, the statistic will alter and remain shown in white text, though no message is shown. - With all other Timing Modes, the statistic will alter and be shown in red text.
- There's no feedback message about stat being raised permanently in the EE's – it must be done separately with opcode #139.
-
The opcode itself provides no coloring anymore (it's been externalized through "UI.menu")
- An effective value > base value ⟶ green.
- An effective value < base value ⟶ red.
- An effective value = base value ⟶ white/default.
Type=3
:
Statistic Modifier
is unused: it uses the value listed in CLSSPLAB.2da for the creature's base class, or defaults to1
if the file isn't present (it only exists by default in IWDEE).-
A single instance of this opcode (using
Type=3
) cannot raise Strength above 18 (hardcoded), but multiple instances of it can.-
This is because it only checks the limit against the creature's base score, not its effective score.
- A Cleric with 12 base STR could gain up to +6 from the effect each time. Two max roll effects would take them to 24 STR.
- A Cleric with 16 base STR could only gain up to +2 from the effect each time.
-
Warrior classes also gain a % Strength score, their maximum is actually
18/100
. Every/10
is counted as+1
from their die roll. Warriors will not exceed18/100
though, as once they hit18
, the remaining dice roll converts to a % increase, preventing their score from exceeding18/100
(18/100 + /10
doesn't convert to19
).
For instance, if a PALADIN with17
STR rolls, say,5
, he will end up with18/40
STR.
-
This is because it only checks the limit against the creature's base score, not its effective score.
- Like the other modes, applying the effect with Timing Mode 1 will affect the creature's base stat, leaving no removable effect.
- Once applied to a creature,
Statistic Modifier
will store the exact STR increase granted, while theSpecial
field will store any Exceptional STR increase granted (only useful for lookup/editing through EEkeeper/NI). -
When you apply this effect in an External EFF, (via op177 / op283):
Parameter1
in the EFF will determine the exact Strength increase (so it must be set manually, and ignores any limit).-
If
Parameter1
is non-zero, Exceptional STR will still be rolled as normal (and only for appropriate Classes).- It will be equal to
10 * (Roll - (18 - Base))
, capped (0,100).
- It will be equal to
- If
Parameter1
is zero, no Exceptional STR will be granted. - The actual increase for Exceptional STR will be stored in the
Special
field of op177 / op283 (after it's been applied to the creature). - Basically, it works exactly like
Type=0
, except that warriors will still gain a random Exceptional STR increase (of course it's only noticeable if their resulting STR is 18).
Timing Mode
s 1/4/7
, the creature's base Strength
is altered, leaving behind no removable effect.
(0,25)
in game (40
in IWD2).
Parameter #1: Irrelevant
Parameter #2: Irrelevant
- Maintains Portrait Icon
Stun
(EE only). - Immobilizes the creature, limiting it to instantaneous actions (INSTANT.IDS).
-
Maintains STATE_STUNNED.
- Renders the creature unselectable and disable the Inventory.
-
Maintains STATE_HELPLESS.
- Renders the creature unselectable and disable the Inventory.
- Causes all attacks against the creature to automatically hit, disabling Critical Hits and misses.
Timing Mode
s 1/4/7
: will set the creature’s base STATE_STUNNED
flag, while still leaving behind a separate removable effect.
- Should you remove the effect without removing the state (through means other than opcode #46), the creature will be fully functional, just not controllable by the player (if it was).
- By itself, STATE_STUNNED does not disable any scripts or limit which actions the creature may take. It needs its opcode's immobilization effect as well as STATE_HELPLESS to fully work.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
This effect ignores durations attributed to it.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
This effect ignores durations attributed to it.
0
(zero).
Parameter #1: Irrelevant
Parameter #2: Irrelevant
This effect ignores durations attributed to it.
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Wisdom = Wisdom + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Wisdom = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Wisdom = (Wisdom * 'Statistic Modifier' value) / 100
Statistic Modifier
can be positive or negative.
The effect modifies WIS.
- With a Timing Modes of Permanent or Delayed, if
Type
is0
andStatistic Modifier
is positive, the statistic will alter and remain shown in white text, and a message 'Wisdom raised permanently' will be shown. - With a Timing Modes of Permanent or Delayed, if
Type
is1
or2
, orStatistic Modifier
is negative, the statistic will alter and remain shown in white text, though no message is shown. - With all other Timing Modes, the statistic will alter and be shown in red text.
- There's no feedback message about stat being raised permanently in the EE's – it must be done separately with opcode #139.
-
The opcode itself provides no coloring anymore (it's been externalized through "UI.menu")
- An effective value > base value ⟶ green.
- An effective value < base value ⟶ red.
- An effective value = base value ⟶ white/default.
Timing Mode
s 1/4/7
, the creature's base Wisdom
is altered, leaving behind no removable effect.
(0,25)
in game (40
in IWD2).
Parameter #1: RGB Colour
Parameter #2: Speed
The 'RGB Colour' field is handled as follows:
Second byte = Red (0-255)
Third byte = Green (0-255)
Fourth byte = Blue (0-255)
The 'Speed' field is handled as follows:
Third byte = Speed (0-255)
A speed of 0 does not pulsate. A speed of 1 is fastest, and a speed of 255 is slowest.
Parameter #1: RGB Colour
Parameter #2: Location
The 'RGB Colour' field is handled as follows:
Second byte = Red (0-255)
Third byte = Green (0-255)
Fourth byte = Blue (0-255)
Known values for 'Location' are:
00 Belt Buckle (on armour) or amulets (on robes) - entire body for some animations
01 Minor colour
02 Major colour
03 Skin colour
04 Strap colour (on armour) or minor trimming (on robes - the centre strip down a robe and the hem on some robes)
05 Armor colour (and major trimming on robe - cross trim and cape trim on robe of archmagi)
06 Hair colour
16 Quillons or Crossguard
20 Grip (usually not visible as it's in the characters hand)
21 Blade or major portion of weapon
32 Shield hub
34 Shield panelling
37 Shield rim
48 Helm ornamentation - i.e. wings
49 Helm ornamentation - i.e. feathers/horsehair
50 Helm ornamentation - i.e. feathers/horsehair
52 Unknown but listed in helm01
53 Helm - the main covering
Parameter #1: RGB Colour
Parameter #2: Location
The 'RGB Colour' field is handled as follows:
Second byte = Red (0-255)
Third byte = Green (0-255)
Fourth byte = Blue (0-255)
Known values for 'Location' are:
00 Belt Buckle (on armour) or amulets (on robes) - entire body for some animations
01 Minor colour
02 Major colour
03 Skin colour
04 Strap colour (on armour) or minor trimming (on robes - the centre strip down a robe and the hem on some robes)
05 Armor colour (and major trimming on robe - cross trim and cape trim on robe of archmagi)
06 Hair colour
16 Quillons or Crossguard
20 Grip (usually not visible as it's in the characters hand)
21 Blade or major portion of weapon
32 Shield hub
34 Shield panelling
37 Shield rim
48 Helm ornamentation - i.e. wings
49 Helm ornamentation - i.e. feathers/horsehair
50 Helm ornamentation - i.e. feathers/horsehair
52 Unknown but listed in helm01
53 Helm - the main covering
Parameter #1: Animation ID
Parameter #2: Type
Animation ID
field, in the style specified by the Type
field.
Known values for
Animation ID
are: (from ANIMATE.IDS – in decimal)
Known values for
Type
are:
- 0 ⟶ Change target's animation to
Animation ID
(Low Priority) - 1 ⟶ Change target's animation to Source's Base Animation (Low Priority)
- Normally used targeting oneself to reassert their base animation over previous
op53,p2=0
effects.
- Normally used targeting oneself to reassert their base animation over previous
-
2 ⟶ Change target's animation to
Animation ID
(High Priority)- Has priority over other
op53
effects using eitherp2=0
orp2=1
, regardless of stacking order.
- Has priority over other
Timing Mode
s 1/4/7
, sets the creature's base animation
, leaving no removable effect.
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
THAC0 = THAC0 + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
THAC0 = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
THAC0 = (THAC0 * 'Statistic Modifier' value) / 100
Parameter #1: IDS Entry
Parameter #2: IDS File
Known values for
IDS File
are:
- 2 ⟶ EA.IDS
- 3 ⟶ GENERAL.IDS
- 4 ⟶ RACE.IDS
- 5 ⟶ CLASS.IDS
- 6 ⟶ SPECIFIC.IDS
- 7 ⟶ GENDER.IDS
- 8 ⟶ ALIGN.IDS
- 9 ⟶ KIT.IDS (EE only)
IDS Entry
is a value from the specified IDS file, indicating the specific creature type to affect.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
0
(zero).
Parameter #1: Irrelevant
Parameter #2: Alignment
Alignment
.
Known values for
Alignment
are:
- 00 ⟶ None
- 17 ⟶ Lawful Good
- 18 ⟶ Lawful Neutral
- 19 ⟶ Lawful Evil
- 33 ⟶ Neutral Good
- 34 ⟶ True Neutral
- 35 ⟶ Neutral Evil
- 49 ⟶ Chaotic Good
- 50 ⟶ Chaotic Neutral
- 51 ⟶ Chaotic Evil
Parameter #1: Level
Parameter #2: Type
Known values for 'Type' are:
- 0 ⟶ Always dispel
- 1 ⟶ Use Caster Level
- 2 ⟶ Use 'Level' field
With 'Type' of 1 or 2, the base chance of successfully dispelling is 50%. This chance is modified by the relative levels of the dispeller to the caster. Each level below gives a -10% chance, each level above gives a +5% chance. There is always a 1% chance of success or failure.
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Stealth = Stealth + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Stealth = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Stealth = (Stealth * 'Statistic Modifier' value) / 100
Timing Mode
s 1/4/7
permanently alter the creature's Move Silently
score, leaving no removable effect.
Type = 0
and Timing Mode = 9
, it modifies MOVESILENTLYMTPBONUS. The final value for this stat is multiplied by its percentage entry in THIEFSCL.2DA, capped to the range [0,255]
, before being included in the creature’s Move Silently
score.
Parameter #1: Percent Chance
Parameter #2: Type
Known values for 'Type' are:
0 Mage Spells
1 Cleric Spells
Parameter #1: Undefined
Parameter #2: Undefined
Parameter #1: Slot Amount Modifier
Parameter #2: Spell Level
Slot Amount Modifier
field, at the level specified by the Spell Level
field.Known values for
Spell Level
are:
-
0 ⟶ Double spells
- The amount of spell slots is doubled for the level specified by the
Slot Amount Modifier
value and all levels below
- The amount of spell slots is doubled for the level specified by the
- BIT0 ⟶ Level 1
- BIT1 ⟶ Level 2
- BIT2 ⟶ Level 3
- BIT3 ⟶ Level 4
- BIT4 ⟶ Level 5
- BIT5 ⟶ Level 6
- BIT6 ⟶ Level 7
-
BIT9 ⟶ Double spells
- The amount of spell slots is doubled exclusively for the level specified by
Slot Amount Modifier
- The amount of spell slots is doubled exclusively for the level specified by
The target creature(s) must have at least 1 slot at the selected level to have their slot count changed.
Negative slots start at 65535 (-1)
, and go from there. Even though the spellbook has room to display only 12 slots at once, the slots are still there and usable.
Slot Amount Modifier
can be positive or negative.
-
If the number of current spell slots is 1:
- applying a
-1
modifier will result in zero current slots and prevent further applications of this opcode from altering spell slots (until this effect terminates or is removed, or the base amount changes). - applying a
-2
modifier instead would bypass zero and result in65535 (-1)
. Then applying a+1
modifier would result in zero current slots and a repeat of the above.
- applying a
- Regardless of whether the value can be altered, the effect is still attached to the creature, rather than being discarded entirely. They can still take effect should the creature's base spell slots be altered (such as from leveling up).
- Applying multiple effects in increments of
-1
will insure that spell slots do not go below zero (and thus will not wrap around to maximum).
Parameter #1: Irrelevant
Parameter #2: Irrelevant
0
(zero).
While a creature with Infravision is currently selected,
- all visible creatures with
body heat
that are currently in a "shadowed" part of the area receive a "warm" (red-shifted) overlay body heat
is determined by a creature's animation (INI
file) usingdetected_by_infravision=1
, or by opcode #342 (p1=1
&p2=1
)-
"shadowed" is determined by each area's Light Map
"AR####LM.BMP"
- Some areas have a separate Light Map for "nighttime" hours,
"AR####LN.BMP"
- Some areas have a separate Light Map for "nighttime" hours,
Parameter #1: Irrelevant
Parameter #2: Irrelevant
This effect ignores durations attributed to it.
0
(zero).
Parameter #1: Irrelevant
Parameter #2: Irrelevant
0
(zero).
- STATE_BLUR will maintain the effects of this opcode, once this opcode expires, but only until you save & reload.
- If you set STATE_BLUR on a CRE file, it won't do anything by itself.
- If you later apply opcode #65 to the creature, once it expires, the blur visual will remain until you save & reload, but will no longer update based on your movement rate (it will remain stuck at whatever it was when the opcode expired).
Parameter #1: Fade Amount
Parameter #2: Visual Effect
Fade Amount
field in the style specified by the Visual Effect
field.
Known values for
Fade Amount
are:
- 0 ⟶ Fully visible
- ...
- 255 ⟶ Fully transparent
A creature's TRANSLUCENT
stat is stored in a single byte (0-255
) on the CRE
file.
This opcode only reads the first byte (out of four) of Fade Amount
, so the value will always be 0-255
.
Visual Effect
are:
- 0 ⟶ Draw instantly
- 1 ⟶ Fade in
- 2 ⟶ Fade out
Visual Effect = 0
sets the TRANSLUCENT
stat directly, based on the timing mode
.
Visual Effect = 1
and Visual Effect = 2
call a hardcoded process that decreases/increases the TRANSLUCENT
stat by Fade Amount
every tick, until it reaches 0
/255
.
-
Any transparency inherit in the
animation
(see for instance7703.INI — SHADOW
) will stack with that of theTRANSLUCENT
stat.- It's likely multiplied (so that
50% * 50% = 25%
), or something similar, but not additive.
- It's likely multiplied (so that
-
On EE games, If you have the game option "Sprite Outlines" enabled,
TRANSLUCENT
values1 - 127
are treated as0
.- If you also have the game option "Highlight selected sprites" enabled,
TRANSLUCENT
values1 - 127
will display correctly, but only while the mouse is over the creature.
- If you also have the game option "Highlight selected sprites" enabled,
Parameter #1: Irrelevant
Parameter #2: Mode
Mode
field. The Resource
key should be set to the filename of the creature to summon.
Mode
are:Mode | Position | EA |
---|---|---|
0, 1 | effect | align with target creature |
3 | target creature | align with target creature |
4 | target creature | CRE file |
5 | effect | align against target creature |
2, else | effect | CRE file |
Mode
details:
- Position:
- 3, 4 ⟶ summon at target creature's position
- else ⟶ summon at effect position
- EA:
Mode = 5
fails to make creatures summoned as ALLY (4) controllable. This is fixed upon reload.
- (EE only)
Resource 2
(external EFFs): Animation VVC/BAM file to be played at the summoned creature's location.
Default is a hardcoded VVC using"SPBOOM.BAM"
and palette#65
. This is generally used as the "portal" animation. - (EE only)
Resource 3
(external EFFs): Animation VVC/BAM file to be played at the location of the ability target. - Applies an opcode #271 to the summoned creature based on the duration of the
Resource 2
(not exact). Creature will not appear/spawn until this animation finishes. - Applies a delayed opcode #215 with
resource = "SPGFLSH1"
to the summoned creature,delayed duration = 5 ticks less
than the opcode #271. - Applies a delayed opcode #68 to the summoned creature based on effect duration (unless permanent).
- When summoned, any temporary changes (such as from equipped items) to the creature's gender are made permanent.
Parameter #1: Text Notification
Parameter #2: Irrelevant
Text Notification
.
Known values for
Text Notification
are:
- 0 ⟶ No text notification
- 1 ⟶ Show text notification
Resource
key should be set to the filename of the
animation to play when unsummoning the creature, and defaults to "SPGFLSH1"
if left empty.
- Has no effect on Party Members.
- Moves the targeted creature(s) to area
".ARE"
(a non-existant area). This deletes non-global creatures from the game. - Global creatures can still be recovered through scripts actions, such as MoveGlobalObject().
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Timing Mode
s 1/4/7
will permanently set the creature's STATE_NONDETECTION
flag, leaving no removable effect. This flag is not cleared on death.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
This effect ignores durations attributed to it.
Parameter #1: Gender Modifier
Parameter #2: Type
Gender Modifier
field, in the style specified by the Type
value.
Known values for
Type
are:
- 0 ⟶ Reverse Gender
- 1 ⟶ Flat Value Modifier:
Gender = 'Statistic Modifier' value
(values from GENDER.IDS)
The effect modifies SEX_CHANGED.
Reverse Gender
also switches the second BIT of the lower BYTE of the creature's animation, which (forPC
races), will switch between their male/female animations (0x6000
⟷0x6010
).-
Other races can be setup this way, but do not occupy the necessary animation slots by default.
For instance,VAMPIRE
is0x7F12
,VAMPIRE_FEMALE
is0x7F22
(Male should be0x7F02
and female0x7F12
for it to work).
Parameter #1: IDS Entry
Parameter #2: IDS File
Known values for 'IDS File' are:
1 Generic
2 Race
3 Class
4 Specific
5 Gender
6 Align
If 'IDS File' is 0, the EA state of the target is altered. The values used do not match ea.ids, use the values below for 'IDS Entry':
0 Friendly (green circle)
64 Neutral (blue circle)
255 Hostile (red circle)
Parameter #1: Statistic Modifier
Parameter #2: Modifier Type
Statistic Modifier
field in the style specified by the Type
field. The effect is an additive modifier, like adding +10
damage.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Damage = Damage + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Damage = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Damage = (Damage * 'Statistic Modifier' value) / 100
1
as 1
– it does not support the percentage modifier.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Parameter #1: Irrelevant
Parameter #2: Irrelevant
This effect ignores durations attributed to it.
0
(zero).
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Parameter #1: Irrelevant
Parameter #2: Irrelevant
This effect ignores durations attributed to it.
0
(zero).
Parameter #1: Damage
Parameter #2: Type
Known values for 'Type' are:
0 Hit Points per Second
1 No effect?
2 Hit Points per Second
3 1 Hit Point per 'Damage'
4 Strength Penalty
5 Dexterity Penalty
6 Constitution Penalty
7 Intelligence Penalty
8 Wisdom Penalty
9 Charisma Penalty
'Damage' can be positive (penalty) or negative (bonus).
Parameter #1: Irrelevant
Parameter #2: Irrelevant
This effect ignores durations attributed to it. It also unsets the feeblemind state bit.
0
(zero).
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Wizard
and Priest
spells only. This is cumulative with Miscast Magic.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
This effect ignores durations attributed to it.
0
(zero).
Parameter #1: Irrelevant
Parameter #2: Type
Type
value to the contents of the resource
key.
Known values for
Type
are:
- 0 ⟶ OVERRIDE
- 1 ⟶ AREA
- 2 ⟶ SPECIFICS
- 4 ⟶ CLASS
- 5 ⟶ RACE
- 6 ⟶ GENERAL
- 7 ⟶ DEFAULT
- Effect is always instantaneous/delayed.
AREA
andSPECIFICS
can only be set on non-global creatures (not potential party members or familiars), and are lost upon saving & reload.
Parameter #1: Irrelevant
Parameter #2: Type
Known values for 'Type' are:
04 Arrow
09 Axe
14 Bolt
19 Bullet
26 Throwing Dagger
34 Dart
64 Gaze (thac0 bonus of 32767)
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Resistance = Resistance + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Resistance = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Resistance = (Resistance * 'Statistic Modifier' value) / 100
Statistic Modifier
can be positive or negative.
The effect modifies RESISTMAGICFIRE.
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Resistance = Resistance + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Resistance = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Resistance = (Resistance * 'Statistic Modifier' value) / 100
Statistic Modifier
can be positive or negative.
The effect modifies RESISTMAGICCOLD.
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Resistance = Resistance + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Resistance = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Resistance = (Resistance * 'Statistic Modifier' value) / 100
Statistic Modifier
can be positive or negative.
The effect modifies RESISTSLASHING.
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Resistance = Resistance + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Resistance = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Resistance = (Resistance * 'Statistic Modifier' value) / 100
Statistic Modifier
can be positive or negative.
The effect modifies RESISTCRUSHING.
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Resistance = Resistance + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Resistance = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Resistance = (Resistance * 'Statistic Modifier' value) / 100
Statistic Modifier
can be positive or negative.
The effect modifies RESISTPIERCING.
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Resistance = Resistance + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Resistance = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Resistance = (Resistance * 'Statistic Modifier' value) / 100
Statistic Modifier
can be positive or negative.
The effect modifies RESISTMISSILE.
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Skill = Skill + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Skill = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Skill = (Skill * 'Statistic Modifier' value) / 100
Timing Mode
s 1/4/7
permanently alters the creature's Open Locks
score, leaving no removable effect.
Type = 0
and Timing Mode = 9
, it modifies LOCKPICKINGMTPBONUS. The final value for this stat is multiplied by its percentage entry in THIEFSCL.2DA, capped to the range [0,255]
, before being included in the creature’s Open Locks
score.
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Skill = Skill + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Skill = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Skill = (Skill * 'Statistic Modifier' value) / 100
Timing Mode
s 1/4/7
permanently alters the creature's Find Traps
score, leaving no removable effect.
Type = 0
and Timing Mode = 9
, it modifies TRAPSMTPBONUS. The final value for this stat is multiplied by its percentage entry in THIEFSCL.2DA, capped to the range [0,255]
, before being included in the creature’s Find Traps
score.
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Skill = Skill + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Skill = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Skill = (Skill * 'Statistic Modifier' value) / 100
Timing Mode
s 1/4/7
permanently alters the creature's Pick Pockets
score, leaving no removable effect.
Type = 0
and Timing Mode = 9
, it modifies PICKPOCKETMTPBONUS. The final value for this stat is multiplied by its percentage entry in THIEFSCL.2DA, capped to the range [0,255]
, before being included in the creature’s Pick Pockets
score.
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Fatigue = Fatigue + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Fatigue = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Fatigue = (Fatigue * 'Statistic Modifier' value) / 100
Statistic Modifier
can be positive or negative.
The effect modifies FATIGUE.
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Drunkenness = Drunkenness + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Drunkenness = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Drunkenness = (Drunkenness * 'Statistic Modifier' value) / 100
Statistic Modifier
can be positive or negative.
The effect modifies INTOXICATION.
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Skill = Skill + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Skill = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Skill = (Skill * 'Statistic Modifier' value) / 100
Statistic Modifier
can be positive or negative.
The effect modifies TRACKING.
Parameter #1: Statistic Modifier
Parameter #2: Type
THAC0, saving throws, turn undead level and thief skills are not affected. Spell slots and selection are not affected (though casting level is). Single/dual class characters gain 2 HP/level, multi-class characters gain 1 HP/level. Warriors gain an extra 1/2 attack at levels 7 and 13. Gaining any XP while at the altered level makes the level change permanent.
Known values for 'Type' are:
0 Cumulative Modifier -> Level = Level + 'Statistic Modifier' value
1 Flat Value Modifier -> Level = 'Statistic Modifier' value
2 Percentage Modifier -> Level = (Level * 'Statistic Modifier' value) / 100
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Exceptional Strength = Exceptional Strength + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Exceptional Strength = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Exceptional Strength = (Exceptional Strength * 'Statistic Modifier' value) / 100
Statistic Modifier
can be positive or negative.
The effect modifies STREXTRA.
Parameter #1: Regeneration Amount
Parameter #2: Type
Known values for 'Type' are:
0 Restore 'Regeneration Amount' per second
1 Restore 'Regeneration Amount' as a percentage of total HP
2 Restore 'Regeneration Amount' HP every second
3 Restore 1HP every 'Regeneration Amount' seconds
4 Restore Param 3 HP every Param 1 seconds
Parameter #1: Duration Modifier
Parameter #2: Type
Duration Modifier
field, affecting the spell type specified by the Type
field. Timing mode 0
is the only timing mode reliably affected. Timings handled through PRO files are ignored.
For instance:
Duration Modifier = 0
⟶ Spells have no durationDuration Modifier = 100
⟶ Spells have normal durationDuration Modifier = 200
⟶ Spells have double duration
Known values for
Type
are:
- 0 ⟶ Mage
- 1 ⟶ Priest
- 2 ⟶ Bard Song (EE only)
The effect modifies SPELLDURATIONMODMAGE and SPELLDURATIONMODPRIEST.
Parameter #1: IDS Entry
Parameter #2: IDS File
IDS File
and IDS Entry
fields.
Known values for
IDS File
are:
- 2 ⟶ EA.IDS
- 3 ⟶ GENERAL.IDS
- 4 ⟶ RACE.IDS
- 5 ⟶ CLASS.IDS
- 6 ⟶ SPECIFIC.IDS
- 7 ⟶ GENDER.IDS
- 8 ⟶ ALIGN.IDS
- 9 ⟶ KIT.IDS (EE only; broken at least in 2.5)
To be protected from any creature, leave
IDS Entry
at 0
(zero), and IDS File
at 2
. Protection will grant the bearer immunity from being attacked, cast a spell at, or otherwise targeted by creatures with this type.
Parameter #1: Irrelevant
Parameter #2: Opcode
Opcode
field.
Parameter #1: Spell Level
Parameter #2: Irrelevant
Power
attribute is equal to Spell Level
(range: 0 – 9
).
- Each application of this opcode only protects against its specified
Spell Level
, not "up to" it. - Each effect in a spell/item is checked separately by this opcode.
-
CAN block effects of Secondary Type
MagicAttack
.- V1 effects inherit their Secondary Type from the Header(SPL) / Extended Header(ITM), V2 effects specify it manually.
-
CAN block EFF files with
resist_dispel = BIT2
.- Keep in mind that this BIT is automatically set on any effect delivered by an Area-Effect (Explosion) projectile, so this opcode can deflect effects through AoE projectiles.
-
CANNOT block non-hostile effects from self.
- V1 effects inherit their non-hostile behavior from the Header(SPL) / Extended Header(ITM), V2 effects specify it manually.
empty/zero
to avoid interacting with this opcode.
Parameter #1: String Reference
Parameter #2: Irrelevant
String Reference
field. When used with a duration timing, after the duration, the name will be set to a blank entry.
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
XP = XP + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
XP = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
XP = (XP * 'Statistic Modifier' value) / 100
The effect modifies XP.
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Gold = Gold + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Gold = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Gold = (Gold * 'Statistic Modifier' value) / 100
The effect modifies party gold or GOLD for everyone else.
Type=0
can only remove gold. Gold amount has a lower bound of 0
.
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Morale Break = Morale Break + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Morale Break = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Morale Break = (Morale Break * 'Statistic Modifier' value) / 100
The effect modifies MORALEBREAK.
Parameter #1: Irrelevant
Parameter #2: Type
resource
key, based on the Type
value. This effect ignores durations attributed to it.
Known values for
Type
are:
- 0 ⟶ Small portrait
- 1 ⟶ Large portrait
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
This does not affect the main reputation of the Party, unless
Type 3-5
are used. Though it can affect ranger/paladinhood of any target.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Reputation = Reputation + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Reputation = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Reputation = (Reputation * 'Statistic Modifier' value) / 100
- 3 ⟶ Increment Party Reputation by
10 * 'Statistic Modifier'
, cannot lower reputation below100
, will raise reputation to100
if already less (only in EEs) - 4 ⟶ Party Reputation = 'Statistic Modifier' value, cannot lower reputation below
100
, will raise reputation to100
if already less (only in EEs) - 5 ⟶ Party Reputation = (Party Reputation * 'Statistic Modifier' value) / 100, cannot lower reputation below 100, will raise reputation to 100 if already less (only in EEs)
Parameter #1: IDS Entry
Parameter #2: IDS File
Known values for 'IDS File' are:
2 EA.ids
3 General.ids
4 Race.ids
5 Class.ids
6 Specific.ids
7 Gender.ids
8 Align.ids
Parameter #1: Undefined
Parameter #2: Undefined
Parameter #1: Amount
Parameter #2: Irrelevant
resource
key. The number of items created is controlled by the Amount
field. The item is created in the Magical Weapon Slot
.
Magical Weapon Slot
does not allow Item
Abilities.
resource
field should not be empty, or the game will crash (not consistently, but it happens).
undispellable
and opcode #58).
Parameter #1: Irrelevant
Parameter #2: Irrelevant
resource
key from the targeted creature(s). Items in container items (e.g. Bags of Holding) will not be removed. If a creature has multiple instances of the item, the one in the lowest slot number (see SLOTS.IDS) is removed. "EFF_M02"
is hard-coded to play when an item is removed. This effect should be used to remove equipped items (use opcode #123 for inventory items).
Parameter #1: Undefined
Parameter #2: Undefined
Parameter #1: Undefined
Parameter #2: Undefined
1
.Affected creature will be visible, targetable, and if controlled, selectable and orderable within the semi-transparent fog of war, but not within the black shroud.
Parameter #1: Irrelevant
Parameter #2: Alignment Mask
Alignment Mask
field.
Known values for
Alignment Mask
are:
- 0 ⟶ Evil (glow Red)
- 1 ⟶ Neutral (glow Blue)
- 2 ⟶ Good (glow Green)
Parameter #1: Irrelevant
Parameter #2: Irrelevant
This effect ignores durations attributed to it.
0
(zero).
- The only difference between this opcode and opcode #47 is their index – you can block one with opcode #101 without blocking the other. That's it.
- Both remove the same effects/
STATE
s, both are blocked by opcode #69. - They might have been intended for identical function, different uses, similar to opcodes #5/#241 (Charm), but it never happened.
- Opcode #116 is used extensively because the original BG1 used it, and didn't use opcode #47 at all.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Parameter #1: Undefined
Parameter #2: Undefined
Parameter #1: Irrelevant
Parameter #2: Irrelevant
The exact formula is
'Parameter1' = 2 + ('Caster Level of the spell containing op119' / 3)
.
- A Wizard spell with op119 will use the caster's Wizard Casting Level.
- A Priest spell with op119 will use the caster's Priest Casting Level.
- An Innate spell with op119 will use the caster's Innate Casting Level.
A Mirror Image scroll used by a Thief with HLA Use Any Item will use the level
10
duration, but the level 1
Image count.The scroll casts the spell at level
10
, but the opcode checks the caster’s Wizard Caster Level (which for a Thief is 1
).
Parameter #1: Enchantment
Parameter #2: Type
Type
field. The Enchantment
field is used if Type
is set to 0
.
Known values for
Type
are:
- 0 ⟶ Enchanted
- 1 ⟶ Magical
- 2 ⟶ Non-Magical
- 3 ⟶ Silver
- 4 ⟶ Non-Silver
- 5 ⟶ Non-Silver / Non-Magical
- 6 ⟶ Two-Handed
- 7 ⟶ One-Handed
- 8 ⟶ Cursed
- 9 ⟶ Non-Cursed
- 10 ⟶ Cold Iron
- 11 ⟶ Non Cold Iron
- Protected weapons will still trigger HitBy(), but will not interact with Mirror Image or Stone skins.
- Blocks weapon damage, on-hit effects of the weapon, opcode #248 and opcode #249, regardless of the effects target.
Area-effect
projectiles (f.i. Arrow of Detonation) only check for Weapon Immunity on the attacked target, and use that result for all caught within their area of effect.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Parameter #1: Charges
Parameter #2: Irrelevant
Parameter #1: Irrelevant
Parameter #2: Irrelevant
resource
key from the targeted creature(s). This effect should be used to remove inventory items (use opcode #112 for equipped items).In particular:
- Removes all item(s) in the first slot containing the specified
resource
key from the targeted creature(s). - Items in container items (e.g. Bags of Holding) will not be removed.
- Inventory slots are checked in numerical order from SLOTS.IDS.
Parameter #1: Irrelevant
Parameter #2: Type
Type
field.
Known values for
Type
are:
- 0 ⟶ Default
- 1 ⟶ Source to Target
- 2 ⟶ Return to Saved Location
- 3 ⟶ Exchanged Source and Target
Return to Saved Location
: Teleport effect target to the coordinates stored by SetHomeLocation(P:Point*) for that creature. Defaults to (0.0)
if not set.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
0
(zero).
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
The engine allows values for
Statistic Modifier
from 0
(immobile) to 255
(instantaneous), though behaviour is only consistent in the range 0 – 30
.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Movement = Movement + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Movement = 'Statistic Modifier' value
- 2 ⟶ Non-stacking Percentage Modifier:
Movement = (Movement * 'Statistic Modifier' value) / 100
- 5 ⟶ Multiplicative Stacking Percentage Modifier:
Movement = (Movement * 'Statistic Modifier' value) / 100
(EE only)
50% * 50% = 25%
150% * 150% = 225%
Parameter #1: Number
Parameter #2: Type
Special: Mode
Each CRE file has a
Creature Power Level
number. The amount of monsters summoned by this effect depends on this value, the special
parameter and if it's used in SPL / ITM or from an external EFF.
When used in SPL/ITM files, known value for
Mode
are:
- 0 ⟶ Summon until
Creature Power Level
equals/exceedsNumber
- 1 ⟶ Summon amount equal to
Number
- 2 ⟶ Summon until
Creature Power Level
equals/exceeds Caster's Level
When used in external EFF files, known value for
Mode
are:
- 0 ⟶ Summon until
Creature Power Level
equals/exceedsNumber
- 1 ⟶ Summon amount equal to
'Number' + Dice rolls
- 2 ⟶ Summon until
Creature Power Level
equals/exceedsCaster Level
field
The
Type
field sets which 2DA file to pick the creatures to summon from. The 2da files are monsumX
and anisumX
, where X = 'Type' + 1
. 0–4
are allied , 5–9
are hostile. The specific 2da files used are:
- 0 ⟶ MONSUM01: Monster Summon 1
- 1 ⟶ MONSUM02: Monster Summon 2
- 2 ⟶ MONSUM03: Monster Summon 3
- 3 ⟶ ANISUM01: Animal Summon 1
- 4 ⟶ ANISUM02: Animal Summon 2
- 5 ⟶ MONSUM01: Monster Summon 1 Hostile
- 6 ⟶ MONSUM02: Monster Summon 2 Hostile
- 7 ⟶ MONSUM03: Monster Summon 3 Hostile
- 8 ⟶ ANISUM01: Animal Summon 1 Hostile
- 9 ⟶ ANISUM02: Animal Summon 2 Hostile
A custom .2da file can be entered in the resource field (untested in bg1).
If used from an external effect (.eff), the
vvc
field controls the bam file played when summoning.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Timing Mode 1
will set STATE_CONFUSED
without leaving behind a removable effect.
- Creature is unseletectable, Inventory is disabled.
- The creature's AI scripts are disabled.
- The creature will randomly execute actions AttackReevaluate(NearestEnemyOf(Myself),15), RandomWalk(), or NoAction().
- Disables Saving while affecting a Party Member (displayed message: "You do not control all your Party Members")
Parameter #1: Statistic Modifier
Parameter #2: Irrelevant
In particular:
- Grants a bonus/penalty to all Saving Throws equal to
Statistic Modifier
. - Grants a bonus/penalty to Current and Maximum Hit Points equal to
'Statistic Modifier'd8
. - Grants a bonus/penalty to base THAC0 equal to
Statistic Modifier
. - Grants a bonus/penalty to base weapon damage equal to
Statistic Modifier
. - Saving throws, THAC0, and Damage modifiers read only the first byte of
Statistic Modifier
for their value, the last 3 bytes are ignored. - HP modifier uses the whole 4 bytes of
Statistic Modifier
. - HP modifier is always positive (negative values become zero), but because Max HP itself is not bounded, it can overflow into negative amounts (Max HP is 32767).
- When used in external EFFs,
Parameter2
controls the exact amount of HP gained.
- While this opcode is "Non-Cumulative" (it sets values rather than increment), what it really does is stack in reverse standard order.
- The base STATE set on the CRE file will override any effect applied to them (defaulting to a value of zero).
- The oldest equipped effect will override newer equipped effects, and any equipped effect will override a non-equipped effect.
- The oldest non-equipped effect will override newer non-equipped effects.
Parameter #1: Modifier
Parameter #2: Irrelevant
Modifier
parameter.In particular:
- Modifies THAC0
- Modifies DAMAGEBONUS
- Morale is a 5 point bonus.
- While this opcode is "Non-Cumulative" (it sets values rather than increment), what it really does is stack in reverse standard order.
- The base STATE set on the CRE file will override any effect applied to them (defaulting to a value of zero).
- The oldest equipped effect will override newer equipped effects, and any equipped effect will override a non-equipped effect.
- The oldest non-equipped effect will override newer non-equipped effects.
Modifier
only reads the first byte for its value, the last 3 bytes are ignored.
Parameter #1: Modifier
Parameter #2: Irrelevant
This opcode has the same effects as opcode #22, but maintains its own separate STATE.
This opcode modifies LUCK.
- While this opcode is "Non-Cumulative" (it sets values rather than increment), what it really does is stack in reverse standard order.
- The base STATE set on the CRE file will override any effect applied to them (defaulting to a value of zero).
- The oldest equipped effect will override newer equipped effects, and any equipped effect will override a non-equipped effect.
- The oldest non-equipped effect will override newer non-equipped effects.
Modifier
only reads the first byte for its value, the last 3 bytes are ignored.
Parameter #1: Statistic Modifier
Parameter #2: Irrelevant
Statistic Modifier
field. A negative value of Statistic Modifier
sets the Strength, Constitution and Dexterity of the targeted creature(s) to 25.
- While this opcode is "Non-Cumulative" (it sets values rather than increment), what it really does is stack in reverse standard order.
- The base STATE set on the CRE file will override any effect applied to them (defaulting to a value of zero).
- The oldest equipped effect will override newer equipped effects, and any equipped effect will override a non-equipped effect.
- The oldest non-equipped effect will override newer non-equipped effects.
Statistic Modifier
only reads the first byte for its value, the last 3 bytes are ignored.
Parameter #1: Statistic Modifier
Parameter #2: Irrelevant
This opcode has the same effects as opcode #22, but maintains its own separate STATE.
This opcode modifies LUCK.
- While this opcode is "Non-Cumulative" (it sets values rather than increment), what it really does is stack in reverse standard order.
- The base STATE set on the CRE file will override any effect applied to them (defaulting to a value of zero).
- The oldest equipped effect will override newer equipped effects, and any equipped effect will override a non-equipped effect.
- The oldest non-equipped effect will override newer non-equipped effects.
Statistic Modifier
only reads the first byte for its value, the last 3 bytes are ignored.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
0
(zero).
While the end result is otherwise the same as “Stoned Death” applied by opcode #13, this opcode does not actually utilize opcode #13 (internally or otherwise), unlike most (all?) other forms of death.
- Creature is NOT helpless – they still require an attack roll to be hit.
- Creature is unselectable, Inventory is disabled.
- Disables the creature's
SPECIFIC
script. - Creature may only take actions listed in both ACTSLEEP.IDS and INSTANT.IDS.
- Any hostile action against the creature(s) applies an Exploding Stoned Death to them.
- Kicked from party, retains Inventory, Overlay's Color Index 72 on the entire creature.
Parameter #1: Irrelevant
Parameter #2: Type
Known values for 'Type' are:
0 Resistances/statistics gained, spell-casting disabled, colouring
1 No resistances/statistics gained, spell-casting enabled, colouring
2 No resistances/statistics gained, spell-casting enabled, no colouring
Parameter #1: Undefined
Parameter #2: Undefined
The effect has no meaning on visible targets.
This effect has no duration.
Parameter #1: Modifier
Parameter #2: Irrelevant
This opcode has the same effects as opcode #22, but maintains its own separate STATE.
This opcode modifies LUCK.
This opcode works as the reverse of Chant (positive values decrease Luck, negative values increase Luck).
- While this opcode is "Non-Cumulative" (it sets values rather than increment), what it really does is stack in reverse standard order.
- The base STATE set on the CRE file will override any effect applied to them (defaulting to a value of zero).
- The oldest equipped effect will override newer equipped effects, and any equipped effect will override a non-equipped effect.
- The oldest non-equipped effect will override newer non-equipped effects.
Statistic Modifier
only reads the first byte for its value, the last 3 bytes are ignored.
Parameter #1: Irrelevant
Parameter #2: Animation Sequence
Known values for 'Type' are:
1 Lay down (short)
2 Move hands (short)
3 Move hands (long)
4 Move shoulder (short)
5 Move shoulder (long)
6 Lay down (long)
Parameter #1: String Reference
Parameter #2: Irrelevant
String Reference
value.
Parameter #1: Irrelevant
Parameter #2: Type
Known values for 'Type' are:
0 .. 8 = Crash
9 Casting Glow Aqua (Necromancy)
10 Casting Glow Blue (Alteration)
11 Casting Glow Gold (Enchantment)
12 Casting Glow Green (Abjuration)
13 Casting Glow Magenta (Illusion)
14 Casting Glow Purple (Conjuration)
15 Casting Glow Red (Invocation)
16 Casting Glow White (Divination)
17+ Crashes
Parameter #1: Target
Parameter #2: Type
Known values for 'Target' are:
0 Current Location
Non-0 Target Location
Known values for 'Type' are:
0 aqua SHAIR
1 aqua SHEARTH
2 aqua SHWATER
3 *crash*
4 blue SHAIR
5 blue SHEARTH
6 blue SHWATER
7 *crash*
8 gold SHAIR
9 gold SHEARTH
10 gold SHWATER
11 *crash*
12 green SHAIR
13 green SHEARTH
14 green SHWATER
15 *crash*
16 magenta SHAIR
17 magenta SHEARTH
18 magenta SHWATER
19 *crash*
20 purple SHAIR
21 purple SHEARTH
22 purple SHWATER
23 *crash*
24 red SHAIR
25 red SHEARTH
26 red SHWATER
27 *crash*
28 white SHAIR
29 white SHEARTH
30 white SHWATER
31 *crash*
32 red MUSHROOM
33 grey MUSHROOM
34 green MUSHROOM
35 red PILLAR
36 white PILLAR
37 white SWIRL
38 Shadow Door (SPDIMDR) (BGs)
39 Finger of Death (SPFDEATH) (BG2)
40+ *crash* (BG2)
Parameter #1: Irrelevant
Parameter #2: Icon
All values are drawn directly from STATES.BAM in the GUIBam.bif starting at sequence 65.
Known values for 'Icon' are:
0 Charm
1 Dire Charm
2 Rigid Thinking
3 Confusion
4 Berserk
5 Intoxicated
6 Poisoned
7 Nauseated
8 Blind
9 Protection from Evil
10 Protection from Petrification
11 Protection from Missiles
12 Magic Armour
13 Held
14 Sleep
15 Shielded
16 Protection from Fire
17 Blessed
18 Chant
19 Free Action
20 Barkskin
21 Strength
22 Heroism
23 Invulnerable
24 Protection from Acid
25 Protection from Cold
26 Resist Fire/Cold
27 Protection from Electricity
28 Protection from Magic
29 Protection from Undead
30 Protection from Poison
31 Non-detection
32 Good luck
33 Bad luck
34 Silenced
35 Cursed
36 Panic
37 Resist Fear
38 Haste
39 Fatigue
40 Bard Song
41 Slow
42 Regenerate
43 Domination
44 Hopelessness
45 Greater Malison
46 Spirit Armour
47 Chaos
48 Feebleminded
49 Defensive Harmony
50 Champion's Strength
51 Dying
52 Mind Shield
53 Level Drain
54 Polymorph Self
55 Stun
56 Regeneration
57 Perception
58 Master Thievery
Parameter #1: Slot
Parameter #2: Irrelevant
resource
key in the slot specified by the Slot
field, on the targeted creature(s).
Known values for
Slot
(from SLOTS.IDS) are:
- 0 ⟶ AMULET
- 1 ⟶ ARMOR
- 2 ⟶ BELT
- 3 ⟶ BOOTS
- 4 ⟶ CLOAK
- 5 ⟶ GAUNTLETS
- 6 ⟶ HELMET
- 7 ⟶ RING_LEFT
- 8 ⟶ RING_RIGHT
- 9 ⟶ SHIELD
- 10 ⟶ FIST
- 11 ⟶ AMMO
- 15 ⟶ MISC
- 35 ⟶ WEAPON
- 11 ⟶ AMMO0
- 12 ⟶ AMMO1
- 13 ⟶ AMMO2
- 14 ⟶ AMMO3
- 15 ⟶ MISC0
- 16 ⟶ MISC1
- 17 ⟶ MISC2
- 18 ⟶ MISC3
- 19 ⟶ MISC4
- 20 ⟶ MISC5
- 21 ⟶ MISC6
- 22 ⟶ MISC7
- 23 ⟶ MISC8
- 24 ⟶ MISC9
- 25 ⟶ MISC10
- 26 ⟶ MISC11
- 27 ⟶ MISC12
- 28 ⟶ MISC13
- 29 ⟶ MISC14
- 30 ⟶ MISC15
- 31 ⟶ MISC16
- 32 ⟶ MISC17
- 33 ⟶ MISC18
- 34 ⟶ MISC19 – Magical Weapon slot
- 35 ⟶ WEAPON0
- 36 ⟶ WEAPON1
- 37 ⟶ WEAPON2
- 38 ⟶ WEAPON3
Magical Weapon Slot
does not allow Item
Abilities.Moreover, unlike opcode #111, this opcode will not "equip" the item that's created in this particular slot.
timing mode
, it applies a delayed opcode #123 effect based on the duration, but with an empty resource
field, resulting in nothing being removed.
Parameter #1: Irrelevant
Parameter #2: Button
Known values for 'Button' are:
0 Stealth Button
1 Thieving Skill Button
2 Spell Select Button
3 First Quick Spell Button
4 Second Quick Spell Button
5 Third Quick Spell Button
6 Turn Undead Button
7 Talk Button
8 Use Item Button
9 First Quick Item Button
11 Second Quick Item Button
12 Third Quick Item Button
13 Innate Ability Button
Parameter #1: Irrelevant
Parameter #2: Spell Type
Special: Show message?
Spell Type
field.
Known values for
Spell Type
are:
- 0 ⟶ Disables
wizard
spells withlocation=spell
(also applied by polymorph) - 1 ⟶ Disables
priest
spells withlocation=spell
(also applied by polymorph) - 2 ⟶ Disables all innate spells (really any
type
exceptwizard
/priest
), regardless oflocation
- 3 ⟶ Disables only "magical" spells (those lacking
Ignore dead/wild magic
), regardless oftype
orlocation
(EEs)
Known values for
Show message?
are:
- 0 ⟶ Yes
- 1 ⟶ No
Parameter #1: Casting Level
Parameter #2: Type
resource
key at the level specified by the Casting Level
field, in the style specified by the Type
field. A Casting Level
of 0
casts at the level of the casting creature.
Known values for
Type
are:
- 0 ⟶ Normal Casting at specified level (
0
for caster level), non-interruptible - 1 ⟶ Cast Instantly at caster level
- 2 ⟶ Cast Instantly at specified level (EE-only)
- When this opcode gets reflected using
Type=1
, the spell specified by theresource
key is cast at the target's Casting Level, not the caster's. - When this opcode gets reflected (opcode #197, opcode #198, opcode #199, opcode #202, opcode #203 and opcode #207) using
Type=2
, the spell specified by theresource
key is cast at the specifiedCasting Level
, and it will also affect the original target (as if it wasn't reflected).
-
When
Type=2
, effects in theresource
will also bypass Magic Resistance, of every target, as if the caster targeted themselves, regardless of who they target with the spell or this effect.- Setting the
Ignore Center
bit in the subspell's projectile will force its effects to check Magic Resistance on every target, even if the caster did target themselves. Though as its primary function is to cause the projectile to ignore the caster (not "center"), it still won't affect them if it'sarea-effect
.
- Setting the
Type
parameter is ignored and treated as 0
.
Type=2
.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Parameter #1: Casting Level
Parameter #2: Type
resource
key, at the level specified by the Casting Level
field, in the style specified by the Type
field. A Casting Level
of 0
casts at the level of the casting creature.
Known values for
Type
are:
- 0 ⟶ Normal Casting
- 1 ⟶ Cast Instantly (ignore
Casting Level
)
Self
. In particular:
- The projectile of the subspell will originate from the target(s) of opcode #148.
- If the SPL/ITM with opcode #148 targets a location, and doesn't have an
area-effect
projectile, there will be no target to cast on. - If the SPL/ITM with opcode #148 has an
area-effect
projectile, the spell in opcode #148 would be cast once for every valid target. - If this opcode uses the
Cast Instantly
option, then the target, not the caster, would cast the spell in opcode #148.
Parameter #1: Undefined
Parameter #2: Undefined
Parameter #1: Irrelevant
Parameter #2: Irrelevant
0
(zero).
Parameter #1: Irrelevant
Parameter #2: Type
resource
key, in the style specified by the Type
value.
Known values for
Type
are:
- 0 ⟶ Remove targeted creature via opcode #168
- 1 ⟶ Kill targeted creature via opcode #13
*p2=8
(Chunking death) - 2 ⟶ Kill targeted creature via opcode #13
*p2=4
(Normal death) - 3 ⟶ No effect on targeted creature – New creature (specified by the
resource
key) is spawned at target's location
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Known movies are:
wyvvern
beregost
BG4LOGO
TSRLOGO
BILOGO
INFELOGO
INTRO
DEATHAND
REST
FRARMINN
BEREGOST
NASHKELL
GNOLL
BGENTER
IRONTHRN
CAMP
SEWER
BGSUNSET
Parameter #1: Irrelevant
Parameter #2: Irrelevant
This effect sets stat #63 (SANCTUARY) to 1.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
This effect sets stat #62 (ENTANGLE) to 1.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
This effect sets stat #64 (MINORGLOBE) to 1.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
This effect sets stat #65 (SHIELDGLOBE) to 1.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
This effect sets stats #58 (HELD) and #67 (WEB) to 1. It also sets the STATE_HELPLESS flag.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
This effect sets stat #66 (GREASE) to 1.
Parameter #1: Amount
Parameter #2: Irrelevant
Amount
value. Sets STATE_MIRRORIMAGE to true.
- STATE_MIRRORIMAGE will maintain the effects of this opcode, once this opcode expires, but only until you save & reload.
- If you set STATE_MIRRORIMAGE on a CRE file, it won't do anything by itself.
- If you later apply opcode #119/opcode #159 to the creature, once it expires, any remaining images will last until struck (absorbing attacks in the process), or until you save & reload.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
0
(zero).
Parameter #1: Irrelevant
Parameter #2: Irrelevant
This effect ignores durations attributed to it.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Also check out the EE description here.
Parameter #1: Undefined
Parameter #2: Undefined
Parameter #1: Irrelevant
Parameter #2: Irrelevant
In particular:
- Their inventory is still access-able.
- They are still select-able, and can be issued orders (for instance, activating modal abilities), though not all actions can be taken.
- It does not interrupt/end modal abilities the creature is currently using.
- They are not "helpless", an attack roll is still required to hit them.
- Their scripts stop running.
This effect sets CasterHold to
1
.
0
.
Parameter #1: Statistic Modifier
Parameter #2: Type
Known values for 'Type' are:
0 Cumulative Modifier -> Resistance = Resistance + 'Statistic Modifier' value
1 Flat Value Modifier -> Resistance = 'Statistic Modifier' value
2 Percentage Modifier -> Resistance = (Resistance * 'Statistic Modifier' value) / 100
Parameter #1: Statistic Modifier
Parameter #2: Type
Statistic Modifier
field in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
THAC0 = THAC0 + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
THAC0 = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
THAC0 = (THAC0 * 'Statistic Modifier' value) / 100
Parameter #1: Irrelevant
Parameter #2: Irrelevant
".ARE"
(a non-existent area). Also known as Script: Destroy Self.
This deletes non-global creatures from the game (most common usage).
For Global Creatures:
- This effect removes the creature from the player's party (if they were in it).
- The effect will keep the creature out of the party and any other Area for its duration, but does not re-instate the creature once it expires.
- They can still be recovered through script actions once the effect expires.
0
(zero).
Parameter #1: Irrelevant
Parameter #2: Icon
All values are drawn directly from STATES.BAM in the GUIBam.bif starting at sequence 65.
Known values for 'Icon' are:
0 Charm
1 Dire Charm
2 Rigid Thinking
3 Confusion
4 Berserk
5 Intoxicated
6 Poisoned
7 Nauseated
8 Blind
9 Protection from Evil
10 Protection from Petrification
11 Protection from Missiles
12 Magic Armour
13 Held
14 Sleep
15 Shielded
16 Protection from Fire
17 Blessed
18 Chant
19 Free Action
20 Barkskin
21 Strength
22 Heroism
23 Invulnerable
24 Protection from Acid
25 Protection from Cold
26 Resist Fire/Cold
27 Protection from Electricity
28 Protection from Magic
29 Protection from Undead
30 Protection from Poison
31 Non-detection
32 Good luck
33 Bad luck
34 Silenced
35 Cursed
36 Panic
37 Resist Fear
38 Haste
39 Fatigue
40 Bard Song
41 Slow
42 Regenerate
43 Domination
44 Hopelessness
45 Greater Malison
46 Spirit Armour
47 Chaos
48 Feebleminded
49 Defensive Harmony
50 Champion's Strength
51 Dying
52 Mind Shield
53 Level Drain
54 Polymorph Self
55 Stun
56 Regeneration
57 Perception
Parameter #1: Irrelevant
Parameter #2: Animation
Animation
field.
It just plays a visual effect, like a far more limited version of opcode #215, and is always instantaneous.
Known values for
Animation
are:
-
0 ⟶ Blood (behind)
- (EEs) Doesn't display any animation.
- 1 ⟶
"BLOODS.BAM"
Blood (small) - 2 ⟶
"BLOODM.BAM"
Blood (medium) - 3 ⟶
"BLOODL.BAM"
Blood (large) - 4 ⟶
"SPFIRIMP.BAM"
Fire 1 - 5 ⟶
"SPFIRIMP.BAM"
Fire 2 - 6 ⟶
"SPFIRIMP.BAM"
Fire 2 - 7 ⟶
"SPSHKIMP.BAM"
Electricity 1 - 8 ⟶
"SPSHKIMP.BAM"
Electricity 2 - 9 ⟶
"SPSHKIMP.BAM"
Electricity 3
-
For
Animation=4/5/6
andAnimation=7/8/9
, this opcode actually pulls the animation from DMGTYPES.2DA, each playing bothANIMATION1
(those listed above) andANIMATION2
, forFIRE
andELECTRICITY
, respectively. Does not play theSOUND
associated with them though.ANIMATION1
is the initial animation,ANIMATION2
is the lingering animation.
- BGEE/BG2EE use the default
*
(hardcoded) entries for all damage types, but they can be overridden by setting entries in DMGTYPES.2DA, as IWDEE does. - The animations for
Animation=1/2/3
are not pulled from DMGTYPES.2DA, they're most likely fully hardcoded.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
SPL
specified by the resource
key to the targeted creature(s).
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Parameter #1: Statistic Modifier
Parameter #2: Irrelevant
Statistic Modifier
.
The effect modifies RESISTPOISON.
Also known as "Stat: Set Poison Resistance".
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Known Sound Effects are:
EFF_E01 Draw upon holy might
EFF_E02 Armor / Free Action
EFF_E03 Barkskin
EFF_E04 Protection from evil
EFF_E05 Hold
EFF_E06 Silence
EFF_E08 Hold
EFF_M02 Blindness
EFF_M04 Detect Evil
EFF_M05 Sleep
EFF_M07 Death spell/ Larloch's drain
EFF_M08 Strength of One/Tenser's Transformation
EFF_M09 Dimension Door
EFF_M10 Dispel/Shapeshift
EFF_M11A Protection from Petrification
EFF_M11B Protection from Normal Missiles
EFF_M12B Minor Globe
EFF_M13 Summon
EFF_M15 Hold
EFF_M16 Charm
EFF_M18D Melf's Acid Arrow
EFF_M26 Animate Dead
EFF_M28 Haste/Slow
EFF_M29 Haste/Slow
EFF_M31C Grease
EFF_P01 Remove Fear/Curse
EFF_P02 Good Berries
EFF_P03 Invisibility Purge
EFF_P04 Command/Rigid Thinking
EFF_P07 Resist Fire/Cold
EFF_P10 Remove Paralysis
EFF_P11 Hold Person Priest
EFF_P13 Miscast Magic
EFF_P16 Flame Strike
EFF_P18 Raise Dead/Blindness
EFF_P21C Sanctuary
EFF_P27 Web
Parameter #1: IDS Entry
Parameter #2: IDS File
Applies the hold effect to the targeted creature(s),
Known values for 'IDS File' are:
2 EA.ids
3 General.ids
4 Race.ids
5 Class.ids
6 Specific.ids
7 Gender.ids
8 Align.ids
Parameter #1: Statistic Modifier
Parameter #2: Type
Applies the modifier value specified by the
Statistic Modifier
field in the style specified by the Type
field.
The engine allows values for
Statistic Modifier
from 0
(immobile) to 255
(instantaneous), though behaviour is only consistent in the range 0 – 30
.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Movement = Movement + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Movement = 'Statistic Modifier' value
- 2 ⟶ Non-stacking Percentage Modifier:
Movement = (Movement * 'Statistic Modifier' value) / 100
- 5 ⟶ Multiplicative Stacking Percentage Modifier:
Movement = (Movement * 'Statistic Modifier' value) / 100
(EE only)
Multiplicative Stacking Percentage Modifier
:
50% * 50% = 25%
150% * 150% = 225%
Parameter #1: IDS Entry
Parameter #2: IDS File
EFF
file specified by the resource
key to the targeted creature(s), if the targeted creature(s) match the value specified by the IDS Entry
field, in the specified IDS File
.
NB. When using an eff to alter thac0/dmg bonus, set
param1 = 0
, and param2 = 2
.
Known values for
IDS File
are:
- 2 ⟶
EA.IDS
- 3 ⟶
GENERAL.IDS
- 4 ⟶
RACE.IDS
- 5 ⟶
CLASS.IDS
- 6 ⟶
SPECIFIC.IDS
- 7 ⟶
GENDER.IDS
- 8 ⟶
ALIGN.IDS
- 9 ⟶
KIT.IDS
(EE only)
PST: This effect doesn’t exist and always crashes the game.
IWD2: there was a note to not use this effect in older IESDP.
EFF
files applied by this opcode can be blocked by opcode #101.
Parameter #1: IDS Entry
Parameter #2: IDS File
The actual modifier value is placed in the Parameter 3 field in an external effect.
Known values for 'IDS File' are:
2 Object.ids
3 General.ids
4 Race.ids
5 Class.ids
6 Specific.ids
7 Gender.ids
8 Align.ids
Parameter #1: Reference Value
Parameter #2: Reference IDS
Known values for 'IDS File' are:
2 Object.ids
3 General.ids
4 Race.ids
5 Class.ids
6 Specific.ids
7 Gender.ids
8 Align.ids
Parameter #1: String Reference
Parameter #2: Undefined
resource
key. The strref specified by the String Reference
field is displayed when an attempt to use the item is made.
Parameter #1: String Reference
Parameter #2: Type
Parameter #1: Unknown
Parameter #2: Unknown
Parameter #1: Undetermined
Parameter #2: Type
EFF
file specified by the resource
key to the targeted creature(s) when an ITM
of the item type
specified by the Type
field is equipped.
EFF
files applied by this opcode bypass / ignore opcode #101.
-
Ammo (i.e.,
Arrows
,Bullets
andBolts
) does not work well with this opcode-
The Ammo Slots (
SLOT_AMMO
,SLOT_AMMO1
,SLOT_AMMO2
,SLOT_AMMO3
) are always "Equipped", even when they are not in use-
In other words: they trigger opcode #183 just by being in a quiver slot, regardless of whether the correct launcher is equipped or even active
- Having said that, this opcode currently allows detecting a launcher using its automated ammo (such as Shortbow of Gesen)
-
In other words: they trigger opcode #183 just by being in a quiver slot, regardless of whether the correct launcher is equipped or even active
-
The Ammo Slots (
- The offhand (
SLOT_SHIELD
) has the same issue — even when disabled, it's detected by this opcode as equipped
Parameter #1: Undefined
Parameter #2: Jump
Jump
field.
Known values for
Jump
are:
- 0 ⟶ Do Jump from impassable areas
- 1+ ⟶ Don't Jump from impassable areas
IWD2: Don’t use.
Parameter #1: IDS Entry
Parameter #2: IDS File
Applies the hold effect to the targeted creature(s),
Known values for 'IDS File' are:
2 EA.ids
3 General.ids
4 Race.ids
5 Class.ids
6 Specific.ids
7 Gender.ids
8 Align.ids
Parameter #1: Delay
Parameter #2: Orientation
resource
key. The creature appears in the specified area after a delay (specified by the Delay
field), with the orientation specified by the Orientation
field.In particular:
- Global Creatures ignore the delay.
- If the creature is already in the specified area, it will ignore the delay.
- Non-global creatures currently in a different area than specified will use the delay.
- Delay is measured in 1⁄30 seconds, (½ tick),
600 = 20 seconds
. -
On non-EE games, the creature appears at the point specified by the Target Point fields (external EFF files only).
- On EE games, target(s) appear at Caster's Coordinates in new area (it does not seem to be possible to override through EFFs).
- Creature is moved to the new area (instantly) and flagged
Moving Between Areas
until their delay expires (if it's used). It won't be active until the delay expires (it's hidden, cannot be affected by Area-effect, doesn't occupy space). It can still be targeted by the variousEveryone
targeting modes in the new area while it's still inactive, but similar to maze/imprisonment, effects won't trigger (including poison and similar) on them until they become active.
There is some confusion whether the Target (bg1, iwds) or the Caster point field is used.
Parameter #1: Value
Parameter #2: Irrelevant
Parameter #1: Irrelevant
Parameter #2: Stat Value
STRREF_FEEDBACK_AURA_CLEANSED
(EE games only) whenever they begin to cast a spell before their aura would normally clear (i.e. more than once/round). Does NOT affect item usage, only spellcasting.Set the
Stat Value
field to any non-zero value if you want no time needed between spells.
The effect modifies AURACLEANSING to
Stat Value
.
Stat Value
parameter can take any value. If you set it to 0
, you will disable the effect (for its duration).
Parameter #1: Speed Modifier
Parameter #2: Irrelevant
Alters the casting time of spells by the value specified by the 'Speed Modifier' field. This effect is cummulative. Positive values decrease the casting time, negative values increase the casting time.
Parameter #1: Speed Modifier
Parameter #2: Irrelevant
attack speed
by the value specified by the Speed Modifier
field. This effect is not cumulative. Attack speed
ranges from 0
(good) to 10
(bad). This effect acts as a bonus, so a high Speed Modifier
is good.
This effect sets
PHYSICALSPEED
to Speed Modifier
.