Well I am going to explain.
Code :
The first number is the multiplier of your skill (If it's set to COMBAT_FORMULAT_LEVELMAGIC, then it will be based of magic level, if set to SKILL then your main melee skill will take over the others)
The second number is the minimum damage (If you want to make a healing spell, remove the - (negative) symbol of the second and fourth numbers)
The third number is the multiplier of your character level.
The fourth number is the maximum damage (Read the parenthesis of the second set of number)
Now, there is a difference between SKILL and LEVELMAGIC formulas.
If you want them to deal damage and not heal each one has a different setup.
Code :
HTML:
COMBAT_FORMULA_SKILL, 1.0, -100, 1.0, -200)
Will deal damage
Code :
HTML:
COMBAT_FORMULA_SKILL, -1.0, -100, -1.0, -200)
WILL HEAL THE ENEMY IF YOU ARE HIGH LEVEL OR HAVE A HIGH SKILL LEVEL
Code :
HTML:
COMBAT_FORMULA_SKILL, -1.0, 100, -1.0, 200)
Will heal the enemy
Code :
HTML:
COMBAT_FORMULA_LEVELMAGIC, 1.0, -100, 1.0, -200)
WILL HEAL THE ENEMY IF YOU ARE HIGH LEVEL OR HAVE A HIGH MAGIC LEVEL
Note: Will deal damage if you are low level and have a low magic level since minimum and maximum damage are negative
Code :
HTML:
COMBAT_FORMULA_LEVELMAGIC, -1.0, -100, -1.0, -200)
Will completely deal damage to the enemy
Code :
HTML:
COMBAT_FORMULA_LEVELMAGIC, 1.0, 100, 1.0, 200)
Will heal the enemy.
So yeah, I think you get it how SKILL and LEVELMAGIC works now.
Now let's make some calculations on how the multipliers add up to the minimum and maximum damage.
Suppose you have this:
Code :
HTML:
COMBAT_FORMULA_LEVELMAGIC, -1.0, -100, -1.0, -200)
And you are a level 100 character with 100 Magic level
first off at level 0 you would deal 100~200 damage.
Now at level 100 with 100 Magic level you would add up the first and third value (100+100) which is 200, and then add it up to both minimum and maximum damage
Which will be 300~400 damage at level 100 with 100 magic level.
So always sum up the first and third value, and them add it to both minimum and maximum values (The second and fourth).
I wish you understand
This tutorial was by Teclis in Otfans I saw that it suits what you want