So I recently grew bored of my (a.atk + a.atk + a.agi) formula for my physical attacks/skills. For my project, ATK(Strength) is the primary physical dmg stat, but AGI(Dexterity) serves as a secondary bonus to physical damage. This is because AGI also increases Hit, Crit, & Counter chances. Therefore the dmg bonus portion of the stat serves to increase the AGI stat's weight/value to match that of ATK (which also increases Crit Mult. btw) and ideally all other stats. Anyways, here's what I've come up w/...
Before:
(a.atk + a.atk + a.agi)<-I would normally add a coefficient <1 for normal attacks (e.g. *0.5)
After:
(a.atk * a.agi) / (a.atk + a.level) + a.atk
Of course, I'll be adding coefficients to scale the damage for various skills, but this would be the base from which all physical attacks/skills are derived.
So I'm curious, have you guys come up w/ any interesting formulas that utilize 2 stats in an unequal manner? Btw, you'll notice my formula didn't reference DEF or MDF, and that's simply because I'm using Armor Scaling (Yanfly)...just an FYI. I'm mostly interested in the relationship between variables, not the specific values themselves. Though feel free to discuss whatever you want. 👋
I wouldnt say that I do anything special for any individual skills formula. I just have a ton of scripts that change skill damage for all skills based on certain values, then skills have a base value that is used in the formulas instead of the skill having a unique formula. 😛
Very neat guys, though I noticed only a.atk is used (ignoring defensive portion rn). I'm trying to find inspiration for a formula that utilises 2 stats lol. (mitigation doesnt count, hence ignoring DEF/MDF)
Although that Math.pow() looks interesting...whats the difference between that and using "**"?
How's this look?...
(a.atk * a.agi) / (a.atk + a.level) + Math.pow(a.atk, a.agi / a.level)
Does this formula look like there would be any glaring balance issues? The "a.agi / a.level" exponent component will almost always fall between 1 - 2. (Maybe up to 3 if they min-maxed AGI, but then they'd have crappy ATK lol)
Edit: I'm considering tacking on a "- a.level" to slightly offset that exponent portion.
Edit2: Nvm, that exponent part needs tweaking...it's too OP as it is.
Edit3: Maybe the following perhaps?...
(a.atk * a.agi) / (a.atk + a.level) + Math.pow(a.atk / a.level, a.agi / a.level)
The only way to know for sure how good it would work, make a damage using the formula, but set it to 0 variance and test it with multiple setups:
early player stats vs early enemy stats
early player stats vs mid-game enemy stats
early player stats vs end-game enemy stats
and repeat them with mid-game and end-game stats for the player as well. If you like how the damage seems to be across the board then it would be balanced for your game.
My games damage will be absurd if a player grinds stat+ items at the end, but that is their decision... I was going for something that felt like a Final Fantasy 10's formula where even a few points of attack can greatly increase the final damage based on how much higher attack is than defense (or Intellect vs Spirit for magic).
My formula makes it so that a player can attack an enemy with ~100 defensive stat more and still be able to barely kill them. If the stats are about equal to each other expect to kill enemies in about 3-4 attacks, and if your stat is ~100 over the enemies defense then you will absolutely wreck them without trying most of the time.
Balance is finding the numbers you think feels right for your game 😀 I always try to balance my enemies with same-level attributes for the area to the player taking about 3-4 hits to kill... if a player comes to an area too soon/weak it might be 5-6 hits, while if they have over levelled a bit it might only take 1-2 hits to kill them.
and lets use that formula you made for an example to see how it does with varying stats:
example 1: 10 attack, 10 agility, level 1
(10*10)/(10+1 )+Math.pow(10, 10/1)
(100)/(11)+Math.pow(10, 10)
100/11+10000000000
damage = 10000000010 roughly
(I think there might be an issue with a number this big)---caused by the Pow formula in this example
example 2: 100 attack, 100 agility, level 50
(100*100)/(100+50 )+Math.pow(100, 100/50)
(10000)/(150)+Math.pow(100, 2)
10000/150+10000
damage = 10067 roughly, might be good for a mid-game damage value?
example 3: 1000 attack, 1000 agility, level 100
(1000*1000)/(1000+100)+Math.pow(1000, 1000/100)
(1000000)/(1100)+Math.pow(1000, 100)
(ummm, I can't even make my calculator show this value without being something weird... so not happening)
I am not saying that your formula will not work for your game at all, if you keep very small numbers it MIGHT, but this is more or less just to show that even the slightest mistake when using Math.pow() can cause some seriously large numbers to happen.
Ill work on some ideas while I eat dinner and Ill post some back if I can find a good idea 😀
you want a formula using attack, agility, and level mainly? Also, what are you planning for your games max attributes/levels? That way I can test a few setups before making ideas here.
How about...
Math.pow(a.atk, (1.00+(a.atk*0.001))) + (((a.agi/10)*((a.level/2)+1)) + ((a.atk/10)*(4+a.level)))
EX1: 10 atk, 10 agi, level 1
Math.pow(10, 1.01) + 2 + 5
10 + 2 + 5
damage = 17
EX2: 100 atk, 100 agi, level 50
Math.pow(100, 1.1) + 260 + 540
158 + 260 + 540
damage = 958
EX3: 1000 atk, 1000 agi, level 100
Math.pow(1000, 2) + 5100 + 10400
1000000 + 5100 + 10400
damage = 1015500
This would make it so that early on a single point in attack will be worth a decent amount, but agi will also feel like it adds a fair amount as well. Later in the game attack will start slowly adding more and more per point the larger the value gets.
(PS I really like these damage values, esp if you cap your games damage at 999,999 that formula would almost be perfect, lol)
Edit: Its all up to you, its your game so you make the numbers the way you want them to be. 😀 until you make the attacks/skills you can toss out all the numbers you want. Once they are made is when you can finally decide if you like the outcome. Sometimes simple math is easier, but those easier formula's are also going to be very linear scaling. Some people like linear, some like exponential growth, lol
I use decimals when I'm expecting decimals in return, its a "bad" habit I guess, but as long as you have a value is all that matters 😀
Usually the more decimal places you use in a formula (most of mine use 0.000) the much harder the damage control will be on the final value.
Think of it this way:
1000 * 1 would be 1000
1000 * 0.1 would be 100
1000 * 0.01 would be 10
1000 * 0.001 would be 1
If you set your attack/skill/spell's damage variance using a whole number and the final value was 1000, in this instance the ability would do 0-2000 damage. Set the same skills variance to 0.01 and then it would be 990-1010 damage.
Stuff kinda like that is why I prefer to use decimals in my formula's... it just feels like you have much better control when fine tuning the values to be where they need to be. 😀
I may have picked a bad way of showing the example but I literally just woke up, lol
I like trying to keep all my formula setups as close to the same as I can, it makes changing everything much easier if you need to change the same thing for the most part.
And as long as the numbers suit your game, number 2 seems fair/simple enough 😀