From Dark and Darker Wiki
m (Updating the "Last Updated" text. Same format as the main page. Makes it more eye-catching.) |
(Changing Template to use structure that works with the new Item Data.) |
||
Line 1: | Line 1: | ||
<includeonly>{{#vardefine:active}}<!-- | <includeonly>{{#vardefine:active}}<!-- | ||
-->{{#vardefine:Poor|{{#ifexist:DropTable:{{{1|{{PAGENAME}}}}} 1|1{{#if:{{#var:active}}||{{#vardefine:active|Poor}}}} | Rarity flags for whether or not the item has a drop table for that rarity. | ||
-->{{#vardefine:Common|{{#ifexist:DropTable:{{{1|{{PAGENAME}}}}} 2|1{{#if:{{#var:active}}||{{#vardefine:active|Common}}}} | -->{{#vardefine:Poor|<!-- | ||
-->{{#vardefine:Uncommon|{{#ifexist:DropTable:{{{1|{{PAGENAME}}}}} 3|1{{#if:{{#var:active}}||{{#vardefine:active|Uncommon}}}}|}}}}<!-- | -->{{#ifexist:DropTable:{{{1|{{PAGENAME}}}}} 1<!-- | ||
-->{{#vardefine:Rare|{{#ifexist:DropTable:{{{1|{{PAGENAME}}}}} 4|1{{#if:{{#var:active}}||{{#vardefine:active|Rare}}}} | -->|1<!-- Var Poor is set to 1 if the DropTable exists. | ||
-->{{#vardefine:Epic|{{#ifexist:DropTable:{{{1|{{PAGENAME}}}}} 5|1{{#if:{{#var:active}}||{{#vardefine:active|Epic}}}} | -->{{#if:{{#var:active}}<!-- First DropTable that exists is set to active. | ||
-->{{#vardefine:Legendary|{{#ifexist:DropTable:{{{1|{{PAGENAME}}}}} 6|1{{#if:{{#var:active}}||{{#vardefine:active|Legendary}}}} | -->||{{#vardefine:active|Poor}} }} }} }}<!-- | ||
-->{{#vardefine:Unique|{{#ifexist:DropTable:{{#if:{{ | -->{{#vardefine:Common|<!-- | ||
--> | -->{{#ifexist:DropTable:{{{1|{{PAGENAME}}}}} 2<!-- | ||
-->|1<!-- | |||
-->{{#if:{{#var:active}}<!-- | |||
-->||{{#vardefine:active|Common}} }} }} }}<!-- | |||
-->{{#if: | -->{{#vardefine:Uncommon|<!-- | ||
--> | -->{{#ifexist:DropTable:{{{1|{{PAGENAME}}}}} 3<!-- | ||
-->|1<!-- | |||
-->{{#if:{{#var:active}}<!-- | |||
-->||{{#vardefine:active|Uncommon}} }}|}} }}<!-- | |||
-->{{#vardefine:Rare|<!-- | |||
-->{{#ifexist:DropTable:{{{1|{{PAGENAME}}}}} 4<!-- | |||
-->|1<!-- | |||
-->{{#if:{{#var:active}}<!-- | |||
-->||{{#vardefine:active|Rare}} }} }} }}<!-- | |||
-->{{#vardefine:Epic|<!-- | |||
-->{{#ifexist:DropTable:{{{1|{{PAGENAME}}}}} 5<!-- | |||
-->|1<!-- | |||
-->{{#if:{{#var:active}}<!-- | |||
-->||{{#vardefine:active|Epic}} }} }} }}<!-- | |||
-->{{#vardefine:Legendary|<!-- | |||
-->{{#ifexist:DropTable:{{{1|{{PAGENAME}}}}} 6<!-- | |||
-->|1<!-- | |||
-->{{#if:{{#var:active}}<!-- | |||
-->||{{#vardefine:active|Legendary}} }} }} }}<!-- | |||
-->{{#vardefine:Unique|<!-- | |||
If the item has a unique variant check the DropTable for it. Else check the DropTable for the item itself. | |||
-->{{#ifexist:DropTable:{{#if:{{Item Data|Weapon|{{{1|{{PAGENAME}}}}}|artifactname}}|{{Item Data|Weapon|{{{1|{{PAGENAME}}}}}|artifactname}} 7|{{{1|{{PAGENAME}}}}} 7}}<!-- | |||
-->|1<!-- | |||
-->{{#if:{{#var:active}}<!-- | |||
-->||{{#vardefine:active|Unique}} }} }} }}<!-- | |||
If the item has no drop tables, don't display anything. | |||
-->{{#if:{{#var:Poor}}{{#var:Common}}{{#var:Uncommon}}{{#var:Rare}}{{#var:Epic}}{{#var:Legendary}}{{#var:Unique}}<!-- | |||
-->|<h2>Dropped By</h2><br><!-- | |||
--><p style="width:fit-content; border:1px solid #DD952A; text-align:center; padding:3px; font-weight:bold; margin:9px; border-radius:10px;">Loot/Drop tables last updated for {{:TODO|LootTables}}</p><br><!-- | |||
-->{{#if:{{#var:Poor}}<!-- If the item has a drop table for the rarity, display the tab for it. | |||
-->|{{TabToggle|Poor|Poor|active={{#ifeq:Poor|{{#var:active}}|yes|no}} }} }}<!-- | |||
-->{{#if:{{#var:Common}}<!-- | |||
-->|{{TabToggle|Common|Common|active={{#ifeq:Common|{{#var:active}}|yes|no}} }} }}<!-- | |||
-->{{#if:{{#var:Uncommon}}<!-- | |||
-->|{{TabToggle|Uncommon|Uncommon|active={{#ifeq:Uncommon|{{#var:active}}|yes|no}} }} }}<!-- | |||
-->{{#if:{{#var:Rare}}<!-- | |||
-->|{{TabToggle|Rare|Rare|active={{#ifeq:Rare|{{#var:active}}|yes|no}} }} }}<!-- | |||
-->{{#if:{{#var:Epic}}<!-- | |||
-->|{{TabToggle|Epic|Epic|active={{#ifeq:Epic|{{#var:active}}|yes|no}} }} }}<!-- | |||
-->{{#if:{{#var:Legendary}}<!-- | |||
-->|{{TabToggle|Legendary|Legendary|active={{#ifeq:Legendary|{{#var:active}}|yes|no}} }} }}<!-- | |||
-->{{#if:{{#var:Unique}}<!-- | |||
-->|{{TabToggle|Unique|Unique|active={{#ifeq:Unique|{{#var:active}}|yes|no}} }} }}<!-- | |||
{{#if:{{#var:Poor}}| | -->{{#if:{{#var:Poor}}<!-- | ||
<div class="Poor-data" {{#ifeq:Poor|{{#var:active}}||style="display:none"}}> | -->|<div class="Poor-data" {{#ifeq:Poor|{{#var:active}}||style="display:none"}}><!-- | ||
{{:DropTable:{{{1|{{PAGENAME}}}}} 1}} | -->{{:DropTable:{{{1|{{PAGENAME}}}}} 1}}</div>}}<!-- | ||
</div> | -->{{#if:{{#var:Common}}<!-- | ||
-->{{#if:{{#var:Common}}|<div class="Common-data" {{#ifeq:Common|{{#var:active}}||style="display:none"}}> | -->|<div class="Common-data" {{#ifeq:Common|{{#var:active}}||style="display:none"}}><!-- | ||
{{:DropTable:{{{1|{{PAGENAME}}}}} 2}} | -->{{:DropTable:{{{1|{{PAGENAME}}}}} 2}}</div>}}<!-- | ||
</div> | -->{{#if:{{#var:Uncommon}}<!-- | ||
-->{{#if:{{#var:Uncommon}}|<div class="Uncommon-data" {{#ifeq:Uncommon|{{#var:active}}||style="display:none"}}> | -->|<div class="Uncommon-data" {{#ifeq:Uncommon|{{#var:active}}||style="display:none"}}><!-- | ||
{{:DropTable:{{{1|{{PAGENAME}}}}} 3}} | -->{{:DropTable:{{{1|{{PAGENAME}}}}} 3}}</div>}}<!-- | ||
</div> | -->{{#if:{{#var:Rare}}<!-- | ||
-->{{#if:{{#var:Rare}}|<div class="Rare-data" {{#ifeq:Rare|{{#var:active}}||style="display:none"}}> | -->|<div class="Rare-data" {{#ifeq:Rare|{{#var:active}}||style="display:none"}}><!-- | ||
{{:DropTable:{{{1|{{PAGENAME}}}}} 4}} | -->{{:DropTable:{{{1|{{PAGENAME}}}}} 4}}</div>}}<!-- | ||
</div> | -->{{#if:{{#var:Epic}}<!-- | ||
-->{{#if:{{#var:Epic}}|<div class="Epic-data" {{#ifeq:Epic|{{#var:active}}||style="display:none"}}> | -->|<div class="Epic-data" {{#ifeq:Epic|{{#var:active}}||style="display:none"}}><!-- | ||
{{:DropTable:{{{1|{{PAGENAME}}}}} 5}} | -->{{:DropTable:{{{1|{{PAGENAME}}}}} 5}}</div>}}<!-- | ||
</div> | -->{{#if:{{#var:Legendary}}<!-- | ||
-->{{#if:{{#var:Legendary}}|<div class="Legendary-data" {{#ifeq:Legendary|{{#var:active}}||style="display:none"}}> | -->|<div class="Legendary-data" {{#ifeq:Legendary|{{#var:active}}||style="display:none"}}><!-- | ||
{{:DropTable:{{{1|{{PAGENAME}}}}} 6}} | -->{{:DropTable:{{{1|{{PAGENAME}}}}} 6}}</div>}}<!-- | ||
</div> | -->{{#if:{{#var:Unique}}<!-- | ||
-->{{#if:{{#var:Unique}}|<div class="Unique-data" {{#ifeq:Unique|{{#var:active}}||style="display:none"}}> | -->|<div class="Unique-data" {{#ifeq:Unique|{{#var:active}}||style="display:none"}}><!-- | ||
{{:DropTable:{{#if:{{ | -->{{:DropTable:<!-- | ||
</div> | If the item has a unique variant display the DropTable for it. Else display the DropTable for the item itself. | ||
-->{{#if:{{Item Data|Weapon|{{{1|{{PAGENAME}}}}}|artifactname}}<!-- | |||
-->|{{Item Data|Weapon|{{{1|{{PAGENAME}}}}}|artifactname}}<!-- | |||
-->|{{{1|{{PAGENAME}}}}}}}<!-- | |||
--> 7}}</div>}}<br>}}<!-- | |||
--></includeonly><noinclude> | |||
=Generate Drop Tables= | =Generate Drop Tables= | ||
Intended usage for individual pages: | Intended usage for individual pages: | ||
<pre>{{GenerateDropTables}}</pre> | <pre>{{GenerateDropTables}}</pre> | ||
default value for item is -PAGENAME-, therefore the above code is same as | default value for item is -PAGENAME-, therefore the above code is same as | ||
<pre>{{GenerateDropTables|{{PAGENAME}}}}</pre> | <pre>{{GenerateDropTables|{{PAGENAME}} }}</pre> | ||
==Example 1== | ==Example 1== | ||
Line 57: | Line 99: | ||
{{GenerateDropTables|Armet}} | {{GenerateDropTables|Armet}} | ||
==Example 3== | ==Example 3== |
Revision as of 04:25, 15 March 2024
Generate Drop Tables
Intended usage for individual pages:
{{GenerateDropTables}}
default value for item is -PAGENAME-, therefore the above code is same as
{{GenerateDropTables|{{PAGENAME}} }}
Example 1
{{GenerateDropTables|Arming Sword}}
Dropped By
Loot/Drop tables last updated for Patch:6.6#Patch 6$red
Common
Uncommon
Rare
Epic
Legendary
NameSorted by Total Expected Value in Descending Order Sum of all (Count * Probability) | Type | Count | Probability |
---|---|---|---|
Loose Loot | 1 | 2.2222% | |
Monster | 1 | 1.8975% | |
Monster | 1 | 1.8975% | |
Monster | 1 | 1.65% | |
Monster | 1 | 1.3545% | |
Monster | 1 | 0.9256% | |
Monster | 1 | 0.9256% | |
Monster | 1 | 0.9256% | |
Monster | 1 | 0.9256% | |
Monster | 1 | 0.918% | |
Monster | 1 | 0.918% | |
Monster | 1 | 0.7983% | |
Monster | 1 | 0.664% | |
Containers | 1 | 0.6271% | |
Containers | 1 | 0.6271% | |
Monster | 1 | 0.4832% | |
Monster | 1 | 0.4832% | |
Containers | 1 | 0.4746% | |
Monster | 1 | 0.4478% | |
Monster | 1 | 0.4478% | |
Monster | 1 | 0.4478% | |
Containers | 1 | 0.4205% | |
Containers | 1 | 0.4205% | |
Monster | 1 | 0.3495% | |
Monster | 1 | 0.3495% | |
Monster | 1 | 0.3464% | |
Containers | 1 | 0.3182% | |
Monster | 1 | 0.3163% | |
Containers | 1 | 0.3153% | |
Containers | 1 | 0.3153% | |
Containers | 1 | 0.3136% | |
Containers | 1 | 0.3136% | |
Containers | 1 | 0.3136% | |
Containers | 1 | 0.3136% | |
Containers | 1 | 0.3136% | |
Containers | 1 | 0.3136% | |
Containers | 1 | 0.3136% | |
Containers | 1 | 0.3136% | |
Containers | 1 | 0.3136% | |
Containers | 1 | 0.3136% | |
Containers | 1 | 0.3136% | |
Containers | 1 | 0.3136% | |
Monster | 1 | 0.306% | |
Monster | 1 | 0.306% | |
Containers | 1 | 0.2966% | |
Containers | 1 | 0.2966% | |
Containers | 1 | 0.2966% | |
Containers | 1 | 0.28% | |
Containers | 1 | 0.28% | |
Containers | 1 | 0.28% | |
Monster | 1 | 0.2515% | |
Containers | 1 | 0.2432% | |
Containers | 1 | 0.2373% | |
Containers | 1 | 0.2373% | |
Containers | 1 | 0.2373% | |
Containers | 1 | 0.2373% | |
Containers | 1 | 0.2288% | |
Monster | 1 | 0.2213% | |
Monster | 1 | 0.2213% | |
Containers | 1 | 0.216% | |
Containers | 1 | 0.2158% | |
Containers | 1 | 0.2158% | |
Containers | 1 | 0.2158% | |
Containers | 1 | 0.2158% | |
Containers | 1 | 0.2158% | |
Containers | 1 | 0.2158% | |
Containers | 1 | 0.2022% | |
Containers | 1 | 0.2022% | |
Monster | 1 | 0.153% | |
Containers | 1 | 0.1464% | |
Containers | 1 | 0.1464% | |
Containers | 1 | 0.1461% | |
Containers | 1 | 0.1081% |
Example 2
{{GenerateDropTables|Armet}}
Example 3
Only displays the rarity it can drop
{{GenerateDropTables|Bone}}
Example 4
Doesn't display anything if there are no drops
{{GenerateDropTables|Potion of Luck}}