RMMV Damage Formula - ideas and help

okay im running into a problem with my formula in game. I was trying to do a test to see some skills or any of these formula's in action really, and everything keeps doing 0 damage, even though the attackers have 11 atk vs the bats 3 def, why is it doing that? 😮



Check the attack Element and if the Bat is immune or has resistance to that element


If that isn't the case post a screen shot of the skill damage formula
the bat defo has no immunities or resistances at all, just the basic, hit rate, crit rate, atk element, nothing more


but here is a screen ...


[IMG]http://i1061.photobucket.com/albums/t471/Jojozityjo/RMMV%20Dmg%20Formula_zpshtodrv6h.png[/IMG]


EDIT: SOLVED: Apparently, having the M in "Min" capatilized, made teh whole formula fail for some reason ... why does capitilization matter? x.x
Just tried it out, and found it was a really dumb typo on my part


Math.min(a.atk, a.atk*(a.atk/(b.def*2)))


min needs to be all lower case 😛  my bad


JavaScript is a case sensitive language, that's why
still, these formulas are hard enough for a dyslexic girl without adding in capitilization bombs on me XD


anyway, it's working now, like a charm, im loving it, thank you Gamma for all your help and patience ^,^
okay ihave another formula question lol


i got yanflies critical control plugin, and it has an option to make luck stat have an effect on critical damage, the default formula is...


value += ((baseDamage >= 0) ? 1 : -1) * 1.5 * user.luk + bonus;


what exactly does that mean? and how can i edit it so luck will do different bonuses to crit? cause i think i want it to be something like, user.luk/2 is added onto total crit dmg amount, or maybe add to the total dmg with something like Math.min(a.luk, a.luk*(a.luk/(b.luk*2))), or maybe, even add tothe multiplier itself, like a.luk/(b.luk*3) but it cant go any higher than an extra +1.5 for a total of 3x the crit dmg


cause as it is, i have critical damage multiplier set to 1.5, cause 3 feels too high to me, yet my heroes still do like, 3x the damage, i can only assume either the plugin isnt working, or that luck fomula is what's making it around 3x dmg still


i would also like to know how to use one of the lunatic modes to make a skill give the char +35% crit rate ontop of whatever crit rate they already have, but im not sure how to do that either x.x
Hey thank you it actually worked pretty well, I have another question... Is there a way to check for Debuff? I want to make a skill that deals more damage the more debuffs a foe is affected with like...


normal formula deals 1000


foe with 1 ATK debuff, then formula delas 1100


foe with 2 ATk debuff;  1200


foe with 2 ATK debuff and 1 DEF debuff, 1300


and so?

I remember trying to do that exact effect in VX Ace. Basically, I had to add a few lines to Game_BattlerBase. This is RGSS3 script, I don't exactly know how to do this with Javascript!


def dbf
  c=0
  for j in 0..7
   if @buffs[j] < 0
     c-= @buffs[j]
   end
  end
  return c
end


Then invoke "dbf" in the formula like:


1000 + (100 * b.dbf)
so i still need my above post answered, i cant figure out that luck formula thing in yanflies critical control plugin, but i also have another question ...


how can i make an attack do more damage if the target's health is lower than a certain point, like if the target is below half health, the attack will do more damage to it?
so i still need my above post answered, i cant figure out that luck formula thing in yanflies critical control plugin, but i also have another question ...


how can i make an attack do more damage if the target's health is lower than a certain point, like if the target is below half health, the attack will do more damage to it?



(b.hpRate() <= 0.5) ? (formula if true) : (formula if false)
in "b.hpRate()" in the parenthasis do i leave that blank or do i need to put something in there?
in "b.hpRate()" in the parenthasis do i leave that blank or do i need to put something in there?



Just leave it blank. 🙂
okies ty ^^


now if only anyone can help me understand Yanflies Critical Control luck bonus formula XD
hmmm i'm trying to balance my monks formula's for damage


he doesnt gain any skills til late game but i want his main attack (pummel hits 3 times) and all his skills to increase in damage as his hp falls i already have a formula in place for them utilizing his atk, agi, and luck scores......but wanted his hp to factor into these..... would (a.mhp - a.hp)*x work for the scaling i'm looking for?
hmmm i'm trying to balance my monks formula's for damage


