MHWDB-API icon indicating copy to clipboard operation
MHWDB-API copied to clipboard

Inconsistent Skill Modifiers

Open DeveloperPaul123 opened this issue 4 years ago • 5 comments

Some of the skill modifiers (especially the elemental damage ones such as damageFire, damageIce and so on) have inconsistent types in the API (int and String).

This is due to some of the values being just integer numbers or something like 100+5%. While this may technically be accurate information, it pain points while parsing.

I think it would make sense to add new fields to the SkillModifier object to include percent damage modifiers. So you could have damageFire and percentDamageFire to account for new levels of elemental damage adding a flat base amount + an added % bonus.

DeveloperPaul123 avatar Feb 25 '20 04:02 DeveloperPaul123

Yeah, that's an ugly hold-over from when the data was being scraped from Kiranico / MH Wiki. I'm putting this in the backlog for either the next release or the release after next, since like you said, it makes parsing that field more difficult than it should be.

LartTyler avatar Mar 02 '20 13:03 LartTyler

Sounds good!

What approach are you going to take to add that information? New fields in the SkillModifier class?

DeveloperPaul123 avatar Mar 02 '20 13:03 DeveloperPaul123

I'm probably just gonna add percentDamageXYZ fields, yeah. At some point, I'd like to completely refactor how the modifiers field is stored and represented in the API, but I think that's gonna be a bit too much work to try and fit into this next release.

LartTyler avatar Mar 02 '20 14:03 LartTyler

Ok sounds good to me 👍

DeveloperPaul123 avatar Mar 02 '20 14:03 DeveloperPaul123

Any updates on this? This is still a bit of a pain point.

DeveloperPaul123 avatar Mar 26 '20 00:03 DeveloperPaul123