Suggestion: Add option for displaying the "luck%" (cumulative drop rate) #371


Open
  • Lorentari created this issue Jan 31, 2020

    I would like if there was a option to add the cumulative drop rate to the tooltip.

    I don't know much about coding addons and LUA, but I can provide the mathematical formula 

    That would be accompliced by the following formula:

     

    [Chance of having at least 1 drop at this point] =  1 - (1 - [droprate in percent (e.g. 0.01 for 1/100-rate)]) ^ [attempts]

     

  • Versipelle posted a comment Aug 17, 2020

    I really much like the idea, I've been doing this on the side in spreadsheets for what I was farming so I definitely would turn this feature on.

     

    I'm not a maintainer of Rarity in any way but I've been tinkering with my local copy to give an example of how it could look like:

     

     

    I just added the following snippet line 2446 in GUI.lua

     

    if item.chance then
            local probability = 1 / item.chance
    	local luck = 1 - ((1 - probability)^attempts)
    	local s_luck = format("%s: |cFF00FFFF%.3g%%|r of players would have dropped it by now. (|cFF00FFFF%.3g%%|r droprate) ", itemName or item.name, luck * 100, probability * 100)
    	self:Pour(s_luck, nil, nil, nil, nil, nil, nil, nil, nil, itemTexture)
    end

     Of course you would need a bit more to add it as an option in the GUI and stuff =)


    Edited Aug 17, 2020
  • RDW posted a comment Aug 19, 2020

    Gotcha, created this issue: https://github.com/SacredDuckwhale/Rarity/issues/191

     

    I probably won't have time to implement optional features such as this anytime soon, but contributions are always welcome :)


To post a comment, please login or register a new account.