Skip to content

Modding kit-based saving throw penalty for caster targets

pietrkopietrko Member Posts: 13
How is implemented the saving throw penalty a target of specialist mage spell recieves?

I tried looking into kit abilites in BG2 but found none for specialist wizards.
I wonder how it can be modded, let's say I would like to make a HLA that gives -1 to saving throw for spell target for given school, how could I achieve it?

Comments

  • AquadrizztAquadrizzt Member Posts: 1,065
    There isn't a clean way to do this as far as I know. I'm a bit rusty on my BG2 modding but my assumption would be something like this:

    - Make an HLA that permanently applies a hidden spell state (or some other splprot.2da accessible stat that can be checked).
    - Patch every spell of that school to check if the original caster has the spell state from the HLA. If they do, apply a -X penalty the target's saving throws for 1 second as the first thing the spell does (this is long enough to affect subsequent spell effects with instantaneous timing).
  • pietrkopietrko Member Posts: 13
    What about something simpler like saving throw penalty based on caster level?
    It would require patching spells too?
    im really curious how they did it with specializations
  • kjeronkjeron Member Posts: 2,367
    It's hardcoded for the specialist mage kits.
  • pietrkopietrko Member Posts: 13
    edited May 2021
    @Aquadrizzt
    Ok I've got the HLA.

    Now which effect I should use to make a condtional saving throw penalty?

    I consider using OpCode 326 using Paramater 2 - 76 (SPLSTATE = specified value) with a special spell that decreases saving throws, but this is unclean and forces me to either add another saving throw decreasing spell that is applied immidiately before EVERY spell with spell throw.....

    Any other ideas?
    Post edited by pietrko on
  • AquadrizztAquadrizzt Member Posts: 1,065
    @pietrko , no that's basically what you have to do. Lots of spells in the original game and in mods use hidden sub spells to perform actions. Many of the really cool mod functionalities people have managed to assemble are actually multiple hidden layers of opcode 326 apply spell effects.
  • pietrkopietrko Member Posts: 13
    edited May 2021
    If i put this opcode 326 in spell ability as first effect would it be executed and applied before other effects?
    Does order of effects even is considered? ( I guess).

    What about projectile speed and so on.
    I fear all those problems.

    Other problem is stacking of those saving throw penalites...
Sign In or Register to comment.