Aller au contenu

Photo

Variable Spell duration


  • Veuillez vous connecter pour répondre
5 réponses à ce sujet

#1
Dark_Ansem

Dark_Ansem
  • Members
  • 638 messages
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?

#2
TimelordDC

TimelordDC
  • Members
  • 923 messages
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.


#3
Dark_Ansem

Dark_Ansem
  • Members
  • 638 messages
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?

#4
Dark_Ansem

Dark_Ansem
  • Members
  • 638 messages
is it like I described in last post?

#5
Talisander

Talisander
  • Members
  • 173 messages
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.

#6
Dark_Ansem

Dark_Ansem
  • Members
  • 638 messages
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)