RaphaelDDL/e7db-api

API V2 Hero stats

Closed this issue · 7 comments

Api v2 no longer offers hero stats ? like lv60SixStarFullyAwakened.

We now have the values needed for the status formula, that means we can now get status for a specific level and awakening without needing to put the values on the API, based on the stats values on the API.

But I'm considering pre-calculating and adding the lv60SixStarFullyAwakened (which is currently the highest a hero can go) on the API so people won't need to code the formulas and most of times that's the statuses that's needed.

Have you need other level/awakening status? Normally all heroes end being lv60 6 star full awaken when you want to compare a fully built vs another fully built.

What is the formula for calculating those stats? It's free unequip and I need to calculate this for ML Charlotte since she's available in the V1 API.

https://api.epicsevendb.com/hero/yufine

      "stats": {
        "bra": 113,
        "int": 91,
        "fai": 67,
        "des": 72
      },

For level+grade only:

HP: (50 + INT * 1.4) * (LEVEL / 3 + 1) * (1 + (GRADE - 1) * 0.075)
ATT: (BRA * 0.6) * (LEVEL / 6 + 1) * (1 + (GRADE - 1) * 0.075)
DEF: (30 + FAI* 0.3) * (LEVEL / 8 + 1) * (1 + (GRADE - 1) * 0.075)
SPD: 60 + DES / 1.6
EFF: 0
EFR: 0
CHC: 0.15
CHD: 1.5
DAC: 0.05
CP: ((att * 1.6 + att * 1.6 * chc * chd) * (1 + (spd - 45) * 0.02) + hp + def * 9.3) * (1 + (res + eff) / 4)

And that will give you all info for lv1 to max for each grade (aka star level).

For the awakening, you have to account the zodiac_tree.stats data, for example, Yufine gets 60 60 60 80 80 80 flat HP from zodiac bonuses, plus gets 3% and 6% ATK from two nodes, plus flat 20 20 20 30 30 30 on each of the steps.

Zodiac stats that end with _rate are the %, for example, att is flat, att_rate is %.

I'll write the pre-calc tonight when I finish work.

Thanks! Would appreciate lv50FiveStarNoAwaken as well since the gear optimizer is dependent on it as well.

Thank you so much 😄

I made the pre-calc and no awaken is perfect 100% match with in-game.

But for some reason, it's off by a few on the awakened (to more). I think I did it wrong: I extracted all zodiac atk/hp flats, sum'ed to the base unawakened then applied the % rates, so I guess I shouldn't do that and instead, walk through each zodiac upgrade and apply the % on that slot. I'll try that now

Okay, v2 now comes with pre-calculated status, located in calculatedStatus. I added lv50FiveStarNoAwaken, lv50FiveStarFullyAwakened, lv60SixStarNoAwaken, lv60SixStarFullyAwakened

few examples:

https://api.epicsevendb.com/hero/little-queen-charlotte , https://api.epicsevendb.com/hero/kawerik , https://api.epicsevendb.com/hero/yufine

Let me know if you find any hero with issues.

Right now is calculated on the API just because JS is easier for me to do than python, but I'll move the pre-calc from being on-the-fly to be part of the data in the gamedatabase since it's static (the builder I wrote in python, so I'll port my code to the builder later so API keeps being data presentation only, no calcs)