he doesnt gain any skills til late game but i want his main attack (pummel hits 3 times) and all his skills to increase in damage as his hp falls i already have a formula in place for them utilizing his atk, agi, and luck scores......but wanted his hp to factor into these..... would (a.mhp - a.hp)*x work for the scaling i'm looking for?



Maybe try this?


(1 + (1 - a.hpRate())) * x


This will scale from 100% to 200% depending on HP remaining. More HP = more damage, up to doubled.
okies ty ^^


now if only anyone can help me understand Yanflies Critical Control luck bonus formula XD



Which are you talking about?
value += ((baseDamage >= 0) ? 1 : -1) * 1.5 * user.luk + bonus;


that one, id like to know what it means, what each part means and how it effects the crit damage formula. Yanfly's description says it adds a flat dmg amount onto the crit dmg result, but im not sure what the formula does or how i can edit it to fit my own taste better, cause as is, it's rather op for my taste, my crits are just too high for me.
value += ((baseDamage >= 0) ? 1 : -1) * 1.5 * user.luk + bonus;


that one, id like to know what it means, what each part means and how it effects the crit damage formula. Yanfly's description says it adds a flat dmg amount onto the crit dmg result, but im not sure what the formula does or how i can edit it to fit my own taste better, cause as is, it's rather op for my taste, my crits are just too high for me.



the formula works like this


check if damage is greater then 0 (baseDamage >= 0)


the *1.5 is base crit damage modifier adjusted by the note tags


the x user luck is multipling final result by the user luck score


bonus is the flat damage bonus added through note tags
so the 1.5 is the default crit damage multiplier?


so then, 1.5 * user luck, if the user luck is like, 100, so that would mean the crit damage multiplier would be 150x more dmg!? 😳
so the 1.5 is the default crit damage multiplier?


so then, 1.5 * user luck, if the user luck is like, 100, so that would mean the crit damage multiplier would be 150x more dmg!? 😳

sorry i actually was looking at the formula wrong


the each part


(baseDamage >= 0) ? 1 : -1)  determines if it is damage or recovery


1.5*user.luk+bonus is the flat increase to final resultso if your luck was 100 then you would have 150 bonus damage or recovery when a crit is landed that is uneffected by damage reduction and enemy defenses (meaning if you would only deal 1 damage normally, and with a crit that would be 2 damage but with the flat increase it becomes 152 damage if luck is 100)
oh i see, so is there any way i could change the formula to make it so it adds to the multiplicative value of crit dmg? something like .. Math.min(1.5, user.luk/(target.luk*3) .. so that the bonus is based on luck vs target luck and it makes it so the Crit Multiplier gains at most, an extra 1.5x? that way with enough luck, it could make my games total Crit Dmg multiplier go from 1.5x to 3x ?
oh i see, so is there any way i could change the formula to make it so it adds to the multiplicative value of crit dmg? something like .. Math.min(1.5, user.luk/(target.luk*3) .. so that the bonus is based on luck vs target luck and it makes it so the Crit Multiplier gains at most, an extra 1.5x? that way with enough luck, it could make my games total Crit Dmg multiplier go from 1.5x to 3x ?



just take the formula right above it and change the 1.5 to 3, the flat doesn't have any effect on the multiplier as all it adds is straight damage

Maybe try this?


(1 + (1 - a.hpRate())) * x


This will scale from 100% to 200% depending on HP remaining. More HP = more damage, up to doubled.



i'm looking more for as hp is lower the more damage he deals cuase he is a monk of the blazing phoenix fist, and i have him have a burning phoenix trait where the closer he is to death the more damage he deals and thought this effect would be best done in the damage formula


also if i use this following formula


(((a.atk) + (a.agi * 1.2)) + a.luk%) + a.level%


will it actually boost the final result by luck % and the final result of that by level % or does the % do absolutely nothing?

Original thread: https://forums.rpgmakerweb.com/threads/rmmv-damage-formula-ideas-and-help.47099/