Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Axis & Allies 1942 Online is now available in Early Access! Buy it on Steam. The FAQ is available.
New Premium Module: Tyrants of the Moonsea! Read More
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

[(BG1, BG2) Bug] Improved Invisibility (SPWI405.SPL) doesn't confer save bonuses (0629)

IgneousIgneous Member Posts: 368
edited August 2012 in Fixed
Current behaviour: When casting Improved Invisibility (SPWI405.SPL), the recipient isn't granted the +4 bonus to all saving throws mentioned in the spell's description.

Expected behaviour: Improved Invisibility should grant the recipient the +4 bonuses to saving throws.

Games affected: BG1, BG2, BGEE.

Notes: See second post for more background. This bug is still present as of Build 0629.

Post edited by Bhryaen on
AndreaColomboBhryaen

Comments

  • IgneousIgneous Member Posts: 368
    Update! According to the IESDP [1] [2], Opcode #20 with the Type 1 (Improved Invisibility) parameter does not provide the +4 bonus to saving throws at all, though it does factor in the AC bonuses.

    I would recommend, then, that Opcode #20 be fixed to include the save bonuses for improved invisible states.

    [1] http://iesdp.gibberlings3.net/opcodes/bg2tob.htm
    [2] http://forums.gibberlings3.net/index.php?showtopic=1805

    AndreaColomboBhryaen
  • IgneousIgneous Member Posts: 368
    Update: This bug is still present as of Build 0629.

  • GalactygonGalactygon Member, Developer Posts: 378
    I would like to add to the desired behavior of (improved) invisibility:

    1. AC and saving throw bonuses should only work against creatures whose stat SEEINVISIBLE=0, and are employing non-area effect spells or items (word 0x08 != 3 of the .pro file used by the header of the .spl or .itm in question).

    2. All .bams, lighting effects, and overlays should not be drawn over an invisible characters (like the hardcoded behaviour of minor globe in BG1/2). I'd allow for a list of .bam resrefs to be specified in an external .2da file that are exceptions to this rule. For example, placing SPFLSRIN and SPFLSTI

    3. Improved invisibility should refresh itself (make the .cre go completely invisible again) whenever one of the following conditions return true:
    a. no one is actively targeting the improved invisible .cre with an attack or spell
    b. no one is actively engaging in dialogue with the improved invisible .cre
    c. the improved invisible .cre in question is out of sight from any enemy who is actively targeting the .cre (can happen if you flee away from the LOS of someone who is pursuing).

    -Galactygon

    BhryaenAndreaColombo
  • GalactygonGalactygon Member, Developer Posts: 378
    Desired behaviour #3 is consistent to the vanilla description of the improved invisibility spell:

    "Note, however, that there are sometimes telltale traces, a shimmering, so that an observant opponent can attack the invisible spell recipient. These traces are only noticeable when specifically looked for ..."

    -Galactygon

    BhryaenAndreaColombo
  • CamDawgCamDawg Member, Developer Posts: 3,394
    I hate Improved Invisibility. I really do. Including the save bonus directly in the opcode will save a nasty hack in the spells that is by no means foolproof.

  • SethDavisSethDavis Member Posts: 1,812
    edited July 2012
    checking this one now

    OP is potentially fixed

    @Galactygon - Unfortunately, the engine seems to be set up specifically to make all those requests horrifically difficult.

    1. The code that determines the saves has no access to the cause of the save as the source adds its effects to a list and destroys itself.

    2. These effects are spread pretty thin throughout the code (not centralized) and are hiding in some strange places.

    3. This one would involve some potentially heavy state checking involving every source in the map/area or a rework of several systems to keep track of this information.

    It might be possible eventually, but for now would you mind saving these points for a feature request?

    Post edited by SethDavis on
    Avenger_teambgAndreaColombo
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    Yeah, adding complexity now will just create new bugs, and there is a tight schedule.

  • AndreaColomboAndreaColombo Member Posts: 5,326
    edited July 2012
    I would surely like to see this addressed as a future request, though. I'm an engine fixes fanboy (and I'm not even a modder, go figure)!

  • CamDawgCamDawg Member, Developer Posts: 3,394
    @SethDavis Have the save bonuses been incorporated into the opcode itself, or is it fixed another way?

  • SethDavisSethDavis Member Posts: 1,812
    @CamDawg - I actually don't know what corresponds to the opcode within the engine. There is a section called opcode, but it's some low level stuff that seems to control lua (?).

    What I did was add the bonuses when invisibility is checked by the character sheet (making sure that invisibility_improved is also active) as well as added a check for invisibility_improved and the appropriate bonuses in the code that checks for a successful save.

    Does that sound OK, or should I rework it somehow?

  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    SethDavis said:


    What I did was add the bonuses when invisibility is checked by the character sheet (making sure that invisibility_improved is also active) as well as added a check for invisibility_improved and the appropriate bonuses in the code that checks for a successful save.

    Does that sound OK, or should I rework it somehow?

    If you rewrote save check to handle the improved invis state, then it should work. It is kinda hardcoded, but works.

  • CamDawgCamDawg Member, Developer Posts: 3,394
    SethDavis said:

    @CamDawg - I actually don't know what corresponds to the opcode within the engine. There is a section called opcode, but it's some low level stuff that seems to control lua (?).

    What I did was add the bonuses when invisibility is checked by the character sheet (making sure that invisibility_improved is also active) as well as added a check for invisibility_improved and the appropriate bonuses in the code that checks for a successful save.

    Does that sound OK, or should I rework it somehow?

    It sounds like it, yeah.

    As for opcodes, I'm coming from a modder's point of view, i.e. effects on spells or items or creatures. Remember, the engine is a black box from my perspective. :) I think these are ... maybe effectIDs? ... in the source. Basically, I want to know if I use an invisibility opcode/effectID (improved) on my spell or item, do I also need to include separate opcode/effectID to apply the save bonuses, or if they'll be automagically applied the same way that AC bonuses currently are.

    Bhryaen
  • SethDavisSethDavis Member Posts: 1,812
    edited July 2012
    Ah, I'll keep that in mind then. Everything should be automatic right now, but if anything finds it's way in that tried to get around this by adding more effects we will probably have redundancy.

  • CamDawgCamDawg Member, Developer Posts: 3,394
    Thank god--we had some horrendous patch in BG2FP, where every spell that gives II was also immune to other II spells (and itself) so the save bonuses wouldn't stack (like the awful slow patch I posted around here somewhere). You've made all that unnecessary and provided a much better solution to boot.

  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    I'm not sure how can we test this? Is the improved invisible state printed when we enable full combat feedback?

  • TanthalasTanthalas Member Posts: 6,738
    Turns out that it is possible to test this one in the game.

    Confirmed Fixed in Build 0815

    Method:

    - Teached Improved Invisibility to my Sorcerer.
    - Spawned a bunch of Faldorns
    - A level 1 Faldorn has a Save vs Spell of 15
    - The spell Entangle gives the target a +3 bonus to saving throws to attempt to bypass its effects (which is actually a penalty @AndreaColombo, @Aosaw)
    - Casted Entangle and observed that the best Saving Throw a Faldorn could achieve was 18 (which is correct).
    - Casted Improve Invisibility on one of the Faldorns.
    - This Faldorn could now save vs Entangle starting at 14.

    Note: I didn't test the other save types, but if it works for one of them, it hopefully works for all of them.

    CuvBhryaen
  • TanthalasTanthalas Member Posts: 6,738
    I just tested this against Wands and its working too.

    I also just noticed that the Improved Invisibility bonus to save rolls is actually reflected on the Record screen. So I think its safe to move this one to confirmed fixed too.

Sign In or Register to comment.