Skip to content

[(BG2, BGEE) Bug] Spell power levels

CamDawgCamDawg Member, Developer Posts: 3,438
edited August 2012 in Fixed
Similar to the item power level fixes, this adjusts power levels so that spells interact with spell protections properly.
// spells using wrong power level
COPY_EXISTING ~sppr105.spl~ ~override~ // (entangle): one sound effect opcode is power 2.
~sppr210.spl~ ~override~ // (resist fire/cold): one display string at level 4 has power 0.
~sppr306.spl~ ~override~ // (protection from fire): The character color pulse effect at all levels is at power 1.
~sppr315.spl~ ~override~ // (cure medium wounds): remove intoxication is at power 0.
~sppr401.spl~ ~override~ // (cure serious wounds): remove intoxication is at power 0.
~sppr502.spl~ ~override~ // (cure critical wounds): remove intoxication at power 0, 'healed' string at power 6.
~sppr512.spl~ ~override~ // (greater command): visual effect on target at power 1
~sppr712.spl~ ~override~ // (resurrection): most of the 'remove spell' opcodes are at power 5.
~spwi106.spl~ ~override~ // (blindness): 'blinded' string at power 0
~spwi111.spl~ ~override~ // (infravision): 'infravision' string at power 0
~spwi113.spl~ ~override~ // (protection from evil): 'protected from evil' string at power 0
~spwi210.spl~ ~override~ // (resist fear): visual effect at power 1
~spwi223.spl~ ~override~ // (deafness): visual effects at power 1
~spwi224.spl~ ~override~ // (glitterdust): visual effect at power 4
~spwi410.spl~ ~override~ // (remove curse): save visual effect, all at power 3
~spwi414.spl~ ~override~ // (spirit armor): display string at power 3
~spwi613.spl~ ~override~ // (improved haste): all effects save one at power 3
~spwi711.spl~ ~override~ // (sphere of chaos): play sound at power 4
~spwi721.spl~ ~override~ // (mass invisibility): actual invisibility effects at power 4 (this error is propagated when the Fixpack clones this effect for its additional spell protections)
~spwi803.spl~ ~override~ // (protection from energy): visual effects at power 7
~spwi910.spl~ ~override~ // (imprisonment): visual effects at power 8
~spwi925.spl~ ~override~ // (comet): knockback at power 0, all others power 9
READ_LONG 0x34 "level" ELSE 0
READ_LONG 0x64 "abil_off" ELSE 0
READ_SHORT 0x68 "abil_num" ELSE 0
READ_LONG 0x6a "fx_off" ELSE 0
FOR (index = 0 ; index < abil_num ; index = index + 1) BEGIN
READ_SHORT ("%abil_off%" + 0x1e + (0x28 * "%index%")) "abil_fx_num"
READ_SHORT ("%abil_off%" + 0x20 + (0x28 * "%index%")) "abil_fx_idx"
FOR (index2 = 0 ; index2 < abil_fx_num ; index2 = index2 + 1) BEGIN
WRITE_BYTE ("%fx_off%" + 0x03 + (0x30 * ("%index2%" + "%abil_fx_idx%"))) "%level%"
END
END
BUT_ONLY_IF_IT_CHANGES

