RMMV Damage Formula - ideas and help

● ARCHIVED · READ-ONLY
Started by Shaz 1539 posts Page 16 of 77 View original ↗
  1. Hey guys and gals,

    My formula "v[3] * a.atk + a.atk * 4 - b.def * 2" is working perfectly with the exception being that it won't do damage on the first turn.

    I can't figure out why. Can anyone help?

    For the record, it's a charge up style attack that increases in strength each time a player uses a certain skill in the battle. Using the skill with this formula unleashes the damage and as a effect, triggers another common event that clears the charged up variable.

    Thanks.
  2. how do I check if the attack was critcal? i want to make a skill that heals then user only if it lands a critcal attack.also, can some one tell ehat's wronge in this formulae?

    70 + (70 * Math.min(Math.floor(a.level / 8), 4)) + Math.floor(a.mgk * 0.35)basically, it rises the fixed damage (70) by 70 every 8 levels, in a cap of 70 * 4 plus 35% of users magicka (custom stat I made - and the problem is not in it, 'cause I use it in a simple formulae and it works).
  3. gotnovicks said:
    how do I check if the attack was critcal? i want to make a skill that heals then user only if it lands a critcal attack.also, can some one tell ehat's wronge in this formulae?

    70 + (70 * Math.min(Math.floor(a.level / 8), 4)) + Math.floor(a.mgk * 0.35)basically, it rises the fixed damage (70) by 70 every 8 levels, in a cap of 70 * 4 plus 35% of users magicka (custom stat I made - and the problem is not in it, 'cause I use it in a simple formulae and it works).
    To answer your critical effect question:


    PlatypusOfDoom said:
    With that in mind, you could do something like: 

    if (b.result().critical) {a.addState(x); y} else {y}
    So basically a formula of:

    if (b.result().critical) {a.gainHp(x); y} else {y}

    Should work. It means if the target  is hit by a critical attack (result().critical) then user (a) gains x amount of hp, then apply damage of y; otherwise just apply damage of y. y should be your damage formula.

     
  4. I'm trying to do an attack that hits 5 times, each successful hit increase the damage by a multiple of 20 so I have the variable x as

    x = 20 + 20 * num_Hits

    Where 'num_Hits' would be each successful hit, if the move misses once it should reset back to 'num_Hits = 0', however I'm not sure (a.) how to catch if a hit is successful (b.) how to store it considering the damage formula resets all local variables each time it is called and (c.) how to reset it back to zero after the action completes
  5. Just in case anyone is wondering how to use a specific actor's attributes in a damage formula:

    Code:
    $gameActors.actor(3).agi
  6. I was wondering if anyone can help me with this formula

    y = b._actorId === 2 ? 200 && b.gainMp(20) : 100; yI'm using it for an item. If it's actor two, I want it to heal 200 and give mana as well. Although as it stands now, it only gives the mana and zero hp.

    If I remove the b.gainMp(20) it works well so I'm guessing I shouldn't write &&.

    Thanks in advance.
  7. Myst Desdemona said:
    I was wondering if anyone can help me with this formula

    y = b._actorId === 2 ? 200 && b.gainMp(20) : 100; yI'm using it for an item. If it's actor two, I want it to heal 200 and give mana as well. Although as it stands now, it only gives the mana and zero hp.

    If I remove the b.gainMp(20) it works well so I'm guessing I shouldn't write &&.

    Thanks in advance.
    I can't test it in game, but I am 99% sure you just need

    b._actorId === 2 ? (b.gainMp(20),200) : 100I tested that in my JS console, and it runs the commands if the condition returns true, and then returns the correct "damage"
  8. @Kai monkey. It worked like a charm. Thank you :)
  9. I wonder if it's possible to do a Final Fantasy I-III/Bravely Default style of attacking where you can attack multiple times depending on a stat and the number of attacks is reduced going by an enemy's stat. I changed M.DEF to Dexterity so for every 5 points of dexterity over the foe's agility, another hit is added.
  10. So has anyone gotten nested if statements to work correctly?

    i want to put this into the proper syntax for it to work as a damage forumula

    <damage formula>if (b.hp>b.mhp*0.5){value= b.add_state(83)}else if (b.hp<=b.mhp*0.5&&b.hp>=b.mhp*0.25){ value = a.atk*3.5 }else{value=a.atk*7 } </damage formula>its a spell that buffs you if you have over half hp otherwise heals you if you have between 25% and 50% hp and heals you for even more should you be at less than 25% hp

    nvm i got it

    Code:
    <damage formula>if (target.hp>target.mhp*0.5){b.addState(83); 0}else if (target.hp<=target.mhp*0.5&&target.hp>=target.mhp*0.25){ value = user.atk*3.5;}else{value = user.atk*7;}</damage formula>
  11. Let me get some critique on this idea please, because it's the one I'm planning on using for my game. I'm using a shadow hearts-esque system for my attacks (sand the judgement ring, sorry ring spirit) where each characters "default" attack hit multiple times, ranging from 2 to 4 times. Anyways, here's the formula of which is speak.

    A.atk * .50 - b.def * .25 (4 hits) for melee characters

    A.atk * .66 - b.def * .33 (3 hits) for balanced characters

    A.atk * - b.def * .5 (2 hits) for less physical characters

    But then have the actual attack hit 4, 3 or 2 times, so it'd basically be a.atk * 2 - b.def but broken up into multiple pieces. So a character with 50 strength attack an enemy with 30 defense would do 40ish damage, divide into four hits. Yea? How terrible of an idea is this?
  12. Column said:
    Let me get some critique on this idea please, because it's the one I'm planning on using for my game. I'm using a shadow hearts-esque system for my attacks (sand the judgement ring, sorry ring spirit) where each characters "default" attack hit multiple times, ranging from 2 to 4 times. Anyways, here's the formula of which is speak.

    A.atk * .50 - b.def * .25 (4 hits) for melee characters

    A.atk * .66 - b.def * .33 (3 hits) for balanced characters

    A.atk * - b.def * .5 (2 hits) for less physical characters

    But then have the actual attack hit 4, 3 or 2 times, so it'd basically be a.atk * 2 - b.def but broken up into multiple pieces. So a character with 50 strength attack an enemy with 30 defense would do 40ish damage, divide into four hits. Yea? How terrible of an idea is this?
    In theory it's a good idea but you can't change the number of hits via the damage foruma box. Because the damage formula box is the damages that each of the hits make.

    Maybe you can trick this with a forced action in the damage formula box, but i don't know how it works for that.
  13. Hm. True. Dang. I believe Yanfly had a script for vx ace that allowed you to edit all the battle screen commands, meaning you could change or even remove "attack".. I used that to make all my characers default "attacks" actually different skills, implementing the above formula. I guess I wasn't thinking that I don't have the capacity to do that yet. Dang. Guess I'll just poke around until something like that comes out for MV. Poo.

    I love these kinds of threads. One of my favorite things to do when I start playing a new rpg is to look up how all the formulas work. It started back when I played ff12 I think. Ever since then, I love going through the numbers, learning exactly how things work.
  14. Column said:
    Hm. True. Dang. I believe Yanfly had a script for vx ace that allowed you to edit all the battle screen commands, meaning you could change or even remove "attack".. I used that to make all my characers default "attacks" actually different skills, implementing the above formula. I guess I wasn't thinking that I don't have the capacity to do that yet. Dang. Guess I'll just poke around until something like that comes out for MV. Poo.

    I love these kinds of threads. One of my favorite things to do when I start playing a new rpg is to look up how all the formulas work. It started back when I played ff12 I think. Ever since then, I love going through the numbers, learning exactly how things work.
    There is already some plugins for that, you should check it out :)

    http://himeworks.com/2015/12/actor-battle-commands/

    http://himeworks.com/2015/12/battle-command-use-skill/
  15. I think those are exactly what I'm looking for! Thanks Nuhada! (And thank you Hime Works as well!)
  16. Hello there! I have a problem :/
    This...
    Sin_t_tulo.png

    When i change the "1000%" for any number under 100% make the Maker Crash :/
    Anybody knows how to fix it?

    PD: Sorry for my bad english >_>
    PD2: Sorry if is not here where i should put this :c
  17. How would I use the formula to make a skill that increases in power for each successful strike? I tried a formula like this:

    a.isStateAffected(15) ? x = a.atk * 7 - b.def * 2: a.isStateAffected(14) ? x = a.addState(15), a.atk * 5 - b.def * 1.75: a.isStateAffected(13) ? x = a.addState(14), a.atk * 3 - b.def * 1.5: x = a.atk * 2 - b.def * 1.25 ; x * (1 + (a.level - b.level)/25)

    but this doesn't work.
  18. a6p said:
    How would I use the formula to make a skill that increases in power for each successful strike? I tried a formula like this:

    a.isStateAffected(15) ? x = a.atk * 7 - b.def * 2: a.isStateAffected(14) ? x = a.addState(15), a.atk * 5 - b.def * 1.75: a.isStateAffected(13) ? x = a.addState(14), a.atk * 3 - b.def * 1.5: x = a.atk * 2 - b.def * 1.25 ; x * (1 + (a.level - b.level)/25)

    but this doesn't work.
    It sounds like this would be better to use a variable for this skill and less adding states over and over again, which is what i believe you are doing. Someone else will have to way in as I dont know if there is a way to determine in the damage formula to see if an attack was a successful hit or not.
  19. Smelipanda said:
    It sounds like this would be better to use a variable for this skill and less adding states over and over again, which is what i believe you are doing. Someone else will have to way in as I dont know if there is a way to determine in the damage formula to see if an attack was a successful hit or not.
    Good idea, should've thought of that. At least I came up with a new type of skill because of it.

    Does anyone know if there's some sort of master list of battle formula commands?
  20. a6p said:
    Good idea, should've thought of that. At least I came up with a new type of skill because of it.

    Does anyone know if there's some sort of master list of battle formula commands?
    I'd also love to know if there is a big list of formula commands!