I was wondering if it is possible to make spell duration dependant on the caster's spellpower:
A spell like Horror, for example, could be made to last 0.5 second x Spellpower?
Variable Spell duration
Débuté par
Dark_Ansem
, juin 02 2010 06:05
#1
Posté 02 juin 2010 - 06:05
#2
Posté 02 juin 2010 - 06:29
You sure can.
Currently, most of the durations are defined as constant floats and then, adjusted according to the rank of the target. Instead, you could generate the base duration based on spellpower (either independently or on top of the already defined constants) and then, apply the rank adjustment.
Currently, most of the durations are defined as constant floats and then, adjusted according to the rank of the target. Instead, you could generate the base duration based on spellpower (either independently or on top of the already defined constants) and then, apply the rank adjustment.
#3
Posté 02 juin 2010 - 07:38
thanks TimelordDC!
let me see if I understand it correctly:
"independently": like 1secXspellpower
"on top of the already defined constants": 6secs+1secXspellpower
how does the game handle decimals? and how does Rank affect durations?
let me see if I understand it correctly:
"independently": like 1secXspellpower
"on top of the already defined constants": 6secs+1secXspellpower
how does the game handle decimals? and how does Rank affect durations?
#4
Posté 05 juin 2010 - 08:22
is it like I described in last post?
#5
Posté 07 juin 2010 - 05:42
Dark: You have to look at the individual spell scripts to see how they work. Each talent in the game has its own formula which will incorporate stats like spellpower in different ways. You would then override the spell scripts you want, which is just a matter of putting the new compiled scripts in the right folder.
Your questions would be answered by reading up on the game rules section of the wiki and looking at the spell scripts. For example, most of the "die rolls" and whatnot in the game are handled with floats.
I'm 99% sure this is how spells work, anyway -- although I haven't done much with scripting at this point outside of setting up some quests and followers.
Your questions would be answered by reading up on the game rules section of the wiki and looking at the spell scripts. For example, most of the "die rolls" and whatnot in the game are handled with floats.
I'm 99% sure this is how spells work, anyway -- although I haven't done much with scripting at this point outside of setting up some quests and followers.
#6
Posté 07 juin 2010 - 06:43
I know that, Talisander. I am asking because the wiki is not clear or makes it more difficult than what it is. and I can't check the scripts on my own, no DA right now (away from my laptop)





Retour en haut







