Aller au contenu

Photo

Warlock's SR Caster Level Problem


  • Veuillez vous connecter pour répondre
9 réponses à ce sujet

#1
Jesse_the_Thief

Jesse_the_Thief
  • Members
  • 85 messages
Has any one found a fix to this issue? As most know, Warlock levels only seem to count as half when trying to penetrate SR. The issue sounds somewhat obvious, Warlocks must have been assigned the same status as Paladins and Rangers for casting somewhere. Has any one figured out a way to change or work around that error?

#2
manageri

manageri
  • Members
  • 394 messages
AFAIK there's nothing that can be done to affect the spell resistance check itself. You can however change the invocation scripts to not check for SR and instead build a SR check of your own. For the spellish invocations (like wall of perilous flame) you of course just replace the "if(!MyResistSpell..." with it. For the blast essence invocations you need to change the nIgnoreResists parameter to true in their DoEldritchBlast function.

Here's the SR check I whipped up a while ago for my own use (which is far from perfect) using hellrime blast as an example:

int DoEssenceHellrimeBlast(object oCaster, object oTarget, int bCalledFromShape, int bDoTouchTest, int nAllowReflexSave, int nHalfDmg)
{
int bPenetratedSR = 1;
int nTargetSR = GetSpellResistance(oTarget);
int nMyCasterLevel =  GetLevelByclass(class_TYPE_WARLOCK, OBJECT_SELF)
                    + GetLevelByclass(class_TYPE_HELLFIRE_WARLOCK, OBJECT_SELF);
if (GetHasFeat(FEAT_PRACTICED_INVOKER,OBJECT_SELF, TRUE))
    {
    nMyCasterLevel = nMyCasterLevel +4;
    if (nMyCasterLevel > GetHitDice(OBJECT_SELF))
        nMyCasterLevel = GetHitDice(OBJECT_SELF);
    }
if (GetHasFeat(FEAT_FIENDISH_POWER, OBJECT_SELF, TRUE))
    nMyCasterLevel = nMyCasterLevel +1;   
if (GetHasFeat(FEAT_FEY_POWER, OBJECT_SELF, TRUE))
    nMyCasterLevel = nMyCasterLevel +1;           
if (GetHasFeat(FEAT_SPELL_PENETRATION, OBJECT_SELF, TRUE))
    nMyCasterLevel = nMyCasterLevel +2;
if (GetHasFeat(FEAT_GREATER_SPELL_PENETRATION, OBJECT_SELF, TRUE))
    nMyCasterLevel = nMyCasterLevel +2;
if (GetHasFeat(FEAT_EPIC_SPELL_PENETRATION, OBJECT_SELF, TRUE))
    nMyCasterLevel = nMyCasterLevel +2;

if (d20(1) + nMyCasterLevel < nTargetSR)
    bPenetratedSR = 0;
if (GetHasSpellEffect(SPELL_GREATER_SPELL_MANTLE, oTarget)
    || GetHasSpellEffect(SPELL_LEAST_SPELL_MANTLE, oTarget)
    || GetHasSpellEffect(SPELL_SPELL_MANTLE, oTarget))
    bPenetratedSR = 1;
//    if (bPenetratedSR == 1)
//    SpeakString("Spell Not Resisted", TALKVOLUME_TALK);
    if (bPenetratedSR == 0)
    SpeakString("Spell Resisted!", TALKVOLUME_TALK);
    if (bPenetratedSR == 1)
    {
    // First, do Base Effects:
    if ( DoEldritchBlast(oCaster, oTarget, bCalledFromShape, bDoTouchTest, DAMAGE_TYPE_COLD, nAllowReflexSave, TRUE, nHalfDmg, VFX_INVOCATION_HELLRIME_RAY) )
    {
       //  script continues unchanged from here

#3
Jesse_the_Thief

Jesse_the_Thief
  • Members
  • 85 messages
Oh, of course of course of course, awesome. I can just do it all manually, great. Thanks.

#4
MasterChanger

MasterChanger
  • Members
  • 686 messages
I think Kaedrin has a workaround planned for his 1.41 release. Search that page for "Warlock SR Fix/Workaround".

#5
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages
I've got it fixed as well -> Community Script Library



Basically it just requires redoing all the spells from the ground up, which most try to avoid ( and doing just a few spells is not really going to solve things as it's a root problem affecting all casters in different ways ).

#6
dunniteowl

dunniteowl
  • Members
  • 1 559 messages
Jesse, I appreciate the dry humor, there. However, even if someone else has a fix for such an issue, it's not going to simply be "Plug and Play" meaning you install it and suddenly everything's fine. So, prepare yourself. There's going to have to be some effort on your part to get it working smoothly with everything else already there. That said, nothing too traumatic, I assure you.

dno

#7
Jesse_the_Thief

Jesse_the_Thief
  • Members
  • 85 messages
Er, it wasn't dry humor, bro, it just hadn't occurred to me I COULD change all the scripts, I was afraid this was one of those hard-coded issues where you're just outta luck. Seemed forehead-smackingly obvious once he said it. I can script it, and he even wrote out the bulk of it for me, so mission accomplished banner time.

#8
dunniteowl

dunniteowl
  • Members
  • 1 559 messages
Ah, and here I was thinking that was just very well used sarcasm. See? The written medium really isn't the same as speaking. If I'd heard you I would've known right off -- at least I hope I would've.

dno

#9
Jesse_the_Thief

Jesse_the_Thief
  • Members
  • 85 messages
Yeah, I hear you. Throws you off when I miss something blindingly obvious too, was one of those situations where I was looking behind tree after tree going, "WHERE'S THE DAMN FOREST AAAAHHH"!

#10
Jesse_the_Thief

Jesse_the_Thief
  • Members
  • 85 messages
This was surprisingly difficult to figure out, but I think I've got it... I used the above script but cleaned things up. All you do is make this an included script in the Eldritch Blast script, and then replace all the "MyResistSpell" with "DoWarlockMyResistSpell". It runs the same check, but does the SR check manually while still utilizing ResistSpell for Mantles and Sphere. (Mantles are hard coded, so fixing them another way would be a mess)

/* This script creates a custom SR check for Warlock Invocations to work around the 1/2 level
error. Any Warlock based offensive spell will likely need to use this custom SR check. */

//The basic gist of it, check the Warlock's spell against the target's SR and give feedback.
//Just like MyResistSpell, 0 = no resist, 1 = SR resist, 2 = Immune resist, 3 = Mantle use.
int DoWarlockMyResistSpell(object oCaster, object oTarget, float fDelay = 0.0);

int DoWarlockMyResistSpell(object oCaster, object oTarget, float fDelay = 0.0)
{
    if (fDelay > 0.5)
    {
        fDelay = fDelay - 0.1;
    }
    effect eSR = EffectVisualEffect( VFX_DUR_SPELL_SPELL_RESISTANCE );
    effect eGlobe = EffectVisualEffect( VFX_DUR_SPELL_GLOBE_INV_LESS );
    effect eMantle = EffectVisualEffect( VFX_DUR_SPELL_SPELL_MANTLE );
    int nTargetSR = GetSpellResistance(oTarget);
    int nMyCasterLevel = GetLevelByclass(class_TYPE_WARLOCK, oCaster) +
                         GetLevelByclass(class_TYPE_HELLFIRE_WARLOCK, oCaster);
    if (GetHasFeat(FEAT_PRACTICED_INVOKER,oCaster, TRUE))
     {
          nMyCasterLevel = nMyCasterLevel +4;
          if (nMyCasterLevel > GetHitDice(oCaster))
        {
                nMyCasterLevel = GetHitDice(oCaster);
        }
    }
    if (GetHasFeat(FEAT_FIENDISH_POWER, oCaster, TRUE))
    {
         nMyCasterLevel = nMyCasterLevel +1;   
    }
    if (GetHasFeat(FEAT_FEY_POWER, oCaster, TRUE))
    {
           nMyCasterLevel = nMyCasterLevel +1;  
    }         
    if (GetHasFeat(FEAT_SPELL_PENETRATION, oCaster, TRUE))
    {
        nMyCasterLevel = nMyCasterLevel +2;
    }
    if (GetHasFeat(FEAT_GREATER_SPELL_PENETRATION, oCaster, TRUE))
    {
         nMyCasterLevel = nMyCasterLevel +2;
    }
    if (GetHasFeat(FEAT_EPIC_SPELL_PENETRATION, oCaster, TRUE))
    {
         nMyCasterLevel = nMyCasterLevel +2;
    }   
    if (d20(1) + nMyCasterLevel < nTargetSR)
    {
        DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eSR, oTarget));  
        return 1;
    }
    else
    {
        switch(ResistSpell(oCaster, oTarget))
        {
           case 0:
           case 1:
           return 0;
           break;
           case 2:
           DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eGlobe, oTarget));
           return 2;
           break;
           case 3:
           DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eMantle, oTarget));
           return 3;
           break;
        }
    }
}

Modifié par Jesse_the_Thief, 28 janvier 2011 - 07:27 .