Thread: New loot system
View Single Post
  #27  
Old 09-20-2012, 03:26 AM
sorvani
Dragon
 
Join Date: May 2010
Posts: 965
Default

Quote:
Originally Posted by ChaosSlayerZ View Post
From what I see if all item in the lootdrop have identical chance to drop, then it doesn't matter what % they are given as long as its equal.
No it matters. 10% != 66%

lootdrop 20 has mindrop=0 droplimit=1 and multiplier=1

This means that no matter how many items are in the lootdrop that between 0 and 1 of them will drop.

lootdrop 20 has 5 entries.

position 1: itemid 13071 = 90%
position 2: itemid 13072 = 50%
position 3: itemid 13073 = 50%
position 4: itemid 13074 = 50%
position 5: itemid 13075 = 1%

First, the code will roll a random number between 1 and 5.
This will determine which item gets rolled first.
Say the result is 2.
The code then looks at the % for the item in position 2 and rolls against that %.
If it hits, the item is dropped and the loop terminates, no more items are rolled.
If it does not hit, then the code moves on to position 3 and rolls against the % for that item.
This continues with positions 4 then 5 then loops back around to position 1.
If at this time no item has yet dropped, the loop terminates because there is no minimum drop requirement for the lootdrop.

Now, let us change the % for position 1 to 100% and assume that the random starts on position 3. If position 3, 4 or 5 hit, then that means position 1 will not even get rolled even though it is 100%. Similarly, if the random started on position 1 and it was 100% then none of the other 4 positions would even get rolled. the loop would be stopped.

Is that all clear?


Now if you have an item (or more than 1) that you DO want to be 100% Make a separate table for the 100% drop(s).

Lootdrop 21 contains 3 items that should ALWAYS drop.
Set mindrop=3, maxdrop=3 and multiplier=1

Position 1: item123 = 100%
Position 2: item456 = 100%
Position 3: item789 = 100%

No matter where the random 1 to 3 starts this loop each item will drop.


Now you have a loot drop where the mob always drops 2 items from a list of 3 (and can dupplicate a drop)

lootdrop 22 contains 3 items, set mindrop=2, maxdrop=2 multiplier=1

Position 1: item123 = 40%
Position 2: item456 = 40%
Position 3: item789 = 20%

The random 1 to 3 will start at 3 and roll against the 20% for that position.
Then it rolls against hte 40% for position 1 then against the 40% for position 2.
If only 1 of the 3 items dropped, the mindrop=2 has not yet been met so the loop will continue. pos 3, 1, 2 until a second item drops.
Reply With Quote