stephenswat / eve-abyssal-market

An abyssal module marketplace for EVE Online.
https://mutaplasmid.space/
MIT License
29 stars 5 forks source link

Roll calculator improvement: cumulative stats #7

Open DarkFenX opened 5 years ago

DarkFenX commented 5 years ago

ms.space provides a way to see cumulative stats for modules like damage mods (i.e. dps output boost, which combines damage boost and rof boost). Roll calculator uses only basic stats so far.

However, for practical purposes I mostly care about cumulative stats. E.g. i want to see how often i will get +22.5%+ dps and 32.5- cpu for radiation sink.

I don't know how it can be calculated math-wise, but pretty sure there should be some algebraic way to solve that. Will write any details in comments if i come up with the solution.

DarkFenX commented 5 years ago

example for 2-factor cumulative stats: 1) 2D plane with x as damage modifier and y as rof modifier 2) area restricted by x-axis range [min dmg mod, max dmg mod] and y-axis range [min rof mod, max rof mod] is area of possibilities, defines 100% chance to roll. Min and max here are absolute min and max for rolls, not user-defined limits. 3) area between user-set min dmgboost and user-set max dmg boost functions (see [1]) is area of chance. Obviously it should be within area of possible values (point 2), User might want to set specific dmgmod / rofmod values which further restricts area of chance 4) roll chance for these parameters is area of chance / area of possibilities

So solution is as easy as finding out area below max and min graphs. Where graph is straight line you just take rectangular value, where graph is dmgboost function you just take definite integral of it over range where it applies. You subtract min area from max area - this is your chance area. Then you divide it by area of possibilities which yields you final combined chance, which takes into consideration all 3 user-set ranges (cumulative dmg boost, dmg modifier, rof modifier).

As a side-note, ability to control dmg modifier/rof modifier separately even if cumulative dmg boost is controlled makes sense due to stacking penalties: you get better results if you have 2 22% damage modules where 1 has high rof roll and 1 has high dmg roll, compared to 2 damage modules which have equal rolls on both.

Oh and also i don't know if there're 3-factor cumulative stats, which might make it a bit more complex.

Also I haven't thought about side-effects it might cause on cases when the same parameter can be used for multiple cumulative stats (shield boost amount on shield boosters is used for 2 cumulative stats, for example - shield boost per second and shield amout per cap). If you do this process for both of these stats, then shield amount roll chance will be taken into account twice, which might (or might be not) neutralized by dividing by shield boost amount roll chance once. Will think about this later, too.

[1] dmgboost = (dmgmod / rofmod - 1) * 100 dmgmod / rofmod = dmgboost / 100 + 1 rofmod = dmgmod / (dmgboost / 100 + 1)