//Include Name: epicdc_inc ///////////////////////////////////// //Created by Genisys / Guile 6/14/08 ///////////////////////////////////// //NOTE: IF you change anything here //you must build the module (Scripts only) //or changes will not be saved! ////////////////EPIC DC BONUS OPTION SETTING///////////////////////////////// /* The # below, (eDC = #) is the # of levels a player must have over level 20 (caster levels) to gain a + 1 bonus to the spell's Saving Throw Difficulty Class (DC) they are casting. (This system is on most spells) (ie. +2 at caster level 26 if the # = 3) Recommended settings are 2 to 6. Basically the # you enter is how many caster levels the PC needs over level 20 to get a +1 bonus. This script has been tested thoroughly. */ const int eDC = 2; //ie. 3 = + 1 / 3 levels over level 20 (caster levels) // (ie. level 38 = + 6 Epic DC Bonus) ////////////////////////////////////////////////////////////////////////////// /* *NOTE: Not All spells which allow saves work within this system. Below are Spells which have thier own Epic DC Bonsus System set up within the spell's script. (Make sure you change the # there! if you change it above!) Combust ~ "x2_s0_combust" Gedlee's Electric Loop ~ "x2_s0_elecloop" This include script will allow you to easially add an Epic DC Bonus to spells which you wish to modify. (Spells which I haven't modified yet.) You can modify any spell within the NWN Toolset Script Editor, simply click the open an exisiting file tab at the top of the script editor, then select All Resources, then in the name box type: nw_s or x2_s , you should be able to find the spell script you wish to edit there. In the spell script you wish to add an Epic DC Bonus.. Directly below: #include "x2_inc_spellhook" Type this: #include "epicdc_inc" void main() { If the spell allows a save usually scripted like so: GetReflexAdjustedDamage(nDamage, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_FIRE); if(MySavingThrow(SAVING_THROW_FORT, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_NONE, OBJECT_SELF, fDelay)) etc. you can add an epic DC Bonus by replacing GetSpellSaveDC() with: GetEpicSpellSaveDC() like so... GetReflexAdjustedDamage(nDamage, oTarget, GetEpicSpellSaveDC(), SAVING_THROW_TYPE_FIRE); IMPORTANT: Save the spell & build the module (scripts only!), then save module! NOTE: you are not modifying the original, but your module will use the edited version instead, the original cannot be modified by saving. Lastly you will have to build the module (scripts only / click advanced tab), and then save the module. I HIGHLY recommend you open up the module properties of your module (select edit at the top), then select cached scripts once the module properties dialogue box pops up. Find all of the scripts that you have edited and add them to the list of cached scripts, but DO NOT cache includes, as they are part of a script (not an actual script) and are treated as though that include is part of the script you are caching. So, you would not want to cache this script or the spellfunc_inc script either. (DO NOT TOUCH ANYTHING BELOW OR THIS LINE!) */ ////////////////////////////////////////////////////////////////////////////// //////Protoype (Defined)////////// int GetEpicSpellSaveDC() { int bDC; object oCaster = OBJECT_SELF; int nDCBonus; int nLvl = GetCasterLevel(OBJECT_SELF); int aInt = eDC - 1; int bInt = nLvl + aInt; int cInt = nLvl - 20; int dInt = cInt / eDC; int gInt = dInt; //Obviously they qualify for a epic bonus DC.. if(bInt >1) { nDCBonus = gInt; string sMessage; sMessage = "Your Epic DC Bonus = +"; sMessage += IntToString(nDCBonus); SendMessageToPC(oCaster, sMessage); } else { nDCBonus = 0; } bDC = GetSpellSaveDC() + nDCBonus; return bDC; //End Prototype Definition }