Damage Formula Question

● ARCHIVED · READ-ONLY
Started by tjaether 9 posts View original ↗
  1. Hi there I'm going through the RPGMaker VX Ace Tutorial again, I'm glad it's finally been completed! I'm on the 3rd Tutorial on page 13 where it introduces Damage Formulas. It states for the example game they are using the default formulas, but it doesn't point to or indicate what the "default" formula is. I have some questions regarding this formula and such. For example, is the "Default" formula the default for ALL types of damage and healing? Like can you use the same formula for a Fire 3 spell as a normal Attack as a Healing Spell? 

    Also I don't understand the equation of the formula, mostly what it stands for and how it figures out dmg... Maybe I can get some clarification here?

    I see this Quick Box Formula: x + y * (a.atk * 0.04 - b.def* 0.02) + z * (a.mat * 0.02) - b.mdf * 0.02) 

    I also see the Example Box for the HP Drain Spell using the Formula: [20 + a.mat * 2 - b.mdf * 2] (Where did they get "20" from?)

    It says that the standard default attack is based on Physical 100, Base =0, Magical= 0. Is this because Physical relies of the STR/ATK rating of the character and the "Base" stat would represent a Weapon's ATK Power/Rating if they were using a normal attack with a sword or something? Then if it was a Magical Weapon would you add in the Magical Rating also? Maybe that's getting ahead of myself...

    So I'm guessing after doing some searching through the forums that in (a.atk) the "a" represents the Character Using the Action and (b.def) the "b" stands for the Character/Enemy the Action is being used against/on. Am I correct with that so far? and (atk) is Physical Attack and (mat) is Magic Attack, etc? I hate to admit it but I'm one of those people that needs some things spelled out in black and white when getting clarification and learning new things. 

    That's the Quick Box formula above stated in the tutorial. 

    X = Base Value

    Y = Physical Value

    Z = Magical Value 

    What is "Base Value"? Is it the set DMG Parameter of a Weapon of Skill/Spell? (Like Dagger has 5 ATK rating, so does that mean it's base value is 5? and then "Y" would be the characters ATK rating?)

    Do you use the entire Quick Box formula to figure a normal attack even though there is no Magical stat involved? Or do you only use the x + y * (a.atk * 0.04 - b.def* 0.02) section?

    I hate to ask this if it's a lot but if someone was able to write up a simple normal attack and magic attack example using the Tutorial Formula so I can see how the stats fill in the blanks and calculate damage I would really appreciate it. I'm basically stuck until I get this figured out. I have to understand it to move forward in making the game so any help here is so unbelievably appreciated! 

    Thank you!

    -TJ

    Reference: 

    dmgformula.jpg
  2. The default formulae are different for each skill. That's what's written in the damage formula box.


    I'm about to head off for work so can't go into more detail than that, but others will be able to answer your other questions.
  3. "Base" in this case comes from the mathematics side - it means the basic number, without any multiplying stat.


    And all those numbers are set by you, when you decide what to type into the formula box.


    You should not consider the "default" formula as a required feature - in fact, the balancing of a game will often change that formula depending on what the developer wants the game to be. All database defaults are only there to give the developer something to start with, so that he/she can start gametests as early as possible. But the default skills (and the default damage formula) is not in any way what I would call balanced.


    But that is exactly why you can edit the damage formulas...


    Now to your other questions:


    Theoretically, any skill can be used by anyone, including both actors and enemies. Because of that, you need placeholder-variables to point the damage interpreter to the correct values.


    a is the variable that stands for the skill user. a.atk therefore means "use the ATK value from the battler that used this skill".


    b is the variable that stands for the skill target. b.def therefore means "use the DEF value from the battler that the skill was targeted on".


    You can reference all other values from both skill user and skill target and quite a lot more than simple mathematics - there is a big topic about how to use the damage formula field for special effects and conditional damage and other things.
  4. Shaz said:
    The default formulae are different for each skill. That's what's written in the damage formula box.

    I'm about to head off for work so can't go into more detail than that, but others will be able to answer your other questions.
    Thank you!
  5. Andar said:
    "Base" in this case comes from the mathematics side - it means the basic number, without any multiplying stat.

    And all those numbers are set by you, when you decide what to type into the formula box.

    You should not consider the "default" formula as a required feature - in fact, the balancing of a game will often change that formula depending on what the developer wants the game to be. All database defaults are only there to give the developer something to start with, so that he/she can start gametests as early as possible. But the default skills (and the default damage formula) is not in any way what I would call balanced.

    But that is exactly why you can edit the damage formulas...

    Now to your other questions:

    Theoretically, any skill can be used by anyone, including both actors and enemies. Because of that, you need placeholder-variables to point the damage interpreter to the correct values.

    a is the variable that stands for the skill user. a.atk therefore means "use the ATK value from the battler that used this skill".

    b is the variable that stands for the skill target. b.def therefore means "use the DEF value from the battler that the skill was targeted on".

    You can reference all other values from both skill user and skill target and quite a lot more than simple mathematics - there is a big topic about how to use the damage formula field for special effects and conditional damage and other things.
    That makes sense, thank you!

    Actually, I'm still confused on the Base Value issue. How do you decide what to set a Base Value to? 

    In the example, it says the HP Drain Spell uses the formula: 20 + a.mat * 2 - bmdf * 2. The Quick Box values were set to Base: 40, Physical: 0, Magical: 100.

    So in that example, where did the "20" come from and why is that number important and in the Quick Box, why does the Spell have a Base value of 40? How was that determined and why is that important? 

    Also, do all Spells have a Magical Value of 100?
  6. The picture of the quick formula box and the damage formula are not from the same example. If the quick formula had been used, the damage formula would have started with 40 + , because the number "base value" that you set in the quick formula will become the base number in the beginning of the damage formula.


    And you decide which number to set in the damage formulas - the same way you decide wether you want to eat potatoes or noodle...


    How you decide and which numbers you use is entirely up to you.


    You could have said "I have ten fingers and ten toes, together that is twenty, so I use twenty as the base value", or you could have rolled dice to decide what numbers to place...


    A lot of people however use a spreadsheet to calculate the damage of the damage formulas, and then decide which numbers to use.


    For example your actors might have attack 100 and defence 100 at level 1, and you want a similiar enemy with 500 HP (all numbers YOU decide to set in the database) to be dead in two hits. With a regular atack of 4*a.atk - 2*b.def and the same attack and defence values, that would result in an average of 200 damage points per hit (400-200). Which means that each hit needs to do about 50 more damage to get to 500 in two hits.


    That might be done by changing the formula to 50 + 4*a.atk-2*b.def, it might be done by changing the multiplicators (4.5 * a.atk instead of 4) or by reducing the enemy to 400 HP - and because each change will have a different result on other enemies, you need to decidewhich way to go.


    But there is absolutely no one that tells you what number to set - you need to decide, and then later check and proof or change your decision by playtesting.
  7. Andar said:
    The picture of the quick formula box and the damage formula are not from the same example. If the quick formula had been used, the damage formula would have started with 40 + , because the number "base value" that you set in the quick formula will become the base number in the beginning of the damage formula.

    And you decide which number to set in the damage formulas - the same way you decide wether you want to eat potatoes or noodle...

    How you decide and which numbers you use is entirely up to you.

    You could have said "I have ten fingers and ten toes, together that is twenty, so I use twenty as the base value", or you could have rolled dice to decide what numbers to place...

    A lot of people however use a spreadsheet to calculate the damage of the damage formulas, and then decide which numbers to use.

    For example your actors might have attack 100 and defence 100 at level 1, and you want a similiar enemy with 500 HP (all numbers YOU decide to set in the database) to be dead in two hits. With a regular atack of 4*a.atk - 2*b.def and the same attack and defence values, that would result in an average of 200 damage points per hit (400-200). Which means that each hit needs to do about 50 more damage to get to 500 in two hits.

    That might be done by changing the formula to 50 + 4*a.atk-2*b.def, it might be done by changing the multiplicators (4.5 * a.atk instead of 4) or by reducing the enemy to 400 HP - and because each change will have a different result on other enemies, you need to decidewhich way to go.

    But there is absolutely no one that tells you what number to set - you need to decide, and then later check and proof or change your decision by playtesting.
    Thank you! I totally get it now. At least I understand the reasoning behind the Base Value. Do you know of any resources that have examples of those DMG Spreadsheets? 

    I'm guessing that you have to do this for every Skill you want to incorporate into the game? 

    Also, do all Spells have a Magical Value of 100 when figuring out Magic DMG/Healing Formulas?
  8. tjaether said:
    I'm guessing that you have to do this for every Skill you want to incorporate into the game?
    That is why balancing is so much work...
    tjaether said:
    Also, do all Spells have a Magical Value of 100 when figuring out Magic DMG/Healing Formulas?
    of course NOT.
    Usually most spells have different values - that is why you can enter that value. If it were to be the same for all skills, then you would only need a few skills or there would be no need to set it.


    It's the same with all parts of the damage formula: you decide which values to use.


    And a lot of people don't even use the quick formula button, they enter their values directly into the damage formula field without ever going near the "quick formula" button.
  9. Andar said:
    That is why balancing is so much work...

    of course NOT.

    Usually most spells have different values - that is why you can enter that value. If it were to be the same for all skills, then you would only need a few skills or there would be no need to set it.

    It's the same with all parts of the damage formula: you decide which values to use.

    And a lot of people don't even use the quick formula button, they enter their values directly into the damage formula field without ever going near the "quick formula" button.
    Ok, I feel like I have a good general grasp of how it works now. Thank you for answering those questions for me. Especially for pointing out that the images in the diagram were not for the same HP Drain Spell. The it's written right there is a little misleading after the first picture. 

    Many blessings upon you my friend. Cheers!