Skip to content

[(BG2) bug] One more Spook fix

CamDawgCamDawg Member, Developer Posts: 3,438
edited November 2012 in Fixed
Spook is still showing 'Panic' in the battle window even if the spell is ineffective due to magic resistance:
// spook's 'panic' string not properly quashed by MR
COPY_EXISTING ~spwi125.spl~ ~override~
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%" + 0x0d + (0x30 * ("%index2%" + "%abil_fx_idx%"))) 1 // change to dispel, no bypass MR
END
END
BUT_ONLY_IF_IT_CHANGES
Post edited by Tanthalas on

Comments

  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    confirmed fixed - with note: @CamDawg one of the sound effects is resistable, but has no saving throw.
    If it should always play then it shouldn't be resistable, if it should play only when taking effect, then then it should have saving throw.
    This is just nitpicking, no one will ever notice this.
  • Humanoid_TaifunHumanoid_Taifun Member Posts: 1,063
    Confirmed fixed.
  • CamDawgCamDawg Member, Developer Posts: 3,438
    edited September 2012

    confirmed fixed - with note: @CamDawg one of the sound effects is resistable, but has no saving throw.
    If it should always play then it shouldn't be resistable, if it should play only when taking effect, then then it should have saving throw.
    This is just nitpicking, no one will ever notice this.

    Argh. Pinging @SethDavis (just run this on the existing 0829) and moving back into B.
    // one sound can't be saved against
    COPY_EXISTING ~spwi125.spl~ ~override~
    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%" + 0x24 + (0x30 * ("%index2%" + "%abil_fx_idx%"))) THIS | BIT0
    WRITE_LONG ("%fx_off%" + 0x28 + (0x30 * ("%index2%" + "%abil_fx_idx%"))) (index * "-1")
    END
    END
    BUT_ONLY
    Post edited by CamDawg on
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    @CamDawg wait wait, what's that -6?
  • CamDawgCamDawg Member, Developer Posts: 3,438

    @CamDawg wait wait, what's that -6?

    Whoops, screwed that up--should be -1 per two levels. Code above is adjusted.
  • Humanoid_TaifunHumanoid_Taifun Member Posts: 1,063
    What does BUT_ONLY do? Is that short for BUT_ONLY_IF_IT_CHANGES?
  • CamDawgCamDawg Member, Developer Posts: 3,438

    What does BUT_ONLY do? Is that short for BUT_ONLY_IF_IT_CHANGES?

    Yep.

    It's especially pointless on a specific patch (it's really only useful for REGEXP patches) but old habits die hard.

  • TanthalasTanthalas Member Posts: 6,738
    Downgraded to C since most people probably won't notice the problem.
  • SethDavisSethDavis Member Posts: 1,812
    Potentially fixed - @CamDawg's fix has been applied
  • CamDawgCamDawg Member, Developer Posts: 3,438
    This is fixed in 0924.
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    Confirmed fixed in 0924
Sign In or Register to comment.