ID:154278
 
hello i am having trouble as to how my magic will be used
and the formula needed for it, plus i need a variation factor for my attack formula
this is the lvl up basses in my game:+;HP,MP,STR,AGL,INT
and depending on your class you get diff stat raises in diff area's, here's my current formula's:

ATK/DMG= STR/2+wepn_power

DEF= (STR+AGL)/2+armr-AGL_restrict

BLOCK%= AGL*LVL-E.AGL

RUN%= AGL*LVL-(no.E*2)

(E=enemy)

i know im not the best mathmatition but i would like some imput, and would appreciation on how to work out a magic
formula, and the dmg variation for both ATK/DMG and MAG/DMG

thank you

Magus_XII
well do magic like weapon and replace wep. str. with mag and for magic points taken away, use like E.Str/usr.Magic -= usr.MP . Or something like that, that way it makes it so if your lvl 1 you cant even attack a lvl say 20 and a lvl 20 would take more MP to attack than a lvl 1 but do less damage. Make sence?
In response to Scoobert
yeah thanks, i dont know though i thought of that one but i figured it wouldnt be that good, maybe im wrong, what about my other formula's do they look alright, or do i need something different?

Magus_XII
In response to MagusXII
lol well i dont realy under stand them but they look ok
Statistical balancing is arguably one of the most complicated areas of game design. The key is figuring out what you want your system to do. Do you want combat to be quick and deadly, slow and strategic, some other combination?
Here's my take on some of your formulas:

ATK/DMG= STR/2+wepn_power

I assume this is a formulation to represent injury. Here, weapon power becomes twice as desirable as strength. That is, statistically, it is better to have a better weapon than be stronger. It also encourages characters to build strength in multiples of two, since a +1 bonus does nothing (unless you formerly had a +1 bonus).

DEF= (STR+AGL)/2+armr-AGL_restrict

Not sure on the logic here, since I don't see how physical strength would affect defense (tougher, maybe?). Anyway, the formula rewritten is STR/2+AGL/2-AGL_restrict+armr. The reason I say this is because once again, character stats become less important than equipment stats. Not a bad thing, but will affect player behavior. Here, it would be equally beneficial for a player to get +1 armor, -1 restrict, or +2 to either STR or AGL. Thus, armor balancing becomes very important (IE an armor with +2 armr would never be used if there was one with +5 armr and +2 restrict because this is a net improvement of 3 in the defensive rating). Again, it encourages characters to maximize equipment over stats and build stats in multiples of 2.

BLOCK%= AGL*LVL-E.AGL

Okay, this is a tricky one. You have a geometric acceleration combined with an arithmetic one. In other words, once AGL and LVL start to go up, E.AGL rapidly becomes irrelevant. Some examples:
AGL*LVL| E.AGL| TOTAL/margin
1 1 0/0
4 2 2/2
9 3 6/4
16 4 12/6
25 5 20/8
36 6 30/10

etc.....
This example assumes an AGL increase of 1 per LVL and equal LVL
The margin represents the difference between the TOTAL Block% and the previous row's Block%. As we see, the TOTAL gets higher at a rapid rate. Conceivably, characters with high AGL and high LVL will block 100% of the time. This will make combat a standstill at high levels. A better formula might use the difference in the two character's levels.

RUN%= AGL*LVL-(no.E*2)

Again, LVL increase + AGL increase mean it will be virtually impossible to keep characters with an AGL+LVL of at least 32 (ie LVL 16 + AGL 16) in combat with less than a dozen foes. One foe cannot keep any character with a total score of about 20 in combat (99% RUN).

If these results are in keeping with your conception of the game, then great! If not, you may want to map out your goals (IE I want characters of equal ability to hit half the time with a good deal of variability, and statistical differences to add maybe 1% to the formula per point difference). Then you can try to make formulas that do this (IE hit%=50+rand(-100,100)+ch.agility+ch.skill+ch.luck/ 3+weapon.ease+victim.agility+victim.blocking+victim.luck/ 3+victim.armor.ease ). Of course, then you'll need to play balance everything, but that's another story!

-James
MagusXII wrote:
hello i am having trouble as to how my magic will be used
and the formula needed for it, plus i need a variation factor for my attack formula
this is the lvl up basses in my game:+;HP,MP,STR,AGL,INT
and depending on your class you get diff stat raises in diff area's, here's my current formula's:

ATK/DMG= STR/2+wepn_power

DEF= (STR+AGL)/2+armr-AGL_restrict

BLOCK%= AGL*LVL-E.AGL

RUN%= AGL*LVL-(no.E*2)

(E=enemy)


Couple of things. The first is that you'll run into the issue of negative numbers when the enemy is more powerful than the attacker. This will make you resort to checking for a negative result, and then changing it to some default minimum.

Lets make a little scenerio:
Fighter A is level 1 and has 10 agility
Fighter B is level 1 and has 9 agility
Fighter C is level 10 and has 100 agility

If Fighter B attacks fighter A he will get a negative result and get a default minimum chance to hit.

If Fighter B were to attack fighter C he would get a negative result and get the same default minimum chance to hit. See the problem here?

This is why I personally prefer ratios and addition to subtraction. Here is one way to do it:

%Hit = (agility)/(agility + E.agility) * 100

This means if Fighter B attacks fighter B his chance to hit would be 9/19*100 which is about 45% chance to hit. They are fairly equal so this makes sense. If fighter B were to attack fighter C his chance to hit would be 9/109 which is about 7% chance to hit.

You can modify this to give either the defender or the attacker the advantage by multiplying their stat by a constant like this:
%Hit = (agility*2)/(agility*2 + E.agility)*100

This would increase the attackers chance to hit, this would give Fighter B about a 12-14% chance to hit fighter C (don't have my calculator).

One more suggestion. Instead of subtracting the Agility restriction from defense you might want to seperate it into a hit and a damage equation. Hit would depend on agility and encumberance and damage would depend on armor and strength.