m-h-c-t / mh-hunt-helper

Tool to help collect data, estimate attraction, catch, and drop rates for a popular game.
https://www.mhct.win
MIT License
7 stars 14 forks source link

Display Additional Convertible Stats #150

Open AardWolf opened 3 years ago

AardWolf commented 3 years ago

Dependent on #149

Display the additional stats on the convertible lookup page. This requires updating the JSON generator.

AardWolf commented 3 years ago

JSON generator being updated as #153 . searchByItem.php for a single convertible now returns JSON like this:

[
    {
        "conv": "1270",
        "item": "Snowball Charm",
        "total": "51109",
        "total_items": "211719",
        "single_opens": "584",
        "times_with_any": "584",
        "min_item_quantity": "1",
        "max_item_quantity": "5",
        "total_quantity_when_any": "2419"
    }
]

conv - convertible id item - item name total - total convertibles opened total_items - total_items across all convertibles opened single_opens - number of convertibles opened singly (single opens) THIS CAN BE 0 times_with_any - of single opens the number of times this item was seen in any quantity min_item_quantity - of single opens the minimum quantity seen for this item max_item_quantity - of single opens, the maximum quantity seen for this item total_quantity_when_any - total number of items seen from single opens

From these we can calculate: average item per convertible: total_items / total chance for an item to be in a convertible: times_with_any / single_opens average quantity when found: total_quantity_when_any / times_with_any (watch for divide by zero)