Difference between revisions of "Database Editor:Loot"

From The Al`Kabor Project Wiki
Jump to navigation Jump to search
m
(new loot sim script; added warning to not use droplimit when mindrop>0)
 
Line 5: Line 5:
== Loot Drops ==
== Loot Drops ==


Loot drops have a complex unintuitive logic because the loot drop system that was designed for EQ Emu originally could not facilitate the functionality that Sony had implemented and band-aid fixes were tacked on top of a flawed design instead of rewriting from scratch.  It's important to understand how this works, else drop rates will be very different than intended.
Loot drops have a complex unintuitive logic because the loot drop system that was designed for EQ Emu originally could not facilitate the functionality that Sony had implemented and band-aid fixes were tacked on top of a flawed design instead of rewriting from scratch.  It's important to understand how this works, else drop rates could be very different than intended.


Like loot tables, loot drops can be applied to multiple loot tables and deleting one will remove it from all the tables that use it.
Like loot tables, loot drops can be applied to multiple loot tables and deleting one will remove it from all the tables that use it.
Line 32: Line 32:


If either Droplimit or Mindrop are non-zero, then some special logic is done to avoid a problem that results in real-world drop chances that don't match expected rates.  The drop code logic will add up each items' drop chance and roll a value up to that sum to avoid problems such as if you had set the first item to 100% or greater with Droplimit 1 giving no other items after it a chance to drop.
If either Droplimit or Mindrop are non-zero, then some special logic is done to avoid a problem that results in real-world drop chances that don't match expected rates.  The drop code logic will add up each items' drop chance and roll a value up to that sum to avoid problems such as if you had set the first item to 100% or greater with Droplimit 1 giving no other items after it a chance to drop.
Note that it is not advised to set Droplimit higher than Mindrop if Mindrop is non-zero because the drop rates will be higher than anticipated due to the way the algorithm functions.  Probability, Multiplier and Multiplier Min should be used instead if the objective is to create a random chance of X to X+Y numbers of drops.


Overall lootdrop logic works like this:
Overall lootdrop logic works like this:
Line 43: Line 45:
=== Loot Simulator ===
=== Loot Simulator ===


Tools/math are often required to know how the results of a configuration of Multiplier, Probability, and Multiplier Minimum will be.  A lua script for this purpose is available [https://drive.google.com/open?id=0B9w2lZ-BZM3lYWUwZ2FVMzBDUkE here].  With this you can use some trial and error to get a drop profile that agrees with you.
Because of EQEmu and TAKP's loot algorithm is complicated, simulations are sometimes necessary in order to accurately gauge whether or not the lootdrop will drops items at the rates intended.  A lua script is available to run simulations of lootdrops and it can be found [https://drive.google.com/open?id=1n0tUTwzxN1ic3iNM5m4macCcFqdN-Sxw here].


The output looks like this:
The output looks like this:


<small><tt>
<small><tt>
:Simulated Kills: 1000000MIN: 1MULT: 7PROBABILITY: 45;  Total Drops: 3701197<br/>
:Simulations/Kills: 100000Min Drop: 0Drop Limit: 0Probability: 100Mult: 1;  Mult Min: 0<br/>
:1 drops: 27759 (2.7%)<br/>
:"Item1" multiplier: 1; chance: 10%<br/>
:2 drops: 135443 (13.5%)<br/>
:"Item2" multiplier: 1; chance: 20%<br/>
:3 drops: 278189 (27.8%)<br/>
:"Item3" multiplier: 1; chance: 30%<br/>
:4 drops: 302977 (30.2%)<br/>
:"Item4" multiplier: 1; chance: 40%<br/>
:5 drops: 186034 (18.6%)<br/>
:Sum of Chances: 100%<br/>
:6 drops: 61279 (6.1%)<br/>
<br/>
:7 drops: 8319 (0.8%)<br/>
:Total drops == 99905<br/>
:RARE_CHANCE: 100;  Rares: 3701197 (100%) Kills w/ Rare: 1000000 (100%)<br/></tt></small>
:kills with 0 Item1 drops == 90030 (90.03% of kills)<br/>
 
:kills with 1 Item1 drops == 9970 (9.97% of kills)<br/>
Note however that this script assumes a Droplimit of 1.
:Total Item1 drops == 9970 (9.98% of drops)<br/>
:kills with 0 Item2 drops == 79967 (79.97% of kills)<br/>
:kills with 1 Item2 drops == 20033 (20.03% of kills)<br/>
:Total Item2 drops == 20033 (20.05% of drops)<br/>
:kills with 0 Item3 drops == 70147 (70.15% of kills)<br/>
:kills with 1 Item3 drops == 29853 (29.85% of kills)<br/>
:Total Item3 drops == 29853 (29.88% of drops)<br/>
:kills with 0 Item4 drops == 59951 (59.95% of kills)<br/>
:kills with 1 Item4 drops == 40049 (40.05% of kills)<br/>
:Total Item4 drops == 40049 (40.09% of drops)<br/>
<br/>
:Kills with 0 total drops: 30230 (30.23%)<br/>
:Kills with 1 total drops: 44127 (44.13%)<br/>
:Kills with 2 total drops: 21408 (21.41%)<br/>
:Kills with 3 total drops: 3978 (3.98%)<br/>
:Kills with 4 total drops: 257 (0.26%)<br/></tt></small>

Latest revision as of 18:18, 23 April 2020

Loot tables consist of both a random coin value range and zero or more lootdrops. The input coin values are in copper, but the looted coin in-game will be higher denominations.

The same loot table may be applied to multiple NPCs. Take care to click the correct button when removing loot tables from an NPC that you do not inadvertently delete a table in use by other NPCs. 'Drop this loot table' will remove the table from that particular NPC without deleting it. Deleting the table (clicking the red X) will remove it from all the NPCs using it.

Loot Drops[edit]

Loot drops have a complex unintuitive logic because the loot drop system that was designed for EQ Emu originally could not facilitate the functionality that Sony had implemented and band-aid fixes were tacked on top of a flawed design instead of rewriting from scratch. It's important to understand how this works, else drop rates could be very different than intended.

Like loot tables, loot drops can be applied to multiple loot tables and deleting one will remove it from all the tables that use it.

Each loot drop contains a list of possible item drops. A loot drop when rolled can drop either none, one, or many items. Each item entry has its own drop chance, a toggle as to whether the NPC may equip the item, the number of item charges if applicable, the level range the NPC may use the item, and a multiplier.

Mindrop, Droplimit, Multiplier, Multiplier Min and Probability control how any items may drop. It's very important to understand how these work. These values are not shared with all the NPCs that have the lootdrop, so you should set them for each NPC that shares the lootdrop.

Mindrop sets a minimum number of items that must drop per multiplier. If this value is non-zero, then the server will keep rolling items in the lootdrop until the number of items equals or exceeds mindrop.

Droplimit sets a maximum number of items that may drop per multiplier. The lootdrop will stop dropping items when this value is reached, but only for each multiplier instance.

Multiplier essentially re-runs the lootdrop as if it were multiple identical lootdrops. Mindrop and Droplimit both only apply to each instance of Multiplier. For example, if you set Mindrop 1 and Droplimit 1 to force only one item drop, and set Multiplier to 3, then 3 items will drop.

Probability is a roll chance for the entire lootdrop. If the roll fails, then none of the items are checked. This probability roll is done once for each Multiplier.

Multiplier Min is a way of guaranteeing that some items drop even with a Probability set below 100%. It essentially forces Probability to 100% for Multiplier Min number of Multipliers. For example: if Mindrop and Droplimit are both 1 to force 1 item to drop per Mult, Probability is between 1 and 99, Multiplier is 10 and Mult Min is 5, then anywhere from between 5-10 items will drop. The first five Mults will be 100%, and the latter five will each roll a Probabiliy chance of dropping an item. In this way you can vary the number of items that may drop while still guaranteeing one or more.

To mimic Sony's loot logic for raid bosses, generally you will want to set both Mindrop and Droplimit to 1 and have all the item chances in the table add up to 100%; then set Multiplier, Probability, and Mult Min appropriately. Use Mult Min if the NPC shouldn't always drop the same number of items, (like NToV bosses generally drop 2 or 3) else if the NPC always drops the same number of items, leave Mult Min at 0 and just set the Multiplier to equal the number of drops and set Mindrop and Droplimit to 1.

Individual Item Rolls[edit]

When individual item rolls are checked, a roll is done for each item's multiplier. I.e. you'll get a range of possible drops from 0 to X drops instead of always either 0 or X.

If Droplimit and Mindrop are both 0, then the items are each checked once from top to bottom and nothing more. None of the items may drop, or all of them my drop depending on the rolls.

If either Droplimit or Mindrop are non-zero, then some special logic is done to avoid a problem that results in real-world drop chances that don't match expected rates. The drop code logic will add up each items' drop chance and roll a value up to that sum to avoid problems such as if you had set the first item to 100% or greater with Droplimit 1 giving no other items after it a chance to drop.

Note that it is not advised to set Droplimit higher than Mindrop if Mindrop is non-zero because the drop rates will be higher than anticipated due to the way the algorithm functions. Probability, Multiplier and Multiplier Min should be used instead if the objective is to create a random chance of X to X+Y numbers of drops.

Overall lootdrop logic works like this:

  • Multiplier is checked first to determine how many instances of this lootdrop will iterate, then loops over them.
  • Probability is ignored if Mult Min hasn't been met yet, else it's rolled for each remaining Multiplier.
  • Individual item multipliers are then checked and item chances are rolled for each item's multiplier.
  • If Droplimit is reached, the loop ends.
  • The loop reruns until Mindrop is reached.

Loot Simulator[edit]

Because of EQEmu and TAKP's loot algorithm is complicated, simulations are sometimes necessary in order to accurately gauge whether or not the lootdrop will drops items at the rates intended. A lua script is available to run simulations of lootdrops and it can be found here.

The output looks like this:

Simulations/Kills: 100000; Min Drop: 0; Drop Limit: 0; Probability: 100; Mult: 1; Mult Min: 0
"Item1" multiplier: 1; chance: 10%
"Item2" multiplier: 1; chance: 20%
"Item3" multiplier: 1; chance: 30%
"Item4" multiplier: 1; chance: 40%
Sum of Chances: 100%


Total drops == 99905
kills with 0 Item1 drops == 90030 (90.03% of kills)
kills with 1 Item1 drops == 9970 (9.97% of kills)
Total Item1 drops == 9970 (9.98% of drops)
kills with 0 Item2 drops == 79967 (79.97% of kills)
kills with 1 Item2 drops == 20033 (20.03% of kills)
Total Item2 drops == 20033 (20.05% of drops)
kills with 0 Item3 drops == 70147 (70.15% of kills)
kills with 1 Item3 drops == 29853 (29.85% of kills)
Total Item3 drops == 29853 (29.88% of drops)
kills with 0 Item4 drops == 59951 (59.95% of kills)
kills with 1 Item4 drops == 40049 (40.05% of kills)
Total Item4 drops == 40049 (40.09% of drops)


Kills with 0 total drops: 30230 (30.23%)
Kills with 1 total drops: 44127 (44.13%)
Kills with 2 total drops: 21408 (21.41%)
Kills with 3 total drops: 3978 (3.98%)
Kills with 4 total drops: 257 (0.26%)