Author Topic: [FF7] Damage Calculator  (Read 9078 times)

Bosola

  • Fire hazard!
  • *
  • Posts: 1752
    • View Profile
    • My YouTube Channel
[FF7] Damage Calculator
« on: 2013-11-02 23:35:53 »
I have released an FFVII damage calculator as a web app. You can access it at http://www.breck-mckye.com/final-fantasy-7-damage-calculator/calc.html. You will need JavaScript enabled to use it.

Enter the statistics of the attacker and defender, set flags for battle conditions like berserk and critical hits, then hit the 'Calculate' button to estimate the damage. You can view a damage 'breakdown' to see exactly how the value was reached and whether there is any chance of causing overflow.

It's still in beta, so I would appreciate any reports if it acts in odd ways. I've tested it and it seems accurate, but there's always the chance of something slipping under the rug. I'd also appreciate any requests for features; there's no point to something like this if it misses something obvious.

If you'd like a local copy, you can pull a version of the source from Github. I've licensed the source under GPL2 in case anyone wants to re-use anything from it (not that I'd understand why; it's fairly simple).
« Last Edit: 2014-07-17 17:49:46 by Covarr »

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Damage Calculator
« Reply #1 on: 2013-11-03 00:25:11 »
Without clicking on anything I have a few observations:

1. Strength/Magic can be one field. Since only one is ever used in any given calculation, having both there is a bit redundant. Same goes for Defense/MDefense.

2. Back Damage Multiplier is a multiple of 1/8. Most enemies do have a BDM of 16/8, and maybe one has 40/8, but you since this is a calculator, it should allow it to be factors of 1/8.

3. Hero Drinks and DragonForce uses only go to 4. While I am aware that the effect is capped at this there is nothing telling the uninformed user of this. Also, since I haven't clicked on anything and don't know how this is handled, the Hero Drink and DragonForce effects overlap. Does your calculator account for this?

4. I have some hesitations with the label "Back row effect". I can't really describe this, but that nomenclature makes it sound like it's part of the back attacks. I think it should be named something in line with the in-game terminology of "Long Range".

5. You mention that you're accounting for Physical/Magical/Curative actions as being X1, X2, and X5 damage types. You don't mention that the other damage types have no variance to them and don't need to be calculated in this manner. It took me a few seconds to come to this conclusion.
5a. This probably isn't worth mentioning, but damage type X1 isn't inherently physical. However, for 99% of the purposes of a damage calculator it's fine.

*Now I clicked*

6. Suddenly I realize that there's no way to account for elemental affinity.

7. It looks like you are accounting for the Hero Drink and DragonForce overlap.

8. Your Max damage seems to be wrong. The variance is [224..255]/256. This will never make max damage equal to final calculated damage.

I might have more, but that's all that's standing out.

EDIT:
I considered making something like this for FFVI, but gave up early on in planning. Good job for getting a beta of one for FFVII!

Sega Chief

  • *
  • Posts: 4086
  • These guys is sick
    • View Profile
Re: Damage Calculator
« Reply #2 on: 2013-11-03 00:41:27 »
Assuming this is giving accurate(ish) damage numbers this'll really help speed up modding and help with planning out challenges; thanks for putting this together.

Bosola

  • Fire hazard!
  • *
  • Posts: 1752
    • View Profile
    • My YouTube Channel
Re: Damage Calculator
« Reply #3 on: 2013-11-03 01:02:42 »
1. I did actually implement some field switching at one point, such that selecting an attack type would turn certain fields and checkboxes on and off, but I figured it was better to leave everything open in case a user was curious about the relationship between e.g. mini and magic damage.

2. This is a fair enough point.

3. I could add some helptext, perhaps. Or maybe change the labels of the highest entries, e.g. 'Hero drinks: 4 (max)'

4. 'Long range' could be a better name.

5. Perhaps I could look at the tooltip text again.

6. Elemental affinity is on my 'to do' list.

7. Of course.

8. I can see that I forgot about the floor on the results of the Rnd function (so the max damage multiplier can never reach 1), but I'm not sure about your minima of 224/256. Terence's guide suggests otherwise:

Quote
Random Variation   (Physical, Magical, Cure, Item only)
  At last, damage is adjusted randomly by the following formula:
       Damage = [Damage * (3841 + Rnd(0..255)) / 4096]

I interpret this as meaning the fraction goes from (3841 + 0) / 4096 to (3841 + 254) / 4096, or 240/256 to 255/256.

Quote
I considered making something like this for FFVI, but gave up early on in planning. Good job for getting a beta of one for FFVII!

It was surprisingly time-consuming to write, actually. Most of the work was on wiring up the view to the model. I'm not sure I'd do something like this as a web project without some kind of framework to ease things along. I hear good things about Backbone.js and Angular; if I ever get round to that Nibelheim project it's likely I'll use one of them.
« Last Edit: 2013-11-03 01:08:21 by Bosola »

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Damage Calculator
« Reply #4 on: 2013-11-04 13:31:55 »
8. I can see that I forgot about the floor on the results of the Rnd function (so the max damage multiplier can never reach 1), but I'm not sure about your minima of 224/256. Terence's guide suggests otherwise:

I interpret this as meaning the fraction goes from (3841 + 0) / 4096 to (3841 + 254) / 4096, or 240/256 to 255/256.

Ah, yes. You are correct. For some reason I thought the floor was E0h when it's actually F0h. I got confused.

Bosola

  • Fire hazard!
  • *
  • Posts: 1752
    • View Profile
    • My YouTube Channel
Re: Damage Calculator
« Reply #5 on: 2013-11-04 21:07:11 »
Nevertheless, I have raised a bug to fix the upper bounds of the randomized value: https://github.com/jbreckmckye/ffvii_damage_calc/issues/7 (I quite like these Github project tools, basic though they are).