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 Value
field, in the style specified by Type
field.
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 ⟶ Final Value Modifier:
Key = 'Key Modifier' value
This effect modifies NUMBEROFATTACKS.
Key Modifier
can take negative values. These values match their positive counterparts (e.g., "-6"
corresponds to "-0.5"
).
Type=3
(Set Final):
- Only functions when using
Timing Mode
s2/5/8
(even inSPLs
). - Haste and Slow affect it as normal, though the displayed APR in the Record Screen won't change.
-
Overrides base,
Type=0
,Type=1
,Type=2
, proficiency and warrior class APR bonuses.Type=1
just overrides the base and previousType=1
andType=2
effects.
- Only the first
Type=3
effect will take hold; any later ones will be skipped.
Timing Mode
s 1/4/7
alters the creature's base APR
stat, leaving behind no removable effect.
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
Location
field, to the colour specified by the RGB Colour
field.
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:
-
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)
See opcode #7 for further details about this topic.
Parameter #1: RGB Colour
Parameter #2: Location and Speed
Location
field, at the rate specified by the Speed
field, with the colour specified by the RGB Colour
field. If the colour values are all set to 0
, the glow effect only occurs if the creature is in darkness; outside at night, inside a building, or standing in shadows.
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 and Speed
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:
-
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)
See opcode #7 for further details about this topic.
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: Mode & Damage Type
Special: Flags
Damage Amount
field, with the damage type specified by the Type
field.
Known values for
Mode & Damage Type
are:
Value (hex) | Damage Type |
Mode |
---|---|---|
0x00000000 | CRUSHING | Normal |
0x00000001 | CRUSHING | Set to Value |
0x00000002 | CRUSHING | Set to Percentage |
0x00000003 | CRUSHING | Reduce by Percentage |
0x00010000 | ACID | Normal |
0x00010001 | ACID | Set to Value |
0x00010002 | ACID | Set to Percentage |
0x00010003 | ACID | Reduce by Percentage |
0x00020000 | COLD | Normal |
0x00020001 | COLD | Set to Value |
0x00020002 | COLD | Set to Percentage |
0x00020003 | COLD | Reduce by Percentage |
0x00040000 | ELECTRICITY | Normal |
0x00040001 | ELECTRICITY | Set to Value |
0x00040002 | ELECTRICITY | Set to Percentage |
0x00040003 | ELECTRICITY | Reduce by Percentage |
0x00080000 | FIRE | Normal |
0x00080001 | FIRE | Set to Value |
0x00080002 | FIRE | Set to Percentage |
0x00080003 | FIRE | Reduce by Percentage |
0x00100000 | PIERCING | Normal |
0x00100001 | PIERCING | Set to Value |
0x00100002 | PIERCING | Set to Percentage |
0x00100003 | PIERCING | Reduce by Percentage |
0x00200000 | POISON | Normal |
0x00200001 | POISON | Set to Value |
0x00200002 | POISON | Set to Percentage |
0x00200003 | POISON | Reduce by Percentage |
0x00400000 | MAGIC | Normal |
0x00400001 | MAGIC | Set to Value |
0x00400002 | MAGIC | Set to Percentage |
0x00400003 | MAGIC | Reduce by Percentage |
0x00800000 | MISSILE | Normal |
0x00800001 | MISSILE | Set to Value |
0x00800002 | MISSILE | Set to Percentage |
0x00800003 | MISSILE | Reduce by Percentage |
0x01000000 | SLASHING | Normal |
0x01000001 | SLASHING | Set to Value |
0x01000002 | SLASHING | Set to Percentage |
0x01000003 | SLASHING | Reduce by Percentage |
0x02000000 | MAGICFIRE | Normal |
0x02000001 | MAGICFIRE | Set to Value |
0x02000002 | MAGICFIRE | Set to Percentage |
0x02000003 | MAGICFIRE | Reduce by Percentage |
0x04000000 | MAGICCOLD | Normal |
0x04000001 | MAGICCOLD | Set to Value |
0x04000002 | MAGICCOLD | Set to Percentage |
0x04000003 | MAGICCOLD | Reduce by Percentage |
0x08000000 | STUNNING | Normal |
0x08000001 | STUNNING | Set to Value |
0x08000002 | STUNNING | Set to Percentage |
0x08000003 | STUNNING | Reduce by 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).
Damage Amount
can be positive or negative (though the damage sound will play in either case).
If Damage Amount
and the Dice values are both non-zero, the total damage inflicted is: 'Damage Amount' + Dice value
.
STUNNING
damage does not stun the target. STUNNING
damage cannot kill a creature, creatures are reduced to 1 HP and are knocked unconscious.
Useful bit values for Save Type
are:
- Bit 24 ⟶
Bypass Mirror Image
- Bit 25 ⟶
Ignore difficulty
POISON
automatically uses save flag Bypass Mirror Image
.
Known bit values for
Flags
are:
- Bit 0 ⟶ Drain HP to caster (cumulative)
- Bit 1 ⟶ As bit 0 but caster and target are reversed (cumulative)
- Bit 2 ⟶ Fist damage only (source has to have fists equipped, delays later effects)
- Bit 3 ⟶ Drain HP to caster (non-cumulative)
- Bit 4 ⟶ As bit 3 but caster and target are reversed (non-cumulative)
- Bit 5 ⟶ Suppress combat log feedback string
- Bit 6 ⟶ Damage inflicted is limited to amount available by target (checks MINHITPOINTS and works in reverse if bits 1 or 4 are set)
- Bit 7 ⟶ Damage inflicted is limited to the caster's
(MAXHITPOINTS - CURRENTHP)
(works in reverse if bits 1 or 4 are set) - Bit 8 ⟶ Save for half
- Bit 9 ⟶ Fail for half: A failed (or lack of) saving throw results in half damage.
- Bit 10 ⟶ Does not wake sleepers
-
Bits 0, 1, 3, and 4 are mutually exclusive, while bits 6 and 7 do not require any of the HP drain bits to be set to function.
- However, bits 6 and 7 are often used together to achieve desired HP drain behavior. For instance, bit7 in conjunction with bit1 is used in IWD:EE/SoD's "Shadow Pact" ability (
"SPIN195.spl"
/"BDSHPACT.spl"
) for shadows to prevent them from inflicting more damage on reverse HP drain than necessary to heal them to normal max HP.
- However, bits 6 and 7 are often used together to achieve desired HP drain behavior. For instance, bit7 in conjunction with bit1 is used in IWD:EE/SoD's "Shadow Pact" ability (
- In all cases, HP drain now only increases maximum HP if the character is at full health and there are extra HP remaining from the drain, which can happen even during the drain. Current HP gained is always cumulative (bits 0,1,3,4) if the caster is injured. Extra HP gained by non-cumulative HP drain (bits 3,4) may still coexist on the same creature. This means that the caster can still benefit from lower HP drain if the effect expires later than the higher HP drain effect.
-
Example: The caster at 3/4 HP can increase his/her HP to 7/7 with one casting of Larloch's Minor Drain (if 4 is rolled) and 8/8 with another casting if 4 is rolled again, otherwise nothing seems to happen despite the damage inflicted. The caster may further benefit with additional castings if injured, but cannot go beyond 8/8 HP. This all assumes there is sufficient HP to drain (since bit 6 is now set in
"SPWI119.spl"
). -
Extra maximum HP effects carried on the creature now have their
mschool
,msectype
,resource
,resist_dispel
,dispel_level
etc properly set. See opcode #18 for how non-cumulative HP gain is stored.
-20
(Allegiance: PC) or -9
(any other Allegiance value) hit points, it also applies opcode #13 of the specified type:
CRUSHING
/SLASHING
/PIERCING
: Exploding DeathACID
/Unlisted: Acid DeathCOLD
/MAGICCOLD
: Frozen DeathFIRE
/MAGICFIRE
: Burning DeathELECTRICITY
: Electrified DeathMAGIC
/MISSILE
/POISON
: Normal Death
^0xaabbggrr
(aa
= alpha/transparency, bb
= Blue, gg
= Green, rr
= Red)
CRUSHING
,SLASHING
,PIERCING
,MISSILE
,STUNNING
:0xffbed7d7
POISON
:0xff76e4c7
FIRE
,MAGICFIRE
:0xff002a9c
COLD
,MAGICCOLD
:0xffffbf00
ELECTRICITY
:0xfffff97d
ACID
:0xff19bba8
MAGIC
:0xff00d7ff
Parameter #1: Text Notification
Parameter #2: Death Type
Death Type
value.
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
- Sets STATE_ACID_DEATH, STATE_DEAD
- Kicked from party, drops inventory
- 1 ⟶ Burning death
- Sets STATE_FLAME_DEATH, STATE_DEAD
- Character Tint Solid, character color ~[0x00404040] (Darkens avatar)
- Kicked from party, drops inventory
- 2 ⟶ Crushed death
- Sets STATE_EXPLODING_DEATH, STATE_DEAD
- Kicked from party, drops inventory
- 4 ⟶ Normal death
- Sets STATE_DEAD
- Drops inventory
- 8 ⟶ Chunked death
- Sets STATE_EXPLODING_DEATH, STATE_DEAD
- Sets ANIMATE[0x230][EXPLODING_TORSO]
- Plays sound ("GORE.WAV")/("GORE2.WAV")
- Kicked from party, drops inventory, sets all color indexes to 70
- 16 ⟶ Stoned death
- Sets STATE_STONE_DEATH
- Any hostile action against the creature(s) applies an Exploding Stoned Death to them
- Kicked from party, retains inventory, overlay's color index 72
- 32 ⟶ Freezing death
- Applies Exploding Freezing Death to the target with a (random) 0-5 second delay
- Sets STATE_FROZEN_DEATH
- Any hostile action against the creature applies an Exploding Freezing Death to the target
- Kicked from party, retains inventory, overlay's color index 71
- 64 ⟶ Exploding stoned death/Level Drain death
- Sets STATE_EXPLODING_DEATH, STATE_DEAD
- Sets
ANIMATE[0x100][CHUNKS]
- Kicked from party, retains inventory, sets all color indexes to 72
- 128 ⟶ Exploding freezing death
- Sets STATE_EXPLODING_DEATH, STATE_DEAD
- Sets
ANIMATE[0x100][CHUNKS]
- Kicked from party, retains inventory, sets all color indexes to 71
- 256 ⟶ Electrified death
- Sets STATE_FLAME_DEATH, STATE_DEAD
- Character Tint Solid, character color ~[0x00404040] (Darkens avatar)
- Kicked from party, drops inventory
- 512 ⟶ Disintegration death
- Sets STATE_EXPLODING_DEATH, STATE_DEAD
- Sets
ANIMATE[0x100][CHUNKS]
- Kicked from party, retains inventory, sets all color indexes to 72
- 1024 ⟶ Destruction (in IWD2)
- Sets STATE_EXPLODING_DEATH (0x00000100), STATE_DEAD (0x00000800)
- Sets
ANIMATE[0x230][EXPLODING_TORSO]
- Plays sound ("GORE.WAV")/("GORE2.WAV")
- Kicked from party, retains inventory, sets all color indexes to 70
- Other
- Removes all death states, but does not restore HP
- Drops inventory
- Any ⟶ Removes death states that they do not set (e.g, a normal Death will remove STATE_FROZEN_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
Statistic Modifier
field in the style specified by the Type
field.
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.
Statistic Modifier
and the Dice values are both non-zero, the total HP change is: 'Statistic Modifier' + Dice value
.
The upper word of the
Type
field can further control the style.
Known values for the upper word of
Type
are:
- BIT0 ⟶ Raise dead
- BIT1 ⟶ Remove all effects with a limited Timing Mode (
not equipped(2)
orpermanent(9)
), but also any ITM in theMagical Weapon Slot
.
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
Type
value.
Known values for
Type
are:
-
0 ⟶ Normal Invisibility
- Grants a
+4
bonus to melee attacks only. - Applying
Normal
Invisibility withTiming Mode
s other than1/4/7
in an external EFF through opcode #183 will NOT terminate early due to hostile/aggressive action (similar to the constant invisibility provided by Mislead). Applying the same through opcode #177 or opcode #283 DOES terminate due to hostile/aggressive action as normal. - Applying
Normal
Invisibility withTiming Mode
s1/4/7
will set the creature's base stateSTATE_INVISIBLE
, while still leaving behind a removable (but irrelevant) effect. This state is not cleared on death, but it is still terminated by any hostile/aggressive action that would normally terminate invisibility.
- Grants a
-
1 ⟶ Improved Invisibility
- Affected creature stays invisible after attack.
- Does not provide saving throw bonuses outside EEs, where it provides a bonus of
4
to all. - Lingers after the duration is spent and act as permanent if used as a 'While Equipped' effect.
- Applying
Improved
Invisibility will cause the effect to be duplicated, with the duplicate usingNormal
invisibility. There's no reason to apply bothNormal
andImproved
invisibility in the same spell/item (unless you want them to have different probabilities/hd limits). - Applying
Improved
Invisibility withTiming Mode
s1/4/7
will set the creature's base stateSTATE_IMPROVEDINVISIBILITY
, and because it duplicates itself asNormal
invisibility,STATE_INVISIBLE
as well, while still leaving behind a removable (but irrelevant) effect for each. These states are not cleared on death. - The effects that remain when setting the base
STATE
s are irrelevant, at least in-game, because everything that can remove theSTATE
s will also remove the effect. TheSTATE
s can however be removed separately through NI or EEkeeper, at which point the effect will once again reapply itsSTATE
immediately upon loading the game.
-
2 ⟶ Weak Invisibility (EE only)
- It's the same type of invisibility as
Improved
Invisibility after you take a hostile action and reveal yourself. - Applying "Weak" Invisibility with
Timing Mode
s1/4/7
will function no differently thanTiming Mode 0
, aside from having no natural expiration timer. - Applying "Weak" Invisibility is otherwise the same as
Improved
Invisibility, except it doesn't duplicate itself with aNormal
version, which is why it doesn't quality for backstabs.
- It's the same type of invisibility as
dexmod.2da
)
To be exact, the attack must follow these rules:
- Attacker must have a backstab multiplier of
2
or higher (seebackstab.2da
) - Attacker must be
STATE_INVISIBLE
- Attacker's weapon must not be
RANGED
Class
/ Kit
doesn’t matter, sneakatt.2da
doesn’t matter (even though the backstab multiplier isn’t used to calculate damage under “Game Option: 3E Sneak Attack”, the creature still has its multiplier calculated / assigned), weapon backstab suitability doesn’t matter.
- Attacking character
THAC0 = 17
- Attacked character
AC = 0
, (dexterity contributing-4
bonus)
13
to hit, even though a roll of 17
is required normally:
However, this mechanic isn't implemented properly...
If the attacked character has a penalty to AC due to dexterity, they will be harder to hit while being attacked under the above conditions.
In the following example:
- Attacking character
THAC0 = 17
- Attacked character
AC = 9
, (dexterity contributing+5
penalty)
8
to hit, though a roll of 13
is now required:
Parameter1 = 1
(unknown if any purpose)Parameter2 = 0
Duration = 20
-4
penalty to hit, unless they are affected by opcode #193. Moreover, you cannot target an improved
/weak
invisible creature with spells unless you’re affected by opcode #193 or the spell can target invisible creatures.
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: Amount_1
Parameter #2: Type
Parameter #3: Amount_2
Parameter #4: Frequency Multiplier
Special: Icon
Type
field. It sets the STATE_POISONED state.
Known values for
Type
are:
-
0 ⟶ Inflict 1 HP per second
Amount_2
andFrequency Multiplier
are ignored –Amount_1
needs to be non-zero
- 1 ⟶ Inflict 1 HP per second
- for best results, leave
Amount_2
andFrequency Multiplier
at0
,Amount_1
between1
and101
- for best results, leave
- 2 ⟶ Deal
Amount_1
damage everyFrequency Multiplier
second(s) - 3 ⟶ Deal one damage every
'Amount_1' * 'Frequency Multiplier' second(s)
- 4 ⟶ Deal
Amount_2
damage every'Amount_1' * 'Frequency Multiplier' second(s)
– This is the only one that must be in external EFF files - 5+ ⟶ Crash
Icon
defines the index from STATDESC.2DA for custom portrait icons. Default value is Poisoned
.
Frequency Multiplier = 0
, its value is treated as 1
. This is the default value for SPL/ITM effects.
Frequency Multiplier
will be replaced when using opcode #329 (Slow Poison) – not necessarily “slow” though, as it can increase or decrease the frequency.
Type
field is 1
:
- if the
Frequency Multiplier
field is non-zero, damage is always dealt. - if the
Amount_1
field is less than256
, damage is dealt whileHP >= 100 / 'Amount_1'
.
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
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: 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
Type
field, in the colour specified by the Colour
field. The colour field may be connected to SPRKLCLR.2DA.
Known values for
Colour
are:
- 0 ⟶ Crash
- 1 ⟶ Black
- 2 ⟶ Blue
- 3 ⟶ Chromatic
- 4 ⟶ Gold
- 5 ⟶ Green
- 6 ⟶ Purple
- 7 ⟶ Red
- 8 ⟶ White
- 9 ⟶ Ice
- 10 ⟶ Stone
- 11 ⟶ Magenta
- 12 ⟶ Orange
- 13+ ⟶ Crash
Known values for
Type
are:
-
1 ⟶ Explosion
- It is always instantaneous.
- 2 ⟶ No effect?
-
3 ⟶ Sparkle Shower
- Will use the specified
duration
, but is not saved (lost upon reload).
- Will use the specified
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
-
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
- 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: Location and Speed
RGB Colour
field, at the speed specified by the (3rd byte of the) Speed
field.
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 and Speed
field is handled as follows:
- First byte = Location (not implemented in 2.5)
- 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. The duration of the effect is controlled by the Speed
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)
See opcode #7 for further details about this topic.
Parameter #1: RGB Colour
Parameter #2: Location
Location and Speed
field, to the colour specified by the RGB Colour
field.
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:
-
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)
See opcode #7 for further details about this topic.
Parameter #1: RGB Colour
Parameter #2: Location
Location
field, to the colour specified by the RGB Colour
field.
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:
-
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)
See opcode #7 for further details about this topic.
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: Dispel Type & Magic Weapon Dispel Type
Type
field, the Level
field can be used to set the level of the effect.
The
Dispel Type & Magic Weapon Dispel Type
field is handled as follows:
-
First word = Dispel Type
- 0 ⟶ Always dispel
- 1 ⟶ Use Caster Level
- 2 ⟶ Use
Level
field
-
Second word = Magic Weapon Dispel Type
-
0 ⟶ Always dispel
- Will not remove items flagged as
undispellable
.
- Will not remove items flagged as
-
1 ⟶ Never Dispel
- Will not remove any Magical Weapon slot item, regardless of
undispellable
.
- Will not remove any Magical Weapon slot item, regardless of
-
2 ⟶ Use Caster Level
- Will not remove items flagged as
undispellable
.
- Will not remove items flagged as
-
0 ⟶ Always dispel
Dispel Type = 1
or Dispel Type = 2
(Level-based Dispel):
-
Base chance is 49%.
- 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.
- Maximum is 99% chance to dispel.
- There is no minimum threshold for succeeding the dispel check, at 5 levels or more below it will always fail.
- Effects with caster levels
1932735279
to1932735534
(as impractical as they may be), corresponding to levels0 – 255
, effectively use an inverted success/failure rate, due to overflow.
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
Type
field, Percent Chance
percent of the time.
Known values for
Type
are:
- 0 ⟶ Mage Spells
- 1 ⟶ Cleric Spells
- 2 ⟶ Innate Abilities
- 3 ⟶ Mage Spells
- 4 ⟶ Cleric Spells
- 5 ⟶ Innate Abilities
SPELLFAILUREMAGE
, SPELLFAILUREPRIEST
and SPELL_FAILURE_INNATE
, each of which is capped 0 — 100
.
Type
values of 0
,1
or 2
display a message — "Spell Failed: casting failure" (on EE games, this string is specified by STRREF_FEEDBACK_SPELLFAILED_CASTFAILURE
)
Type
values of 3
,4
or 5
display a message — "Spell failed due to dead magic" (on EE games, this string is specified by STRREF_FEEDBACK_SPELLFAILED_CASTFAILUREDEAD
)
- Additionally, it sets
DEAD_MAGIC
to1
.
- This opcode is cumulative with itself and the Deafness effect.
- Spells with
Ignore Dead/Wild Magic
ignore the spell failure chance from this effect (regardless of using theDead Magic
mode).
Parameter #1: RGB Colour
Parameter #2: Location and Fade Speed
- It always affects the entire creature (not a specific location).
- It is always "instantaneous". No effect is attached to the creature, it's all handled by internal mechanics, but it still uses the specified duration. Saving & Reloading will remove the effect.
- The creature will instantly be covered by a color overlay which then fades out. The color overlay will not fade back in. It's otherwise similar to opcode #50, where the color overlay fades onto the creature and then fades back out.
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 and Fade Speed
field is handled as follows:
- First byte = Location (unused, it always affects everything. Leave it at
0
) - Third byte = Fade 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: 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
IDS File
field, to the value specified by the IDS Entry
field.
Known values for
IDS File
are:
- 0 ⟶ EA
- 1 ⟶ Generic / General
- 2 ⟶ Race
- 3 ⟶ Class
- 4 ⟶ Specific
- 5 ⟶ Gender
- 6 ⟶ Align / Alignmen (iwd1, pst)
- Only reliable timing mode is
Timing Mode 1
(all others are bugged and can convert to this timing mode under various circumstances). Timing Mode
s1/4/7
will permanently set the creature(s) IDS value, leaving no removable effect.
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: Amount
Parameter #2: Type
Parameter #4: Frequency Multiplier
Special: Icon
Amount
parameter as the amount of damage, and the Type
parameter as how the disease functions.
Known values for
Type
are:
-
0 ⟶ Inflict 1 HP per second
Frequency Multiplier
is ignored –Amount
needs to be non-zero)
-
1 ⟶ Inflict 1 HP per second
- for best results, leave
Frequency Multiplier
at0
,Amount
between1
and101
- for best results, leave
- 2 ⟶ Deal
Amount
damage everyFrequency Multiplier
second(s) - 3 ⟶ Deal one damage every
'Amount' * 'Frequency Multiplier'
second(s) - 4 ⟶ Reduce Strength score by
Amount
- 5 ⟶ Reduce Dexterity score by
Amount
- 6 ⟶ Reduce Constitution score by
Amount
- 7 ⟶ Reduce Intelligence score by
Amount
- 8 ⟶ Reduce Wisdom score by
Amount
- 9 ⟶ Reduce Charisma score by
Amount
- 10 ⟶ Slow Effect
- 11 ⟶ Mold touch/Single
- 12 ⟶ Mold touch/Decrement
- 13 ⟶ Contagion
Amount
can be positive (penalty) or negative (bonus).
Icon
defines the index from STATDESC.2DA for custom portrait icons. Default value is None (no icon)
.
Permanent
timing modes require a duration
for this effect to work.
POISON
damage, except Mold Touches, which deal MAGIC
damage.
Frequency Multiplier = 0
, its value is treated as 1
. This is the default value for SPL/ITM effects.
Slow
effect is no different from that caused by opcode #40 (Slow), including its stacking interaction with Haste, except that it is blocked/removed as a disease, not as a slow effect.
Contagion
is a composite of Strength, Dexterity, Charisma drain and the Slow effect, each ability score reduced by Amount
.
Type
field is 1
:
- if the
Frequency Multiplier
field is non-zero, damage is always dealt. - if the
Amount
field is less than256
, damage is dealt whileHP > 100 / 'Amount'
.
Mold Touch
is complicated: the general idea is that it deals x
or xd6
damage and applies the SPL file specified by the resource
key (default: "original resource" + B
) every (round or second) for either 1 round (single) or across multiple rounds dealing less each round (decrement).
In particular:
- If
Type=11
: - if
Type=12
:-
The first hit doesn't occur immediately, but instead at 80 ticks (exactly), the second hit occurs at 90 ticks (6 seconds), then later hits occur 1 round apart. So:
1st hit: 5.33s(80t), 2nd hit: 6s(90t), 3rd hit: 12s(180t), etc...
Oddly, this effect measures rounds as 6 seconds (90 ticks) intervals, not 100 ticks. -
As far as damage dealt is concerned, in SPLs/ITMs:
x = 'Amount'(d6)
, decrementing the amount by 1 die every round, until zero.- Should always use
Timing Mode
1
,3
or4
, and only a non-zero duration if usingTiming Mode 4
. - If
Timing Mode
is1
or4
, the portrait icon, and DISEASED remain until cured/death. - If
Timing Mode
is3
(with no duration), it will expire 1 round after the final damage (when it realizes the amount has reached zero).Timing Mode 3
andduration = 0
should be the "default" setting for this mode right now.
-
As far as damage dealt is concerned, in external EFFs:
x = (remaining 'Duration' / 6)(d6)
, or just(remaining 'Duration' / 6)
ifFrequency Multiplier >= 65536
.- The damage dice is rounded down.
- Because the first hit doesn't occur until 80 ticks, any duration shorter will have no triggers.
- The Portrait Icon and DISEASED will remain for the full specified duration.
- The SPL resource is applied at the same/every time as the damage, though the damage occurs first.
-
The first hit doesn't occur immediately, but instead at 80 ticks (exactly), the second hit occurs at 90 ticks (6 seconds), then later hits occur 1 round apart. So:
Frequency Multiplier
determines whether it deals damage every second or every round, and whether it deals x
or xd6
damage.
Frequency Multiplier = 0
⟶xd6
per roundFrequency Multiplier = 65536
or greater (must be even) ⟶x
per secondFrequency Multiplier = 65537
or greater (must be odd) ⟶x
per round
x
decrements only once per round.
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: Projectile Index
Values for
Projectile Index
are taken from PROJECTL.IDS.
Projectile Index
.
#0|NONE
)).
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: Amount_1
Parameter #2: Type
Parameter #3: Amount_2
Parameter #4: Frequency Multiplier
Special: Icon
Type
field, to the targeted creature(s).
Known values for
Type
are:
-
0 ⟶ Restore 1 HP per second
Amount_2
andFrequency Multiplier
are ignored –Amount_1
needs to be non-zero
-
1 ⟶ Restore 1 HP per second
- for best results, leave both
Amount_2
andFrequency Multiplier
at0
,Amount_1
between1
and101
- for best results, leave both
- 2 ⟶ Restore
Amount_1
HP everyFrequency Multiplier
second(s) - 3 ⟶ Restore 1 HP every
'Amount_1' * 'Frequency Multiplier'
second(s) - 4 ⟶ Restore
Amount_2
HP every'Amount_1' * 'Frequency Multiplier'
second(s) – This is the only one that must be in external EFF files
Icon
defines the index from STATDESC.2DA for custom portrait icons. Default value is None (no icon)
.
Type
values greater or equal to 5
will crash the game!
Permanent
timing modes require a duration for this effect to work.
Frequency Multiplier = 0
, its value is treated as 1
. This is the default value for SPL/ITM effects.
Type
field is 1
:
- if the
Frequency Multiplier
field is non-zero, HP is always restored. - if the
Amount_1
field is less than256
, HP is restored whileHP > 100 / 'Amount_1'
.
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
Special: Mode
IDS Entry
field, in the specified 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
The affected creature becomes immobile and its AI scripts stop running.
This effect sets HELD to
1
. It also sets the STATE_HELPLESS flag.
Known values for
Mode
are:
- 0 ⟶ Default
- Non-zero ⟶ False Petrify
- In addition to the normal paralyze effect, it maintains a detectable STATE_STONE_DEATH and the stone overlay, but does not directly kill, award XP, or chunk when attacked. Only functions like this against non-party members.
- Against party members, it functions as normal, unless you save and reload while the effect is active. Upon reloading, the stone overlay will be applied and the character will be dropped to 0 hit points, but not killed, and no STATE_STONE_DEATH (this is probably to avoid kicking the character from the party)
Parameter #1: Irrelevant
Parameter #2: Irrelevant
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: Sound
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. This effect should be used to remove equipped items (use opcode #123 for inventory items).
On successful removal, parameter "Sound" dictates which sound will be played:
Resource2
.WAVParameter #1: Irrelevant
Parameter #2: Irrelevant
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: Irrelevant
Parameter #2: Irrelevant
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: 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
resource
key, in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Gain Resistances/statistics (spell-casting disabled)
- 1 ⟶ Appearance only
This effect sets POLYMORPHED
to 1
but only if Type=0
.
If the resource
key is empty, other Polymorph effects are removed, allowing for removal of permanent effects.
- It will also remove any item in
SLOT_MISC19
(Magical Weapon Slot), whether or not it was supplying a Polymorph effect.
Type
is 0
, this opcode sets
Strength
Exceptional Strength
Dexterity
- Resistances
Base AC
- Specific AC
Base APR
resource
key is empty, and it subsequently clears other Polymorph effects, Type
is used just like param#1
of opcode #337.As a result, it will clear all Polymorph effects if
Type = "-1"
, else it will only clear Polymorph effects that have a param#2
that matches.
Parameter3
(external EFF): Circle SizeParameter4
(external EFF): Animation (from ANIMATE.IDS)
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
Animation Sequence
field.
Known values for
Animation Sequence
are (from SEQ.IDS):
- 0 ⟶ Attack
- 1 ⟶ Awake
- 2 ⟶ Cast
- 3 ⟶ Conjure
- 4 ⟶ Damage
- 5 ⟶ Die
- 6 ⟶ Turn head
- 7 ⟶ Ready
- 8 ⟶ Shoot
- 9 ⟶ Twitch
- 10 ⟶ Walk
- 11 ⟶ Attack (Slash)
- 12 ⟶ Attack (Backslash)
- 13 ⟶ Attack (Jab)
- 14 ⟶ Emerge
- 15 ⟶ Hide
- 16 ⟶ Sleep
Parameter #1: String Reference
Parameter #2: Irrelevant
String Reference
value.
Parameter #1: Projectile Index
Parameter #2: Type
Known values for
Type
are:
- 0 ⟶ Use
Projectile Index
projectile value. - 1 .. 8 ⟶ Crash
- 9 ⟶
PROJECTL[110]
, Default file:"CGNECROM.PRO"
- 10 ⟶
PROJECTL[111]
, Default file:"CGALTERA.PRO"
- 11 ⟶
PROJECTL[112]
, Default file:"CGENCHAN.PRO"
- 12 ⟶
PROJECTL[113]
, Default file:"CGABJURA.PRO"
- 13 ⟶
PROJECTL[114]
, Default file:"CGILLUSI.PRO"
- 14 ⟶
PROJECTL[115]
, Default file:"CGCONJUR.PRO"
- 15 ⟶
PROJECTL[116]
, Default file:"CGINVOCA.PRO"
- 16 ⟶
PROJECTL[117]
, Default file:"CGDIVINA.PRO"
Projectile Index
must be treated as in spells, i.e.: value in PROJECTL.IDS + 1
Parameter #1: Target
Parameter #2: Type
Type
value at the location specified by Target
. These effects are usually used for spell hits based on the spell school.
Known values for
Target
are:
- 0 ⟶ Current Location
- Non-zero ⟶ Target Location
Known values for
Type
are:
Type value |
PRO Index | Animation | Palette Notes |
---|---|---|---|
0 | 118 | SHAIR.BAM | default (ice) |
1 | 119 | SHEARTH.BAM | default (ice) |
2 | 120 | SHWATER.BAM | default (ice) |
4 | 121 | SHAIR.BAM | SHAIR1.BMP (blue) |
5 | 122 | SHEARTH.BAM | SHEARTH1.BMP (blue) |
6 | 123 | SHWATER.BAM | SHWATER1.BMP (blue) |
8 | 124 | SHAIR.BAM | SHAIR2 (gold) |
9 | 125 | SHEARTH.BAM | SHEARTH2 (gold) |
10 | 126 | SHWATER.BAM | SHWATER2 (gold) |
12 | 127 | SHAIR.BAM | SHAIR3 (green) |
13 | 128 | SHEARTH.BAM | SHEARTH3 (green) |
14 | 129 | SHWATER.BAM | SHWATER3 (green) |
16 | 130 | SHAIR.BAM | SHAIR4 (magenta) |
17 | 131 | SHEARTH.BAM | SHEARTH4 (magenta) |
18 | 132 | SHWATER.BAM | SHWATER4 (magenta) |
20 | 133 | SHAIR.BAM | SHAIR5 (purple) |
21 | 134 | SHEARTH.BAM | SHEARTH5 (purple) |
22 | 135 | SHWATER.BAM | SHWATER5 (purple) |
24 | 136 | SHAIR.BAM | SHAIR6 (red) |
25 | 137 | SHEARTH.BAM | SHEARTH6 (red) |
26 | 138 | SHWATER.BAM | SHWATER6 (red) |
28 | 139 | SHAIR.BAM | SHAIR7 (stone) |
29 | 140 | SHEARTH.BAM | SHEARTH7 (stone) |
30 | 141 | SHWATER.BAM | SHWATER7 (stone) |
32 | 142 | SPBOOM.BAM | MPALETTE[67] (shiny gold) |
33 | 143 | SPBOOM.BAM | MPALETTE[65] (really dark gray) |
34 | 144 | SPBOOM.BAM | MPALETTE[69] (shiny green) |
35 | 145 | FLMSTRK.BAM | default (BG1 flamestrike) |
36 | 146 | HLYMITE.BAM | default (BG1 draw upon holy might) |
37 | 147 | SHAIR.BAM | default (white) |
38 | 109 | SPDIMNDR.BAM | default (BG1 dimension door) |
39 | 207 | SPFDEATH.BAM | default (BG1 finger of death) |
Their animations (
"SHAIR"
, "SHWATER"
, etc…) can be though.
Parameter #1: Irrelevant
Parameter #2: Icon
Icon
field on the targeted creature(s) portrait.
All values are drawn directly from
"STATES.BAM"
in the "GUIBam.bif"
starting at sequence 65
.
Icon value |
BG2 | BG(2):EE | IWD:EE |
---|---|---|---|
0 | Charm | Charm | Charm |
1 | Dire Charm | Dire Charm | Dire Charm |
2 | Rigid Thinking | Rigid Thinking | Rigid Thinking |
3 | Confused | Confused | Confused |
4 | Berserk | Berserk | Berserk |
5 | Intoxicated | Intoxicated | Intoxicated |
6 | Poisoned | Poisoned | Poisoned |
7 | Diseased | Diseased | Diseased |
8 | Blind | Blind | Blind |
9 | Protection From Evil | Protection From Evil | Protection From Evil |
10 | Protection From Petrification | Protection From Petrification | Protection From Petrification |
11 | Protection From Missiles | Protection From Missiles | Protection From Missiles |
12 | Magic Armor | Magic Armor | Magic Armor |
13 | Held | Held | Held |
14 | Sleep | Sleep | Sleep |
15 | Shielded | Shielded | Shielded |
16 | Protection From Fire | Protection From Fire | Protection From Fire |
17 | Blessed | Blessed | Blessed |
18 | Chant | Chant | Chant |
19 | Free Action | Free Action | Free Action |
20 | Barkskin | Barkskin | Barkskin |
21 | Strength | Strength | Strength |
22 | Heroism | Heroism | Heroism |
23 | Invulnerable | Invulnerable | Invulnerable |
24 | Protection From Acid | Protection From Acid | Protection From Acid |
25 | Protection From Cold | Protection From Cold | Protection From Cold |
26 | Resist Fire/Cold | Resist Fire/Cold | Resist Fire/Cold |
27 | Protection From Electricity | Protection From Electricity | Protection From Electricity |
28 | Protection From Magic | Protection From Magic | Protection From Magic |
29 | Protection From Undead | Protection From Undead | Protection From Undead |
30 | Protection From Poison | Protection From Poison | Protection From Poison |
31 | Non-detectable | Non-detectable | Non-detectable |
32 | Good Luck | Good Luck | Good Luck |
33 | Bad Luck | Bad Luck | Bad Luck |
34 | Silenced | Silenced | Silenced |
35 | Cursed | Cursed | Cursed |
36 | Panic | Panic | Panic |
37 | Resist Fear | Resist Fear | Resist Fear |
38 | Haste | Haste | Haste |
39 | Fatigue | Fatigue | Fatigue |
40 | Bard Song | Bard Song | Bard Song |
41 | Slow | Slow | Slow |
42 | Regenerate | Regenerate | Regenerate |
43 | Domination | Domination | Domination |
44 | Hopelessness | Hopelessness | Hopelessness |
45 | Greater Malison | Greater Malison | Greater Malison |
46 | Spirit Armor | Spirit Armor | Spirit Armor |
47 | Chaos | Chaos | Chaos |
48 | Feebleminded | Feebleminded | Feebleminded |
49 | Defensive Harmony | Defensive Harmony | Defensive Harmony |
50 | Champion's Strength | Champion's Strength | Champion's Strength |
51 | Dying | Dying | Dying |
52 | Mind Shield | Mind Shield | Mind Shield |
53 | Energy Drain | Energy Drain | Energy Drain |
54 | Polymorph Self | Polymorph Self | Polymorph Self |
55 | Stun | Stun | Stun |
56 | Regeneration | Regeneration | Regeneration |
57 | Perception | Perception | Perception |
58 | Master Thievery | Master Thievery | Master Thievery |
59 | Energy Drain | Energy Drain | Energy Drain |
60 | Holy Power | Holy Power | Holy Power |
61 | Cloak of Fear | Cloak of Fear | Cloak of Fear |
62 | Iron Skins | Iron Skins | Iron Skins |
63 | Magic Resistance | Magic Resistance | Magic Resistance |
64 | Righteous Magic | Righteous Magic | Righteous Magic |
65 | Spell Turning | Spell Turning | Spell Turning |
66 | Repulsing Undead | Repulsing Undead | Repulsing Undead |
67 | Spell Deflection | Spell Deflection | Spell Deflection |
68 | Fireshield Red | Fireshield Red | Fireshield Red |
69 | Fireshield Blue | Fireshield Blue | Fireshield Blue |
70 | Protection from Normal Weapon | Protection from Normal Weapon | Protection from Normal Weapon |
71 | Protection from Magic Weapon | Protection from Magic Weapon | Protection from Magic Weapon |
72 | Tenser's Transformation | Tenser's Transformation | Tenser's Transformation |
73 | Protection from Magical Energy | Spell Shield | Spell Shield |
74 | Mislead | Mislead | Mislead |
75 | Contingency Active | Contingency Active | Contingency Active |
76 | Protected from the Elements | Protected from the Elements | Protected from the Elements |
77 | Projected Image | Projected Image | Projected Image |
78 | Maze | Maze | Maze |
79 | Imprisonment | Imprisonment | Imprisonment |
80 | Stoneskin | Stoneskin | Stoneskin |
81 | KAI | KAI | KAI |
82 | Called Shot | Called Shot | Called Shot |
83 | Spell Failure | Spell Failure | Spell Failure |
84 | Offensive Spin | Offensive Spin | Offensive Spin |
85 | Defensive Spin | Defensive Spin | Defensive Spin |
86 | Intelligence drained by mind flayer | Intelligence drained by mind flayer | Intelligence drained by mind flayer |
87 | Regenerating | Regenerating | Regenerating |
88 | In Dialog | In Dialog | In Dialog |
89 | In Store | In Store | In Store |
90 | Negative Plane Protection | Negative Plane Protection | Negative Plane Protection |
91 | Ability Score Drained | Ability Score Drained | Ability Score Drained |
92 | Spell Sequencer Active | Spell Sequencer Active | Spell Sequencer Active |
93 | Protected from Energy | Protected from Energy | Protected from Energy |
94 | Magnetized | Magnetized | Magnetized |
95 | Able to Poison Weapons | Able to Poison Weapons | Able to Poison Weapons |
96 | Setting Trap | Setting Trap | Setting Trap |
97 | Glass Dust | Glass Dust | Glass Dust |
98 | Blade Barrier | Blade Barrier | Blade Barrier |
99 | Death Ward | Death Ward | Death Ward |
100 | Doom | Doom | Doom |
101 | Decaying | Decaying | Decaying |
102 | Acid | Acid | Acid |
103 | Vocalize | Vocalize | Vocalize |
104 | Mantle | Mantle | Mantle |
105 | Miscast Magic | Miscast Magic | Miscast Magic |
106 | Magic Resistance Lowered | Magic Resistance Lowered | Magic Resistance Lowered |
107 | Spell Immunity | Spell Immunity | Spell Immunity |
108 | True Seeing | True Seeing | True Seeing |
109 | Detecting Traps | Detecting Traps / Illusions | Detecting Traps |
110 | Improved Haste | Improved Haste | Improved Haste |
111 | Spell Trigger | Spell Trigger | Spell Trigger |
112 | Deaf | Deaf | Deaf |
113 | Enfeebled | Enfeebled | Enfeebled |
114 | Infravision | Infravision | Infravision |
115 | Friends | Friends | Friends |
116 | Shield of the Archons | Shield of the Archons | Shield of the Archons |
117 | Spell Trap | Spell Trap | Spell Trap |
118 | Absolute Immunity | Absolute Immunity | Absolute Immunity |
119 | Improved Mantle | Improved Mantle | Improved Mantle |
120 | Farsight | Farsight | Farsight |
121 | Globe of Invulnerability | Globe of Invulnerability | Globe of Invulnerability |
122 | Minor Globe Of Invulnerability | Minor Globe Of Invulnerability | Minor Globe Of Invulnerability |
123 | Spell Shield | Protected from Magical Energy | Protected from Magical Energy |
124 | Polymorphed | Polymorphed | Polymorphed |
125 | Otiluke's Resilient Sphere | Otiluke's Resilient Sphere | Otiluke's Resilient Sphere |
126 | Nauseated | Nauseated | Nauseated |
127 | Ghost Armor | Ghost Armor | Ghost Armor |
128 | Glitterdust | Glitterdust | Glitterdust |
129 | Webbed | Webbed | Webbed |
130 | Unconscious | Unconscious | Unconscious |
131 | Mental Combat | Mental Combat | Mental Combat |
132 | Physical Mirror | Physical Mirror | Physical Mirror |
133 | Repulse Undead | Repulse Undead | Repulse Undead |
134 | Chaotic Commands | Chaotic Commands | Chaotic Commands |
135 | Draw Upon Holy Might | Draw Upon Holy Might | Draw Upon Holy Might |
136 | Strength of One | Strength of One | Strength of One |
137 | Bleeding | Bleeding | Bleeding |
138 | Rage | Rage | Rage |
139 | Boon of Lathander | Boon of Lathander | Boon of Lathander |
140 | Storm Shield | Storm Shield | Storm Shield |
141 | Enraged | Enraged | Enraged |
142 | Stunning Blow | Stunning Blow | Stunning Blow |
143 | Quivering Palm | Quivering Palm | Quivering Palm |
144 | Entangled | Entangled | Entangled |
145 | Grease | Grease | Grease |
146 | Smite | Smite | Smite |
147 | Hardiness | Hardiness | Hardiness |
148 | Power Attack | Power Attack | Power Attack |
149 | Whirlwind Attack | Whirlwind Attack | Whirlwind Attack |
150 | Greater Whirlwind Attack | Greater Whirlwind Attack | Greater Whirlwind Attack |
151 | Magic Flute | Magic Flute | Chaos of Battle |
152 | Critical Strike | Critical Strike | Critical Strike |
153 | Greater Deathblow | Greater Deathblow | Greater Deathblow |
154 | Deathblow | Deathblow | Deathblow |
155 | Avoid Death | Avoid Death | Avoid Death |
156 | Assassination | Assassination | Assassination |
157 | Evasion | Evasion | Evasion |
158 | Greater Evasion | Greater Evasion | Greater Evasion |
159 | Improved Alacrity | Improved Alacrity | Improved Alacrity |
160 | Aura of Flaming Death | Aura of Flaming Death | Aura of Flaming Death |
161 | Globe of Blades | Globe of Blades | Globe of Blades |
162 | Improved Chaos Shield | Improved Chaos Shield | Improved Chaos Shield |
163 | Chaos Shield | Chaos Shield | Chaos Shield |
164 | Fire Elemental Transformation | Fire Elemental Transformation | Fire Elemental Transformation |
165 | Earth Elemental Transformation | Earth Elemental Transformation | Earth Elemental Transformation |
166 | Unknown | Unknown | Mind Blank |
167 | Unknown | Unknown | Aid |
168 | Unknown | Unknown | Phased |
169 | Unknown | Unknown | Pain |
170 | Unknown | Unknown | Impervious Sanctity of Mind |
171 | Unknown | Unknown | Petrified |
172 | Unknown | Unknown | Iron Body |
173 | Unknown | Unknown | Animal Rage |
174 | Unknown | Unknown | Exaltation |
175 | Unknown | Unknown | Recitation |
176 | Unknown | Unknown | Blood Rage |
177 | Unknown | Unknown | The Ballad of Three Heroes |
178 | Unknown | Unknown | The Tale of Curran Strongheart |
179 | Unknown | Unknown | Tymora's Melody |
180 | Unknown | Unknown | The Song of Kaudies |
181 | Unknown | Unknown | The Siren's Yearning |
182 | Unknown | Unknown | War Chant of Sith |
183 | Unknown | Unknown | Prayer |
184 | Unknown | Unknown | Righteous Wrath of the Faithful |
185 | Unknown | Unknown | Cat's Grace |
186 | Unknown | Unknown | Hope |
187 | Unknown | Unknown | Courage |
188 | Unknown | Enchanted Weapon | Unknown |
189 | Unknown | Spirit Ward | Spirit Ward |
190 | Unknown | Ether Gate | Ether Gate |
191 | Unknown | Shamanic Dance | Shamanic Dance |
192 | Unknown | Chaos of Battle | Repulsion |
193 | Unknown | Unknown | Increased Movement Rate |
194 | Unknown | Repulsion | Immunity: Abjuration |
195 | Unknown | Increased Movement Rate | Immunity: Conjuration |
196 | Unknown | Immunity: Abjuration | Immunity: Divination |
197 | Unknown | Immunity: Conjuration | Immunity: Enchantment |
198 | Unknown | Immunity: Divination | Immunity: Illusion |
199 | Unknown | Immunity: Enchantment | Immunity: Evocation |
200 | Unknown | Immunity: Illusion | Immunity: Necromancy |
201 | Unknown | Immunity: Evocation | Immunity: Alteration |
202 | Unknown | Immunity: Necromancy | Enchanted Weapon |
203 | Unknown | Immunity: Alteration | Static Charge |
204 | Unknown | Flaming Fists | Entropy Shield |
205 | Unknown | Frozen Fist | Shield of Lathander |
206 | Unknown | Armor of Faith | Greater Shield of Lathander |
207 | Unknown | Unknown | Beltyn's Burning Blood |
208 | Unknown | Unknown | Shroud of Flame |
209 | Unknown | Unknown | Antimagic Shell |
210 | Unknown | Unknown | Flaming Fists |
211 | Unknown | Unknown | Frozen Fist |
212 | Unknown | Unknown | Circle of Bones |
213 | Unknown | Unknown | Armor of Faith |
0 – 190
are drawn directly from "STATES.BAM"
from sequences 65 – 255
, but can be overridden in STATDESC.2DA. Additional values must be added to STATDESC.2DA.
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
Button
field. The resource field acts as a matching key to the resource field of the Enable Button, allowing separate enable/disable reasons.
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
- 10 ⟶ Bard Song Button (EE only)
- 11 ⟶ Second Quick Item Button
- 12 ⟶ Third Quick Item Button
- 13 ⟶ Innate Ability Button
- 14 ⟶ Find Traps Button
- 15 ⟶ Inventory Button (EE only)
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
resource
key.
Learning is successful when
1D100 <= the INT-dependent LEARN_SPELL value
in INTMOD.2DA.
The
LEARN_SPELL
value is modified for mage specialists, with +15
for same school spells, and -15
for non-same school spells.
Wizard
spell type uses INTMOD.2DA. OtherSpell type
s automatically succeed, but report failure.Wizard
spell type can belevel
1–9
if learned.Priest
spell type can belevel
1–7
if learned.- Other
Spell type
s can belevel
1–32767
if learned.
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
resource
key.
BG2 | TOB | All EE games | BG:EE | BG:SoD | BG2:EE |
---|---|---|---|---|---|
BISLOGO | INTRO | LOGO – WotC logo | DEATHAND – Death | SODCIN01 – Siege of Dragonspear Introduction | NITEDAY – Sunrise |
BWDRAGON | MANAFORG | INTRO – Baldur's Gate: Enhanced Edition Introduction | SODCIN02 – Boarskyr Bridge | DAYNITE – Sunset | |
DAYNITE | MELISSAN | REST – Resting Outside | SODCIN03 – Murder | DEATHAND – Death | |
DEATHAND | OUTRO | RESTDUNG – Resting in Dungeon | SODCIN05 – Epilogue | INTRO15F – Shadows of Amn Intro | |
END15FPS | SARADUSH | RESTINN – Resting at Inn | FLYTHR01 – Asylum | ||
ENDCRDIT | POCKETZZ | BGENTER – Entering Baldur's Gate | FLYTHR02 – Underdark | ||
FLYTHR01 | FRARMINN – Friendly Arm Inn | FLYTHR03 – Suldanessellar | |||
FLYTHR02 | NASHKELL – Nashkell | FLYTHR04 – Hell | |||
FLYTHR03 | CAMP – Bandit Camp | INTRO – Throne of Bhaal Intro | |||
FLYTHR04 | MINEFLOD – Flooding Cloakwood Mines | POCKETZZ – Pocket Plane Rest | |||
INTRO15F | ELDRCITY – Undercity | SARADUSH – Saradush Flythrough | |||
NITEDAY | ENDMOVIE – Epilogue | MANAFORG – Mana Forge Flythrough | |||
RESTCAMP | ENDCRDIT – Credits | MELISSAN – Melissan's Demise | |||
RESTDUNG | WRECK – Wrecked Ship (Werewolf Island) | OUTRO – Closing the Book | |||
RESTINN | BLACKPIT – The Black Pits Introduction | HEXXATDR – Dragomyr's Crypt (Hexxat) | |||
WOTC | DORNGORG – Resurrection Gorge (Dorn) | ||||
DORNTREE – Ritual Circle (Dorn) | |||||
NEERAES – Town Bell (Neera) | |||||
RASAADMI – Sharran (Rasaad) | |||||
RASAADTE – Temple (Rasaad) |
Parameter #1: Irrelevant
Parameter #2: Mode
Known values for
Mode
are:
- 0 ⟶ Default overlay, "SANCTRY.BAM"
- 1 ⟶ Custom overlay, Resource field: Animation file (VVC or BAM)
This effect sets SANCTUARY to
1
.
0
(zero).
Parameter #1: Irrelevant
Parameter #2: Mode
Known values for
Mode
are:
- 0 ⟶ Default overlay, "SPENTACI.BAM"
- 1 ⟶ Custom overlay, Resource field: Animation file (VVC or BAM)
This effect sets ENTANGLE to
1
.
0
.
Parameter #1: Irrelevant
Parameter #2: Mode
Known values for
Mode
are:
- 0 ⟶ Default overlay, "MINORGLB.BAM"
- 1 ⟶ Custom overlay, Resource field: Animation file (VVC or BAM)
This effect sets MINORGLOBE to
1
.
Parameter #1: Irrelevant
Parameter #2: Mode
Known values for
Mode
are:
- 0 ⟶ Default overlay, "SPSHIELD.BAM"
- 1 ⟶ Custom overlay, Resource field: Animation file (VVC or BAM)
This effect sets SHIELDGLOBE to
1
.
0
(zero).
Parameter #1: Irrelevant
Parameter #2: Mode
Known values for
Mode
are:
- 0 ⟶ Default overlay, "WEBENTD.BAM"
- 1 ⟶ Custom overlay, Resource field: Animation file (VVC or BAM)
This effect sets HELD and WEB to
1
. It also sets the STATE_HELPLESS flag.
0
(zero).
Parameter #1: Irrelevant
Parameter #2: Mode
Known values for
Mode
are:
- 0 ⟶ Default overlay, "GREASED.BAM"
- 1 ⟶ Custom overlay, Resource field: Animation file (VVC or BAM)
This effect sets 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
In particular, it only removes opcode #126 effects using
param2 = 1 (Set value)
, if the creature's current movement rate is less than the default movement rate for its current animation (Haste/Slow are not factored in this).
Increment
or Set % Value
effects, nor any using the alternate movement rate opcode, opcode #176.
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
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
The effect modifies RESISTMAGIC.
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
Icon
field from being displayed.
All values are drawn directly from "STATES.BAM" in the "GUIBam.bif" starting at sequence
65
.
Known values for
Icon
are: see opcode #142.
param2
value. Cannot block portrait icons generated by any other mechanic.
param2
value.
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
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
resource
key.
Known Sound Effects are:
- EFF_E01 ⟶ Expire Illusionary Spell
- EFF_E02 ⟶ Expire Abjuration Spell
- EFF_E03 ⟶ Expire Conjuration Spell
- EFF_E04 ⟶ Expire Divination Spell
- EFF_E05 ⟶ Expire Enchantment Spell
- EFF_E06 ⟶ Expire Invocation Spell
- EFF_E07 ⟶ Expire Necromancy Spell
- EFF_E08 ⟶ Expire Alteration Spell
- EFF_M02 ⟶ Wizard Abjuration Spell Effect
- EFF_M03 ⟶ Wizard Conjuration Spell Effect
- EFF_M04 ⟶ Wizard Divination Spell Effect
- EFF_M05 ⟶ Wizard Enchantment Spell Effect
- EFF_M07 ⟶ Wizard Necromancy Spell Effect
- EFF_M08 ⟶ Wizard Alteration Spell Effect
- EFF_M09 ⟶ Dimension Door
- EFF_M10 ⟶ Dispel, Expire Illusionary Spell Effect
- EFF_M11A ⟶ Expire Protection from Petrification
- EFF_M11B ⟶ Expire Protection from Normal Missiles
- EFF_M11C ⟶ Protection from Normal Missiles
- EFF_M12A ⟶ Minor Globe Spell Effect
- EFF_M12B ⟶ Expire Minor Globe Spell Effect
- EFF_M13 ⟶ Monster Summoning
- EFF_M15 ⟶ Wizard Hold Person/Undead/Monster
- EFF_M16 ⟶ Confusion Spell Effect
- EFF_M18D ⟶ Melf's Acid Arrow
- EFF_M20 ⟶ Melf's Minute Meteors Impact
- EFF_M20 ⟶ Fireball Impact
- EFF_M26 ⟶ Animate Dead
- EFF_M28 ⟶ Haste
- EFF_M29 ⟶ Slow
- EFF_M31A ⟶ Grease Area Effect Duration
- EFF_M31B ⟶ Grease Start Area Effect
- EFF_M31C ⟶ Grease Affect Creature
- EFF_M32 ⟶ Blur
- EFF_M33 ⟶ Wizard Illusionary Spell Effect
- EFF_M34 ⟶ Ice Storm
- EFF_M35 ⟶ Tree of Life Parasite Destruction
- EFF_M36 ⟶ Viekang Teleport
- EFF_M36A ⟶ Skull Trap (untriggered)
- EFF_M36B ⟶ Skull Trap shatter
- EFF_M38 ⟶ Teleport Without Error
- EFF_M41 ⟶ Disintegrate dust
- EFF_M38 ⟶ ic Armor
- EFF_M52 ⟶ Protection from Acid/Cold/Electricity/Fire
- EFF_M53 ⟶ Spell Protection Removal
- EFF_M55 ⟶ Weapon Protection Effect (e.g. Mantle, etc.)
- EFF_M58 ⟶ Melf's Minute Meteors creation
- EFF_M59 ⟶ Fire
- EFF_M60 ⟶ Stoneskin
- EFF_M61 ⟶ Polymorph/Shapeshift
- EFF_M68 ⟶ Melf's Acid Arrow Impact
- EFF_M69 ⟶ Improved Alacrity/Use Any Item
- EFF_M70 ⟶ Cacofiend, Gate, Summon Fiend
- EFF_M71 ⟶ Power Word: Blind, Kill, Silence, Sleep, Stun
- EFF_M71B ⟶ Wizard Conjure Elemental Mental Combat
- EFF_M71C ⟶ Wizard Conjure Elemental Mental Combat (Won)
- EFF_M71D ⟶ Wizard Conjure Elemental Mental Combat (Lost)
- EFF_M73 ⟶ Summon Hakeashar, Nishruu
- EFF_M74 ⟶ Imprisonment, Maze 1
- EFF_M74B ⟶ Imprisonment, Maze 2
- EFF_M76 ⟶ True Sight/Seeing
- EFF_M77 ⟶ Wizard Eye
- EFF_M79 ⟶ Spook
- EFF_M80 ⟶ Mislead, Project Image, Simulacrum
- EFF_M82 ⟶ Emotion, Greater Malison, Resist Magic
- EFF_M86 ⟶ Contingency & Sequencer -type spells
- EFF_M87 ⟶ Wizard Rapture of the Father
- EFF_M89 ⟶ Wail of the Banshee
- EFF_M90 ⟶ Timestop (Start)
- EFF_M91 ⟶ Timestop (Expire)
- EFF_M92 ⟶ Mirror Image/Priest Illusionary Spell Effect
- EFF_M108 ⟶ Dragon's Breath
- EFF_M110 ⟶ Bigby's Hand Spells
- EFF_P01 ⟶ Priest Abjuration Spell Effect
- EFF_P02 ⟶ Priest Conjuration Spell Effect
- EFF_P03 ⟶ Priest Divination Spell Effect
- EFF_P04 ⟶ Priest Enchantment Spell Effect
- EFF_P05 ⟶ Priest Invocation Spell Effect
- EFF_P06 ⟶ Priest Necromancy Spell Effect
- EFF_P07 ⟶ Priest Alteration Spell Effect
- EFF_P08 ⟶ Animal Summoning
- EFF_P11 ⟶ Hold Animal/Person (Priest)
- EFF_P12 ⟶ Protection from Evil/Magic Energy/The Elements/Energy
- EFF_P13 ⟶ Miscast Magic
- EFF_P14 ⟶ ic Vitriolic Sphere
- EFF_P15 ⟶ ic Recitation
- EFF_P16 ⟶ Flame Strike
- EFF_P18 ⟶ Raise Dead
- EFF_P19 ⟶ Call Lightning
- EFF_P21A ⟶ Sanctuary Start
- EFF_P21B ⟶ Sanctuary Duration
- EFF_P21C ⟶ Sanctuary Expire
- EFF_P22A ⟶ Glyph of Warding non-triggered
- EFF_P22B ⟶ Glyph of Warding Shatter
- EFF_P24 ⟶ BG1 Armor/Shield
- EFF_P25 ⟶ Restoration (Lesser, Greater) casting completion
- EFF_P40 ⟶ Free Action
- EFF_P43 ⟶ Cloak of Fear start/Nature's Beauty
- EFF_P51 ⟶ Remove Fear
- EFF_P54 ⟶ Shillelagh, Spiritual Hammer
- EFF_P55 ⟶ Silence 15' radius
- EFF_P56 ⟶ Barkskin
- EFF_P60 ⟶ Aid
- EFF_P61 ⟶ Ironskins
- EFF_P64A ⟶ Creature Summoning Flash
- EFF_P65 ⟶ Creature Summoning Circle
- EFF_P66 ⟶ Call Woodland Beings
- EFF_P69 ⟶ Unholy Word
- EFF_P70 ⟶ Holy Word
- EFF_P72 ⟶ Command Word
- EFF_P73 ⟶ Charm/Domination
- EFF_P76 ⟶ Flameblade
- EFF_P77 ⟶ Spiritual Hammer Hit
- EFF_P80 ⟶ Blade Barrier Creation
- EFF_P83 ⟶ Bolt of Glory
- EFF_P89 ⟶ Restoration (Greater, Lesser)
- EFF_P90 ⟶ Regeneration
- EFF_P92 ⟶ Earthquake
- EFF_P93 ⟶ Cause Wounds
- EFF_P97 ⟶ Armor of Faith wings
- EFF_P115 ⟶ Implosion
- EFF_P116 ⟶ Conjure Fallen Deva/Planetar
- EFF_P117 ⟶ Conjure Deva/Planetar
Parameter #1: IDS Entry
Parameter #2: IDS File
IDS Entry
field, in the specified IDS File
. The affected creature becomes immobile and its AI scripts stop running.
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)
This effect sets HELD to
1
. It also sets the STATE_HELPLESS flag.
STRREF_EFFECT_HOLD
in the combat log.
It even overrides the entries in EFFTEXT.2DA.
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
Special: Statistic Modifier
IDS Entry
field in the specified IDS File
.
The actual modifier value is placed in the
Parameter3
field in an external effect.
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)
- It will affect all attacks, not just the weapon it's on, which would be incorrect when dual-wielding.
- Multiple opcode #178 effects only allow additional targeting, they do not stack their THAC0 bonus.
Parameter #1: IDS Entry
Parameter #2: IDS File
Special: Statistic Modifier
IDS Entry
field in the specified IDS File
. The actual modifier value is placed in the Parameter3
field in an external EFF – dice values are ignored.
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)
- It will affect all attacks, not just the weapon it's on, which would be incorrect when dual-wielding.
- For two-handed/ranged weapons, it can be ideal if a base weapon damage bonus is desired.
- Damage is multiplied by critical hits (and maybe backstabs).
- Multiple opcode #179 effects only allow additional targeting, they do not stack their damage bonus.
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: Item Type
Parameter #2: Restriction
Special: Description note
Item Type
field for the purpose specified by the Restriction
field.
Known values for
Restriction
are:
- 0 ⟶ Equip
- 1 ⟶ Use
The message defined in
Description note
will be displayed whenever this effect is triggered.
Parameter #1: Unused
Parameter #2: Unused
This opcode is supposed to apply the EFF
file specified in resource2
if the target has the ITM
file specified in resource
equipped.
- Since the
EFF
resource is specified inresource2
, this opcode must be used inV2
(external) effects.
-
The internal function it uses to find the item,
CGameSprite::FindItemPersonal()
, treats the found slot‐index as a boolean, so it always applies theEFF
unless theITM
is inSLOT_AMULET
.- Basically, since all slot indices but
SLOT_AMULET
are strictly greater than0
, the function will almost always return true, making the opcode useless.
- Basically, since all slot indices but
- Additionally,
CGameSprite::FindItemPersonal()
doesn't considerSLOT_MISC19
(the Magical Weapon slot, used by opcode #111) as an "equipped" slot (this is probably intentional though...)
EFF
files applied by this opcode bypass / ignore opcode #101.
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
IDS Entry
field, in the specified IDS File
. The affected creature becomes immobile and its AI scripts stop running.
This effect is not removed by opcode #162.
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)
This effect sets HELD to
1
. It also sets the STATE_HELPLESS flag.
STRREF_EFFECT_HOLD
in the combat log.
It even overrides the entries in EFFTEXT.2DA.
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
Variable Name
field to the value specified by the Value
field.
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: Type
Casting Time
of spells by the value specified by the Speed Modifier
field. This effect is cummulative.
This effect sets MENTALSPEED to
Speed Modifier
. Known value for Type
are:
-
0 ⟶ Increment by
Speed Modifier
- Positive values decrease the casting time, negative values increase the casting time.
-
1 ⟶ Set casting time of every spell to
Speed Modifier
- Negative values set casting time to
0
- Negative values set casting time to
-
2 ⟶ Set casting time of spells with casting time higher than
Speed Modifier
toSpeed Modifier
- Other spells are unaffected.
Type=2
was tested only for BGEE and might not work on non-EE.
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
.
Parameter #1: Modifier
Parameter #2: Type
Modifier
field as a bonus to casting spell levels, of a type specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Mage
- 1 ⟶ Cleric
This effect modifies CASTINGLEVELBONUSMAGE or CASTINGLEVELBONUSCLERIC depending on
Type
.
Parameter #1: Irrelevant
Parameter #2: Upgrade Marker
The Familiar summoned is based on the alignment of the Protagonist and values stored in the GAM file (non-EE games) or FAMILIAR.2DA (EE games).
On non-EE games, the
Upgrade Marker
field is used internally to indicate the familiar has received the ToB upgrades.
- On EE games, if there is an
Upgrade Marker
, it isn't on opcode #192 (needs researching...).
On non-EE games, default creatures for familiars are:
- Lawful Good ⟶ Pseudo Dragon (
FAMPSD
) - Lawful Neutral ⟶ Ferret (
FAMFER
) - Lawful Evil ⟶ Imp (
FAMIMP
) - Neutral Good ⟶ Pseudo Dragon (
FAMPSD
) - True Neutral ⟶ Rabbit (
FAMRAB
) - Neutral Evil ⟶ Dust Mephit (
FAMDUST
) - Chaotic Good ⟶ Fairy Dragon (
FAMFAIR
) - Chaotic Neutral ⟶ Cat (
FAMCAT
) - Chaotic Evil ⟶ Quasit (
FAMQUAS
)
<CHARNAME>
is game-specific. IWDEE has no such restriction, but still only allows a single character to have a familiar at a time. It’s unclear if it’s a specific flag in the GAM file or if it’s engine-side.
Parameter #1: Irrelevant
Parameter #2: Stat Value
The effect modifies SEEINVISIBLE 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: Irrelevant
Parameter #2: Stat Value
The effect modifies IGNOREDIALOGPAUSE 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: Max HP Modifier
Parameter #2: Unused
Parameter #3: Master ID (owner)
Master ID
:
- Floats Text String STRREF_GUI_MIXED_FAMILIARDIED.
- Opcode #10:
Statistic Modifier = -1
,Type = 0
,Timing Mode 1
. -
Opcode #18:
Statistic Modifier = Max HP Modifier
,Type = 0
,Timing Mode 1
.- Opcode #192 sets
Max HP Modifier
to-½ the familiar's Max HP
- Opcode #192 sets
-
Opcode #12:
Damage Amount = 'this creature's Max HP'
,Type = MAGIC
,Timing Mode 1
,Save Type = Bypass Mirror Image
.-
Normally, Maximum HP of
Master ID
is lowered byMax HP Modifier
, and Current HP is lowered by twiceMax HP Modifier
(sinceMax Hp Modifier = ½ familiar's Max HP
).
It won't be if the familiar's Max HP is increased (or decreased) permanently after it is summoned (temporary changes to Max HP will be removed by death before it deals damage, and so they won't affect the amount).
Permanent changes to the familiar's Constitution, enough to alter the bonus HP it grants, will have similar results.
-
Normally, Maximum HP of
Master ID
are:
- -1 ⟶ Not Party Member
- 0 ⟶ Player1
- 1 ⟶ Player2
- 2 ⟶ Player3
- 3 ⟶ Player4
- 4 ⟶ Player5
- 5 ⟶ Player6
Timing Mode 9
, otherwise it will be removed (by death) before it fully triggers.
Parameter2
is possibly intended to be Damage Type
. It uses the same format as opcode #12 (opcode #192 sets it to 0x400000 – MAGIC
), but changing it has no effect.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Timing Mode
of 9
.
Parameter #1: Irrelevant
Parameter #2: Impact Projectile
Projectile
is equal to the one specified by the Impact Projectile
field back to the attacker.
V1 effects inherit their Projectile
from the Extended Header (SPL / ITM), V2 effects specify it manually.
Values for Impact Projectile
are taken from PROJECTL.IDS.
- Area-Effect projectiles only impact through their explosion and/or secondary projectiles, so they are what must be specified in
Impact Projectile
. - Opcode #333, opcode #326 and opcode #146
*p2=2
are NOT properly reflected by this opcode – the spell specified by theirresource
key will affect the original target (as if it wasn't reflected).
-
CANNOT reflect effects of Secondary Type
MagicAttack
.- V1 effects inherit their Secondary Type from the Header(SPL) / Extended Header(ITM), V2 effects specify it manually.
-
CAN reflect 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 reflect effects through AoE projectiles.
- CANNOT reflect effects from self.
- Maintains animation
SPTURNI2
on the target, can be suppressed by opcode #291.
empty/zero
to avoid interacting with this opcode.
Parameter #1: Irrelevant
Parameter #2: Opcode
Opcode
field.
*p2=2
are NOT properly reflected by this opcode – the spell specified by their resource
key will affect the original target (as if it wasn't reflected).
-
CANNOT reflect effects of Secondary Type
MagicAttack
.- V1 effects inherit their Secondary Type from the Header(SPL) / Extended Header(ITM), V2 effects specify it manually.
-
CAN reflect 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 reflect effects through AoE projectiles.
- CANNOT block effects from self.
- Maintains portrait icon
Spell Deflection
on the target (this is likely a bug). - Maintains animation
SPTURNI2
on the target, can be suppressed by opcode #291.
empty/zero
to avoid interacting with this opcode.
Parameter #1: Power Level
Parameter #2: Irrelevant
Power
attribute is equal to the one specified by the Power Level
field (range: 0 – 9
).
*p2=2
are NOT properly reflected by this opcode – the spell specified by their resource
key will affect the original target (as if it wasn't reflected).
-
CANNOT block effects of Secondary Type
MagicAttack
.- V1 effects inherit their Secondary Type from the Header(SPL) / Extended Header(ITM), V2 effects specify it manually.
-
CANNOT 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 cannot reflect effects through AoE projectiles.
- CANNOT block effects from self.
- Maintains portrait icon
Spell Deflection
on the target (this is likely a bug).
empty/zero
to avoid interacting with this opcode.
Parameter #1: Total Amount
Parameter #2: Power Level
Total Amount
field) whose Power
attribute is equal to the one specified by the Power Level
field (range: 0 – 9
).
The Power
level of the first effect to trigger any instance of this opcode's reflection will determine how much this opcode's Total Amount
is decremented. Every instance of this opcode on the creature will be decremented by this amount.
- Example – Minor Spell Turning applies opcode #200 4 times, with
parameter2 = (1, 2, 3, and 4)
, andparameter1
based on caster level. If any of them trigger, all of them will be decremented by the same amount. It doesn't matter that they come from the same spell. If you cast both Spell Turning and Minor Spell Turning, all instances of opcode #200 from both spells would be decremented, even if the spell(effect) triggering it was level 5–9 (above what Minor Spell Turning can reflect).
On EE games, resource
field ⟶ Spell cast when this effect self-terminates, default = Parent + "B"
.
If Caster and Target are both affected by this opcode, the spell from Caster will reflect off Target, but not reflect back off Caster. Previously, whoever had more reflection charges would end up victorious, now the initial target always ends up victorious.
-
CANNOT block effects of Secondary Type
MagicAttack
.- V1 effects inherit their Secondary Type from the Header(SPL) / Extended Header(ITM), V2 effects specify it manually.
-
CANNOT 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 cannot reflect effects through AoE projectiles.
- CANNOT block effects from self.
- Maintains portrait icon
Spell Turning
on the target. - Maintains animation
SPTURNI2
on the target, can be suppressed by opcode #291.
empty/zero
to avoid interacting with this opcode.
Parameter #1: Total Amount
Parameter #2: Power Level
Total Amount
field) whose Power
attribute is equal to the one specified by the Power Level
field (range: 0 – 9
).
The Power
level of the first effect to trigger any instance of this opcode's deflection will determine how much this opcode's Total Amount
is decremented. Every instance of this opcode on the creature will be decremented by this amount.
On EE games, resource
field ⟶ Spell cast when this effect self-terminates, default = Parent + "B"
.
-
CANNOT block effects of Secondary Type
MagicAttack
.- V1 effects inherit their Secondary Type from the Header(SPL) / Extended Header(ITM), V2 effects specify it manually.
-
CANNOT 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 cannot deflect effects through AoE projectiles.
- CANNOT block effects from self.
- Maintains portrait icon
Spell Deflection
on the target. - Maintains animation
SPMAGGLO
on the target, can be suppressed by opcode #291.
empty/zero
to avoid interacting with this opcode.
Parameter #1: Irrelevant
Parameter #2: School
School
field.
V1 effects inherit their Primary Type (School)
from the Header(SPL) / Extended Header(ITM), V2 effects specify it manually.
School
are:
- 0 ⟶ NONE
- 1 ⟶ ABJURATION
- 2 ⟶ CONJURATION
- 3 ⟶ DIVINATION
- 4 ⟶ ENCHANTMENT
- 5 ⟶ ILLUSION
- 6 ⟶ EVOCATION
- 7 ⟶ NECROMANCY
- 8 ⟶ ALTERATION
- 9 ⟶ GENERALIST
- 10 ⟶ WILDMAGE
*p2=2
are NOT properly reflected by this opcode – the spell specified by their resource
key will affect the original target (as if it wasn't reflected).
-
CANNOT reflect effects of Secondary Type
MagicAttack
.- V1 effects inherit their Secondary Type from the Header(SPL) / Extended Header(ITM), V2 effects specify it manually.
-
CAN reflect 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 reflect effects through AoE projectiles.
- CANNOT reflect effects from self.
- Maintains portrait icon
Spell Deflection
on the target (this is likely a bug). - Maintains animation
SPTURNI2
on the target, can be suppressed by opcode #291.
empty/zero
to avoid interacting with this opcode.
Parameter #1: Irrelevant
Parameter #2: Secondary Type
Secondary Type
field.
V1 effects inherit their Secondary Type
from the Header(SPL) / Extended Header(ITM), V2 effects specify it manually.
Secondary Type
are:
- 0 ⟶ NONE
- 1 ⟶ SPELLPROTECTIONS
- 2 ⟶ SPECIFICPROTECTIONS
- 3 ⟶ ILLUSIONARYPROTECTIONS
- 4 ⟶ MAGICATTACK
- 5 ⟶ DIVINATIONATTACK
- 6 ⟶ CONJURATION
- 7 ⟶ COMBATPROTECTIONS
- 8 ⟶ CONTINGENCY
- 9 ⟶ BATTLEGROUND
- 10 ⟶ OFFENSIVEDAMAGE
- 11 ⟶ DISABLING
- 12 ⟶ COMBINATION
- 13 ⟶ NON-COMBAT
*p2=2
are NOT properly reflected by this opcode – the spell specified by their resource
key will affect the original target (as if it wasn't reflected).
-
CANNOT reflect effects of Secondary Type
MagicAttack
. -
CAN reflect 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 reflect effects through AoE projectiles.
- CANNOT reflect effects from self.
- Maintains portrait icon
Spell Deflection
on the target (this is likely a bug). - Maintains animation
SPTURNI2
on the target, can be suppressed by opcode #291.
empty/zero
to avoid interacting with this opcode.
Parameter #1: Irrelevant
Parameter #2: School
School
field.
V1 effects inherit their Primary Type (School)
from the Header(SPL) / Extended Header(ITM), V2 effects specify it manually.
School
are:
- 0 ⟶ NONE
- 1 ⟶ ABJURATION
- 2 ⟶ CONJURATION
- 3 ⟶ DIVINATION
- 4 ⟶ ENCHANTMENT
- 5 ⟶ ILLUSION
- 6 ⟶ EVOCATION
- 7 ⟶ NECROMANCY
- 8 ⟶ ALTERATION
- 9 ⟶ GENERALIST
- 10 ⟶ WILDMAGE
-
CANNOT 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 effects from self.
- Maintains animation
SPMAGGLO
on the target, can be suppressed by opcode #291.
empty/zero
to avoid interacting with this opcode.
Parameter #1: Irrelevant
Parameter #2: Secondary Type
Secondary Type
field.
V1 effects inherit their Secondary Type
from the Header(SPL) / Extended Header(ITM), V2 effects specify it manually.
Secondary Type
are:
- 0 ⟶ NONE
- 1 ⟶ SPELLPROTECTIONS
- 2 ⟶ SPECIFICPROTECTIONS
- 3 ⟶ ILLUSIONARYPROTECTIONS
- 4 ⟶ MAGICATTACK
- 5 ⟶ DIVINATIONATTACK
- 6 ⟶ CONJURATION
- 7 ⟶ COMBATPROTECTIONS
- 8 ⟶ CONTINGENCY
- 9 ⟶ BATTLEGROUND
- 10 ⟶ OFFENSIVEDAMAGE
- 11 ⟶ DISABLING
- 12 ⟶ COMBINATION
- 13 ⟶ NON-COMBAT
- CANNOT block effects of Secondary Type
MagicAttack
. -
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 effects from self.
- Maintains animation
SPMAGGLO
on the target, can be suppressed by opcode #291.
empty/zero
to avoid interacting with this opcode.
Parameter #1: String Reference
Parameter #2: Irrelevant
resource
key. The strref specified by the String Reference
field is displayed when the spell is absorbed.
String Reference
is bound by
// NOTE: strrefs [0xF00000—0xF00537] index into enginest.2da, with the row being "strref - 0xF00000" if (!pEffect->m_sourceRes.IsValid() || (pImmunitySpell->m_error != 0xf00074 && pImmunitySpell->m_error != 0xf00080)) { uint nNewFeedback = 0xffffffff; if (pImmunitySpell->m_error == 0xf00074) { nNewFeedback = 0xf00073; } pImmunitySpell->m_error = nNewFeedback; }
String Reference
has to be 0xF00074
(STRREF_FEEDBACK_EVADE_RESOURCE
) or 0xF00080
(STRREF_FEEDBACK_IMMUNE_RESOURCE
) for the engine to display it.
NOTE: the engine only allows
0xF00074
/ 0xF00080
— it doesn’t care that STRREF_FEEDBACK_IMMUNE_RESOURCE
(99389
on BG2:EE) is what 0xF00080
eventually resolves to, it’s not 0xF00080
. opcode #206’s String Reference
should look like this in Near Infinity (right click ⇒ Edit as hex number):
In order to do so, both the
Resource
field of opcode #206 and the Parent Resource
field of the EFF file must be the same string (max. 8 character long); moreover, you must set the Resource Type
field of the EFF file to Spell
.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
resource
key.
*p2=2
are NOT properly reflected by this opcode – the spell specified by their resource
key will affect the original target (as if it wasn't reflected).
- Similar to opcode #206, this can only reflect EFF files if their
Parent Type
is set toSpell
. -
CANNOT reflect effects of Secondary Type
MagicAttack
.- V1 effects inherit their Secondary Type from the Header(SPL) / Extended Header(ITM), V2 effects specify it manually.
-
CAN reflect 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 reflect effects through AoE projectiles.
- CANNOT reflect effects from self.
- Maintains portrait icon
Spell Deflection
on the target (this is likely a bug). - Maintains animation
SPTURNI2
on the target, can be suppressed by opcode #291.
empty/zero
to avoid interacting with this opcode.
Parameter #1: Minimum Value
Parameter #2: Irrelevant
Minimum Value
field.
This effect sets MINHITPOINTS to
Minimum Value
.
Minimum Value
values65536
to98303
will set an only allowed hit point value (HP can't be higher or lower), each representing'Minimum Value' value - 65536
, so0
to32767
.- Values
32768
to65535
do this as well, but all result in negative HP amounts, so not usable, as they will result in the same bugged non-death as opcode #17 reducing HP to 0. - All values higher than
98303
just repeat loop over from-32768
to32767
. - Any positive value will also grant the creature immunity to directly applied opcode #13 effects. Those applied indirectly will still kill the creature, notably by opcodes #55, #134, #151, #209, and #238.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
More specifically, it functions by applying opcode #13 (
Death Type = 4 // Normal Death
).
7EYES.2DA
.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
The
duration
of the effect is:
- 1 to 29 HP ⟶ stunned for 4d4 rounds
- 30 to 59 HP ⟶ stunned for 2d4 rounds
- 60 to 89 HP ⟶ stunned for 1d4 rounds
~Stunned~
string display.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
The field at
0xcc
can be used to prevent death related effects (e.g. removal from party) running on the targetted creature(s) – not verified on EE games (it is very likely that this was replaced by giving Maze a specified duration
option).
Aside from kicking from the party, or granting experience for a kill, the targeted creature(s) is suspended from the area:
- They can not be targeted by Area-Effect projectiles, only with effect targets
Party
orEveryone
or similar. - They are not detectable by any script triggers, though they may still be targeted with actions directly by scriptname or partyslot.
-
Excluding Opcodes #211/#212/#213:
- All other effects on the creature are suppressed until this effect is removed.
-
Excluding opcode #212:
- Delayed effects that would trigger will be further delayed until this effect is removed.
- Effects that would expire will not expire until this effect is removed.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Removes Imprisonment and Maze, and EFF files using those opcodes.
Parameter #1: Irrelevant
Parameter #2: Type
Special: Icon
Suspends the creature in the same manner as Imprisonment, disabling Inventory and removing all active Portrait Icons (except its own), but without kicking or granting exp. It actually removes itself with a delayed opcode #212 effect (that it also applies), not by expiring. Blocking the opcode #212 effect will prevent maze from ending.
Known values for
Type
are:
- 0 ⟶ Use intelligence based duration (via INTMOD.2DA)
- 1 ⟶ Use
Duration
field
The duration of the effect is set in INTMOD.2DA, default values are:
- 0 to 2 int ⟶ 20d4 rounds
- 3 to 5 int ⟶ 10d4 rounds
- 6 to 8 int ⟶ 5d4 rounds
- 9 to 11 int ⟶ 4d4 rounds
- 12 to 14 int ⟶ 3d4 rounds
- 15 to 17 int ⟶ 2d4 rounds
- 18+ int ⟶ 1d4 rounds
Icon
defines the index from STATDESC.2DA for custom portrait icons (EE only). Default value is Maze
.
Parameter #1: Irrelevant
Parameter #2: Type
resource
key to display multiple spell options, based on the Type
field.
Known values for
Type
are:
- 0 ⟶ Use
resource
2da list - 1 ⟶ Known
mage
spells, except Identify ("SPWI110"
), and Nahal's Reckless Dweomer ("SPWI124"
) - 2 ⟶ Known
mage
spells, except the above, and those with spell flagIgnore Wild Surge
Type
is 0
, the 2da file must follow the following format:2DA V1.0 **** ResRef Type name RESREF Casting Type name RESREF Casting Type
name
can be any string of characters/numbers without any whitespace, and does not need to be unique. RESREF
is the filename of the spell without its .SPL
extension.As far as
Casting Type
is concerned:
- 0/1 ⟶ Spell completely mimics the mechanics of casting a spell from a quick-cast slot (including requiring and expending a memorization of the spell)
- 2 ⟶ It either does nothing or crashes, depending on the spell.
- 3 ⟶ Ignores Spells/Round rule, ignores memorization.
- 4 ⟶ Ignores Spells/Round rule, ignores memorization, spellcasting cannot be interrupted by damage, uses normal
casting speed
. - 5 ⟶ Ignores Spells/Round rule, cast instantly, even if the game is paused, can be cast without memorization, but will decrement memorization if exists.
Parameter #1: Undetermined
Parameter #2: Play where?
resource
key, in the style specified by the Play where?
value.
Known values for
Play where?
are:
- 0 ⟶ Play on target (not attached)
- 1 ⟶ Play on target (attached)
- 2 ⟶ Play on point
Known BAM files are:
- acidblob ⟶ Ankheg Spit
- aciddth ⟶ Acid Hit
- bloodcr ⟶ Blood Splash
- bloodl ⟶ Blood Splash (Large)
- bloodm ⟶ Blood Splash (Medium)
- bloods ⟶ Blood Splash (Small)
- burnhand ⟶ Burning Hands
- cgabjura ⟶ Casting Glow (Abjuration)
- cgaltera ⟶ Casting Glow (Alteration)
- cgconjur ⟶ Casting Glow (Conjuration)
- cgdivina ⟶ Casting Glow (Divination)
- cgenchan ⟶ Casting Glow (Enchantment)
- cgillusi ⟶ Casting Glow (Illusion)
- cginvoca ⟶ Casting Glow (Invocation)
- cgnecrom ⟶ Casting Glow (Necromancy)
- colrspry ⟶ Colour Spray
- explode ⟶ Crash
- fire ⟶ Crash
- firebrn ⟶ Small Dot of Fire
- flml ⟶ Bolt Of Flame (Large)
- flmm ⟶ Small Bolt Of Flame (Medium)
- flms ⟶ Tiny Bolt Of Flame (Small)
- flmstrk ⟶ BG Flame Strike
- glphwrdh ⟶ Glyph of Warding (Part)
- glphwrdt ⟶ Glyph of Warding (Full)
- greased ⟶ Blob Of Grease
- greaseh ⟶ Blob Of Grease
- grndglow ⟶ Grey round ground Explosion
- hlymite ⟶ Call Upon Holy Might
- magicstn ⟶ Magic Stone
- minorglb ⟶ Minor Globe of Invulnerability
- mmagich ⟶ Burst of Yellowish Magic (like Bolt Of Glory)
- sanctry ⟶ Sanctuary
- settrap ⟶ Spell Icon
- shacid ⟶ Acid Damage
- shair ⟶ Green mist rises from head to air above
- sharea ⟶ Exploding Yellow Ring above head
- shearth ⟶ Blue drops from chest drop on ground
- shglyph ⟶ Rubbish
- shskull ⟶ Rubbish
- shwater ⟶ Potion of Healing
- sklh ⟶ Skull trap (moving)
- sklt ⟶ Skull Trap (stationary)
- skybolt ⟶ Call Lightning
- spabjura ⟶ Four cornered blue magic joins in middle
- spagscho ⟶ Unexplainable
- spaltera ⟶ Coloured magic rising from ground (Like Teleport Field)
- spanisum ⟶ Opening Plant (find familiar)
- sparmour2 ⟶ Magic helm forms above target
- sparmouri ⟶ golden armour joins together at chest of caster (armour)
- sparmour ⟶ snowball like balls swirl around target
- spattck1 ⟶ Globe of magic (Like ruby ray of reversal)
- spattck2 ⟶ swirling small ball of magic (umber hulk confusion)
- spbaserd ⟶ Golden Light with white rays of light coming from middle
- spbasewt ⟶ Blue Light with white rays of light coming from middle
- spbdbur ⟶ Lime green blob of magic
- spbdburs ⟶ Direct Vertical Strike of greenish blue magic
- spbdimsp ⟶ Greenish burst of magic upon target
- spbehbla ⟶ Purplish magic swirling on target
- spbehray ⟶ Fire like blob
- spbhandi ⟶ Small ball of burning red fire
- spblbbtm ⟶ Blade Barrier (bottom half)
- spblbtop ⟶ Blade Barrier (Top Half)
- spbleshi ⟶ 3 Golden rays converging upon target
- spblood ⟶ Chunk of flesh when body explodes due to too much damage
- spboom ⟶ Mushroom like cloud of fire
- spbrnhnd ⟶ Burning Hands
- spburn ⟶ Tiny blob of fire
- spburns1 ⟶ Round fire
- spcagemz ⟶ Maze (Only top 2 grates)
- spcallli ⟶ Strike of Lightning (not lightning strike)
- spccmdsi ⟶ Purplish red burst of magic
- spccolde ⟶ Round of blue ice with a trail of smoke smashing on target
- spccoldl ⟶ Travelling round blue ice with a trail of smoke
- spccwoui ⟶ Burst of Bluish light bursting on target
- spchlgt1 ⟶ Chain Lightning
- spchlgt2 ⟶ Chain Lightning
- spchlgt3 ⟶ Chain Lightning
- spchchromi ⟶ Orb of Translucent bluish green magic
- spchrorb ⟶ Chromatic Orb
- spchunks ⟶ Ice Chunks (when target is frozen and smashed)
- spclcomp ⟶ Blue cloud of mist
- spclkfri ⟶ Blue Cloak forming on target (cloak of fear)
- spcloud1 ⟶ Blue Cloud of mist
- spcloud2 ⟶ A better Blue cloud of mist
- spcloud3 ⟶ Small cloud of blue mist
- spcloudi ⟶ Burst of orangey red magic
- spcmwoui ⟶ Blue magic on target increases then shrinks and disappears
- spcomend ⟶ Tentacle Whip
- spcomett ⟶ A Purple Comet
- spcomstt ⟶ A whip
- spconfus ⟶ Confusion a ring of intertwined birds
- spcontin ⟶ A large white star forming a book which blasts white light
- spcrtwpn ⟶ Yellow and white rays circle forming hammer and anvil
- spcspra2 ⟶ Coloured ball of magic
- spcspra3 ⟶ Larger more clearer ball of magic
- spcsprai ⟶ Same as last one
- spcswoui ⟶ Blast of greenish yellowey white magic
- spdeath3 ⟶ Rising spirit (Finger of Death)
- spdimdr1 ⟶ Bg open dimension door
- spdimdr2 ⟶ Bg opening dimension door
- spdimndr ⟶ Bg2 dimension door
- spdispma ⟶ Swirling balls of blue magic (dispel magic)
- spdivina ⟶ Five balls of blue magic separating very small
- spdusty2 ⟶ Disintegration dust
- spelltin ⟶ Rubbish green square
- spentaai ⟶ Green vine from ground
- spentaci ⟶ A swarm of green vines
- spentaxi ⟶ A swarm of vines that disappear after intertwining
- spfbsmal ⟶ White Ball of fire
- spfdeath ⟶ Rising Spirit (Finger of Death)
- spfdeth3 ⟶ Rising Spirit (Finger Of Death)
- spfearef ⟶ Face on ground (Horror)
- spfinodi ⟶ A dieing Rose
- spfire ⟶ Flame Damage
- spfirebl ⟶ Fireball
- spfirepl ⟶ Burst of fire in middle with a circle of white light leaving
- spfiresb ⟶ Fire Shield Blue
- spfiresr ⟶ Fire Shield Red
- spfiret ⟶ Small Ball of Fire
- spfiretr ⟶ Better Small Ball Of Fire
- spfirimp ⟶ Fire Damage
- spfirsdi ⟶ Burst of Flames
- spfirsed ⟶ Fire Seed
- spfladow ⟶ Flame Strike
- spflames ⟶ Burst of Flames
- spflast1 ⟶ Burst Of Flames (Different)
- spflast2 ⟶ Flame Strike (different)
- spfleshs ⟶ Swirling white rays (when Irenicus petrifies people)
- spflmarr ⟶ Flame Arrow (more real)
- spflmbld ⟶ Rising Sword
- spflmsti ⟶ Bottom half Of Icewind Dale Style Flame Strike
- spflsrin ⟶ Central flaming ball ejecting 2 rings of white light
- spflstri ⟶ Flamestrike with burning bright yellow at bottom
- spfracti ⟶ a chain breaking in half
- spfstrmi ⟶ Small meteor swarm
- spgenhla ⟶ Ray of bluish light with rays of yellow light (Holy Power)
- spgenhlb ⟶ Ray Above but forming (the one above forms and finishes)
- spgflsh1 ⟶ Burst of yellow red magic (when monsters unsummon)
- spglyphi ⟶ Travelling Coloured glyph of warding
- spglypti ⟶ Floating coloured glyph
- spgreaai ⟶ Purple oval of magic
- spgreaci ⟶ same oval of magic but still the one above forms and goes
- spgreaxi ⟶ Blob of purple goo exploding on target
- spgreorb ⟶ green Orb
- sphandat ⟶ A electrical looking hand appearing
- sphealin ⟶ Healing
- sphleft ⟶ left Half of Icewind style Heal
- sphlhi01 ⟶ left half of icewinds Heal
- sphlhi02 ⟶ Right half of icewinds heal
- sphlybls ⟶ Aid
- sphlysm2 ⟶ Lighter Ray of Holy Smite
- sphlysm3 ⟶ Darker ray of Holy Smite
- sphlysmt ⟶ Yellow ray of light striking target
- sphollyw ⟶ A swirl of blue magic forming then exploding into many doves
- spholmig ⟶ Already formed circle of magic with white rays shining out
- spholymt ⟶ Yellow ray with bluish mist on side vertically on target
- spholywd ⟶ Light blue ray of vertical energy with whitish mist on side
- sphorpuf ⟶ Yellowish puff of smoke
- sphorwil ⟶ Abi Dalzims horrid wilting
- sphright ⟶ Right hands side of Icewinds spell heal
- spicestm ⟶ Ice storm
- spillus ⟶ a ball of blue magic swirling
- spilusio ⟶ a ball of blue magic swirling
- spinsect ⟶ Black swarm of Insects
- spiplaai ⟶ Brown swarm of insects
- spiplari ⟶ Brown swarm of insects
- spiplaui ⟶ Forming swarm of brown insects
- splightb ⟶ Lightning Bolt
- spmagglo ⟶ Minor Spell Deflection
- spmagmis ⟶ Magic Missile
- spmetswa ⟶ Flaming ball of fire
- spmetswm ⟶ Meteor Swarm
- spmetswn ⟶ More Balls of Meteor swarm
- spmindat ⟶ The swirling ball above head when you are held
- spmirroi ⟶ A shining blue mirror
- spmonsum ⟶ Monster Summoning
- spnecro1 ⟶ Ring of circling reddish purplish magic
- spnpoisi ⟶ Icewinds style of cure disease
- spnwchrm ⟶ Green orbs rising from ground to head (charm)
- sppfirai ⟶ Produce Fire
- sppfirri ⟶ smaller burst of fire
- sppfirxi ⟶ larger burst of flame
- spplanar ⟶ Large yellow orb forming then shattering
- sppolymp ⟶ Polymorph
- spportal ⟶ Round portal forming
- sppowwrd ⟶ One of the red Power Word effects
- spprayri ⟶ Icewind Dales style of prayer
- spprism2 ⟶ swirling orb of colour
- spprism3 ⟶ swirling ball of colour
- spprismt ⟶ swirling ball of colour
- spproimg ⟶ Crack in ground forming some round circle
- spprotec ⟶ Protection from normal weapons
- spraised ⟶ animate dead
- spraisei ⟶ growing rose (raise dead)
- sprdrabu ⟶ Vertical strike of red magic
- sprdrae2 ⟶ burst of yellow fire like magic
- sprdraex ⟶ burst of yellow fire like magic
- sprdraim ⟶ puff of red smoke exploding on target in a ring
- sprdrasi ⟶ puff of red smoke formed and it stays formed
- spresuri ⟶ growing silver rose (resurrection)
- spring ⟶ grey travelling ray
- sprmpari ⟶ Icewind Style of remove paralysis
- sprotect ⟶ Protection from evil
- sprwra2i ⟶ A blue symbol on the ground with rays of blue rising from it
- sprwrati ⟶ green ray forming and bursting down on target
- spsarmour ⟶ Forming wings
- spschgi ⟶ Purple energy with a black ring around it swirling
- spscorch ⟶ Fire thing again (so many of these)
- spscoric ⟶ same as above
- spsdbur ⟶ A ray of misty grey magic vertically striking fast
- spsdimpa ⟶ Great sparks of white bursting
- spsdrbur ⟶ a ray of misty grey magic vertically striking
- spshadow ⟶ Nothing
- spshield ⟶ Prot normal missiles
- spshkimp ⟶ Electrical damage effect
- spskullt ⟶ red eyed skull with a trail of green smoke
- spsmkjet ⟶ nothing
- spsmold ⟶ nothing
- spsmpuff ⟶ white round puff of smoke disappearing
- spsnrayi ⟶ Sunray
- spsohopi ⟶ Symbol forming and ejecting a ray of magic (symbol hopeless)
- spspaini ⟶ Symbol of Pain
- spsparks ⟶ sparks
- spspeart ⟶ Bolt of Glory
- spspmaze ⟶ 4 lines forming a sharp cage of spears
- spstink ⟶ small puff of smoke rising from ground
- spstones ⟶ stoneskin
- spstrenh ⟶ Whiteray shooting down forming a puff of magic on target (lesser restoration)
- spstreni ⟶ Strength of One
- spsturni ⟶ Minor Spell Turning
- spsumgte ⟶ gate (ring of bones)
- spsummon ⟶ Call Woodland Beings
- spsunray ⟶ Larger sunray
- sptrapbb ⟶ Snare Trap
- sptrusee ⟶ Opening Eye (clairvoyance)
- spturni2 ⟶ Already formed spell turning
- spunhbl2 ⟶ unholy smite
- spunhbl3 ⟶ darker version of above
- spunhblt ⟶ Red bolt shooting
- spunholy ⟶ Am orange glow exploding into many doves
- spwi124a ⟶ Spell Icon
- spwi124b ⟶ Spell Icon
- spwi124c ⟶ Spell Icon
- spwirbla ⟶ Some ring forming a circle with other lines coming from it with blades arching up forming some cage
- spwrdfld ⟶ Teleport Field
- stnkcldd ⟶ Stinking Cloud
- stnkcldt ⟶ Travelling Ball of Stinking Cloud
- travel ⟶ An orb of swirling magic orb that shoots out to everyone
- trbloba ⟶ green blob forming and splatting on target
- trblobb ⟶ green blob forming and splatting on target
- trdartst ⟶ Shooting knife looking things
- trgooyaa ⟶ green blob forming and splatting on target
- trgooybb ⟶ green blob forming and splatting on target
- trspeart ⟶ Spear rising from ground striking target
- trventaa ⟶ Bottom part of opening vent
- trventbb ⟶ top part of opening vent which sprays out mist
- webbomb ⟶ A burst of webs
- webc ⟶ entangled in web
- webentd ⟶ Other version of web
- webenth ⟶ Entangling web
- webentt ⟶ Travelling ball of shining web
Parameter #1: Amount
Parameter #2: Irrelevant
Amount
field. Amount
can be positive or negative.In particular:
- Alters the targeted creature(s) Base THAC0, Saving Throws, Hit Points, and Spell Slots as appropriate for their new effective level.
- Thief skills are adjusted depending of the class and kit of the creature.
- Rangers, Shamans, and Bards have their value adjusted as appropriate for their new effective level based on files SKILLRNG.2DA, SKILLSHM.2DA, and SKILLBRD.2DA, respectively.
- Monks and Thieves skills are all adjusted by the average amount of skill points they receive per level (regardless of which skills they were spent on), applied and capped (range:
[0,255]
) before racial and/or dexterity adjustments. - All effects using
Timing Mode 2
(equipped) that alter the above stats are suppressed. - The targeted creature(s) cannot level-up.
- The targeted creature(s) current experience is hidden (they still gain experience as normal).
- This effect is removed, regardless of
Timing Mode
, by any death that sets STATE_DEAD.
Parameter3
is used internally to store recalculated current hp.Parameter4
is used internally to store recalculated max xp.
This effect sets LEVELDRAIN to
Amount
.
Parameter #1: Irrelevant
Parameter #2: Wake on damage
Special: Icon
Sleep (Wake on Hit)
mode to the targeted creature(s), if the targeted creature(s) has less than 20 HP. The effect always lasts 5 rounds, and ignores the duration
field. When calling the sleep opcode, parameters 2 and special are copied over.
Parameter #1: Amount
Parameter #2: Use Dice?
Special: Icon
Amount
field.Known values for
Use Dice?
are:
- 0 ⟶ No
- 1 ⟶ Yes
If Amount
and Use Dice?
values are both non-zero, the total number of protections from physical attacks is: 'Amount' + Dice values
.
This opcode maintains STONESKINS to the amount of skins left.
Icon
defines the index from STATDESC.2DA for custom portrait icons. Default value is Stoneskin
.
Parameter #1: IDS Entry
Parameter #2: IDS File
IDS Entry
in the IDS file specified by the IDS File
field. Note that the saving throws are not specified by the opcode name but are correctly rolled by the engine.
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)
Parameter #1: Maximum Level
Parameter #2: School
School
, and has a 0 <= Power Level <= Maximum Level
:
- All effects from that effect's
Parent Resource
with aPower Level <= Maximum Level
that do not useTiming Mode 9
will be removed. - An effect using
Timing Mode 9
can be used to match the type and power level to trigger its resource's removal, but that effect itself will not be removed. - If removal is triggered, the relevant string from
MSCHOOL.2DA
is displayed in the combat log.
V1 effects inherit their Primary Type (School)
from the Header(SPL) / Extended Header(ITM), V2 effects specify it manually.
School
are:
- 0 ⟶ NONE
- 1 ⟶ ABJURATION
- 2 ⟶ CONJURATION
- 3 ⟶ DIVINATION
- 4 ⟶ ENCHANTMENT
- 5 ⟶ ILLUSION
- 6 ⟶ EVOCATION
- 7 ⟶ NECROMANCY
- 8 ⟶ ALTERATION
- 9 ⟶ GENERALIST
- 10 ⟶ WILDMAGE
Parameter #1: Maximum Level
Parameter #2: Secondary Type
Secondary Type
, and has a 0 <= Power Level <= Maximum Level
:
- All effects from that effect's
Parent Resource
with aPower Level <= Maximum Level
that do not useTiming Mode 9
will be removed. - An effect using
Timing Mode 9
can be used to match the type and power level to trigger its resource's removal, but that effect itself will not be removed. - If removal is triggered, the relevant string from
MSECTYPE.2DA
is displayed in the combat log.
V1 effects inherit their Secondary Type
from the Header(SPL) / Extended Header(ITM), V2 effects specify it manually.
Secondary Type
are:
- 0 ⟶ NONE
- 1 ⟶ SPELLPROTECTIONS
- 2 ⟶ SPECIFICPROTECTIONS
- 3 ⟶ ILLUSIONARYPROTECTIONS
- 4 ⟶ MAGICATTACK
- 5 ⟶ DIVINATIONATTACK
- 6 ⟶ CONJURATION
- 7 ⟶ COMBATPROTECTIONS
- 8 ⟶ CONTINGENCY
- 9 ⟶ BATTLEGROUND
- 10 ⟶ OFFENSIVEDAMAGE
- 11 ⟶ DISABLING
- 12 ⟶ COMBINATION
- 13 ⟶ NON-COMBAT
Parameter #1: Max Range
Parameter #2: Irrelevant
The
Max Range
field sets the maximum range of the teleporting effect. Teleport is random direction up to specified range, range measured same as projectile radius, i.e.: 16 = 1 ft
.
Parameter #1: Total Amount
Parameter #2: School
Total Amount
field) whose Primary Type (School)
is equal to the one specified by the School
field.
V1 effects inherit their Primary Type (School)
from the Header(SPL) / Extended Header(ITM), V2 effects specify it manually.
The Power
level of the first effect to trigger any instance of this opcode's deflection will determine how much this opcode's Amount
is decremented. Every instance of this opcode on the creature will be decremented by this amount.
School
are:
- 0 ⟶ NONE
- 1 ⟶ ABJURATION
- 2 ⟶ CONJURATION
- 3 ⟶ DIVINATION
- 4 ⟶ ENCHANTMENT
- 5 ⟶ ILLUSION
- 6 ⟶ EVOCATION
- 7 ⟶ NECROMANCY
- 8 ⟶ ALTERATION
- 9 ⟶ GENERALIST
- 10 ⟶ WILDMAGE
On EE games, resource
field ⟶ Spell cast when this effect self-terminates, default = Parent + "B"
.
-
CANNOT 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 effects from self.
- Maintains portrait icon
Spell Shield
on the target. - Maintains animation
SPMAGGLO
on the target, can be suppressed by opcode #291.
empty/zero
to avoid interacting with this opcode.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Parameter #1: Undefined
Parameter #2: Undefined
More specifically, it functions by applying opcode #50 to creature(s) with any dispellable effects. Color glow is red.
Parameter #1: Total Amount
Parameter #2: Secondary Type
Total Amount
field) whose Secondary Type
is equal to the one specified by the Secondary Type
field.
V1 effects inherit their Secondary Type
from the Header(SPL) / Extended Header(ITM), V2 effects specify it manually.
The Power
level of the first effect to trigger any instance of this opcode's deflection will determine how much this opcode's Total Amount
is decremented. Every instance of this opcode on the creature will be decremented by this amount.
Secondary Type
are:
- 0 ⟶ NONE
- 1 ⟶ SPELLPROTECTIONS
- 2 ⟶ SPECIFICPROTECTIONS
- 3 ⟶ ILLUSIONARYPROTECTIONS
- 4 ⟶ MAGICATTACK
- 5 ⟶ DIVINATIONATTACK
- 6 ⟶ CONJURATION
- 7 ⟶ COMBATPROTECTIONS
- 8 ⟶ CONTINGENCY
- 9 ⟶ BATTLEGROUND
- 10 ⟶ OFFENSIVEDAMAGE
- 11 ⟶ DISABLING
- 12 ⟶ COMBINATION
- 13 ⟶ NON-COMBAT
On EE games, resource
field ⟶ Spell cast when this effect self-terminates, default = Parent + "B"
.
- CAN block effects of Secondary Type
MagicAttack
. -
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 effects from self.
- Maintains portrait icon
Spell Shield
on the target. - Maintains animation
SPMAGGLO
on the target, can be suppressed by opcode #291.
empty/zero
to avoid interacting with this opcode.
Parameter #1: Total Amount
Parameter #2: School
Total Amount
field) whose Primary Type (School)
is equal to the one specified by the School
field.
V1 effects inherit their Primary Type (School)
from the Header(SPL) / Extended Header(ITM), V2 effects specify it manually.
The Power
level of the first effect to trigger any instance of this opcode's reflection will determine how much this opcode's Total Amount
is decremented. Every instance of this opcode on the creature will be decremented by this amount.
School
are:
- 0 ⟶ NONE
- 1 ⟶ ABJURATION
- 2 ⟶ CONJURATION
- 3 ⟶ DIVINATION
- 4 ⟶ ENCHANTMENT
- 5 ⟶ ILLUSION
- 6 ⟶ EVOCATION
- 7 ⟶ NECROMANCY
- 8 ⟶ ALTERATION
- 9 ⟶ GENERALIST
- 10 ⟶ WILDMAGE
On EE games, resource
field ⟶ Spell cast when this effect self-terminates, default = Parent + "B"
.
If Caster and Target are both affected by this opcode, the spell from Caster will reflect off Target, but not reflect back off Caster. Previously, whoever had more reflection charges would end up victorious, now the initial target always ends up victorious.
-
CANNOT reflect effects of Secondary Type
MagicAttack
.- V1 effects inherit their Secondary Type from the Header(SPL) / Extended Header(ITM), V2 effects specify it manually.
-
CAN reflect 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 reflect effects through AoE projectiles.
- CANNOT reflect effects from self.
- Maintains portrait icon
Spell Deflection
on the target (this is likely a bug). - Maintains animation
SPTURNI2
on the target, can be suppressed by opcode #291.
empty/zero
to avoid interacting with this opcode.
Parameter #1: Total Amount
Parameter #2: Secondary Type
Total Amount
field) whose Secondary Type
is equal to the one specified by the Secondary Type
field.
V1 effects inherit their Secondary Type
from the Header(SPL) / Extended Header(ITM), V2 effects specify it manually.
The Power
level of the first effect to trigger any instance of this opcode's reflection will determine how much this opcode's Total Amount
is decremented. Every instance of this opcode on the creature will be decremented by this amount.
Secondary Type
are:
- 0 ⟶ NONE
- 1 ⟶ SPELLPROTECTIONS
- 2 ⟶ SPECIFICPROTECTIONS
- 3 ⟶ ILLUSIONARYPROTECTIONS
- 4 ⟶ MAGICATTACK
- 5 ⟶ DIVINATIONATTACK
- 6 ⟶ CONJURATION
- 7 ⟶ COMBATPROTECTIONS
- 8 ⟶ CONTINGENCY
- 9 ⟶ BATTLEGROUND
- 10 ⟶ OFFENSIVEDAMAGE
- 11 ⟶ DISABLING
- 12 ⟶ COMBINATION
- 13 ⟶ NON-COMBAT
On EE games, resource
field ⟶ Spell cast when this effect self-terminates, default = Parent + "B"
.
If Caster and Target are both affected by this opcode, the spell from Caster will reflect off Target, but not reflect back off Caster. Previously, whoever had more reflection charges would end up victorious, now the initial target always ends up victorious.
-
CANNOT reflect effects of Secondary Type
MagicAttack
. -
CAN reflect 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 reflect effects through AoE projectiles.
- CANNOT reflect effects from self.
- Maintains portrait icon
Spell Deflection
on the target (this is likely a bug). - Maintains animation
SPTURNI2
on the target, can be suppressed by opcode #291.
empty/zero
to avoid interacting with this opcode.
Parameter #1: Max Level
Parameter #2: School
School
, with a Power Level
up to Max Level
, of the first two valid Parent Resource
s from the targeted creature(s).
V1 effects inherit their Primary Type (School)
from the Header(SPL) / Extended Header(ITM), V2 effects specify it manually.
School
are:
- 0 ⟶ NONE
- 1 ⟶ ABJURATION
- 2 ⟶ CONJURATION
- 3 ⟶ DIVINATION
- 4 ⟶ ENCHANTMENT
- 5 ⟶ ILLUSION
- 6 ⟶ EVOCATION
- 7 ⟶ NECROMANCY
- 8 ⟶ ALTERATION
- 9 ⟶ GENERALIST
- 10 ⟶ WILDMAGE
The first valid Parent Resource
has a matching effect with a non-zero Power Level
and a Timing Mode
other than 2/5/8
, all such matching effects of this Parent Resource
will be removed.
The second valid Parent Resource
has a matching effect with a non-zero Power Level
and a Timing Mode
of 2/5/8
, all such matching effects of this Parent Resource
will be removed.
If any effects are removed, the String Reference corresponding to the School
from MSCHOOL.2DA
is returned to the combat log.
The only way to really see this behavior (removing two separate resources) is to have a spell or item ability that only applies equipped effects.
Power Level
of 0
are ignored when this opcode checks for effects, but will still be removed if another effect from its Parent Resource
triggers removal.
Parameter #1: Max Level
Parameter #2: Secondary Type
Secondary Type
, with a Power Level
up to Max Level
, of the first two valid Parent Resource
s from the targeted creature(s).
V1 effects inherit their Secondary Type
from the Header(SPL) / Extended Header(ITM), V2 effects specify it manually.
Secondary Type
are:
- 0 ⟶ NONE
- 1 ⟶ SPELLPROTECTIONS
- 2 ⟶ SPECIFICPROTECTIONS
- 3 ⟶ ILLUSIONARYPROTECTIONS
- 4 ⟶ MAGICATTACK
- 5 ⟶ DIVINATIONATTACK
- 6 ⟶ CONJURATION
- 7 ⟶ COMBATPROTECTIONS
- 8 ⟶ CONTINGENCY
- 9 ⟶ BATTLEGROUND
- 10 ⟶ OFFENSIVEDAMAGE
- 11 ⟶ DISABLING
- 12 ⟶ COMBINATION
- 13 ⟶ NON-COMBAT
The first valid Parent Resource
has a matching effect with a non-zero Power Level
and a Timing Mode
other than 2/5/8
, all such matching effects of this Parent Resource
will be removed.
The second valid Parent Resource
has a matching effect with a non-zero Power Level
and a Timing Mode
of 2/5/8
, all such matching effects of this Parent Resource
will be removed.
If any effects are removed, the String Reference corresponding to the Secondary Type Type
from MSECTYPE.2DA
is returned to the combat log.
The only way to really see this behavior (removing two separate resources) is to have a spell or item ability that only applies equipped effects.
Power Level
of 0
are ignored when this opcode checks for effects, but will still be removed if another effect from its Parent Resource
triggers removal.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
The timestop effect lasts half as long as the
Duration
specified for the effect.
In particular:
- All creatures not immune to Time Stop will be rendered uncontrollable, can be hit automatically by attacks as if they were HELPLESS (but do not actually have
STATE_HELPLESS
set), and their frequency-based effects will not trigger (poison/regeneration), but theirduration
will run. - Projectiles are suspended mid-flight until the Time Stop ends, at which point they will resume normal function.
Area Effect
projectiles are suppressed until the Time Stop ends, at which point they will resume normal function, though their duration will run during the Time Stop.- Projectiles that hit "instantly" (
#0
and#1
for spells/items) are unaffected by Time Stop, which includes all melee weapons.
0
(zero).
Parameter #1: Target
Parameter #2: Condition
Special: Extra
resource
field on the target specified by the Target
field, when the condition from the Condition
field is true. The conditions are akin to various triggers.
Known values for
Target
are:
- 0 ⟶
Myself
- 1 ⟶
LastHitter
-
2 ⟶
NearestEnemyOf
(effectively[EVILCUTOFF])
- Since object specifiers are not relative to the creature, this works as expected only from the Player's perspective.
- 3+ ⟶
Nearest
(effectively[ANYONE]
)
Condition
are:
- 0 ⟶
HitBy([ANYONE])
— Checked every time -
1 ⟶
See([EVILCUTOFF])
— Checked once per round- Since object specifiers are not relative to the creature, this works as expected only from the Player's perspective.
- 2 ⟶
HPPercentLT(Myself,50)
— Checked once per round - 3 ⟶
HPPercentLT(Myself,25)
— Checked once per round - 4 ⟶
HPPercentLT(Myself,10)
— Checked once per round - 5 ⟶
StateCheck(Myself,STATE_HELPLESS)
f.i. unconscious — Checked once per round - 6 ⟶
StateCheck(Myself,STATE_POISONED)
— Checked once per round - 7 ⟶
AttackedBy([ANYONE])
— Checked every time - 8 ⟶
PersonalSpaceDistance([ANYONE],4)
— Checked once per round - 9 ⟶
PersonalSpaceDistance([ANYONE],10)
— Checked once per round -
10 ⟶
Delay(
— Checked once per roundExtra
)- This condition is pretty unreliable because two events need to line up for it to fire: the
Delay()
trigger needs to return true at the same time the contingency is checked.
- This condition is pretty unreliable because two events need to line up for it to fire: the
- 11 ⟶
TookDamage()
— Checked every time - 12 ⟶
Killed([ANYONE])
— Checked every time -
13 ⟶
TimeOfDay(
— Checked once per roundExtra
)- For this particular
Condition
, theTarget
parameter must be0
.
- For this particular
- 14 ⟶
PersonalSpaceDistance([ANYONE],
— Checked once per roundExtra
) - 15 ⟶
StateCheck([ANYONE],
— Checked once per roundExtra
) - 16 ⟶
Die()
- 17 ⟶
Died([ANYONE])
— Checked every time - 18 ⟶
TurnedBy([ANYONE])
— Checked every time - 19 ⟶
HPLT(Myself,
— Checked once per roundExtra
) - 20 ⟶
HPPercentLT(Myself,
— Checked once per roundExtra
) - 21 ⟶
CheckSpellState(Myself,
— Checked once per roundExtra
)
Extra
are:
-
BIT0 ⟶ When triggered, will display
STRREF_GUI_FEEDBACK_CONTINGENCY_TRIGGER
as effect host and remove effect- If
Condition=0
and(Extra BAND BIT0) == BIT0
(i.e.,BIT0
is set) ⟶ Trigger even if the effect host was the source of the hit
- If
-
BIT1 ⟶ Fire subspell as effect source (the creature that casts the spell) instead of effect host (the creature the effect is attached to)
-
This is not relevant for vanilla spells. However, just for the sake of providing an example...
If you change Globe of Blades, (
"sppr725.spl"
) like so:SPL Ability
⇒Target = Living actor
- And change all of the ability's
effects
toTarget = Projectile target
- And change
"sppr725d.eff"
toResource = "spwi112"
,Special = 2
"spwi112.spl"
) at the contingency host. Basically it lets you check the conditions on another creature yet take an action from the caster.
-
This is not relevant for vanilla spells. However, just for the sake of providing an example...
- BIT2 ⟶ Suppress subspell
casting glow
andstring
- BIT3 ⟶ Suppress subspell
range
check
Extra
field is also used for the following Condition
values:
- 13 ⟶ Use value from
TIMEODAY.IDS
- 14 ⟶ Range in feet
- 15 ⟶ Use value from
STATE.IDS
- 19 ⟶ Any numeric value
- 20 ⟶ Any numeric value
- 21 ⟶ Use value from
SPLSTATE.IDS
- As you may have noticed,
Extra
acting as both flags and parameters for someCondition
values is annoying. -
As a matter of fact, conditions such as
TimeOfDay(DUSK)
(i.e.,Condition=13
andExtra=1
) may not work as expected — In this particular case, sinceBIT0
is set to1
, the effect will terminate after first trigger andSTRREF_GUI_FEEDBACK_CONTINGENCY_TRIGGER
will be displayed in the combat log.- Hopefully, this is not an issue since you can set up the opcode #232 effect to always fire (see below) and then add opcode #318/opcode #324 effects to the subspell filtering for the desired condition(s).
When used in an external EFF
file, resource2
and resource3
can also be specified — all spells will be cast when triggered.
When used in an external EFF
file, known values for Parameter3
are:
- 0 ⟶ Not a "real" contingency (Fire Shields, Globe of Blades, etc...)
-
1 ⟶ Real contingency
- Maintains
Contingency
portrait icon, displays feedback messageSTRREF_GUI_FEEDBACK_CONTINGENCY_TRIGGER
when triggered, and terminates this effect after first trigger. This value is always set when created by opcode #234.
- Maintains
When used in an external EFF
file, Parent Type (Source Type)
may be manually set to influence its behavior. Known values for Parent Type
are:
-
0 ⟶ None
- Allows further effects with a matching
Parent Resource
to affect the target.
- Allows further effects with a matching
-
1 ⟶ Spell
- Any further effects with a matching
Parent Resource
will be blocked by the engine and stringSTRREF_ERROR_CAN_NOT_CAST_TWO_CONT
is returned to the combat log. Spells must therefore either have this as the last effect, or use it in anEFF
through opcode #177, specifying aParent Type
of0
or2
.
- Any further effects with a matching
-
2 ⟶ Item
- Allows further effects with a matching
Parent Resource
to affect the target.
- Allows further effects with a matching
-
If you need a condition which is always true, you could set
Condition
to20
andExtra
to102
—hp < 102%
will always be true.102
is used because its binary representation does not haveBIT0
set to1
. In so doing:STRREF_GUI_FEEDBACK_CONTINGENCY_TRIGGER
won't be displayed in the combat log- the effect won't terminate after first trigger
- These triggers and objects are limited to their normal detection range: e.g.,
Died([ANYONE])
won't see someone dying on the other side of the map. - Excluding the
PersonalSpaceDistance()
checks,[ANYONE]
includesMyself
. - The presence of this effect in any of a spell's ability headers will force any Wild Surge of that spell to use the
Cast Normal
result. -
As of v2.6, the vanilla Contingency spells will now remove a previous instance of themselves if recast before they have triggered.
- Probably was a cleaner solution than working with subspells to do the same with opcode #321.
Parameter #1: Amount
Parameter #2: Type
Type
field, to the value specified by the Amount
field, for the targeted creature(s).
Type value |
BG2 | BG:EE / IWD:EE | BG2:EE |
---|---|---|---|
89 | PROFICIENCYBASTARDSWORD | PROFICIENCYBASTARDSWORD | PROFICIENCYBASTARDSWORD |
90 | PROFICIENCYLONGSWORD | PROFICIENCYLONGSWORD | PROFICIENCYLONGSWORD |
91 | PROFICIENCYSHORTSWORD | PROFICIENCYSHORTSWORD | PROFICIENCYSHORTSWORD |
92 | PROFICIENCYAXE | PROFICIENCYAXE | PROFICIENCYAXE |
93 | PROFICIENCYTWOHANDEDSWORD | PROFICIENCYTWOHANDEDSWORD | PROFICIENCYTWOHANDEDSWORD |
94 | PROFICIENCYKATANA | PROFICIENCYKATANA | PROFICIENCYKATANA |
95 | PROFICIENCYSCIMITARWAKISASHININJATO | PROFICIENCYSCIMITARWAKISASHININJATO | PROFICIENCYSCIMITARWAKISASHININJATO |
96 | PROFICIENCYDAGGER | PROFICIENCYDAGGER | PROFICIENCYDAGGER |
97 | PROFICIENCYWARHAMMER | PROFICIENCYWARHAMMER | PROFICIENCYWARHAMMER |
98 | PROFICIENCYSPEAR | PROFICIENCYSPEAR | PROFICIENCYSPEAR |
99 | PROFICIENCYHALBERD | PROFICIENCYHALBERD | PROFICIENCYHALBERD |
100 | PROFICIENCYFLAILMORNINGSTAR | PROFICIENCYFLAILMORNINGSTAR | PROFICIENCYFLAILMORNINGSTAR |
101 | PROFICIENCYMACE | PROFICIENCYMACE | PROFICIENCYMACE |
102 | PROFICIENCYQUARTERSTAFF | PROFICIENCYQUARTERSTAFF | PROFICIENCYQUARTERSTAFF |
103 | PROFICIENCYCROSSBOW | PROFICIENCYCROSSBOW | PROFICIENCYCROSSBOW |
104 | PROFICIENCYLONGBOW | PROFICIENCYLONGBOW | PROFICIENCYLONGBOW |
105 | PROFICIENCYSHORTBOW | PROFICIENCYSHORTBOW | PROFICIENCYSHORTBOW |
106 | PROFICIENCYDART | PROFICIENCYDART | PROFICIENCYDART |
107 | PROFICIENCYSLING | PROFICIENCYSLING | PROFICIENCYSLING |
108 | PROFICIENCYBLACKJACK | PROFICIENCYBLACKJACK | PROFICIENCYBLACKJACK |
109 | PROFICIENCYGUN | WEAPON_ENCHANTMENT* | CLERIC_HALLOW* |
110 | PROFICIENCYMARTIALARTS | CLERIC_ARMOR_OF_FAITH* | CLERIC_ARMOR_OF_FAITH* |
111 | PROFICIENCY2HANDED | PROFICIENCY2HANDED | PROFICIENCY2HANDED |
112 | PROFICIENCYSWORDANDSHIELD | PROFICIENCYSWORDANDSHIELD | PROFICIENCYSWORDANDSHIELD |
113 | PROFICIENCYSINGLEWEAPON | PROFICIENCYSINGLEWEAPON | PROFICIENCYSINGLEWEAPON |
114 | PROFICIENCY2WEAPON | PROFICIENCY2WEAPON | PROFICIENCY2WEAPON |
115 | EXTRAPROFICIENCY1 | PROFICIENCYCLUB | PROFICIENCYCLUB |
116 | EXTRAPROFICIENCY2 | WIZARD_SPELL_DEFLECTION* | WIZARD_SPELL_DEFLECTION* |
117 | EXTRAPROFICIENCY3 | PROTECTION_FROM_EVIL* | PROTECTION_FROM_EVIL* |
118 | EXTRAPROFICIENCY4 | TRUE_SIGHT* | TRUE_SIGHT* |
119 | EXTRAPROFICIENCY5 | CLERIC_CHAOTIC_COMMANDS* | CLERIC_CHAOTIC_COMMANDS* |
120 | EXTRAPROFICIENCY6 | CLERIC_INSECT_PLAGUE* | CLERIC_INSECT_PLAGUE* |
121 | EXTRAPROFICIENCY7 | CLERIC_BLADE_BARRIER* | CLERIC_BLADE_BARRIER* |
122 | EXTRAPROFICIENCY8 | CLERIC_PHYSICAL_MIRROR* | CLERIC_PHYSICAL_MIRROR* |
123 | EXTRAPROFICIENCY9 | CLERIC_SHIELD_OF_THE_ARCHONS* | CLERIC_SHIELD_OF_THE_ARCHONS* |
124 | EXTRAPROFICIENCY10 | CLERIC_REGENERATION* | CLERIC_REGENERATION* |
125 | EXTRAPROFICIENCY11 | WIZARD_FIRE_SHIELD* | WIZARD_FIRE_SHIELD* |
126 | EXTRAPROFICIENCY12 | WIZARD_PROTECTION_FROM_MAGIC_ENERGY* | WIZARD_PROTECTION_FROM_MAGIC_ENERGY* |
127 | EXTRAPROFICIENCY13 | WIZARD_MISLEAD* | WIZARD_MISLEAD* |
128 | EXTRAPROFICIENCY14 | WIZARD_PROTECTION_FROM_MAGIC_WEAPONS* | WIZARD_PROTECTION_FROM_MAGIC_WEAPONS* |
129 | EXTRAPROFICIENCY15 | WIZARD_SPELL_TURNING* | WIZARD_SPELL_TURNING* |
130 | EXTRAPROFICIENCY16 | WIZARD_PROTECTION_FROM_THE_ELEMENTS* | WIZARD_PROTECTION_FROM_THE_ELEMENTS* |
131 | EXTRAPROFICIENCY17 | CLERIC_FREE_ACTION* | CLERIC_FREE_ACTION* |
132 | EXTRAPROFICIENCY18 | WIZARD_KHELBENS_WARDING_WHIP* | WIZARD_KHELBENS_WARDING_WHIP* |
133 | EXTRAPROFICIENCY19 | CLERIC_DEFENSIVE_HARMONY* | CLERIC_DEFENSIVE_HARMONY* |
134 | EXTRAPROFICIENCY20 | EXTRAPROFICIENCY20 | EXTRAPROFICIENCY20 |
- Every
STAT
from89
to134
is a weapon proficiency, even the weapon styles. -
Every one of those
STAT
s can be set as a weapon's proficiency and it will use that stat's value for proficiency bonuses.-
This includes
STAT
s likeCLERIC_ARMOR_OF_FAITH*
, even though they're used for an alternative purpose.- The only thing stopping them from showing up during chargen/level-up proficiency selection is their entries (or lack there of) in WEAPPROF.2DA. A
NAME_REF
column of4294967296 (-1)
is hardcoded to hide the proficiency during chargen/level-up. Aside from that it just needs a non-zero maximum for the current class/kit.
- The only thing stopping them from showing up during chargen/level-up proficiency selection is their entries (or lack there of) in WEAPPROF.2DA. A
-
This includes
Type 99 – PROFICIENCYHALBERD
currently cannot use the Increment
option without crashing.
Special
field must currently be 0
, due to an incomplete (bugged) feature added by Beamdog (it wasn't used before anyway, so there was no point in it not being 0
).
This is however not true for EEs, where
param#2 ('Type')
is split into two word subfields. By setting the second (high) one to 1 (Increment)
, it’s possible to increment/decrement the proficiency points of the targeted creature(s) by the value specified by the Amount
parameter.
Parameter #1: Maximum Level Usable
Parameter #2: Amount/Type
The spells are stored using opcode #232, using
Timing Mode 1
and Parameter3
set to 1
.
The
Maximum Level
field indicates the maximum spell level that can be used in the contingency. The Amount/Type
field indicates the number of spells that can be used in the contingency, and the type of the contingency.
Known values for the
Amount/Type
field are:
- First word: Amount (
1–3
) - Second word:
- 0 ⟶ Chain Contingency (See opcode #232 for target and condition descriptions)
- Target choices are limited to those listed in CONTTARG.2DA
- Condition choices limited to those listed in CONTCOND.2DA.
- 1 ⟶ Normal Contingency
- Target choice is limited to
0|Myself
, and only if it's listed in CONTTARG.2DA. - Condition choices limited to those listed in CONTCOND.2DA.
- Target choice is limited to
- 2 ⟶ Sequencer
- Functions as per opcode #257.
- 0 ⟶ Chain Contingency (See opcode #232 for target and condition descriptions)
Parent Resource
or Activation Key
must be added to the mageBookStrings{}
lua table for the UI, or the game will crash upon use.
Parameter #1: Speed
Parameter #2: Direction
Speed
field, in the direction specified by the Direction
field. Speed
ranges from 0
to 255
.
Known values for
Direction
are:
- 0/1 ⟶ Away from the destination point (specified in EFF file)
- 2 ⟶ Away from the source
- 3 ⟶ Towards the destination point (specified in EFF file)
- 4 ⟶ Towards source
TANARRI
DRAGON_RED
DRAGON_BLACK
DRAGON_SILVER
DRAGON_GREEN
DRAGON_AQUA
DRAGON_BLUE
DRAGON_BROWN
DRAGON_MULTICOLOR
DRAGON_PURPLE
DEMOGORGON
ELEMENTAL_EARTH
SHAMBLING_MOUND
ELEMENTAL_FIRE
ELEMENTAL_FIRE_PURPLE
BURNING_MAN
ELEMENTAL_AIR
RAVER
SLAYER
SOLAR
DEVA_MONADIC
MELISSAN
GIANT_FIRE
GIANT_YAGA-SHURA
GOLEM_ICE
if (this->m_sourceRes.startsWith("SP")) { this->m_effectAmount = (100 - pSprite->m_derivedStats.m_nResistMagic) / 100 * (float)this->m_effectAmount; if (this->m_effectAmount == 0) { return 0; // Terminate } }
magic resistance
, but it fails at casting the first division to a float.If the
SPL
resref starts with SP
(see for instance "spin695.spl"
— Wing Buffet) any positive magic resistance
will make the Speed
parameter 0
, causing the opcode to immediately terminate.Having said that, you can bypass this issue by having the
SPL
file starting with SP
apply a secondary SPL
file (for instance via opcode #146), and then by having the secondary SPL
file apply opcode #235. Just make sure the secondary SPL
resref does not start with SP
.
In EEs, this effect can push creatures through closed (and locked) doors (this does not require the “pass-wall” effect).
Direction
options 1
and 3
“can” be overriden in external EFF files, but default to the ability target/location.
Parameter #1: Undetermined
Parameter #2: Type
Type
field.
In particular:
- The Image inherits any/only effects attached to the creature using
Timing Mode 9
- The Image has duplicates of all of the targeted creature(s) items that are flagged with
DROPPABLE
and not flagged withNONDROPABLE
- All items on the Image are flagged with
NONDROPABLE
, so an image created by another image will have no items - If the targeted creature(s) is not a party memeber, saving is disabled so long as the image exists
Known values for
Type
are:
-
0 ⟶ Clone — Image created with the targeted creature(s) Current Hit Points and the following (in order)
- All AI scripts and Dialogues are set to
""
(empty string, i.e. they will be cleared) Script Name
(Death Variable) set to"COPY"
- Opcode #68 based on effect
duration
- The creature is not immediately controllable, but will become controllable (if allied) after saving & reloading
- All AI scripts and Dialogues are set to
-
1 ⟶ Mislead — Image created with the targeted creature(s) Maximum Hit Points and the following (in order)
- Allegiance set to
ALLY
,NEUTRAL
, orENEMY
, depending on target allegiance Gender
set toILLUSIONARY
- All AI scripts and Dialogues are set to
""
(empty string, i.e. they will be cleared) -
If the clone's allegiance is not
ALLY
,Class Script
is set to'Original Class Script' + 'M'
. The script has to already exist (as a separateBCS
file).- And the
Class Script
is only set if it wasn't originally null/empty — it will never be just"M"
- If original
Class Script
is 8 characters long, the last letter will be replaced with"M"
-
If you look in BG2EE, you will see these files:
MAGE18A.BCS → MAGE18AM.BCS
MAGE18B.BCS → MAGE18BM.BCS
MAGE18C.BCS → MAGE18CM.BCS
MAGE18D.BCS → MAGE18DM.BCS
- And the
Script Name
(Death Variable) set to"COPY"
- Opcode #68 based on effect
duration
- Opcode #237
*p2=1
: Puppet Stats, Mislead - Opcode #145
*p2=0
: Disable Spell Casting, Wizard - Opcode #145
*p2=1
: Disable Spell Casting, Priest - Opcode #145
*p2=2
: Disable Spell Casting, Innate - Opcode #144
*p2=8
: Disable Button (Use Item) - Opcode #144
*p2=9
: Disable Button (Quick Item 1) - Opcode #144
*p2=11
: Disable Button (Quick Item 2) - Opcode #144
*p2=12
: Disable Button (Quick Item 3) - Opcode #144
*p2=13
: Disable Button (Special Ability) - Applies
"MISLEAD.SPL"
- Allegiance set to
-
2 ⟶ Project Image — Image is created with the targeted creature(s) Current Hit Points and the following (in order)
- Allegiance set to
ALLY
,NEUTRAL
, orENEMY
, depending on target allegiance Gender
set toILLUSIONARY
- All AI scripts and Dialogues are set to
""
(empty string, i.e. they will be cleared) Script Name
(Death Variable) set to"COPY"
- Opcode #68 based on effect
duration
- Opcode #237
*p2=2
: Puppet Stats, Project Image - Applies
"PROJIMAG.SPL"
- Allegiance set to
-
3 ⟶ Simulacrum — Image is created with the targeted creature(s) Current Hit Points and the following (in order)
- Allegiance set to
ALLY
,NEUTRAL
, orENEMY
, depending on target allegiance Gender
set toILLUSIONARY
- All AI scripts and Dialogues are set to
""
(empty string, i.e. they will be cleared) Script Name
(Death Variable) set to"COPY"
- Opcode #68 based on effect
duration
- Opcode #216
- Opcode #237
*p2=3
: Puppet Stats, Simulacrum - Applies
"SIMULACR.SPL"
- Allegiance set to
- 4+ ⟶ As
0
Simulacrum
is supposed to apply a level-drain effect to the clone equal to floor(ceil(average of
LEVEL
,
LEVEL2
,
LEVEL3
) * factor)
. The factor
appears to be 50% in original games and 40% in EEs. However in EEs, the code is bugged for dual class characters — instead of using the character’s average level it uses the level count of the first class in the dual class name.This means dual class mages usually end up with Simulacrums that are substantially more powerful than intended.
Parameter #1: Master ID
Parameter #2: Image Type
Known values for
Master ID
are:
- -1 ⟶ Not Party Member (Disables saving while in effect)
- 0 ⟶ Player1
- 1 ⟶ Player2
- 2 ⟶ Player3
- 3 ⟶ Player4
- 4 ⟶ Player5
- 5 ⟶ Player6
Image Type
are:
- 0 ⟶ Clone
-
1 ⟶ Mislead
- Maintains STATE_INVISIBLE on
Master ID
. This state is constantly reapplied whenever removed or terminated.
- Maintains STATE_INVISIBLE on
-
2 ⟶ Project Image
- Maintains STATE_HELPLESS on
Master ID
. This state is constantly reapplied whenever removed or terminated. - If
Master ID
triggersHitBy([ANYONE],0)
, this creature is moved to area"NO_AREA.ARE"
. This will delete non-global creatures from the game, unless such an area has been added to the game.
- Maintains STATE_HELPLESS on
- 3 ⟶ Simulacrum
Modifies PUPPETMASTERID to the
Object ID
of a projected image's Master. Object ID
is the 4 byte long number stored at offset 0x27c
of the CRE file, and can change.
Modifies PUPPETMASTERTYPE, to a value of
Parameter2
, on the creature specified by PUPPETMASTERID:
- Stores the image type (Mislead, Projection, Simulacrum) of a creature's most recently created clone.
Modifies PUPPETTYPE, to a value of
Image Type
:
- Stores the image type (Mislead, Projection, Simulacrum) of a such a creature.
PUPPETID is likewise set on the
Master ID
, to the image's Object ID
(likely whichever image is most recent, if they have multiple images).
Parameter #1: IDS Entry
Parameter #2: IDS File
IDS Entry
and in the specified IDS File
, and if the targeted creature(s) hit-dice is less than those specified by the Dice Values.
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)
Parameter #1: Irrelevant
Parameter #2: Type
Type
field.
Known values for
Type
are:
- 0 ⟶ View explored sections only
- 1 ⟶ View explored section and unexplored sections
Parameter #1: Irrelevant
Parameter #2: Icon
Icon
field.
Known values for
Icon
are: see opcode #142.
param2
value. Cannot remove portrait icons generated by any other mechanic.
param2
value.
Parameter #1: Creature ID
Parameter #2: Charm Type
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Parameter #1: Amount to Drain
Parameter #2: Unused
Amount to Drain
.
In particular:
- Only Item Abilities of type
Magical
are drained. - Only items with flag
MAGIC
can be drained. - Items flagged as
INDESTRUCTIBLE
are not drained. - Items with a
Maximum Stack Size
greater than1
are not drained. - Items drained of all charges behave as dictated by their first Ability that is fully drained (the
when drained
field). - You can drain charges of a particular item if the
resource
field is used.
Parameter #1: Number to Drain
Parameter #2: Irrelevant
Number to Drain
parameter.
Parameter #1: Undefined
Parameter #2: Undefined
It sets CHECKFORBERSERK.
Parameter #1: Undetermined
Parameter #2: Undetermined
Berserk
portrait icon. This effect attaches opcode #247.It also sets BERSERKSTAGE1.
Parameter #1: Irrelevant
Parameter #2: Constant Value
This effect causes the targeted creature(s) to attack the nearest creature. The affected creature becomes berserk and its AI scripts stop running. Grants a
+2
bonus to hit and damage with all weapons. Unlike opcode #3, this one can affect enemies as well.
This effect sets BERSERKSTAGE2 to
Constant Value
. It also sets the STATE_BERSERK flag.
Constant Value
parameter should be non-zero.
Parameter #1: Irrelevant
Parameter #2: Fist only
resource
key as a melee effect.
The specified effect will be applied to the target of each successful melee attack.
The
resource
key references a EFF
not a SPL
.
EFF
files applied by this opcode can be blocked by opcode #101.
parameter2
to 4
(i.e., BIT2
) results in restricting this effect to fists only. If you leave it at 0
, then all melee weapons are eligible (including fists).
Parameter #1: Irrelevant
Parameter #2: Irrelevant
resource
key as a ranged effect.
The specified effect will be applied to the target of each successful ranged attack.
The
resource
key references a EFF
not a SPL
.
EFF
files applied by this opcode can be blocked by opcode #101.
Parameter #1: Damage Modifier
Parameter #2: Irrelevant
Damage Modifier
value to the damage caused by the targetted creature(s). The effect works as a minimum damage value, i.e. at least Damage Modifier
damage will always be caused (on a successful hit).
The effect modifies DAMAGELUCK.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
resource
key.
On non-EE games, the default Bard Song applies the following effects:
- All effects are added to the entire party with
Timing Mode 4096
(end at ticks) andduration = nGameTime + 100
-
Display Special Effect Icon
param2 (Icon) = 40 Bard Song
-
Morale Modifier – Sets the Morale stat of the targetted creature(s) to
10
.param1 (Ignored) = 10
param2 (Ignored) = 0
-
Cure Horror
param1 (Irrelevant) = 1
param2 (Irrelevant) = 0
-
Protection from Opcode
param1 (Irrelevant) = 1
param2 (Opcode) = 24 (State: Horror)
On EE games, the default bardsong has been externalized to
"BARDSONG.SPL"
.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
resource
key as a trap.In particular:
- If the caster is a party member, the number of traps in the current area must not exceed their class limit specified in TRAPLIMT.2DA.
- Feedback string
STRREF_FEEDBACK_SNAREFAILED_TOOMANY
will be displayed if there are too many. - The caster cannot have any hostile creatures within their own visual range.
- Feedback string
STRREF_FEEDBACK_SNAREFAILED_ENEMIES
will be displayed if there are enemies in sight. - If the caster succeeds the skill check, Feedback string
STRREF_FEEDBACK_SNARESUCCEEDED
will be displayed (and the spell specified by theresource
key cast). - If the caster fails the skill check, Feedback string
STRREF_FEEDBACK_SNAREFAILED
will be displayed. - If the caster has a critical failure, then they are struck by spell
'Resource' + 'F'
.
Parameter #1: String Reference
Parameter #2: Marker Color
Applies the set map marker effect.
The String Reference
parameter is a string reference to the dialog.tlk
file that sets what the marker says when the marker is read. The Target
of this effect should be set to Self
to function correctly.
The "Marker Color" parameter corresponds to the marker images in flag1.bam. In BG2 it can be one of:
- 0 - Gray (default value)
- 1 - Violet
- 2 - Green
- 3 - Orange
- 4 - Red
- 5 - Blue
- 6 - Dark Blue
- 7 - Light Gray
- 0 - Black (default value)
- 1 - Grey (slate)
- 2 - Red
- 3 - Green
- 4 - Yellow
- 5 - Blue (tel)
- 6 - Purple
- 7 - Orange (salmon)
- 8 - Cyan
Parameter #1: String Reference
Parameter #2: Irrelevant
Target
of this effect should be set to Pre-Target
to function correctly (actually, it can work with Self
, might depend on how you are using it).
The String Reference
field should match opcode #253 StrRef
to be removed. Opcode #254 needs to be cast on exact coordinates as opcode #253.
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, and has the can not steal
bit set.
duration
(from the calling file) is specified in days.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
resource
key, VVC field (resource2
), and resource3
.This effect stores spells to be cast through opcode #258 and opcode #260.
When used in an external EFF file, known values for
Parameter3 (Type)
are:
- 0 ⟶ Hidden – this sequencer is not viewable in the MageBook 'Contingency' screen, and is not removed when activated.
- 1 ⟶ Displayed – this sequencer is viewable in the MageBook 'Contingency' screen, and is removed when activated.
Parent Type (Source Type)
may be manually set to influence its behavior. Known values for Parent Type
are:
- 0 ⟶ None – Allows further effects with a matching "Parent Resource" to affect the target.
- 1 ⟶ Spell – Any further effects with a matching "Parent Resource" will be blocked by the engine and string
STRREF_ERROR_CAN_NOT_CAST_TWO_CONT
is returned to the combat log. - 2 ⟶ Item – Allows further effects with a matching "Parent Resource" to affect the target.
Parent Resource (Activation Key)
must be manually set to influence its behavior.The
Activation Key
is the "Resource" to be referenced by the effect(s) that will activate this sequencer.When set manually, it cannot contain lowercase characters, it MUST be in ALLCAPS, numbers, and/or symbols, or the sequencer cannot be activated.
Parameter #1: Maximum Level Usable
Parameter #2: Amount
It applies opcode #256 to the caster upon completing the spell selection process, and at the same time it grants you the
-D
or -P
subspell (via opcode #171). In particular:
- if all of the sequenced spells use
Ability Target 4 (Target Point)
, it will grant spell'Parent' + 'P'
(provided such a spell exists – for instance:SPWI420P
), - otherwise it will grant spell
'Parent' + 'D'
(for instance:SPWI420D
).
Timing Mode 1
(regardless of timing mode for opcode #257) and Parameter3
set to 1
.
The
Maximum Level
field indicates the maximum spell level that can be used in the sequencer. The Amount
field indicates the number of spells that can be used in the sequencer.
When used in an external EFF file,
Parent Type (Source Type)
may be manually set to influence its behavior. Known values for Parent Type
are:
- 0 ⟶ None – Allows further effects with a matching "Parent Resource" to affect the target.
- 1 ⟶ Spell – Any further effects with a matching "Parent Resource" will be blocked by the engine and string
STRREF_ERROR_CAN_NOT_CAST_TWO_CONT
is returned to the combat log. - 2 ⟶ Item – Allows further effects with a matching "Parent Resource" to affect the target.
Parent Resource (Activation Key)
must be manually set to influence its behavior.When set manually, it cannot contain lowercase characters, it MUST be in ALLCAPS, numbers, and/or symbols, or the sequencer cannot be activated.
If not used in an external EFF, the
Activation Key
will be the "Parent Resource".If used in an external EFF, the
Activation Key
must be explicitly specified, but doesn't need to match its actual "Parent Resource".For the vanilla spells, the
Activation Key
is always the parent spell of opcode #257.
mageBookStrings{}
lua table, or the game will crash upon use.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Activates any opcode #256 effects with a matching resource (
Activation Key
) of the targeted creature(s).When used in combination with opcode #257 (Spell Sequencer Creation):
- The
resource
key must be set to the filename of the spell which contains the Spell Sequencer Creation effect. - The spell which contains the Spell Sequencer Creation effect can have a maximum filename of 7 characters.
- The spell which contains the Spell Sequencer Activation effect must have the same filename, suffixed with the
D
character, and should be an innate ability. For instance:- Spell Sequencer Creation filename =
SPWI420
- Spell Sequencer Activation filename =
SPWI420D
- Spell Sequencer Creation filename =
Those spells are cast by the targeted creature(s) at "this" ability's target.
For each stored spell, "this" ability's target must be within range of that spell, or it will fail.
All opcode #256 effects with a matching
Activation Key
are removed if their Parameter3 = 1
(those created by opcode #257 / opcode #234 have this value set to 1
by default).
Parameter #1: Total Amount
Parameter #2: Power Level
Total Amount
field, of the level specified by the Power Level
field, and recalling previously cast spells.
The Power
level of the first effect to trigger any instance of this opcode's trap will determine how much this opcode's Total Amount
is decremented. Every instance of this opcode on the creature will be decremented by this amount.
On EE games, resource
field ⟶ Spell cast when this effect self-terminates, default = Parent + "B"
.
-
CANNOT trap effects of Secondary Type
MagicAttack
.- V1 effects inherit their Secondary Type from the Header(SPL) / Extended Header(ITM), V2 effects specify it manually.
-
CANNOT trap 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 cannot trap effects through AoE projectiles.
- CANNOT trap effects from self.
- Maintains portrait icon
Spell Trap
on the target. - Maintains animation
SPMAGGLO
on the target, can be suppressed by opcode #291. -
When it traps an effect, it applies opcode #261 to the target.
Parameter1
is thePower
level of the trapped effect,Parameter2
is always0|Wizard
.
empty/zero
to avoid interacting with this opcode.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Activates any opcode #256 with a matching resource (
Activation Key
) of the targeted creature(s).When used in combination with opcode #257 (Spell Sequencer Creation):
- The
resource
key must be set to the filename of the spell which contains the Spell Sequencer Creation effect. - The spell which contains the Spell Sequencer Creation effect can have a maximum filename of 7 characters.
- The spell which contains the Spell Sequencer Activation effect must have the same filename, suffixed with the
P
character, and should be an innate ability. For instance:- Spell Sequencer Creation filename =
SPWI420
- Spell Sequencer Activation filename =
SPWI420P
- Spell Sequencer Creation filename =
Those spells are cast by the targeted creature(s) at "this" ability's target.
For each stored spell, "this" ability's target must be within range of that spell, or it will fail.
All opcode #256 effects with a matching
Activation Key
are removed if their Parameter3 = 1
(those created by opcode #257 / opcode #234 have this value set to 1
by default).
Parameter #1: Spell Level
Parameter #2: Spell Type
This effect will restore 1 spell to memory, at the level specified by the
Spell Level
field, and of the type specified by the Spell Type
field. If there is no free slot at the specified level, the effect restores a spell at the next lowest level possible.
Known values for
Spell Type
are:
- 0 ⟶ Wizard / Bard / Sorcerer
- 1 ⟶ Cleric / Druid / Shaman
Parameter #1: Statistic Modifier
Parameter #2: Type
This effect modifies the visual range of the targeted creature(s).
The
Statistic Modifier
parameter seems to be in the 0–15
interval.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Visual Range = Visual Range + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Visual Range = 'Statistic Modifier' value
The effect modifies VISUALRANGE.
- Each unit of visible range equals 2ft:
32px(horizontal)/24px(vertical)
- Default Visual Range = 14
- Maximum visual range to reveal "Fog of War" = 23
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:
Backstab = Backstab + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Backstab = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Backstab = (Backstab * 'Statistic Modifier' value) / 100
Parameter #1: Irrelevant
Parameter #2: Type
Type
field.
This effect causes the targeted creature(s) to drop a piece of equipment.
Known values for
Type
are:
- 0 ⟶ Drop random equipment
- 1 ⟶ Drop weapons from Quick-Weapon Slot (slots
#35 – #38
)
Magical Weapon Slot
if they are not flagged properly.Will never drop items:
- located in slot
SLOT_FIST
. - flagged as
INDESTRUCTIBLE
. - NOT flagged as
DROPPABLE
. - flagged as
NONDROPABLE
.
Parameter #1: Value
Parameter #2: Type
resource
key, in the style specified by the Type
field, by the value specified by the Value
field.
Known values for
Type
are:
- 0 ⟶ Set Global (to
Value
) - 1 ⟶ Increment Global (by
Value
)
-
Since the
Resource
Key can only be 8 characters long maximum, you can not set a Global Variable with this effect that has a name longer than this amount.-
You can use the
VVC
field of external EFF files for an additional 8 characters of variable name.- You can use the
3rdresource
field of external EFF files for an additional 8 characters of variable name.
- You can use the
-
You can use the
Value
can store integers or coordinates. Coordinates are stored as first 2 bytes X, last 2 bytes Y (f.i.: 310 + (30 << 16)
).
Parameter #1: Irrelevant
Parameter #2: Irrelevant
resource
keys.
resource
.
Parameter #1: String Reference
Parameter #2: Irrelevant
String Reference
field being displayed by the targeted creature(s).
String Reference
value.Cannot block string displays from any other mechanic.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
The targeted creature(s) will be able to explore like a PC does.
This effect sets EXPLORE to
1
.
Parameter #1: Strength
Parameter #2: Undetermined
Strength
field.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Disables the creature's AI scripts.
The creature cannot take any action not listed in INSTANT.IDS (usually through ActionOverride()).
The creature is still subject to area effect and may still be targeted directly by mouseover.
Parameter #1: Amount_1
Parameter #2: Type
Parameter #3: Amount_2
Parameter #4: Frequency Multiplier
Special: Icon
EFF
specified by the resource
key to the targeted creature(s) as specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Apply once per second
Amount_2
andFrequency Multiplier
are ignored —Amount_1
needs to be non-zero
- 1 ⟶ Unknown (see below for further details)
- 2 ⟶ Apply
Amount_1
times everyFrequency Multiplier
second(s) - 3 ⟶ Apply once every
'Amount_1' * 'Frequency Multiplier'
second(s) - 4 ⟶ Apply
Amount_2
times every'Amount_1' * 'Frequency Multiplier'
second(s) — This is the only one that must be in externalEFF
files - 5+ ⟶ Crash
Icon
defines the index from STATDESC.2DA
for custom portrait icons. Default value is None (no icon)
.
EFF
files applied by this opcode can be blocked by opcode #101.
Type = 1
, thought the effect is still present (it doesn't just instantly terminate), and will generate a portrait icon if Icon
is non-zero.
Frequency Multiplier = 0
, its value is treated as 1
. This is the default value for SPL/ITM effects.
Parameter #1: Undetermined
Parameter #2: Undetermined
resource
field is filled, it will use a custom 2DA file to determine which projectiles to remove.The custom 2DA file must be structured as
"CLEARAIR.2DA"
.
Parameter #1: Undetermined
Parameter #2: Undetermined
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
Type = 0
and Timing Mode = 9
, it modifies HIDEINSHADOWSMTPBONUS. 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 Hide in Shadows 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
Type = 0
and Timing Mode = 9
, it modifies DETECTILLUSIONSMTPBONUS. 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 Detect Illusions 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
Type = 0
and Timing Mode = 9
, it modifies SETTRAPSMTPBONUS. 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 Set 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:
To-hit = To-hit + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
To-hit = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
To-hit = (To-hit * 'Statistic Modifier' value) / 100
Parameter #1: Irrelevant
Parameter #2: Button
Button
field. The resource field acts as a matching key to the resource field of the Enable Button, allowing separate enable/disable reasons.
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
- 10 ⟶ Bard Song Button (EE only)
- 11 ⟶ Second Quick Item Button
- 12 ⟶ Third Quick Item Button
- 13 ⟶ Innate Ability Button
- 14 ⟶ Find Traps Button
- 15 ⟶ Inventory Button (EE only)
Parameter #1: Irrelevant
Parameter #2: Type
This effect causes other spells to be subject to wild magic throws.
Known values for
Type
are:
- 1 ⟶ Affect next spell cast
- 2 ⟶ Affect all spells cast for effect duration
In particular, it doesn’t work for
SPL
s whose BIT14 is set to 1
, subspells, as well as certain script actions – mostly the “instant-cast” ones.
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.
Known values for
Type
are:
- 0 ⟶ Cumulative Modifier:
Chance = Chance + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Chance = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Chance = (Chance * 'Statistic Modifier' value) / 100
Parameter #1: Value
Parameter #2: Scripting State
Scripting State
to the given value. Scripting State
range from 0
to 35
. The scripting state can be checked via scripts (see STATS.IDS) subtract 156
from the stat value to get the scripting state.
- On non-EE games, this effect does not have proper bounds checking. It can therefore be used in unintended ways. For example scripting state
13
equals with theNO_CIRCLE
attribute (stat=169
), and scripting state1139
ties toPICKPOCKET
(stat=29
). -
EEs have proper bounds checking for this opcode, can only modify stats
#156 – #200
, except SUMMON_DISABLE_ACTION, not all values are a straight "subtract156
from their stat".- For best results, it should only be used for stats
#156 – #165
, as all others have dedicated opcodes and hardcoded effects.
- For best results, it should only be used for stats
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 IDS Entry
in the specified IDS File
. The EFF
can be removed via the Remove Curse opcode (in addition to other standard methods).
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
EFF
files applied by this opcode bypass / ignore opcode #101.
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
The effect modifies MELEE_THACO_BONUS.
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:
Damage = Damage + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Damage = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Damage = (Damage * 'Statistic Modifier' value) / 100
The effect modifies MELEE_DAMAGE_BONUS.
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:
Damage = Damage + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Damage = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Damage = (Damage * 'Statistic Modifier' value) / 100
The effect modifies MISSILE_DAMAGE_BONUS.
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:
THAC0 = THAC0 + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
THAC0 = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
THAC0 = (THAC0 * 'Statistic Modifier' value) / 100
The effect modifies FIST_THACO_BONUS.
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:
Damage = Damage + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
Damage = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
Damage = (Damage * 'Statistic Modifier' value) / 100
The effect modifies FIST_DAMAGE_BONUS.
Parameter #1: String Reference
Parameter #2: Position
Special: Class
String Reference
field, at the location specified by the Position
field.
Known values for
Position
are:
- 0 ⟶ Records Screen information section
- 1 ⟶ Various character screens (eg. Inventory and Records Screen)
The effect modifies CLASS_STRING_OVERRIDE_MIXED and CLASS_STRING_OVERRIDE_LOWER.
Class
specifies which classes title is replaced (values are from CLASS.IDS). Parameter #1: Irrelevant
Parameter #2: Stat Value
The effect modifies PREVENT_SPELL_PROTECTION_EFFECTS 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: Irrelevant
Parameter #2: Stat Value
The effect modifies IMMUNITY_TO_BACKSTAB 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: Irrelevant
Parameter #2: Stat Value
The effect modifies PREVENT_AI_SLOWDOWN to
Stat Value
.
- Creatures in EE run scripts as long as they are in the current area, opcode #293 does not alter this, nor allow their scripts to run while they are in different areas.
- However, creatures without this opcode attached will run scripts at a considerably slower rate (about ⅓ or ¼ rate).
- Moreover, it looks like off-screen creatures move only at halved speed (which might be true for other actions as well). With this opcode creatures seem to move and act at the same speed as on-screen.
Stat Value
parameter can take any value. If you set it to 0
, you will disable the effect (for its duration).
Parameter #1: Undefined
Parameter #2: Constant Value
69
to 74
(or 70–74
). These sounds are randomly played (for non global, alive characters, when not in cutscene or dialog). This stat tunes the frequency of these random strings.
Known values for
Constant Value
are:
- -1 ⟶ no existance sounds
- 0 ⟶ standard existance sound frequency
- Other values ⟶ random existance sound frequency (the higher the rarer)
Parameter #1: Undefined
Parameter #2: Stat Value
The effect modifies NO_PERMANENT_DEATH to
Stat Value
.Timing Mode
should be set to 9 (Permanent after Death)
.
Stat Value
parameter can take any value. If you set it to 0
, you will disable the effect (for its duration).
Parameter #1: Irrelevant
Parameter #2: Irrelevant
resource
key.
Parameter #1: Undefined
Parameter #2: Stat Value
The effect modifies IMMUNE_TO_TURN_UNDEAD 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: Irrelevant
Parameter #2: Irrelevant
"cut250a.bcs"
. By default this script teleports the party to the Pocket Plane area (AR4500
).
"cut250a.bcs"
doesn’t exist.
Parameter #1: Shield Amount
Parameter #2: Icon
Icon
parameter.
Known values for
Icon
are:
- 0 ⟶ Normal Chaos Shield
- 1 ⟶ Improved Chaos Shield
The effect modifies CHAOS_SHIELD.
"SPTURNI2.BAM"
(Spell Turning Disk).
Surges it prevents do not count towards the “Next Spell” option of opcode #280.
Parameter #1: Unknown
Parameter #2: Stat Value
The effect modifies NPC_BUMP 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: Statistic Modifier
Parameter #2: Condition
Parameter #3: Weapon Category
Special: Attack Type
Critical hits will occur on a roll (on a
1d20
) greater or equal to: 20 - 'Statistic Modifier'
.
Known values for
Condition
are:
- 0 ⟶ Apply Critical Hit chance for both hands
- 1 ⟶ Apply Critical Hit chance only for this weapon
Known values for
Attack Type
are:
- 0 ⟶ Any attack type
- 1 ⟶ Melee attack only
- 2 ⟶ Ranged attack only
- 3 ⟶ Magical attack only
(External EFFs) Known values for
Weapon Category
are defined in ITEMCAT.IDS.
The effect modifies CRITICALHITBONUS.
Parameter #1: Irrelevant
Parameter #2: Stat Value
The effect modifies USE_ANY_ITEM 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: Irrelevant
Parameter #2: Stat Value
The effect modifies ASSASSINATE to
Stat Value
.
Stat Value
parameter can take any value. If you set it to 0
, you will disable the effect (for its duration).
- Backstabs no longer require the creature to be invisible.
- Sneak Attacks no longer require the creature to be flanking their target.
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:
THAC0 = THAC0 + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
THAC0 = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
THAC0 = (THAC0 * '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: Range
Parameter #2: Irrelevant
"SPCL922.SPL"
.
Parameter #1: Radius
Parameter #2: Stat Value
The effect modifies IMMUNE_TO_TRACKING to
Stat Value
.
Stat Value
parameter can take any value. If you set it to 0
, you will disable the effect (for its duration).
While Equipped
on an item will crash the game.
permanent
or equipped
timing modes.
Radius
: same scale as Area-Effect projectiles (16 units = 1ft
).
Parameter #1: Value
Parameter #2: Type
resource
key to the value specified by the Value
field.
Known values for
Type
are:
- 0 ⟶ Set Local (to
Value
) - 1 ⟶ Increment Local (by
Value
)
-
Since the
resource
key can only be 8 characters long maximum, you can not set a variable with this Effect that has a name longer than this amount.-
You can use the
Resource 2
field of external EFF files for an additional 8 characters of variable name.-
You can use the
Resource 3
field of external EFF files for an additional 8 characters of variable name.- As a result, it cannot modify variables more than 24 characters long.
-
You can use the
-
You can use the
Value
can store integers or coordinates. Coordinates are stored as first 2 bytes X, last 2 bytes Y (f.i.: 310 + (30 << 16)
).
Parameter #1: Irrelevant
Parameter #2: Stat Value
The effect modifies IMMUNE_TO_TIME_STOP to
Stat Value
.
Stat Value
parameter can take any value.If you set it to
0
, you will disable the effect (for its duration). For instance, a Time Stop spell that applies (to everyone) op#310 with Stat Value = 0
for 18s
would trap those such as Demogorgon in the time stop.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
SPWISH01 – SPWISH25
), selected based on the casting creatures Wisdom attribute, as outlined below.
SPWISHxx MinWis MaxWis 01 10 25 02 10 25 03 10 25 04 10 25 05 0 25 06 10 25 07 0 25 08 15 25 09 0 25 10 0 25 11 0 25 12 0 25 13 0 25 14 0 25 15 15 25 16 0 25 17 0 25 18 0 17 19 0 9 20 0 17 21 0 17 22 0 9 23 0 9 24 0 9 25 0 25
Parameter #1: Undefined
Parameter #2: Stat Value
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: Undetermined
Parameter #2: Undetermined
resource
key has been gained. Used for pre-requisites/count limits.
Parameter #1: Amount
Parameter #2: Irrelevant
Amount
field.This opcode maintains STONESKINSGOLEM to the amount of skins left.
In particular, the Juggernaut Golem
"TOMEGOL4.CRE"
is scripted by "TOMEGOL4.BCS"
to Kill()
itself if its Summoner and no Party Members have STONESKINSGOLEM set to a non-zero value.
Parameter #1: Irrelevant
Parameter #2: Stat Value
The effect modifies STAT #201 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: Irrelevant
Parameter #2: Irrelevant
Parameter #1: Irrelevant
Parameter #2: Type
Parameter #1: Value
Parameter #2: Stat Type
Type
field becomes immune to the spell or item specified in the Resource
field. See opcode #324 for more information.
In order to do so, both the
Resource
field of opcode #318 and the Parent Resource
field of the EFF file must be the same string (max. 8 character long). Unlike opcode #206, this one can innately block any type of resource (None/Spell/Item
).
Parameter #1: IDS Entry
Parameter #2: IDS File
Special: Description note
Power
is set to 1
, this opcode restricts the item to creature(s) matching the object identifiers. When Power
is set to 0
, creature(s) matching the object identifiers cannot use the item. The string to display when an invalid creature attempts to use the item is held in 0x2C
.
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
- 10 ⟶ Actor's name
- 11 ⟶ Actor's scripting name (8 maximum in
resource
field)
The message defined in
Description note
will be displayed whenever this opcode is triggered.
- If
IDS File
is set to10
and the strref held inparameter1
is set to"-1" (None)
, then you're targeting player-created characters (e.g., "CHARNAME"). - If
IDS File
is set to11
and no death variable is specified in theresource
field, then you're targeting player-created characters (e.g., "CHARNAME").
Parameter #1: Weather
Parameter #2: Irrelevant
Weather
.
Known values for
Weather
are:
- 0 ⟶ Normal
- 1 ⟶ Rain
- 2 ⟶ Snow
- 3 ⟶ Fog (unimplemented)
Parameter #1: Irrelevant
Parameter #2: Type
resource
key, in the style specified by the Type
field. Both SPL
and ITM
resources are considered.
Known values for
Type
are:
-
0 ⟶ Default
- Will remove effects applied with any
Timing Mode
- Will remove effects applied with any
-
1 ⟶ Equipped effects list only
- Will only remove effects applied with
Timing Mode 2
- Will only remove effects applied with
-
2 ⟶ Timed effects list only
- Will remove effects applied with any
Timing Mode
, excluding2
and9
- Will remove effects applied with any
-
It always needs to be the first effect for stacking prevention.
Timing Mode
should be either0
withduration
=0
, or1
.
-
It will only look at effects attached directly to the creature.
-
Any
EFF
file filtered through an opcode #177/opcode #182/opcode #183 effect will not be looked at.- Only the opcode #177/opcode #182/opcode #183 effect itself will be checked.
- Any
EFF
file applied by an opcode #248/opcode #249/opcode #272 effect will be looked at, as they get attached directly to the corresponding creature.
-
Any
ITM
file and a SPL
file share the same resref
(f.i. "spwi112.itm"
, "spwi112.spl"
), and the resource
field of this opcode is set to "spwi112"
, then it will remove effects from both resources (the engine doesn't care about the extension when checking the resource
field).
- You might want to keep it mind when using this opcode (you can potentially break things…)
resource
field empty will remove any effect on the creature without a parent resource. Weapon proficiencies, HLA markers, stealth, turn undead (paladin’s panic only) … Local variable effects are however safe.
Parameter #1: Unknown
Parameter #2: Unknown
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:
TurnLevel = TurnLevel + 'Statistic Modifier' value
- 1 ⟶ Flat Value Modifier:
TurnLevel = 'Statistic Modifier' value
- 2 ⟶ Percentage Modifier:
TurnLevel = (TurnLevel * 'Statistic Modifier' value) / 100
The effect modifies TURNUNDEADLEVEL.
- However, this stat does NOT include the amount provided by cleric/paladin levels (
effective turn undead level = TURNUNDEADLEVEL + cleric/paladin turn amount
).
Parameter #1: Value
Parameter #2: Stat Type
Type
field becomes immune to the spell or item specified in the Resource
field. It also gives a message on successful resist.
Known values for
Stat Type
are defined in SPLPROT.2DA. SPLPROT.2DA uses three codes (labeled STAT
, VALUE
and RELATION
) to define a targeting type.
STAT
is either a straight stat value (listed in STATS.IDS) or a pseudo stat of the to be targeted creature:
- 0x100 ⟶ source equals target
- 0x101 ⟶ source is not target
- 0x102 ⟶ circle size
- 0x103 ⟶ use two rows of SPLPROT.2DA
- 0x104 ⟶ negate 0x103
- 0x105 ⟶ source and target morale match
- 0x106 ⟶ AREATYPE.IDS (like outdoors, forest, etc)
- 0x107 ⟶ time of day (in hours)
- 0x108 ⟶ source and target ethical match
- 0x109 ⟶ evasion
- 0x10a ⟶ EA.IDS
- 0x10b ⟶ GENERAL.IDS
- 0x10c ⟶ RACE.IDS
- 0x10d ⟶ CLASS.IDS
- 0x10e ⟶ SPECIFIC.IDS
- 0x10f ⟶ GENDER.IDS
- 0x110 ⟶ ALIGN.IDS
- 0x111 ⟶ STATE.IDS
- 0x112 ⟶ SPLSTATE.IDS
- 0x113 ⟶ source and target allies
- 0x114 ⟶ source and target enemies
- 0x115 ⟶ summon creature limit
- 0x116 ⟶ chapter check
VALUE
is a number used to compare to the stat using a relational operator. Depending on the stat/operator it could be a bit value (hexadecimal allowed). If value is set to "-1"
, then Value
of the opcode will be used.
RELATION
is an index to a relational operator:
- 0 ⟶ less or equal
- 1 ⟶ equal
- 2 ⟶ less
- 3 ⟶ greater
- 4 ⟶ greater or equal
- 5 ⟶ not equal
- 6 ⟶ binary less or equal (stat doesn't contain extra bits not in value)
- 7 ⟶ binary more or equal (stat contains all bits of value)
- 8 ⟶ binary match (at least one bit is common)
- 9 ⟶ binary not match (none of the bits are common)
- 10 ⟶ binary more (stat contains at least one bit not in value)
- 11 ⟶ binary less (stat doesn't contain all the bits of value)
In order to do so, both the
Resource
field of opcode #324 and the Parent Resource
field of the EFF file must be the same string (max. 8 character long). Unlike opcode #206, this one can innately block any type of resource (None/Spell/Item
).
- As of v2.6, the name of the correct resource is displayed instead of the name of the resource the effect instance is located in.
- When displaying its feedback message, it will attempt to identify the name of the parent spell if this effect is located in a child spell with no name. It does in the following manner: if the effect is used within a spell that has no name but there is a spell in the game whose
resname
is one character shorter with a valid name, then it will display that name. This feature is used by Sunfire ("SPWI523D.spl"
) in IWD:EE to check for thief evasion. - This feature will also attempt to look for an identical
"resname.itm"
and display that (identified/unidentified) name if the.spl
the effect is in doesn't have a valid name.
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
Statistic Modifier
can be positive or negative.
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: Value
Parameter #2: Stat Type
Stat Type
field will be affected by the spell in the Resource
field. See opcode #324 for more information.
The spell specified by the resource
field is cast at the same level as the current effect, regardless of Spell type
.
Unlike opcode #146, when targeting Self
or Original Caster
, the resource
is still cast on the ability target, not the caster.
For the purpose of dispelling effects only, the opcode target (not necessarily the caster) determines the caster level for effects in its resource
. It also determines the "Caster location" saved to the V2 effect on creatures. It doesn't transfer full ownership though – the caster is still credited for damage.
If the resource
uses projectile #0 (default)
:
- The
resource
will ignore itsprojectile
field, defaulting to use projectile#1|None
for all effects. - Effects in the
resource
that targetSelf
,Projectile Target
, orOriginal Caster
will all affect the target of this effect. - If this effect is reflected/turned, the target of effects in the
resource
is reflected.
- Effects in the
resource
that targetSelf
will affect the target of this effect, not the caster. - If this effect is reflected/turned, only effects in the
resource
targetingOriginal Caster
will be affected, now affecting the target.
resource
key is cast at the level specified at offset 0xc8
of the EFF.
- Unlike opcode #146
*p2=1
, when this opcode gets reflected (opcode #197, opcode #198, opcode #199, opcode #202, opcode #203 and opcode #207), the spell specified by theresource
key is cast at the caster's Casting Level, and it will also affect the original target (as if it wasn't reflected). - When this opcode is applied through opcode #177 and gets reflected (opcode #197, opcode #198, opcode #199, opcode #202, opcode #203 and opcode #207), the spell specified by the
resource
key is cast at the level specified at offset0xc8
of the EFF, and it will also affect the original target (as if it wasn't reflected).
-
Effects in the
resource
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
Timing Mode
s for this opcode are: 0|Instant/Limited
with duration = 0
, 1|Instant/Permanent
, or 4|Delayed/Permanent
.
Parameter #1: Target
Parameter #2: Projectile Index
Projectile Index
value. These effects are usually used for spell hits based on the spell school.
Functions similar to opcode #140, with the
Use Projectile
option, except its Projectile Index
is 4096 (0x1000)
less, instead of the usual +1
. It can't display projectiles 0 – 4095
.
Known values for
Target
are:
- 0 ⟶ Launch projectile at effect target (doesn't work in Area-Effect spells)
- 1 ⟶ Affected targets launch projectile at ability target (
creature
orlocation
). UseSelf
to generate just one projectile.
Parameter2: Projectile Index (-4096)
Special
field is meant to override Projectile Index
, using values straight from PROJECTL.IDS (without the 4096
offset), but it’s not actually implemented.
Parameter #1: Irrelevant
Parameter #2: Type
Special: Mode
Type
field, depending on the Mode
value.
These effects could be detected by the gamescript trigger ExtendedStateCheck() (see EXTSTATE.IDS).
Known values for
Type
are:
- 0 ⟶ Chaotic Command
- 1 ⟶ Miscast Magic
- 2 ⟶ Pain
- 3 ⟶ Greater Malison
- 4 ⟶ Blood Rage
- 5 ⟶ Cat's Grace
- 6 ⟶ Mold Touch
- 7 ⟶ Shroud of Flame
If
Mode
is set to 1
, then this effect behaves like IWD2 Set State effect (see SPLSTATE.IDS).
-
The
IWD mode
Spell States are interchangeable with theirIWD2 mode
counterparts.- However, keep in mind that the values do not match. Let us consider "Shroud of Flame" as an example. You must use
7
withIWD mode
and47
withIWD2 mode
.
- However, keep in mind that the values do not match. Let us consider "Shroud of Flame" as an example. You must use
- The
IWD mode
states are bits18–25
from EXTSTATE.IDS, all of which are hardcoded. -
Each EXTSTATE has a hard-coded two-way mapping to a SPLSTATE, even though you can't actually set most of the EXTSTATEs directly:
Hex value Bit Label Spell state 0x00000001 BIT0 STATE_PRAYER 12 – BENEFICIAL_PRAYER 0x00000002 BIT1 STATE_PRAYER_BAD 13 – DETRIMENTAL_PRAYER 0x00000004 BIT2 STATE_RECITATION 14 – BENEFICIAL_RECITATION 0x00000008 BIT3 STATE_RECITATION_BAD 15 – DETRIMENTAL_RECITATION 0x00000010 BIT4 STATE_EYE_OF_THE_MIND 48 – EYE_OF_THE_MIND 0x00000020 BIT5 STATE_EYE_OF_THE_SWORD 49 – EYE_OF_THE_SWORD 0x00000040 BIT6 STATE_EYE_OF_THE_MAGE 50 – EYE_OF_THE_MAGE 0x00000080 BIT7 STATE_EYE_OF_VENOM 51 – EYE_OF_VENOM 0x00000100 BIT8 STATE_EYE_OF_THE_SPIRIT 52 – EYE_OF_THE_SPIRIT 0x00000200 BIT9 STATE_EYE_OF_FORTITUDE 53 – EYE_OF_FORTITUDE 0x00000400 BIT10 STATE_EYE_OF_STONE 54 – EYE_OF_STONE 0x00000800 BIT11 STATE_ANIMAL_RAGE 39 – ANIMAL_RAGE 0x00001000 BIT12 STATE_SUPPRESS_HP_INFO 35 – SUPPRESS_HP_INFO 0x00002000 BIT13 STATE_BERSERK_ALWAYS_ACTIVE 33 – BERSERK_ALWAYS_ACTIVE 0x00004000 BIT14 STATE_SNEAK_ATTACK_IMMUNITY 40 – SNEAK_ATTACK_IMMUNITY 0x00008000 BIT15 STATE_CYNICISM_EQUIPPED 255 – CYNICISM_EQUIPPED 0x00010000 BIT16 STATE_UNSTUN_ON_DAMAGE 37 – UNSTUN_ON_DAMAGE 0x00020000 BIT17 STATE_DEAFENED 38 – DEAFENED 0x00040000 BIT18 STATE_CHAOTIC_COMMANDS 41 – CHAOTIC_COMMANDS 0x00080000 BIT19 STATE_MISCAST_MAGIC 42 – MISCAST_MAGIC 0x00100000 BIT20 STATE_PAIN 43 – PAIN 0x00200000 BIT21 STATE_MALISON 44 – MALISON 0x00400000 BIT22 STATE_BLOOD_RAGE 34 – BLOOD_RAGE 0x00800000 BIT23 STATE_CATS_GRACE 45 – CATS_GRACE 0x01000000 BIT24 STATE_MOLD_TOUCH 46 – MOLD_TOUCH 0x02000000 BIT25 STATE_SHROUD_OF_FLAME 47 – SHROUD_OF_FLAME 0x04000000 BIT26 STATE_STATIC_CHARGE 116 – STATIC_CHARGE 0x08000000 BIT27 STATE_DOESNT_AWAKEN_ON_DAMAGE 36 – DOESNT_AWAKEN_ON_DAMAGE
Parameter #1: Slow Factor
Parameter #2: Irrelevant
Slow Factor
field.
Frequency Multiplier
field of any opcode #25 effects on the targeted creature. As a result, it is useless against opcode #25 whose Type
is 0
or 1
, as well as any Poison effect that is used through opcode #177, as Type=4
requires.
Frequency Multiplier
field was already higher than the value specified in opcode #329.
Parameter #1: Strref
Parameter #2: Type
Parameter #3: Starting strref
Special: Count
Strref
field, in the style specified by the Type
field.
Known values for
Type
are:
- 0 ⟶ Default (show strref)
- 1 ⟶ Cynicism (show Cynicism strrefs)
Cynicism
option:
- Uses a random String Reference from between
24916 – 24940
. - Triggers at random intervals throughout its duration.
- Maintains CYNICISM_EQUIPPED on the targeted creature(s).
Strref
is set to 0
and Type
to 1
, the third parameter will
dictate the first strref and Count
will dictate the count. Then the number of lines of Count
will
be displayed starting with the strref in Starting strref
.
Type=0
, it is possible to colorize the string. In order to do so, follow the instructions concerning the colorization of the name of your character during Character Creation.
Parameter #1: Count
Parameter #2: Type
Special: Mode
Creature Power Level
number. This effect summons a number of monsters depending on this value, the special
parameter and if it is used in SPL / ITM or from an external EFF.When used in SPL/ITM files, known values for
Mode
are:
- 0 ⟶ Summon amount equal to
'Count' + Dice rolls
- 1 ⟶ Summon amount equal to
'Count' + Dice rolls
- 2 ⟶ Summon until
Creature Power Level
equals/exceeds Caster's Level
When used in external EFF files, known values for
Mode
are:
- 0 ⟶ Summon until
Creature Power Level
equals/exceedsCount
- 1 ⟶ Summon amount equal to
'Count' + 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 listed in SMTABLES.2DA.
If the
resource
field is filled, it will use a custom .2da to determine which monsters to summon.
If used from an external effect (.eff), the
vvc
field controls the bam/vvc file played over the creatures when summoning.
If used from an external effect (.eff), the
second vvc
field controls the bam file played over the target area when summoning.Parameter #1: Modifier
Parameter #2: Type
Type
parameter defines which damage type is increased.
Known values for
Type
are:
- 0 ⟶ All damage increased
- 1 ⟶ Fire damage
- 2 ⟶ Cold damage
- 3 ⟶ Electricity damage
- 4 ⟶ Acid damage
- 5 ⟶ Magic damage
- 6 ⟶ Poison damage
- 7 ⟶ Slashing damage
- 8 ⟶ Piercing damage
- 9 ⟶ Crushing damage
- 10 ⟶ Missile damage
Modifier
is always a percentage, not a flat value. Multiple instances stack additively, i.e.: +20% + 20% = +40%
.
Parameter #1: Number
Parameter #2: Level
Special: Delay
"original resource" + B
) on the target, for a number of strikes specified by the Number
field. The spell will be cast once per Delay
through its projectile.
If a spell Level
is not specified, then the spell will be cast at level 1 and the damage opcodes will inherit the dice values of this effect, otherwise the spell will be cast at the given level.
Delay
specifies the delay between hits, its default value is 6
(one round).
- If
subspell's projectile = 0
, subspell effects targetingSelf|Projectile Target|Original Caster
will affect the effect target of opcode #333. - If
subspell's projectile != 0
, subspell effects targetingOriginal Caster
will affect the effect target of opcode #333. -
If
subspell's projectile != 0
, subspell effects targetingSelf
andProjectile Target
will affect the ability target of spell containing opcode #333. In particular:-
SPL containing opcode #333 ⇒
target:Living Actor
; opcode #333 ⇒target:Self
Subspell is cast targeting theLiving Actor
- subspell: op#:
target:Self
⟶ affects targetedLiving Actor
. - subspell: op#:
target:Projectile Target
⟶ affects targetedLiving Actor
if subspell's projectile issingle-target
, or subspell's projectile target(s) if it'sarea-effect
.
- subspell: op#:
-
SPL containing opcode #333 ⇒
target:Living Actor
; opcode #333 ⇒target:Projectile Target
Subspell is cast at each target of the projectile- subspell: op#:
target:Self
⟶ affects subspell's target. - subspell: op#:
target:Projectile Target
⟶ affects subspell's target if subspell's projectile issingle-target
, or subspell's projectile target(s) if it'sarea-effect
.
- subspell: op#:
-
SPL containing opcode #333 ⇒
target:Target Point
; opcode #333 ⇒target:Self
Subspell is cast targeting yourself, not the target point- subspell: op#:
target:Self
⟶ affectsSelf
. - subspell: op#:
target:Projectile Target
⟶ affectsSelf
if subspell's projectile issingle-target
, or subspell's projectile target(s) if it'sarea-effect
.
- subspell: op#:
-
SPL containing opcode #333 ⇒
target:Target Point
; opcode #333 ⇒target:Projectile Target
Subspell is cast at each target of the projectile- subspell: op#:
target:Self
⟶ affects subspell's target. - subspell: op#:
target:Projectile Target
⟶ affects subspell's target if subspell's projectile issingle-target
, or subspell's projectile target(s) if it'sarea-effect
.
- subspell: op#:
-
SPL containing opcode #333 ⇒
target:Caster
⟶ is the same as targeting yourself as theLiving Actor
.
-
SPL containing opcode #333 ⇒
-
When this opcode gets reflected (opcode #197, opcode #198, opcode #199, opcode #202, opcode #203 and opcode #207), only its first "hit" gets reflected. Subsequent hits occur as if reflection wasn't involved. When this happens, for that first hit only:
- If
subspell's projectile = 0
, subspell effects targetingSelf|Projectile Target|Original Caster
will affect the original caster. - If
subspell's projectile != 0
, subspell effects targetingOriginal Caster
will affect the original caster. - If
subspell's projectile != 0
, subspell effects targetingSelf
andProjectile Target
will continue to affect the ability target of the spell containing opcode #333.
- If
-
Effects in the
resource
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
Saving Throw
is checked EVERY time it triggers, terminating the opcode #333 effect if successful, so unless that is desired (or it only triggers once), it should not have a Saving Throw
.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Parameter #1: Spellstate
Parameter #2: Row#
Special: Eye Group
Spellstate
set. Known values for Spellstate
are defined in SPLSTATE.IDS.
- If it's already set, this opcode is NOT applied, nothing happens.
- Otherwise, the opcode is attached, the spellstate becomes set (for the duration of the effect), and the "Resource" specified by the
resource
key (if any!) is granted to the character (as if through opcode #171)
The next time the row number specified by
Row#
of 7EYES.2DA is triggered (blocks an effect), this effect will terminate, remove the spell it granted (as if through opcode #172) and decrement opcode #336 effects according to their Eye Group
(parameter2
for opcode #336, special
field for opcode #335).
-
If you apply opcode #335 while the specified
Spellstate
is already set (either by opcode #328 or another opcode #335), then the new opcode #335 will NOT be applied.
Row# = "-1"
will effectively have it last its full duration, blocking every effect listed for that spellstate in 7EYES.2DA.
Parameter #1: Sequence
Parameter #2: Eye Group
resource
field and Sequence
.Known values for
Sequence
are:
- 0 ⟶ None
- 1 ⟶ A
- 2 ⟶ B
- 3 ⟶ C
- 4 ⟶ D
- 5 ⟶ E
- 6 ⟶ F
- 7 ⟶ G
- ...
- 26 ⟶ Z
The two animations that are played must be named in the following way:
'Resource'1'Sequence'.'extension'
'Resource'2'Sequence'.'extension'
#7eyes1a.VVC, #7eyes1b.VVC, #7eyes1c.VVC, #7eyes1d.VVC, #7eyes1e.VVC, #7eyes1f.VVC
#7eyes2a.VVC, #7eyes2b.VVC, #7eyes2c.VVC, #7eyes2d.VVC, #7eyes2e.VVC, #7eyes2f.VVC
Whenever an opcode #335 effect with a matching
Eye Group
(parameter2
for opcode #336, special
field for opcode #335) terminates on the creature, the Sequence
value is reduced by 1, until it reaches 0 and terminates itself.
Parameter #1: Param
Parameter #2: Opcode
Opcode
from target, that has the same param2
as Param
. Use "-1"
to ignore the parameter.
Timing Mode 9 (Instant/Permanent)
.
Parameter #1: StrRef
Parameter #2: Mode
Known values for
Mode
are:
- 0 ⟶ cannot rest
- 1 ⟶ cannot save
- 2 ⟶ cannot save or rest
Parameter #1: Value and Modifier
Parameter #2: Projectile Type
Special: Range
Projectile Type
.
Value
is the high word of the first parameter, Modifier
is a bitfield manipulation operation.
Known values for
Modifier
are:
- 0 ⟶ Set
Value
– ignores original - 1 ⟶ And
Value
– keeps bits - 2 ⟶ Or
Value
– sets bits - 3 ⟶ Xor
Value
– toggles bits - 4 ⟶ And not
Value
– turns off bits
Range
is a radius around the targeted location that it will detect the specified animation (it will affect all within its radius). It's measured same as projectiles: 16 = 1ft radius
.
Resource
should be the animation's label
as listed in the ARE file, not necessarily its filename.
Projectile Type
displays a projectile over the animation's location similar to opcode #140/opcode #141.
"SPIN172.SPL"
, "SPIN177.SPL"
, and "AR1105.ARE"
(the area with those animations) in IWDEE.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
resource
key. Both parameters should be 0
(zero).
In particular:
- If the game option '3E Sneak Attacks' is not enabled, the spell is cast at the character's innate level.
- If the game option '3E Sneak Attacks' is enabled, the spell is cast at level defined in
CRIPPSTR.2DA + 1
.
"BACKSTAB.SPL"
and the spell specified by the resource
key.
Parameter #1: Irrelevant
Parameter #2: Condition
Parameter #3: Weapon Category
Special: Attack Type
resource
key.
Known values for
Condition
are:
- 0 ⟶ Always (both hands)
- 1 ⟶ By this weapon only
Known values for
Attack Type
are:
- 0 ⟶ Any attack type
- 1 ⟶ Melee attack only
- 2 ⟶ Ranged attack only
- 3 ⟶ Magical attack only
(External EFFs) Known values for
Weapon Category
are defined in ITEMCAT.IDS.
Parameter #1: Value
Parameter #2: Field
Known values for
Field
are:
- 1 ⟶ Override body heat
- 2 ⟶ Override blood color
- 4 ⟶ Override personal space
Value = 0
causes infinite melee/spell range, both for their attacks/spells and when others target them.
Parameter #1: Irrelevant
Parameter #2: Mode
Mode
are:
- 0 ⟶ Swap if
caster HP > target HP
- 1 ⟶ Always swap
Parameter #1: IDS Entry
Parameter #2: IDS File
Parameter #3: Weapon Slot
Parameter #4: Weapon Category
Special: Enchantment Level
IDS Entry
field in the specified 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
When used in external EFFs, known values for
Weapon Slot
are:
- 0 ⟶ Current weapon (the one to which this opcode is attached as an equipped effect, otherwise no restrictions)
- 1 ⟶ Main hand weapon (includes Ammo and Fists)
- 2 ⟶ Off-hand weapon
- 3 ⟶ Both weapons
(External EFFs) Values for
Weapon Category
are taken from ITEMCAT.IDS.
Magical
flag.
Parameter #1: Enchantment Level
Parameter #2: Type
Special: Weapon Slot
Type
field. The Enchantment Level
field is used if Type
is set to 0
.
Known values for Type
are:
- 0 ⟶ Magical weapons (
Enchantment Level
and below) - 1 ⟶ Magical weapons (all)
- 2 ⟶ Non-magical weapons
- 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
Known values for
Weapon Slot
are:
- 0 ⟶ Current weapon (the one to which this opcode is attached as an equipped effect, otherwise no restrictions)
- 1 ⟶ Main hand weapon (includes Ammo and Fists)
- 2 ⟶ Off-hand weapon
- 3 ⟶ Both weapons
Type
values 2
, 4
, 5
, 7
, 9
, and 11
do nothing (the “non-“ versions), as the opcode can only add properties, not remove them. These Type
values were likely copied directly from opcode #120, specifically so they would have the same values, even if some didn’t function.
Type=0
, any non-zero Enchantment Level
value will also flag the item as Magical
.
Parameter #1: Statistic Modifier
Parameter #2: Type
Special: Primary 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
Primary Type
defines the school of magic to save against (see MSCHOOL.2DA).
0 – 11
) spell schools.
Parameter #1: Unknown
Parameter #2: Unknown
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Parameter #1: Unused
Parameter #2: Current Weapon Only?
Parameter #3: Weapon Category
Special: Attack Type
resource
key when the target suffers a critical miss. The target of the critical miss effect is the attacker.
Known values for
Current Weapon Only?
are:
- 0 ⟶ No
- 1 ⟶ Yes
Known values for
Attack Type
are:
- 0 ⟶ Any attack type
- 1 ⟶ Melee attack only
- 2 ⟶ Ranged attack only
- 3 ⟶ Magical attack only
(External EFFs) Known values for
Weapon Category
are defined in ITEMCAT.IDS.
Parameter #1: Statistic Modifier
Parameter #2: Current Weapon Only?
Parameter #3: Weapon Category
Special: Attack Type
1d20
) lower or equal to: 1 + 'Statistic Modifier'
.
Known values for
Current Weapon Only?
are:
- 0 ⟶ No
- 1 ⟶ Yes
Known values for
Attack Type
are:
- 0 ⟶ Any attack type
- 1 ⟶ Melee attack only
- 2 ⟶ Ranged attack only
- 3 ⟶ Magical attack only
(External EFFs) Known values for
Weapon Category
are defined in ITEMCAT.IDS.
For instance, let us consider opcode #301 (
Statistic Modifier = 10
) and opcode #362 (Statistic Modifier = 10
). You would have the following ranges:
- Critical hit:
10 – 20
- Critical miss:
1 – 11
10
or 11
, you would get a Critical hit, not a Critical miss.
Parameter #1: Irrelevant
Parameter #2: Irrelevant
Special: Modal State
The targeted creature must already be in the specified Modal State when this opcode is applied.
Modal State
defines the modal state to check (see MODAL.IDS).
Modal State = 0
, then any modal state is eligible, but not NONE
, it must be an actual Modal State.
Parent Resource
field must be used to specify which resources effects will be removed (an empty field will remove effects applied by the engine, such as level-up proficiencies).
Parameter #1: Unknown
Parameter #2: Unknown
Parameter #1: Dialogue enabled
Parameter #2: AI enabled
Special: Selection circle color
Known values for
Dialogue Enabled
are:BG:EE/SoD:
- 0 ⟶ Enabled
- 1 ⟶ Disabled
- 0 ⟶ Disabled
- 1 ⟶ Enabled
Known values for
AI Enabled
are:
- 0 ⟶ Disabled
- 1 ⟶ Enabled
Known values for
Selection circle color
are:
- 0 ⟶ Purple Selection Circle
- non-zero ⟶ Normal Selection Circle
AI Enabled
doesn’t work in BG:EE/SoD games (i.e., you cannot disable the AI of the targeted creature).
Parameter #1: Irrelevant
Parameter #2: Irrelevant
SPL
) specified in the resource
field to the target creature if it moves.
The spell should be applied instantly and any casting times in the
SPL
file should be ignored.
Parameter #1: Irrelevant
Parameter #2: Stat Value
Stat Value
enables it. Ensures that base stats of the affected creature can not be reduced to 0.
The effect modifies IGNOREDRAINDEATH to
Stat Value
.
Stat Value
parameter can take any value. If you set it to 0
, you will disable the effect (for its duration).