Calculating the casting charging time of scrolls

Post » Sun Aug 31, 2014 11:36 am

For my mod, I'm trying to calculate the casting time of a scroll. Simply calling theScroll.GetCastTime() returns zero, presumably because the actual cast time is not set explicitly in the CK form but is auto-calculated based on the magic effects that make up the scroll? Is there a way to calculate the casting time or should GetCastTime() also work for auto-calculated scrolls?

User avatar
^_^
 
Posts: 3394
Joined: Thu May 31, 2007 12:01 am

Post » Sun Aug 31, 2014 7:21 pm

http://www.uesp.net/wiki/Tes5Mod:Mod_File_Format/SPEL says that when a spell (or scroll) is set to auto-calc, the highest cast time from among all of that spell's effects will be used as the cast time. You can walk the effects on the scroll using GetNumEffects() and GetNthEffectMagicEffect(). Call GetCastTime() on each individual magic effect and figure out which one is the highest, hopefully that should work for you.

User avatar
Ezekiel Macallister
 
Posts: 3493
Joined: Fri Jun 22, 2007 12:08 pm


Return to V - Skyrim