RMMV Damage Formula - ideas and help

● ARCHIVED · READ-ONLY
Started by Shaz 1539 posts Page 28 of 77 View original ↗
  1. As far as dealing more damage the lower your hp is


    a.maxHp - a.hp


    But this the literal number of hit points missing, so at low level it's very weak, instead


    (a.maxHp - a.hp)/a.maxHp


    This turns it into a percentage value (between 0 and 1~) if you use this and multiply the number (eg. 0.5*4=2) then multiply it by attack you have a simple system, though I'm sure if as a buff this is the best measure, but it should help
  2. i dont want my crits to be a flat 3x more dmg though, i want them to be 1.5x, but i would like to up the multiplier to a max of 3 based on luck


    would this formula work?


    value *= (1.5 + Math.min(1.5, user.luk/(target.luk*3))) + bonus;


    just leave the flat bonus formula blank so only the multiplier counts, or would that mess up the plugin? and is "target.luk" even a plausible thing in formulas for RMMV? lol
  3. In the Yanfly code, yes target.luk is a thing
  4. so then that formula of mine could work in making the crit dmg multiplier grow the more luck you have over your foe?
  5. yes it would work in that sense.... so long as at one point your luck score goes above 3x enemy luck.....it would be better done as user.luk (or a.luk if your worried) / target.luk (or if your worried b.luk) this way the boost is more reasonable.... also you want to keep + bonus at the end if you plan on making gear or skills or states that buff the crit damage multiplier


    an even better formula would be for it (1.5 + (1 + (user.luk - target.luk) / 100)) + bonus
  6. in my formula, if the user luk is 3x enemy luck, then it would just add +1 to the multiplier wouldn't it? for a total of 2.5x crit dmg?


    cause 300 luk vs 100 luk in my formula would = 1 ?


    cause i want it to be somewhat hard to get the crit dmg bonus, cause to me, 1.5x multiplier is pretty good, so getting even higher, i want them to really work for it, but not get to a point where it doesnt matter what they are against, they have max crit dmg, hence why i want the enemy to have a factor in the formula, so it isnt just as simple as "oh i have 500 luk, so now i always do 3x crit dmg no matter what!" lol


    i also want a reason to use some of my skills that boost the luk stat, hence why i went with "target.luk*3" so on even ground, you can get about, +0.3 to the multiplier, but once you start stacking on luck bonuses and buffs and luck boosting states, you feel like all that luck boosting wasnt pointless cause now yo ucan visibly see that your crits are doing much better
  7. Jojozityjo said:
    in my formula, if the user luk is 3x enemy luck, then it would just add +1 to the multiplier wouldn't it? for a total of 2.5x crit dmg?


    cause 300 luk vs 100 luk in my formula would = 1 ?


    cause i want it to be somewhat hard to get the crit dmg bonus, cause to me, 1.5x multiplier is pretty good, so getting even higher, i want them to really work for it, but not get to a point where it doesnt matter what they are against, they have max crit dmg, hence why i want the enemy to have a factor in the formula, so it isnt just as simple as "oh i have 500 luk, so now i always do 3x crit dmg no matter what!" lol


    i also want a reason to use some of my skills that boost the luk stat, hence why i went with "target.luk*3" so on even ground, you can get about, +0.3 to the multiplier, but once you start stacking on luck bonuses and buffs and luck boosting states, you feel like all that luck boosting wasnt pointless cause now yo ucan visibly see that your crits are doing much better





    your gonna want to do a math.max(3, (formula)) since it seems you want to max at a x3 damage multiplier
  8. Crimson Dragon Inc. said:
    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


    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?



    Sorry. I meant, the less HP, the more damage. That's what the "1 -" part is for. :)
  9. Riff said:
    Sorry. I meant, the less HP, the more damage. That's what the "1 -" part is for. :)





    hmmmm...


    also notice everyone is ignoring the second part of the post T_T
  10. Crimson Dragon Inc. said:
    hmmmm...


    also notice everyone is ignoring the second part of the post T_T



    Sorry, did you mean this one?


    (((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?
  11. Riff said:
    Sorry, did you mean this one?


    (((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?





    yea
  12. Crimson Dragon Inc. said:
    yea



    Let's see.


    When you use % in formulas, it acts as a modular (i think that's what it's called). For example,


    5 % 3 is 2


    8 % 4 is 0


    It's like division, but the result is the 'leftover' after division. Dont really know how to explain properly. Sorry. Heh.


    So to make a.level%, 1% to 99% (or whatever max level), simply change


    + a.level%


    to


    * (1 + a.level/100)


    You can do the same for Luck stats.


    - Riff
  13. Crimson Dragon Inc. said:
    your gonna want to do a math.max(3, (formula)) since it seems you want to max at a x3 damage multiplier

    wouldnt Math.max make it take the number that is higher? so if my chars luk is so high that the formula equals out to be more than 3, say, 4, then it would do 4x multiplier instead of 3? :o


    also, had a thought, how would the "target.stat" thing work on a skill that targets all enemies? o.0
  14. Jojozityjo said:
    wouldnt Math.max make it take the number that is higher? so if my chars luk is so high that the formula equals out to be more than 3, say, 4, then it would do 4x multiplier instead of 3? :o


    also, had a thought, how would the "target.stat" thing work on a skill that targets all enemies? o.0





    math.max would make it so that X is the highest the formula can be so in the formula i put math.max(x, (formula)) where formula determines the result and X determines what the max of that result can be


    also it would calculate each enemy indiviually when using an all target skill 
  15. Crimson Dragon Inc. said:
    math.max would make it so that X is the highest the formula can be so in the formula i put math.max(x, (formula)) where formula determines the result and X determines what the max of that result can be


    also it would calculate each enemy indiviually when using an all target skill 



    no, Math.max() returns the highest number, Math.min() returns the lowest number, do NOT confuse them
  16. GammaVD said:
    no, Math.max() returns the highest number, Math.min() returns the lowest number, do NOT confuse them





    um i didnt......
  17. Math.max() returns the highest number


    eg. Math.max(10, 15, 25, 100) will return 100


    It does not limit the highest number allowed
  18. so i want math.min then


    cause i want the default crit multiplier to be 1.5, but can go no higher than 3 with enough luck


    value *= (1.5 + Math.min(1.5, user.luk/(target.luk*3))) + bonus;


    that's what my formula for the crit dmg multiplier is right now, does that look right? or do i have unneeded parenthasis somewhere? lol
  19. that should be fine


    the max with this would be


    value *= 3 + bonus //since 1.5 + 1.5 = 3


    remember, value is the raw damage from your attack formula, '*=' means its equal itself times whatever is on the right hand side
  20. i have so much to learn of how things like that in variables work, but thank you guys for helping me figure it out slowly, my game is coming along more and more nicely thanks to all your help ^-^