This is for the purpose of finding an effective way to combine looted items, needed for Quality Recipe in Path of Exile game. Saves the time, as counting it in calculator (or mentally, as some are able to) is no longer needed.
- Open the script.
- Write percent values of all items of a given type you'd like to vendor.
- Script outputs what combinations are available to you.
Only after running this script have I gotten to know how many more combinations there could be, that I hadn't even suspected.
There's one significant bug I've found: if the input allows for two identical combinations to be possible, it returns only one of them.
# For example
'10 10 10 10 10 10 10 10'
# should return
[8, 2, (10, 10, 10, 10),(10, 10, 10, 10)] # (that's 8 items in 2 groups/recipes)
# but it returns only
[4, (10, 10, 10, 10)].
# When numbers are more varied it could be much more difficult to notice than in this simple example.
NOTE: It needs Python 3 installed on your machine to work. Python 2 shouldn't work.
====================================
Made for the purpose of learning and automation. Maybe someone else will find it useful too, but I expect there to be better solutions for this already.