Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Change spell properties individually
Author Message
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #1
Change spell properties individually
Code:
[SPELL 1]
DEFNAME=s_clumsy
...
EFFECT=10
DURATION=120.0
I need to preserve the current spell hardcoded action (items, memories, etc) without using SPELLFLAG_SCRIPTED to prevent many headaches but just use a custom formula to make EFFECT and DURATION a variable based on magery skill

it's something like this:
Code:
[SPELL 1]
DEFNAME=s_clumsy
...

ON=@Effect
EFFECT=<eval (<SRC.MAGERY>*10)/100>
DURATION=<eval (<SRC.MAGERY>*120)/100>
is there any way to do this using -legal- sphere functions/variables like this example?

I'm asking this because the only way I found to do this is use a horrible workaround to change these variables globally like this:
Code:
[SPELL 1]
DEFNAME=s_clumsy
...

ON=@Effect
//change effect and duration to be applied when hit the spell
SERV.SPELL.s_clumsy.EFFECT=<eval (<MAGERY>*10)/100>
SERV.SPELL.s_clumsy.DURATION=<eval (<MAGERY>*120)/100>

//now I must use another second horrible workaround to store the value
//(on the item that doesnt exists but will be created when the spell hit lol)
//to make it apply the same EFFECT when DURATION is over:
TIMERF 1,FINDID.i_rune_clumsy.MORE = <SERV.SPELL.s_clumsy.EFFECT>
TIMERF 1,FINDID.i_rune_clumsy.EVENTS = +t_horrible_workaround

[TYPEDEF t_horrible_workaround]
ON=@Unequip
SERV.SPELL.<MOREX>.EFFECT=<MORE>
If there's no way to do this, it could be a great feature to some dev implement Smile

EDIT: lol I posted this topic on wrong forum section, someone move it to "Sphere .56b > Script Help" plz
(This post was last modified: 07-11-2013 09:17 AM by Coruja.)
07-11-2013 09:07 AM
Find all posts by this user Like Post Quote this message in a reply
Staff_Stanic
Journeyman
*

Posts: 96
Likes Given: 25
Likes Received: 14 in 8 posts
Joined: Nov 2012
Reputation: 1

Dimension Shard

Post: #2
RE: Change spell properties individually
I think that you can use 'ARGN2' and 'ARGN3' to do what you want...
Code:
@Effect
ARGN1 = The number of the spell that has hit the object.
ARGN2 = The strength of the spell.
ARGN3 = A multiplier for the spell's duration or effect.

Also you can use the 'ARGN3' to change the "length of time it will take to cast the spell" on @Start
Code:
@Start
ARGN1 = The spell number being cast.
ARGN2 = The difficulty of the spell.
ARGN3 = The length of time it will take to cast the spell, in tenths of a second.


Font:
http://wiki.sphere.torfo.org/index.php/@Effect
http://wiki.sphere.torfo.org/index.php/@...l_Trigger)
(This post was last modified: 07-11-2013 12:37 PM by Staff_Stanic.)
07-11-2013 12:23 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #3
RE: Change spell properties individually
ARGN2 on both trigger just change the spell power value that seems a random value based on magery, to later use this value on the unknown EFFECT formula to return the unknow value which I doesnt want to use

and ARGN3 on @Start changes only the spell cast time not the spell effect duration
07-12-2013 12:44 PM
Find all posts by this user Like Post Quote this message in a reply
admin phoenix
Master
**

Posts: 354
Likes Given: 1
Likes Received: 23 in 13 posts
Joined: Mar 2012
Reputation: 3



Post: #4
RE: Change spell properties individually
why not using
ON=@Effect
argn2=<eval (<SRC.MAGERY>*10)/100>

or some other formular?
I am using this for my whole spells.
But my formular is a little bit complexer. I am using a function because I am also using resistance and some other effects Smile
07-12-2013 03:21 PM
Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #5
RE: Change spell properties individually
already tried some days ago but it doesnt work too
with magery 100.0% the ARGN2 return strange values like 700~900, to use this random value on another formula to define the real spell effect (how much dex the clumsy will decrease). But in this case the ARGN2 is completely useless since EFFECT on [spell 1] always override it

Code:
[SPELL 1]
...
EFFECT=10,15

ON=@Success //or @Effect
ARGN2=<R1000>
just try it and even changing the ARNG2 to 0 or 1000, the dex decreased is always a random value between 10~15
(This post was last modified: 07-13-2013 02:35 AM by Coruja.)
07-13-2013 02:32 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 246
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #6
RE: Change spell properties individually
According to my "tests"the "spell power" thing in argn2 just increase the chance to get the maximum value of the EFFECT field Tongue

Or better, more your magery is high, more chance you'll get the maximum effect value
(This post was last modified: 07-13-2013 02:42 AM by darksun84.)
07-13-2013 02:40 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)