MCADAMS Posted February 7, 2011 Author Share Posted February 7, 2011 It's annoying to make the same spell over and over again because the damage becomes trivial as you reach a higher level, so this simple tutorial will let you make your Intelligence stat and your character level effect your spells damageFind in **modCombat**:```' set the vital Vital = Spell(spellnum).Vital```Under that add:``` Vital = Vital * (Player(Index).Level / 2) + GetPlayerStat(Index, Stats.Intelligence) / 4```This will make it so that the overall spell damage is:_Spell Damage x (Player level / 2) x (Intelligence Stat / 4)_So;If you're level 4, and a spell does 8 damage, and your Int. is 16, your spell will do **64** damage.If you're level 8, and a spell does 8 damage, and your Int. is 28, your spell will do **224** damage.Thus remedying the problem!You can also change this code to better suit your needs or if you think its unbalanced.Hope this helped you all. Have fun ;)![](http://i.imgur.com/4sj5e.png) Link to comment Share on other sites More sharing options...
Robin Posted February 8, 2011 Share Posted February 8, 2011 Simple, but should help people out.Still not sure how I want spells to scale in Origins so this should certainly tide people over till I get to work on that.Good to see people releasing work as well. Link to comment Share on other sites More sharing options...
MCADAMS Posted February 8, 2011 Author Share Posted February 8, 2011 @Robin:> Simple, but should help people out.> > Still not sure how I want spells to scale in Origins so this should certainly tide people over till I get to work on that.> > Good to see people releasing work as well.Thanks!I'm glad I finally remotely understand this stuff. Feels good to finally contribute. Link to comment Share on other sites More sharing options...
Robin Posted February 8, 2011 Share Posted February 8, 2011 Quite.```GetPlayerStat(Index, Stats.Intelligence / 4)```Replace that with:```GetPlayerStat(Index, Stats.Intelligence) / 4``` Link to comment Share on other sites More sharing options...
MCADAMS Posted February 8, 2011 Author Share Posted February 8, 2011 @Robin:> Quite.> > ```> GetPlayerStat(Index, Stats.Intelligence / 4)> > ```> > Replace that with:> > ```> GetPlayerStat(Index, Stats.Intelligence) / 4> > ```But..but..but..you need to close the string. Link to comment Share on other sites More sharing options...
Robin Posted February 8, 2011 Share Posted February 8, 2011 That's not a string… you're dividing "Stats.Intelligence" by 4\. You want to divide the player's actual intelligence, not the number of the stat. Link to comment Share on other sites More sharing options...
MCADAMS Posted February 8, 2011 Author Share Posted February 8, 2011 @Robin:> That's not a string… you're dividing "Stats.Intelligence" by 4\. You want to divide the player's actual intelligence, not the number of the stat.Yeah I have no idea what a string is.But all you did was take the closing parentheses off, which it needs. I get a compile error when taking it off.EDIT: Sorry, didn't see you added one. Link to comment Share on other sites More sharing options...
Robin Posted February 8, 2011 Share Posted February 8, 2011 Why are you arguing with me? >_> Link to comment Share on other sites More sharing options...
MCADAMS Posted February 8, 2011 Author Share Posted February 8, 2011 @Robin:> Why are you arguing with me? >_>Sorry, I just misread what you said, see my edit above.![](http://i.imgur.com/eu2AW.png) Link to comment Share on other sites More sharing options...
OmegaRedd Posted February 9, 2011 Share Posted February 9, 2011 Thanks. Link to comment Share on other sites More sharing options...
ilsu333 Posted February 9, 2011 Share Posted February 9, 2011 thx for the code dude…But dunno why i get RTE6 (overflow) when i start the server after using the code...What am i doing wrong? Link to comment Share on other sites More sharing options...
Octohunter Posted February 12, 2011 Share Posted February 12, 2011 Nice job, I spent about an hour looking for the piece of code in modCombat that allowed me to change spell damage :) Link to comment Share on other sites More sharing options...
chuchoide Posted February 12, 2011 Share Posted February 12, 2011 Nice code man, will use it later!@Above use CTRL + F to find quickly lol. Link to comment Share on other sites More sharing options...
Octohunter Posted February 12, 2011 Share Posted February 12, 2011 Tried that, but didn't know what to look for :)I ended up editing the damage display function instead of the actual damage. Link to comment Share on other sites More sharing options...
chuchoide Posted February 12, 2011 Share Posted February 12, 2011 Just copy ' set the vital Vital = Spell(spellnum).Vital and paste there. Link to comment Share on other sites More sharing options...
ilsu333 Posted February 12, 2011 Share Posted February 12, 2011 Guys i get overflow if i use the code…May that be because i got 800 spell slots? Link to comment Share on other sites More sharing options...
Guest Posted February 12, 2011 Share Posted February 12, 2011 .. You have 800 spell slots? You mean you MAX_SPELLS=800? Link to comment Share on other sites More sharing options...
ilsu333 Posted February 17, 2011 Share Posted February 17, 2011 @Sekaru:> .. You have 800 spell slots? You mean you MAX_SPELLS=800?yep Link to comment Share on other sites More sharing options...
mattt183 Posted February 17, 2011 Share Posted February 17, 2011 ya, might want to lower that Link to comment Share on other sites More sharing options...
Guest Posted February 17, 2011 Share Posted February 17, 2011 Hah our spell system.Good work! Link to comment Share on other sites More sharing options...
Guest Posted May 5, 2011 Share Posted May 5, 2011 just wanted to say thanks for this, helps me out. just learning the ropes around the system. Link to comment Share on other sites More sharing options...
Suppositoire Posted June 3, 2011 Share Posted June 3, 2011 Good work, thank you :D Link to comment Share on other sites More sharing options...
da_gad_pader Posted June 3, 2011 Share Posted June 3, 2011 this is nice , and what if i want the spell or skill will be based on strength??? for the warrior skills example ? how should i do that? Link to comment Share on other sites More sharing options...
Yenkai Posted June 3, 2011 Share Posted June 3, 2011 Instead of adding:```Vital = Vital * (Player(Index).Level / 2) + GetPlayerStat(Index, Stats.Intelligence) / 4```Add this:```Vital = Vital * (Player(Index).Level / 2) + GetPlayerStat(Index, Stats.Strength) / 4``` Link to comment Share on other sites More sharing options...
RyokuHasu Posted June 3, 2011 Share Posted June 3, 2011 VB will automaticly give you options when you start typing variablesjust start with "stats." and it will give a list of options you can use from modTypes. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now