Imstrength 8 Posted May 6 (edited) Hello everyone and thanks for checking out my thread dedicated to understanding the drop rate system. I was given the code that relates to npc drops and player drop bonuses by @Crux to work some numbers, i will share my notes i took as i did the math as well as do my best to explain how the system works and even use specific example and provide you an equation to do your own math fast! *****When there are (double drops) enable on the server, the second drop is not effected by the players ::droprate bonus***** NOTES // Drop a maximum of 2 items for (int i = 0; i < 2; i++) { for (Entry<Integer, List<NpcDropItem>> entry : tables.entrySet()) { List<NpcDropItem> dropTable = entry.getValue(); // Select a random item from the drop table NpcDropItem drop = dropTable.get(ThreadLocalRandom.current().nextInt(dropTable.size())); // Grab that items chance int chance = drop.getChance().getRandom(); // If we didn't roll a rare drop on the first roll, don't try again (1/180 arbitrary hard code for 'rare' drop) if (chance >= DropChance.OF_180.getRandom() && i == 1) { continue; } // If this isn't a second roll (i.e WOGW double drops/double slayer drops) apply our chance increase if (!p.getAttributeMap().getBoolean(PlayerAttributes.SECOND_DROP_ROLL)) { chance -= getChanceIncrease(p, chance, false); } // If somehow after our chance modifications we have over 100%, fix it if (chance < 1) { chance = 1; } // If we haven't dropped an item from this table yet AND we rolled it OR we have not rolled a common drop and the drop is 1/15 (arbitrary hard code for 'common' drop), then drop this item if (!dropped[drop.getChance().ordinal()] && RandomUtil.random(chance) == 0 || !common && drop.getChance() == DropChance.OF_15) { if (!common && drop.getChance() == DropChance.OF_15) { common = true; } dropList.add(drop); dropped[drop.getChance().ordinal()] = true; } // According to RS Wiki, rare drops on Zulrah's table always have a second chance to roll if they were not rolled already on each kill if (npc == ZulrahConstants.GREEN_ZULRAH) { if (drop.getChance() == DropChance.OF_340 || drop.getChance() == DropChance.OF_4000 || drop.getChance() == DropChance.OF_6000) { if (!dropped[drop.getChance().ordinal()] && RandomUtil.random(chance) == 0) { dropList.add(drop); dropped[drop.getChance().ordinal()] = true; } } } } } my notes (useless) MY NOTES HAVE BEEN REMOVED BECAUSE SOME PEOPLE CAN'T READ First off you will need 2 equations to calculate the item you are wishing to hunt, you will also need the drop rate of the item you want, the total number of drops that npc has, and your players drop rate bonus (converted into a decimal) KEY: C = the drop rate of the desired item (1/X where X is the chance) B = Drop rate bonus as a decimal (1.6 = 60%) Z = Chance after bonus is applied N = The number of drops the npc has (not including 100% items like bones or ashes) (C * B) - C = Z (1/(C - Z ))*(1/N) = CHANCE EXAMPLE EQUATION: I want to get a Kraken tentacle so a tentacle has the drop rate of 1/400. let's imagine we are on an account with a drop rate bonus of 30% The kraken has 35 possible drops including the tentacle so now we take our first equation: (C * B) - C = Z Equation: (400*1.30)-400 = 120 Then we take our second equation: (1/(C - Z ))*(1/N) = CHANCE (1/(400-120))*(1/N) = 0.0285 or 0.0285% chance to SPECIFICALLY get the tentacle. This would be a 1/3,508 drop. Edited May 11 by Imstrength 1 Quote Share this post Link to post Share on other sites

Utriballll 7 Posted May 7 (edited) I rechecked it twice, but you made a mistake somewhere Try using a higher drop chance, I used a droprate bonus of 42% and got a lower drop chance than in your example using the same numbers (1/400-(1/400*.42)) = 0.00145 (1/35)*(0.00145)= 4.14e-5 1/4.14e-5= 1/24138 dropchance if you can find your mistake this would be a really cool post! ^^ Edited May 7 by Utriballll 1 Quote Share this post Link to post Share on other sites

Imstrength 8 Posted May 7 (edited) 4 hours ago, Utriballll said: I rechecked it twice, but you made a mistake somewhere Try using a higher drop chance, I used a droprate bonus of 42% and got a lower drop chance than in your example using the same numbers (1/400-(1/400*.42)) = 0.00145 (1/35)*(0.00145)= 4.14e-5 1/4.14e-5= 1/24138 dropchance if you can find your mistake this would be a really cool post! ^^ i found the errors! when calculating your drop bonus you have yo add in the fact everyone has their usual 100% so B = Drop rate bonus as a decimal (60% = 1.60 not 0.60) i also had to change the equations slightly Edited May 7 by Imstrength Quote Share this post Link to post Share on other sites

Rhys 1 Posted May 13 Thanks for this, I've been wondering for a while how it worked. I still don't know what to do with this information, but I feel better knowing how it works. Quote Share this post Link to post Share on other sites

Littlee 82 Posted May 14 Smh... Cleaned the post up. Nice job clearing this up, if it's still confusing certain players maybe Crux can join in and help explain it. Quote Share this post Link to post Share on other sites