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
Known values for 'Charm Type' are:
0 Charmed (Target neutral after effect ends)
1 Charmed (Target hostile after effect ends)
2 Dire charmed (Target neutral after effect ends)
3 Dire charmed (Target hostile after effect ends)
Parameter #1: Statistic Modifier
Parameter #2: Type
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.
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: Irrelevant
Parameter #1: RGB Colour
Parameter #2: Pulse Speed
Parameter #1: Statistic Modifier
Parameter #2: Type
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.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Parameter #1: Fixed Damage
Parameter #2: Damage Type
If a saving throw is made, the damage values are cut in half, including Fixed Damage. To completely negate damage in the case of a successful saving throw, set the Resource Key to NEG.
The following values are valid for Damage Type:
0 is Crushing Damage
1 is Lower HP to Fixed Damage value(Ignores random damage values)
2 is Lower HP to Fixed Percent set by Fixed Damage value
4 is Lower HP by 1/3 of the effect's damage (after random damage has been rolled)
65536 is Acid Damage
131072 is Cold Damage
262144 is Electic Damage
524288 is Fire Damage
1048576 is Piercing Damage
2097152 is Poison Damage
4194304 is Magic Damage
8388608 is Missile Damage
16777216 is Slashing Damage
33554432 is Magic Fire Damage
67108864 is Magic Cold Damage
134217728 is Stunning Damage
The opcode uses the 'variable' field at 0x2c to determine which (if any) custom critical damage visual to play. Known values are:
0x01 - The Nameless One
0x02 - Annah
0x04 - Grace
0x08 - Nordom
0x10 - Vhailor
0x20 - Morte
0x40 - Dakkon
0x80 - Ignus
Parameter #1: Irrelevant
Parameter #2: Death State?
The Death State? parameter sets whether or not the CGAMESPRITE_STATE_DEAD is applied to the target:
0 or any multiple of 4 (4,8,16,32...)-State set in target
Any other-Target simply killed.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Parameter #1: Statistic Modifier
Parameter #2: Type
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
'Statistic Modifier' can be positive or negative.
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
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.
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:
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: Variable
Parameter #2: Poison Type
Known values for 'Poison Type' are:
0 Inflict 'Variable' per second
1 Percentage Damage: The Variable parameter defines the percentage damage to inflict
2 Hit Points Per Second: The Variable parameter defines how much hit point damage is done each second
3 Seconds Per Hit Points: The Variable parameter defines how long it takes to do 1 HP of damage
Parameter #1: Irrelevant
Parameter #2: Type
0 Normal
1 Dispel effect #211 (Induce Hiccups)
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
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 MAGICDAMAGERESISTANCE.
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: Irrelevant
Parameter #1: Colour
Parameter #2: Type
Known values for 'Colour' are:
0 Crash
1 Nothing
2 White with small blue specs that alternate between white and dark blue
3 Mostly purple, changing to white towards the end of the effect
4 White sparkles that fade out
5 White sparkles that fade out, but last longer than '4'
6 White sparkles that alternate to purple at the end of the effect
7 Like six, except it seems to change faster
8 Glittering white specs
9 White and grey specs that alternate to blue at the end of the effect
10 Dark grey specs that alternate to white at the end of the effect
11 Pink specs, some changing to white at the end of the effect
12 White effects that very slowly fade out
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
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
'Statistic Modifier' can be positive or negative.
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
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
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.
Parameter #1: RGB Colour
Parameter #2: Timing
Parameter #1: RGB Colour
Parameter #2: Irrelevant
Parameter #1: Animation Set
Parameter #2: Irrelevant
Look up the value for the Animation Set you wish to use for this effect in the RESDATA.INI file (it'll be the number in the brackets directly above it), then do the following:
If you want the animation to be falsely/'clown' coloured, add 24576
If you want the animation to be true coloured, add 57344
Iron Golem
Pillar of Skulls
Foundry Gears
Mortuary Ghost
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: Index Number
Parameter #2: IDS File
NOTE: DO NOT use a timing mode of Duration, Permanent or Delay with Duration for this effect, or it will crash! To use this effect without a delay, simply set the timing mode to Delay, and the time to 0.
The following values are valid for the parameters:
IDS File: 3 (General)
Reference Value:
1 HUMANOID
2 ANIMAL
3 DEAD
4 UNDEAD
5 GIANTHUMANOID
6 FROZEN
7 DRUNK
8 GOOD
9 BAD
10 HIDDEN
11 LEADER
12 FOLLOWER
13 MANY_1
14 MANY_2
15 MANY_3
16 MANY_4
255 MONSTER
IDS File: 4 (Race)
Reference Value:
1 HUMAN
2 AASIMAR
3 ABISHAI_BLACK
4 ABISHAI_GREEN
5 ABISHAI_RED
6 ANNAH
7 BAATEZU
8 CAMPATUSKANELLA
9 CORNUGON
10 Cranium_Rat
11 DABUS
12 DAKKON
13 DEIONARRA
14 DEVA
15 DRONE_BOSS
16 DRONE_HEAVY
17 DRONE_LIGHT
18 DRONE_MEDIUM
19 FALL_FROM_GRACE
20 FELL
21 GEHRELETH
22 GENSAI_AIR
23 GENSAI_FIRE
24 GENSAI_STONE
25 GENSAI_WATER
26 GHOST
27 GHOUL
28 GIANT_SKELETON
29 GITHYANKI
30 GITHZERAI
31 GLABREZU
32 GRILLIG
33 GRONK
34 HARGRIMM
35 IGNUS
36 IRON_GOLEM
37 JAMES_BIRD
38 LADY_OF_PAIN
39 LEMURE
40 LIM_LIM
41 LOTHAR
42 MANTUOK
43 MANY_AS_ONE
44 MODRON
45 MORTE
46 NIGHT_HAG
b47 NO_RACE
48 NORDOM
49 NUPPERIBO
50 PILLAR_OF_SKULLS
51 RESTLESS_SPIRIT
52 ROGUE_MODRON
53 SHADOW_MARK_1
54 SHADOW_MARK_2
55 SHADOW_MARK_3
56 SKELETON
57 SKELETON_GIANT
58 SKELETON_PRIEST
59 SOHMIEN
60 STONE_GOLEM
61 SUCCUBUS
62 TANARRI
63 THOKOLA
64 TIEFLING
65 TRIGIT
66 TROCOPOTOCA
67 VARGOUILLE
68 VHAILOR
69 WERERAT
70 WERERAT_MANTUOK
71 WORM
72 ZOMBIE
73 BARIAUR
254 UNKNOWN_RACE
255 NO_RACE
IDS File: 5 (Class)
Reference Values:
1 MAGE
2 FIGHTER
3 CLERIC
4 THIEF
5 BARD
6 PALADIN
7 FIGHTER_MAGE
8 FIGHTER_CLERIC
9 FIGHTER_THIEF
10 FIGHTER_MAGE_THIEF
11 DRUID
12 RANGER
13 MAGE_THIEF
14 CLERIC_MAGE
15 CLERIC_THIEF
16 FIGHTER_DRUID
17 FIGHTER_MAGE_CLERIC
18 CLERIC_RANGER
255 NO_CLASS
IDS File: 8 (Alignment)
Reference Values:
00 NONE
17 LAWFUL_GOOD
18 LAWFUL_NEUTRAL
19 LAWFUL_EVIL
33 NEUTRAL_GOOD
34 NEUTRAL
35 NEUTRAL_EVIL
49 CHAOTIC_GOOD
50 CHAOTIC_NEUTRAL
51 CHAOTIC_EVIL
Other values are undetermined at this time.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Parameter #1: Irrelevant
Parameter #2: 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: Irrelevant
Parameter #1: Irrelevant
Parameter #2: Irrelevant
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: Undefined
Parameter #2: Undefined
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 Value
Parameter #2: Identifier Type
Known values for 'Identifier Type' are:
0 Allegiance (EA.IDS)
1 General (GENERAL.IDS)
2 Race (RACE.IDS)
3 Class (CLASS.IDS)
4 Specific (SPECIFIC.IDS)
5 Gender (GENDER.IDS)
6 Alignment (ALIGNMEN.IDS)
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
10
point base THAC0 penalty (4
on EE games, plus a cumulative 4
point base AC penalty. All of that is unverified in PST).
Maintains its own portrait icon Blind
.
Timing Mode
s1/4/7
will permanently set the creature'sSTATE_BLIND
flag, leaving no removable effect.-
Related: the
-4
penalty toAC
andTHAC0
are apparently tied to the effect, notSTATE_BLIND
.-
So for instance you will not be able to 100% cure a creature affected by
CLERIC_NATURE_BEAUTY — "sppr704.spl"
(it applies opcode #74 withtiming_mode=1
).- As a workaround, you might want to stick with a limited
timing_mode
and setduration
to a very high random value.
- As a workaround, you might want to stick with a limited
-
So for instance you will not be able to 100% cure a creature affected by
-4
penalties it applies are not cumulative.
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 1 HP per second
1 1 HP per second
2 'Damage' per Second
3 Cause 1HP every 'Damage' seconds
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: Irrelevant
Parameter #1: Irrelevant
Parameter #2: Index Number
Known values for 'Index Number' are:
0 None
1 Arrow (Red End)
2 Arrow (Flame Tipped, Exploding)
3 Arrow (Flame Tipped)
4 Arrow (Lavender End)
6 Throwing Axe #1
9 Throwing Axe #2
10 Throwing Axe #3
11 Crossbow Bolt #1
12 Crossbow Bolt (Smoking, Exploding)
14 Crossbow Bolt #2
15 Crossbow Bolt #3
16 Sling Stone #1
17 Sling Stone (Smoking, Exploding)
19 Sling Stone #2
21 Fan of Flame
22 Quick Lightning Bolt
23 Chromiatic Orb
24 Cone of Cold Graphic effect that is delayed 1 second
25 Cone of Cold Graphic Effect #1
26 Throwing Dagger (Black Handle) #1
29 Throwing Dagger (Grey Handle)
31 Throwing Dagger (Light Grey Handle)
32 Throwing Dagger (Smoking, Exploding)
34 Throwing Dagger (Black Handle) #2
36 Magic Missile (Old, 1) #1
37 Fireball (Explosion)
39 Lightning (Special, Strings between walls back and forth)
40 Thrown Stone
41 Slow light blue missile that makes a bright yellow burst of light
44 Small Steam burst
46 Quick Light Blue Missile #3
47 Quick Light Blue Missile #4
48 Quick Light Blue Missile #5
49 Quick Light Blue Missile #6
50 Quick Light Blue Missile #7
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
Statistic Modifier
field in the style specified by the Type
field.
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: Regen/Time
Parameter #2: Regen Type
0 then all of the target's lost Hit Points will be restored
1 then the Regen/Time parameter is the Maximum Hit Point percentage to replace each second
2 the Modifier is the amount of Hit Points to regenerate per second
3 then the Regen/Time parameter's value is the amount of seconds it takes to regenerate 1 Hit Point
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: Index Number
Parameter #2: IDS File
The following values are valid for the IDS File parameter:
2 is Enemy/Ally (EA.IDS)
3 is General (GENERAL.IDS)
4 is Race (RACE.IDS)
5 is Class (CLASS.IDS)
6 is Specifics (SPECIFIC.IDS)
7 is Gender (GENDER.IDS)
8 is Alignment (ALIGNMEN.IDS)
Parameter #1: Irrelevant
Parameter #2: Type
Known values for 'Type' are:
7 Weak
8 Walk
Other values for 'Type' act as 'Run Away'
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
resource
key. The number of items created is controlled by the Charges
field. The number of secondary charge is determined by Parameter3
. The number of tertiary charges is determined by Parameter4
(external EFFs). The item is created in the Inventory.
- (EE only)
Resource 2
andResource 3
(external EFFs): item to be created is randomly chosen from resource fields1–3
that are not empty. - Applies a delayed opcode #123 effect to remove the item (based on specified
duration
)
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: Irrelevant
Parameter #1: Irrelevant
Parameter #2: Irrelevant
0
(zero).
Parameter #1: Distance
Parameter #2: Irrelevant
Parameter #1: Number
Parameter #2: Type
Each creature files has a Creature Power Level number (at 0x18). The amount of monsters summoned by this effect is equal to the 'Number' field / Creature Power Level.
The 'Type' field set which 2da file to pick the creatures to summon from. The 2da files are monsumX and anisumX, where X = Type + 1. The .2da files must be edited to add valid creature names. A file named SPBOOM.bam is required in the override directory for this effect to work. 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.
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
Parameter #1: Statistic Modifier
Parameter #2: Irrelevant
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
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: Change Specifics
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
00,12,66 is Make Attack Motions
01,06 is Fall Down, as if asleep
02 is Spell Casting motions
03 is Stronger Spell Casting Motions
04,59 is Recieve Damage animation
05 is quick combat stance
09,13 is Make more attack motions
10 is Lay Down Quickly
11 is Walk and stop quickly
14 is Third attack animation
20,67 is the first Talk animation
21,68 is Second Talk animation
22,69 is third talk animation
23,70 is fidget while standing
24,71 is the second fidget while standing animation
25,72 is fidget while in attack stance
26,73 is the second fidget while in attack stance animation
27,76 is assume an attack stance from standing
28,77 is assume a stand from and attack stance
29,56 is the first attack animation
30,57 is the second attack animation
31,58 is the third attack animation
32,62 is the first spell animation
33,63 is the second spell animation
34,64 is the third spell animation
35,65 is getting up from sleep/death
36 is the first miscellaneous animation
37 is the second miscellaneous animation
38 is the third miscellaneous animation
39 is the fourth miscellaneous animation
40 is the fifth miscellaneous animation
41 is the sixth miscellaneous animation
42 is the seventh miscellaneous animation
43 is the eigth miscellaneous animation
44 is the ninth miscellaneous animation
45 is the tenth miscellaneous animation
46 is the 11th miscellaneous animation
47 is the 12th miscellaneous animation
48 is the 13th miscellaneous animation
49 is the 14th miscellaneous animation
50 is the 15th miscellaneous animation
51 is the 16th miscellaneous animation
52 is the 17th miscellaneous animation
53 is the 18th miscellaneous animation
54 is the 19th miscellaneous animation
55 is the 20th miscellaneous animation
60 is the Run animation
61 is the Walk animation
74 is the standing animation
75 is the attack stance animation
Parameter #1: String Reference
Parameter #2: Irrelevant
String Reference
value.
Parameter #1: Irrelevant
Parameter #2: Type
Known values for 'Type' are:
9 bluish circle with a white star in centre glowing around chest then exploding in a puff of smoke
10 white ball with purple/blue spikes all around it's outside glowing around chest then exploding in a puff of smoke
11 yellow light in an up and down line with yellow light moving around it making triangle shape glowing around chest then exploding in a bunch of sparks
12 green ball with white flashing through it glowing around chest then exploding in a enlarge circle
13 little black ball glowing around chest then exploding in a puff of smoke
14 purple circle with cloud in centre glowing around chest then exploding in a bunch of sparks
15 red ball glowing around chest then exploding in a bunch of sparks
16 lightning in small circle around chest then explodes out to a larger lightning circle around chest
Parameter #1: Target
Parameter #2: Type
Known values for 'Target' are:
0 Current Location
Non-0 Target Location
Known values for 'Type' are (animations requiring BG1 graphics files are listed with a *):
0 *Whisps of smoke float from the head
1 *Droplets of water fall on the ground
2 *Whisps of smoke travel to the ground
38 *Mirror opens and closes behind target
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: Slot Type
Parameter #2: Irrelevant
00 Hand
01 Eyeball/Earring(Left)
02 Tattoo (Bottom Left)
03 Bracelet
04 Ring (Right)
05 Tattoo (Top Left)
06 Ring (Left)
07 Earring (Right)/Lens
08 Armor
09 Tattoo (Bottom Right)
10 SPECIAL: Replace default weapon until next reload of game
11 Quiver slot #1
12 Quiver slot #2
13 Quiver slot #3
14 Quiver slot #4
15 Quiver slot #5
17 Quick item slot #1
18 Quick item slot #2
19 Quick item slot #3
20 Quick item slot #4
21 Quick item slot #5
22 Inventory Slot #1 (Top Row)
23 Inventory Slot #2 (Bottom Row)
24 Inventory Slot #3 (Top Row)
25 Inventory Slot #4 (Bottom Row)
26 Inventory Slot #5 (Top Row)
27 Inventory Slot #6 (Bottom Row)
28 Inventory Slot #7 (Top Row)
29 Inventory Slot #8
30 Inventory Slot #9
31 Inventory Slot #10
32 Inventory Slot #11
33 Inventroy Slot #12
34 Inventory Slot #13
35 Inventory Slot #14
36 Inventory Slot #15
37 Inventory Slot #16
38 Inventory Slot #17
39 Inventory Slot #18
40 Inventory Slot #19
41 Inventory Slot #20
43 Weapon Slot #1
44 Weapon Slot #2
45 Weapon Slot #3
46 Weapon Slot #4
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
Target-type 'Global' forcs all creatures within range to cast the spell.
Known values for 'Type' are:
0 Normal Casting
1 Cast Instantly
If the target is a container, the Type parameter is ignored and treated as 0
Parameter #1: Irrelevant
Parameter #2: Spell Type
0-Mage
1-Priest
2-Innate (Useless in Torment: Spell Learned but NOT memorized.)
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: Irrelevant
If cast upon a party member, the summoned creature appears in the same spot as the target, and the target is moved over slightly.
If cast upon a non party member, the summoned creature appears in the same spot as the target, and the target is removed totally.
Timing modes 'Duration' and 'Delay with Duration' (Timing mode 3) both function as 'Permantent' and 'Delayed', accordingly.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Known movies are:
ALYBIRTH
ARRV_IGN
ARRV_VHA
BAATOR
BISLOGO
CANNON
CARCERI
CONFLAG
CREDITS
CRETURN
CURSTD
DEATH
DRAGON
FINALE
FORTDOOR
FORTRESS
INTROH
MAZE1
MAZE2
METEOR
OPENING
OUTLANDS
RUNE
SIGIL
SS_ADETH
SS_MSLAB
SS_PHAROD
T1ABSORB
T1DEATH
T1ENTER
TIME
TSRLOGO
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: Modifier Type
Parameter #1: Bonus
Parameter #2: Irrelevant
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Parameter #1: Irrelevant
Parameter #2: Irrelevant
SPL
specified by the resource
key from the targeted creature(s) spellbook.
If the key is not 8 characters long, all memorized copies will be removed.
If the key is 8 characters, memorized copies will remain intact.
0
(zero).
Two 8 characters long keys that are identical up to the 7th character are indistinguishable!
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
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: 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: Not Valid
Parameter #2: Not Valid
Parameter #1: Not Valid
Parameter #2: Not Valid
Parameter #1: Not Valid
Parameter #2: Not Valid
Parameter #1: Not Valid
Parameter #2: Not Valid
Parameter #1: Unknown
Parameter #2: Unknown
Parameter #1: Not Valid
Parameter #2: Not Valid
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: Not Valid
Parameter #2: Not Valid
Parameter #1: Set Type
Parameter #2: Effect Type
Known values of 'Set Type' are:
0 Clear effect
1 Set effect
Known values of 'Effect Type' are:
Sleeping(1) (01 00 00 00)--Sets the 'Asleep' status in target(s)
Berserk(2) (02 00 00 00)--Sets the 'Berserk' status in target(s)
Panic(4) (04 00 00 00)--Sets the 'Panic' status in target(s)
Stunned(8) (08 00 00 00)--Sets the 'Stunned' status in target(s). Works on the protagonist.
Curse(16) (16 00 00 00)--Sets the 'Cursed' status. No penalties towards stats.
Helpless(32) (32 00 00 00)--Sets the 'Helpless' status. No portrait change.
Frozen Death(64) (64 00 00 00)--Immobilizes.
Petrified Death(128)
Mirror Image(256)
Flaming Death(512)
Acid Death(1024)
Death(2048)
Silenced(4096)
Charmed(8192)
Poisoned(16384)
Protection from Critical Hits(32768)
Bonus Critical Hits(65536)
Infravision(131072)
Blind(262144)
Disease(524288)
Feeblemind(1048576)
Non-detection(2097152)
Duplicated(4194304)
Blessed(8388608)
Detect Evil(16777216)
Invisible(33554432)
Luck Bonus(67108864)
Aid(124217728)
Antimagic(268435456)
Blur(536870912)
Embalming(1073741824)
Confused(217483648)
Note that all the death effects are in name only, with the exception of regular 'death', and will not fuction exactly like the regular effects, though they are dispelable by the same manner. The only way to remove frozen death is to kill the target or some other means, otherwise they will be permanately immobilized. Acid and Flaming Death seem to have no effect here. The same is true for Mirror Image. All values between the values listed here are combinations of the effects.
Parameter #1: RGB
Parameter #2: Method
Known bit values of Method are:
1 - Repeat animation, otherwise duration counts, except for permanent which plays once.
2 - Removes stickiness (background animation)
Parameter #1: RGB
Parameter #2: Method
Known bit values of Method are:
0x1000 - Sticky flag (default is opposite as with #187)
0x30000 - Both bits must be set, this causes Repeat animation
0x100000 - RGB is used as transparency, fade totally at speed of DiceSize
There are four effects doing exactly the same, this is probably to have resistances against opcode.
#188 used for swarm curse
#189 used mostly for Ravel's spells (black barbed curse, vampiric touch, blacksphere, cone of cold and stygian ice.)
#190 appears to be unused
#191 used for the rest of the spells.
Parameter #1: RGB
Parameter #2: Method
See use at #188
Parameter #1: RGB
Parameter #2: Method
See use at #188
Parameter #1: RGB
Parameter #2: Method
See use at #188
Parameter #1: Fixed Drain
Parameter #2: Drain Type
Known values for 'Drain Type' are:
0 the target receives hit points
1 the caster receives hit points
2 the target and caster hit points (this works even if both are at full health)
3 the target receives hit points (this works even if both are at full health. No damage animation is shown)
Parameter #1: Magnitude
Parameter #2: Irrelevant
Parameter #1: RGB Ratio
Parameter #2: Unused
Parameter #1: RGB Colour
Parameter #2: Type
The 'RGB Colour' field is handled as follows:
First byte = Red (0-255)
Second byte = Green (0-255)
Third byte = Blue (0-255)
Know values for 'Type' are:
0,1 Quick fade from light to dark, then quick fade to light
2,3 Quick fade from light to dark, then instant light
4,5,6,7 Fade from light to dark, goes for duration of effect, then fade to light
8 No Effect
9 Very fast light to black shift and back
10 Instant black for the duration of the effect, then instant light
100 Unknown
200 Unknown
The duration only applies to 4,5,6,7, and 10.
The dice values control the fading speed.
The resource field contains a wav resref.
Parameter #1: Irrelevant
Parameter #2: Effect
Known values for 'Effect' are:
0 Adder's Kiss
1 Ball Lightning
2 Fizzle
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Parameter #1: Irrelevant
Parameter #2: Effect
0 Cloak of Warding
1 Shield
2 Black Barbed Shield
3 Pain Mirror
4 Guardian Mantle
6 Enoll Eva's Duplication
7 Armor
8 Antimagic Shell
11 Flame Walk
12 Protection from Evil
13 Conflagration
14 Infernal Shield
15 Submerge the Will
16 Balance in All Things
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Parameter #1: Penalty Value
Parameter #2: Undetermined
Parameter #1: Value
Parameter #2: Undetermined
Parameter #1: Speed
Parameter #2: Irrelevant
Parameter #1: Irrelevant
Parameter #2: Embalming Type
A 0 will give the target 2-8 hit points and +1 AC for the duration of the spell.
Any other value gives the target +2 hit points per level of the caster and +2 AC.
Both effects last for the duration of the spell.
Parameter #1: Unknown
Parameter #2: Type
Known values of 'Type' are:
0 Stop actions
1 Enable actions
This effect has no duration.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Parameter #1: Undefined
Parameter #2: Undefined