Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EO] Intelligence/Level affecting Spell Damage


MCADAMS
 Share

Recommended Posts

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 damage

Find 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

@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

@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

  • 2 months later...
  • 5 weeks later...
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...