// spells using wrong power level
COPY_EXISTING ~sppr303.spl~ ~override~ // (divine dispel magic) : all opcodes are power 0 except its visual effect and removing feeblemind, which are at 3. To work v. magic protections, all of these should be 0.
~spwi302.spl~ ~override~ // (remove magic): visual effect at power 3, all others at 0. Should add removal of feeblemind to this spell.
~spwi321.spl~ ~override~ // (spell thrust): all effects at power 4. Testing needs to be done here--secondary type of magic attack causes target MR to be ignored, possibly also power levels? If yes, no changes needed. If not, needs to be raised to 5 so it can dispel minor spell turning, per its description.
~spwi326.spl~ ~override~ // (arcane dispel magic) : all opcodes are power 0 except its visual effect and removing feeblemind, which are at 3. To work v. magic protections, all of these should be 0.
READ_LONG 0x64 "abil_off"
READ_SHORT 0x68 "abil_num"
READ_LONG 0x6a "fx_off"
FOR (index = 0 ; index < abil_num ; index = index + 1) BEGIN
READ_SHORT ("%abil_off%" + 0x1e + (0x28 * "%index%")) "abil_fx_num"
READ_SHORT ("%abil_off%" + 0x20 + (0x28 * "%index%")) "abil_fx_idx"
FOR (index2 = 0 ; index2 < abil_fx_num ; index2 = index2 + 1) BEGIN
WRITE_BYTE ("%fx_off%" + 0x03 + (0x30 * ("%index2%" + "%abil_fx_idx%"))) 0
END
END
BUT_ONLY_IF_IT_CHANGES</[re>
Post edited by Bhryaen on

Comments

  • CorianderCoriander Member Posts: 1,667
    Ok, I'll put it in.
  • NathanNathan Member Posts: 1,007
    Verified, this has been integrated and should be present in the next build.
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    Confirmed fixed - though most of these won't have any effect. Permanent state removals don't linger around, always succeed, so their power level is never checked. They were 0 to always succeed in bg1 style magic resistance, i guess.
  • BhryaenBhryaen Member Posts: 2,874
    Confirmed Fixed:

    -SPPR105- All effects at Power = 1
    -SPPR210- All effects at Global Effect #3 are Power = 2
    -SPPR306- Character color pulse for all effects now Power = 3
    -SPPR315- Remove intoxication now Power = 3
    -SPPR401- Remove intoxication now Power = 4
    -SPPR502- Remove intoxication and Display string now Power =5
    -SPPR512- Play visual effect for all Spell abilities at Power = 5
    -SPPR712- All effects set to Power = 7
    -SPWI106- Blindness effect set to Power = 1
    -SPWI111- Infravision effect set to Power = 1
    -SPWI113- Effect #0 of every spell ability set to Power = 1
    -SPWI210- Play visual effect set to Power = 2
    -SPWI223- Deafness effect set to Power = 2
    -SPWI224- Play visual effect set to Power = 2
    -SPWI410- All effects now Power = 4
    -SPWI414- Display string now Power = 4
    -SPWI613- All effects of all abilities now Power = 6
    -SPWI711- Play sound now Power = 7
    -SPWI721- All inviso effects now Power = 7
    -SPWI803- Visual effects now Power = 8
    -SPWI910- Visual effects now Power = 9
    -SPWI925- Erm... yeah, Wing Buffet removed from BGEE, so...

    -SPPR303- All effects set to Power = 0
    -SPWI302- Play visual effect now Power = 0; 2 new effects added, 1 to remove Feeblemind portrait icon, 1 to cure Feeblemind
    -SPWI321- All effects set to Power = 0; (see below)
    -SPWI326- All effects set to Power = 0.

    Not confirmed fixed:

    *SPWI321: Spell Thrust
    Testing needs to be done here--secondary type of magic attack causes target MR to be ignored, possibly also power levels? If yes, no changes needed. If not, needs to be raised to 5 so it can dispel minor spell turning, per its description.
    Spell description:

    When this spell is cast at a target creature it will dispel all of the spell protections of 5th level and lower. This includes the following spells: Minor Spell Deflection, Minor Globe of Invulnerability, Spell Immunity, and Minor Spell Turning. The target's magic resistance, if any, does not affect this spell.
    Created scroll of SWPI522 (Minor Spell Turning).
    Created scrolls of SPWI321- memorized one...

    But should I set the scroll to Power = 5 or something as well? I'll get to this later...

  • BhryaenBhryaen Member Posts: 2,874
    OK... hopefully this test suffices:

    Recruited Xan, set up Xan with Minor Spell Turning (the spell, not the scroll), had him cast it on himself, then unpartied from him and made him hostile by shooting him. Finally had Nexlit the Blue Elf cast Spell Thrust (the spell, not the scroll) on Xan, and it surrounded Xan in a nice sphere that ate up his Minor Spell Turning. :-) Repeated to make sure.

    Also tried casting Spell Thrust by scroll, but I probably didn't set something up right because despite it being set to Preset Target the spell got cast on Self instead. That said, Nexlit the Blue Elf had Minor Spell Turning up as well, and once again the sphere and MST removal.

    Confirmed Fixed
Sign In or Register to comment.