Skip to content

LoB Saving Throws Bug

gorpusgorpus Member Posts: 4
In LoB mode, to make the game harder, enemies have a -5 saving throw bonus. That works well for most enemies, however on some enemies a weird behaviour happens: Instead of a lower saving throw they have an extremely high one, which makes them fail all saving throws. I did some experiments and found that enemies that have originally a very low saving throws, for example, zero or less, when the -5 bonus is applied the saving throw jumps to near 20 instead of going to lower negatives (Sarevok example
attached). This makes fighting some bosses very easy because they fail all saving throws. It is clearly a bug.

To reproduce the bug:
- In BG1 open the console and enter: C:CreateCreature("SAREVO")
- Pause the game and press control+q on Sarevok. Keeping the game paused check his saving throws.

I'm using v2.6.6.0 and SCS is the only mod I've installed. Is there a way to fix this bug?



  • jmerryjmerry Member Posts: 3,801
    gorpus wrote: »
    Is there a way to fix this bug?
    No. This is a bug in the game engine. There's no way to fix it without a new patch.

    This bug has likely been present for some time, but before 2.6 came out a different bug prevented the LoB save bonus from working and covered this one up.

    What's going on here? A creature's base saving throws are recorded as unsigned integers in the creature file. The values get truncated to the [20,20] interval before using them - but since it's unsigned, that's actually [0,20]. LoB acts on the creature by modifying these values, before the truncation happens. Sarevok's saves go from 1 to -4 each, which becomes some big number by integer underflow, and then gets truncated to 20.
    After this, other save modifiers such as spells and equipment are applied - but at this point, the number has been copied to a new signed integer variable. Saves can go negative at this point with no problem.

    On top of all of this, a save of 20 is treated as an auto-fail value. Have a bard or Avenger hit LoB Sarevok with a caster level 10 Chromatic Orb, and he'll be petrified every time for the instant win. He won't even roll a saving throw attempt*. On the flip side, a non-LoB Sarevok makes that save 100% of the time even if he's under the influence of both Doom and Greater Malison.

    * Patch 2.6 Sarevok, that is. Older game versions gave him an immortality item and a scripted death at 1 HP, while 2.6 lets you kill him normally. The SCS final battle component also gives Sarevok immortality until you kill of his followers.
  • gorpusgorpus Member Posts: 4
    Thank you for the explanation, makes total sense.

    Hope this gets fixed in the future. Or maybe consider removing the -5 saving throw bonus.
Sign In or Register to comment.