RMMV Damage Formula - ideas and help

● ARCHIVED · READ-ONLY
Started by Shaz 1539 posts Page 37 of 77 View original ↗
  1. From what I know it uses only the most effective element, if you want to add an element to an attack you can use target.elementRate(elementId) but this won't fix the problem if the elements are attached to the weapon, you are going to need a plugin that allows for multiple elements
  2. GammaVD said:
    From what I know it uses only the most effective element, if you want to add an element to an attack you can use target.elementRate(elementId) but this won't fix the problem if the elements are attached to the weapon, you are going to need a plugin that allows for multiple elements

    That is my understanding as well, but I wasn't sure if I got it right. You can even change how the restistances and weaknesses are calculated with yanfly's element core, in a way that resistances are added or multiplied or averaged. Which sadly isn't what I was looking for. So I'll just discard the idea of weapons with different elements for now, since I don't want the element rate to be averaged or anything like that.


    Thank you very much for helping me develop a clear understanding! 
  3. I'm using yanfly's crit control to add my character's luck into the formula for a critical strike but it doesn't seem to be helping and I'm not sure what the issue is. I have my characters luck stat at 532 for testing purposes and in about 50 attacks I haven't landed a single crit. against default bat enemies


    rate = user.cri + user.luc * (1 - target.cev);


    This is the formula I put into the plugin parameters. Is there a step I am missing that only applies to crits, or is my formula bad? Any help would be greatly appreciated. 
  4. @Shikuroshi: Check the enemy's CEV. By that formula, if the CEV is 100%, it will cancel out the effect of luck, as the (1 - target.cev) line becomes 0, and anything times 0 is zero.
  5. I changed it down to %1 and it doesn't seem to effect it. Unless I am unlucky, or totally misinterpreted and the higher the number the more likely a crit will happen.

    Spoiler
    bat stats.png



    battler stats.png
  6. You can put them in a spoiler (the eye button).


    and yeah, misinterpreted. The problem. Those change the critical evasion upwards, which in your formula's case makes your user's luck decrease critical rate. And only by 1 to 5 percent, so it is not very visible.


    You should put the user.cri + user.luk inside parentesis, since without them the multiplication is calculated first.


    I personally would suggest using a formula more like 


    rate = (user.cri + user.luk) * (1 - target.cev - target.luk);


    It is affected by both's luck.

  7.  I liked your formula a lot better, I didn't consider using the enemiy's luck in this situation and I thank you for that.


    But I changed the formula and after a bit of testing I still don't seem to be getting any crits at all. The only change I made was the formula into the one you posted. 

    Code:
     rate = (user.cri + user.luc) * (1 - target.cev - target.luk);
  8. Ok, just checked and I know the problem.


    The formula I sent you is wrong. You see, the formula to calculate if it is a critical is Math.random() < this.itemCri(target). Notice the <. The way the formula is, it would never be so. The values are too big.


    Try this one:


    rate = (user.cri + user.luk / 1000) * (1 - target.cev - target.luk / 1000);


    I'm not saying it would work like we want (I'll use it in my own game, hope you don't mind :p) but it should at least work.

  9. Hey if it works go for it! c: It's not like I came up with the concept of adding luck into your crit chance. I'll test out this formula and get back with my findings. 


    Edit: This worked lovely. I got a crit 85% of the time and that is fine by me! Now I can go about the rest of my life. Thanks friend. 
  10. You're welcome.
  11. EDIT:


    Hello RPG Maker!


    I need some help with this formula.


    Ok I managed to edit the formula for it to work, here it is.


    if (b.isStateAffected(26)) { 0; } else { if (b.isStateAffected(27)) {((a.atk * 4) - (b.def * 2) + (a.level * 10)) * 0.50;} else {(a.atk * 4) - (b.def * 2) + (a.level * 10);}; }




    But know I have found myself with one problem, 


    <Custom HP Life Steal Rate>
    if (target.isStateAffected(27))
    {rate = -1.50;}
    else
    {rate = 0.75;}
    </Custom HP Life Steal Rate>


    This code here should make the skill steal 75% of HP with each hit, and if the target has state 27 they should suffer damage (I already have the Negative HP steal enabled in the plugin in, but it doesn't seem to work, It deals half the damage but doesn't return back the damage it shoul.
  12. did you try putting -1.50 between parentheses? (-1.50)?
  13. Try it already, the skill deals half the damage but the user of the attack doens't recive any damage.
  14. hmm... and is it recovering when not under the state?


    Did you check it in a new skill of normal damage to see if it works there?
  15. Yes it works, the skill absorbs 75% if the enemy is not affected by the state, if the enemy has state 26, the enemy doesn't recive any damage and the skill doesn't absorb, when the enemy has state 27, it recieves half the damage, but the user doens't recive the damage that is supposed to be the absorbtion.


    I haven't test the negative drain effect alone, and for the time being I cannot.
  16. why can't you for now? it seems this is the problem.


    Just make a separate skill just to "negative drain" something, and give it to a character. just for the battle test.
  17. Cause I'm on my phone right now...
  18. well, do it when you can.
  19. Yeah, didn't work alone.


    In fact, neither the over heal nor the negative heal, work with the <Custom Hp Life Steal Rate>.


    I had to use Yanfly, Black Blood potion tips and tricks video to recreate the effect. So I suppose you could say problem solved?
  20. emelian65 said:
    Yeah, didn't work alone.


    In fact, neither the over heal nor the negative heal, work with the <Custom Hp Life Steal Rate>.


    I had to use Yanfly, Black Blood potion tips and tricks video to recreate the effect. So I suppose you could say problem solved?



    have you tried utilizing yanfly's life steal plug in?