kuper-adrian / statg-bot

Discord bot that posts PUBG statistics in your discord channel
MIT License
3 stars 2 forks source link

Does not correctly print avgStats.avgKills #3

Closed trololo151 closed 6 years ago

trololo151 commented 6 years ago

bot and site show different statistics pubg.op.gg

trololo151 commented 6 years ago

Does not correctly consider cd for this line result.avgKills = result.kills / result.roundsPlayed;

kuper-adrian commented 6 years ago

Sry for the late response.

Could you provide an example/username or maybe screenshots of the problem? My own stats don't differ from the pubg.op.gg results so its hard for me to find the cause.

trololo151 commented 6 years ago

image image In your case, cd is considered as damage / matches, and you need damage / death

kuper-adrian commented 6 years ago

After checking the numbers I noticed the following:

The formula statg uses at the moment is

avgKills = kills / roundsPlayed

This calculation is somewhat off, because you don't necessarily die every single game.

pubg.op.gg on the other hand seems to be using the following formula

avgKills = kills / (roundsPlayed - wins)

In my opinion this value is also not 100% correct, since you can win a game after you died (at least if you are playing duos or squad). But I will use this formula to be consistent with pubg.op.gg.

Thanks for reporting this issue.

trololo151 commented 6 years ago

does not correctly show everything exactly