Author Topic: DC for spells cast from items  (Read 334 times)

Legacy_Terrorble

  • Sr. Member
  • ****
  • Posts: 370
  • Karma: +0/-0
DC for spells cast from items
« on: January 27, 2013, 06:32:49 am »


               How are DCs calculated for spells cast from items?  scroll, wand, staff,...  Or, where does GetSpellSaveDC() pull that information from?

I cast my lightning bolt from a staff and it says the DC is 16.  It doesn't account for focus feats or caster ability score, levels, item level, etc.

Before I manually edit the spell scripts to make my own DCs, I thought I'd see about using what is already there.
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
DC for spells cast from items
« Reply #1 on: January 27, 2013, 07:01:08 am »


               You have to manually edit the scripts. The simplest way is to do a mass find/replace on all scripts, or, if you want to spend more time, all spellcripts, and inject an #include line for your own custom include. This, by itself, is relatively simple with a text editor worth its salt, but it's still time-consuming.

From there, you can then write your own custom functions, and determine dc however you like. If you need more to go on, I can post our custom spells include, in which we set up a spell info struct which we run before every spell, to collect data. And yes, doing that meant rewriting every spellscript. You might find a simpler way via the unofficial 'patch', but I'm not sure, not having used it.

Funky
               
               

               
            

Legacy_Squatting Monk

  • Hero Member
  • *****
  • Posts: 776
  • Karma: +0/-0
DC for spells cast from items
« Reply #2 on: January 27, 2013, 07:13:37 am »


               GetSpellSaveDC()'s formula is 10 + spell level + relevant ability modifier. It also adds modifiers from things like spell focus. I can't find any info on the various wikis as to whether it works any differently for spells cast by items.
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
DC for spells cast from items
« Reply #3 on: January 27, 2013, 01:52:21 pm »


               

FunkySwerve wrote...
. You might find a simpler way via the unofficial 'patch', but I'm not sure, not having used it.

Funky

yes, CP allows to override DC and caster level or any item to specific value. Also possible to add metamagic into the spell.

its explained in documentation, link in my signature
               
               

               


                     Modifié par ShaDoOoW, 27 janvier 2013 - 01:53 .
                     
                  


            

Legacy_Terrorble

  • Sr. Member
  • ****
  • Posts: 370
  • Karma: +0/-0
DC for spells cast from items
« Reply #4 on: January 27, 2013, 11:37:46 pm »


               Thanks for the quick replies.
I downloaded the CP and am looking through that.

I've had my hands in most spells before, so if I have to take a couple hours and replace GetSpellSaveDC() with my own function when casting from an item, I might go that route.