Hi. I'd just like to ask if anyone got their hands on the code for increasing DC of your spells casted? Spell Focus feats come into mind, but I couldn't find their scripts. Thanks
Increase Spell DC Script
Débuté par
Illustair
, sept. 03 2012 10:49
#1
Posté 03 septembre 2012 - 10:49
#2
Posté 03 septembre 2012 - 04:56
SpellFocus* looks like its hardcoded. Most spells that use a SaveDC get the DC right in the spellscript. which means, from this perspective, you'd have to rewrite all those spellscripts ............
CSL might have something about it, but i wouldna get my knickers twisted ..
CSL might have something about it, but i wouldna get my knickers twisted ..
#3
Posté 05 septembre 2012 - 01:51
Is that so? I'd scratch that then. Thanks
#4
Posté 06 septembre 2012 - 12:55
Yes it does it.
To adjust the DC
There are vars like this to increase damage, AOE size, add metamagics
This is how i use it internally for adjusting spells on the outer planes, see "_CSLCore_Environment.nss" for the context of this code.
To adjust the DC
// adjust the SetLocalInt( oCaster, "HKPERM_Save_DCadj", 2 ); // or SetLocalInt( oCaster, "HKPERM_Save_DCadj", -2 ); // adjust the next spell cast only ( removed upon casting any spell ) SetLocalInt( oCaster, "HKTEMP_Save_DCadj", 2 ); // or SetLocalInt( oCaster, "HKTEMP_Save_DCadj", -2 );
There are vars like this to increase damage, AOE size, add metamagics
This is how i use it internally for adjusting spells on the outer planes, see "_CSLCore_Environment.nss" for the context of this code.
if ( iTargetState & CSL_ENVIRO_NEGATIVE )
{
// Fire and light descriptors are impeded
if ( iDescriptor & ( SCMETA_DESCRIPTOR_LIGHT | SCMETA_DESCRIPTOR_FIRE ) )
{
if ( !CSLEnviroImpededMagicCheck( oCaster, "Casting Light spell in shadow", 20, iSpellLevel, iclass ) )
{
return FALSE;
}
}
else if ( iDescriptor & SCMETA_DESCRIPTOR_POSITIVE || iSpellSubSchool & SPELL_SUBSCHOOL_HEALING && !( iDamageModType & DAMAGE_TYPE_NEGATIVE ) )
{
if ( !CSLEnviroImpededMagicCheck( oCaster, "Casting Positive spell in negative", 20, iSpellLevel, iclass ) )
{
return FALSE;
}
}
if ( iDescriptor & SCMETA_DESCRIPTOR_LIGHT )
{
SetLocalInt( oCaster, "HKTEMP_Spell_DurationCatAdj", -1 );
SetLocalInt( oCaster, "HKTEMP_sizemodpercent", 50 );
}
if ( iDescriptor & SCMETA_DESCRIPTOR_POSITIVE )
{
SetLocalInt( oCaster, "HKTEMP_damagemodpercent", 75 );
SetLocalInt( oCaster, "HKTEMP_sizemodpercent", 75 );
}
if ( iSpellSubSchool & SPELL_SUBSCHOOL_HEALING && !( iDamageModType & DAMAGE_TYPE_NEGATIVE ) )
{
SetLocalInt( oCaster, "HKTEMP_damagemodpercent", 75 );
SetLocalInt( oCaster, "HKTEMP_sizemodpercent", 75 );
}
if ( iDescriptor & SCMETA_DESCRIPTOR_NEGATIVE || iDamageModType & DAMAGE_TYPE_NEGATIVE )
{
SetLocalInt( oCaster, "HKTEMP_damagemodpercent", 150 );
SetLocalInt( oCaster, "HKTEMP_sizemodpercent", 125 );
}
// shadow descriptor spells do more damage, and they are always maximized
if ( iSpellSubSchool & SPELL_SUBSCHOOL_SHADOW )
{
SetLocalInt( oCaster, "HKTEMP_damagemodpercent", 150 );
SetLocalInt( oCaster, "HKTEMP_sizemodpercent", 125 );
SetLocalInt( oCaster, "HKTEMP_Spell_MetaMagic", GetLocalInt( oCaster, "HKTEMP_Spell_MetaMagic") | METAMAGIC_MAXIMIZE );
}
}
#5
Posté 06 septembre 2012 - 05:01
Great stuff. That's exactly what I was looking for, and more.





Retour en haut






