RMMV Damage Formula - ideas and help

● ARCHIVED · READ-ONLY
Started by Shaz 1539 posts Page 73 of 77 View original ↗
  1. JohnDoeNews said:
    That is exactly what I am doing. :) I see those stats as percentages.

    But, if you would make skills this way, you should make your whole game this way. You can't really mix things up with default formula's, where you suddenly do 20 + 4*ATK - 2*DEF damage, because your stats will be off.

    Also the stats of your actors, enemies, weapons and armor will work slightly different then they do by default. The ATK of weapons should go up and the DEF of armor should go down, since ALL armors slots of a certain level should give as much DEF as 1 single weapon of the same level give ATK.
    Yeah, I agree with you. It's the kind of approach that needs to be applied consistently.

    The main issue with it though really is that it doesn't allow for scalability; if Punch does 50 damage at the beginning of the game given both attacker and defender having 10 atk/def, it'll also do 50 damage at endgame given both attacker and defender having 999 atk/def.
  2. Trihan said:
    Yeah, I agree with you. It's the kind of approach that needs to be applied consistently.

    The main issue with it though really is that it doesn't allow for scalability; if Punch does 50 damage at the beginning of the game given both attacker and defender having 10 atk/def, it'll also do 50 damage at endgame given both attacker and defender having 999 atk/def.
    True, but it will deal 500 damage if the target has 99 DEF when you have 999 ATK. And only 5 damage if you gave 99 ATK and they have 999 DEF.

    So skills grow super strong against enemies that are at a much lower level then you are and skills are mighty weak when you battle enemies with a much higher level.

    So, this makes learning higher skills ar higher levels and finding better weapons/armor just more important. I see that as a positive: Over 99 levels, you can keep learning skills every 3 or 4 levels. Each with a slightly higher base attack than the last.

    Also, that is one of the things I meant with the stats of actors and enemies should be different: MHP should not grow as quick as with the default formula's. I end up with my MHP on lvl 99 being only around 300% of the MHP on lvl 1.

    Bosses with large MHP pools are long battles, and much harder to beat. I like boss battles being long. I've seen that is pretty much every major RPG:

    Final Fantasy
    Kingdom Hearts
    World of Warcraft
    Skyrim
    Fallout

    Boss battles were always long, tough battles, even on easy setting. (Yes, I've played most of those on easy too, when I replay for the second or third time just to find secrets or achievements.)

    You are right that against enemies of your own level, skills do not get stronger with my formula's, but I don't see that as a bad thing. You have to build your whole game differently, though. That is why you can't mix my formula's up with default way of setting up formula's.
  3. My last post about weapon affinity using variables was solved, thanks so much! But, I figured I might as well ask this as well:

    I'm trying to make an item only be able to be used when the target has a certain state applied, could I use conditionals in the damage formula of the item for this? Basically I need a Bandage item to only be able to apply to an actor with the Bleeding state active, in turn removing said Bleeding State and applying the Bandaged State. If the target doesn't have Bleeding applied, the item would fail and return the item to the inventory - hopefully playing a sound effect as well. Trying to make wound management in this game take time to heal, not just a simple 'fix' by applying an item.

    I've been trying to get Yanfly's Selection Control and Item Requirements to do this but with no success - the part where I remove Bleeding ONLY if it is currently applied works, but adding the Bandaged State afterwards overrides the conditional and makes it so I can apply the item to anyone anytime.
  4. fladdles said:
    My last post about weapon affinity using variables was solved, thanks so much! But, I figured I might as well ask this as well:

    I'm trying to make an item only be able to be used when the target has a certain state applied, could I use conditionals in the damage formula of the item for this? Basically I need a Bandage item to only be able to apply to an actor with the Bleeding state active, in turn removing said Bleeding State and applying the Bandaged State. Trying to make wound management in this game take time to heal, not just a simple 'fix' by applying an item.

    I've been trying to get Yanfly's Selection Control and Item Requirements to do this but with no success - the part where I remove Bleeding ONLY if it is currently applied works, but adding the Bandaged State afterwards overrides the conditional and makes it so I can apply the item to anyone anytime.
    Can you show me what you already tried?
  5. Trihan said:
    Can you show me what you already tried?
    Yep. During battle it works as intended, only allowing me to use the item in my inventory when someone has the Bleeding state. But on the map, I can use it anytime. State 73 is Bleeding, Bandaged is State 80.
    halp.png
  6. fladdles said:
    During battle it works as intended, only allowing me to use the item in my inventory when someone has the Bleeding state. But on the map, I can use it anytime.
    That's correct. The Selection Control only functions in battle, those notetags have no effect in the party menu. So long as the item does one valid thing (e.g. add the Bandaged state because the target doesn't already have it), you'll be able to use it.
  7. ATT_Turan said:
    That's correct. The Selection Control only functions in battle, those notetags have no effect in the party menu. So long as the item does one valid thing (e.g. add the Bandaged state because the target doesn't already have it), you'll be able to use it.
    Darn. So my best bet with limiting its usage is to make it only REMOVE a state, eh?
  8. fladdles said:
    Darn. So my best bet with limiting its usage is to make it only REMOVE a state, eh?
    Without getting a plugin to modify the engine how you like, yeah - the item won't be usable to remove a state from a party member who doesn't have the state.
  9. If i did something like this:
    if (b.level > a.luk+2) { formula; } else {formula;}
    A. Will that work as a check?
    B. Is there a way to replace the first formula (Or another way to write it) with something to the effect of result * X?
  10. Oggy said:
    If i did something like this:
    if (b.level > a.luk+2) { formula; } else {formula;}
    A. Will that work as a check?
    Only if b has a level. Enemies (as you know from their database entries) don't. So if that's a skill given to actors, it will crash when you target an enemy.

    There are some plugins that give enemies levels, but you'd have to check the documentation to see if that's the correct way to reference it in the plugin's code, and you'd have to include that information in your questions for us to give you an accurate answer.

    Oggy said:
    B. Is there a way to replace the first formula (Or another way to write it) with something to the effect of result * X?
    I'm not sure what you're asking here. You'd just type it?
    Code:
    if (b.level > a.luk+2) (a.atk-b.def)*2; else a.atk-b.def;

    If that's not what you meant, please clarify.
  11. Thanks @ATT_Turan . My syntax for js is still not as good as I would like. This is a formula structure i was working on for enemies. I repurposed luk to be a weapon attack stat for players, so enemies have zero use for it atm and I was thinking of using luk on enemies as a "level".

    Yeah you are right, if(x) formula 1 else formula 2, would be the easiest way. I'm not sure what I was thinking lol.

    EDIT:
    @ATT_Turan I was thinking, is there a way to use js like this to check if b.level is greater than a.luk to multiply the damage by 0.75?

    <JS Pre-Damage> code code code </JS Pre-Damage>
    To keep my formula window a little cleaner?

    EDIT EDIT:
    <JS Post-Damage>
    if(b.level > a.luk)
    target.gainHp(0-Math.round(value *0.75));
    </JS Post-Damage>

    Achieved my inteded goal of decreasing damage done by enemies that are outleveled when using enemy luck as enemy level.
  12. Oggy said:
    I repurposed luk
    Were you aware that the LUK stat has some built-in effects that affect random attack rolls? If you're repurposing it, you would probably want to use a plugin that disables those effects.
  13. Oh yeah, i know :LZYcheeze:. By repurposed I mean I already wrote it out of the game.
  14. I'd like to create a damage formula that adds a weapon's Attack damage at the end of a calculation. Is there an easy way to do this or a plugin that makes this manageable?

    Edit: For example (not the actual formula I'm using, but)...


    100 * a.atk / b.def + Weapon
  15. As long as you have a stat that can be used as "weapon" its possible.
  16. Oggy said:
    As long as you have a stat that can be used as "weapon" its possible.
    You mean replacing an unused stat slot with a weapon stat? No, sadly.
  17. I'm not sure about plugins that add stats to the game (as I have never used them) or how they work with damage formulae but you could check into that to see.

    EDIT:
    @ShatteredRift
    I did some testing and you could create an element called Weapon and add its Element Rate to your weapons. This could be used to add weapon damage to the end of a formula if you don't want to use plugins.

    For example:
    100* a.atk/b.def + a.elementRate(elementId here)

    Since it uses percent adding would make 100% = 1 point of damage. the only real limit would be i think it could only go up to 999 points. So if you are keeping the weapon stat scaling lowish it could work for you.
  18. ShatteredRift said:
    I'd like to create a damage formula that adds a weapon's Attack damage at the end of a calculation. Is there an easy way to do this or a plugin that makes this manageable?

    Edit: For example (not the actual formula I'm using, but)...


    100 * a.atk / b.def + Weapon
    Can you clarify more about what you're trying to do?

    By default, a.atk includes any bonus to ATK that the actor's weapon (or armor) has.

    Do you specifically want the weapon to count twice? Why not just double the ATK bonus on the weapon?

    If you want that to be its own formula, added on top of the actual damage formula, you would need to use a plugin for that. For example:
    Weapon Damage
  19. @ShatteredRift about @Oggy 's idea of a custom stat, I myself have a plugin on itch.io that lets you both edit your default stats and create custom ones, you could use that for this...
    In fact, a "weapon damage" custom stat is one of the most common ways people use it for, as far as I know.
  20. Oggy said:
    I'm not sure about plugins that add stats to the game (as I have never used them) or how they work with damage formulae but you could check into that to see.

    EDIT:
    @ShatteredRift
    I did some testing and you could create an element called Weapon and add its Element Rate to your weapons. This could be used to add weapon damage to the end of a formula if you don't want to use plugins.

    For example:
    100* a.atk/b.def + a.elementRate(elementId here)

    Since it uses percent adding would make 100% = 1 point of damage. the only real limit would be i think it could only go up to 999 points. So if you are keeping the weapon stat scaling lowish it could work for you.
    This would probably be perfect! Since it's a percentage, I can just multiply by 100 to have a range up to 999. And since I hope to handle both Weapons and Armor this way, it should work out perfectly. Thank you!

    ATT_Turan said:
    Can you clarify more about what you're trying to do?

    By default, a.atk includes any bonus to ATK that the actor's weapon (or armor) has.

    Do you specifically want the weapon to count twice? Why not just double the ATK bonus on the weapon?

    If you want that to be its own formula, added on top of the actual damage formula, you would need to use a plugin for that. For example:
    Weapon Damage
    I'm comparing ATK and DEF as a ratio, vaguely similar to Pokemon's damage formula (if you and/or others are familiar with it). I want Weapons and Armor to then apply separately and be much more impactful.

    So to expand a bit on what I showed earlier...

    n * a.atk / b.def + Weapon - Armor

    I plan for my formula to look vaguely like the above. If an attacker's ATK matches enemy DEF, that's just a 1* multiplier in there. If below, it quickly reduces the damage to zero, at which point damage is essentially Weapon - Armor. If significantly above, damage scales quite quickly. So if a player is above an area's "difficulty," they dominate. If they're below, they struggle.

    As for what I'm actually trying to do. Specifically, I had a number range I wanted to work inside of, and I forced my formula to work accordingly. I had also originally designed it to be a PvP format. Pokemon is a good analogy again. Player characters and enemies were meant to use the same stats/formulas/etc. I'm seeing how much of it I can adapt into RPGMMV.

    YoraeRasante said:
    @ShatteredRift about @Oggy 's idea of a custom stat, I myself have a plugin on itch.io that lets you both edit your default stats and create custom ones, you could use that for this...
    In fact, a "weapon damage" custom stat is one of the most common ways people use it for, as far as I know.
    This is likely to be quite helpful in the near future. Thank you!


    Also, I want to say thank you to everyone again. You've all been very helpful!