From Dark and Darker Wiki
(Auto generate drop tables) |
(made {{PAGENAME}} default value) |
||
Line 1: | Line 1: | ||
<includeonly>{{#vardefine:active}}<!-- | <includeonly>{{#vardefine:active}}<!-- | ||
-->{{#vardefine:Poor|{{#ifexist:DropTable:{{{1}}} 1|1{{#if:{{#var:active}}||{{#vardefine:active|Poor}}}}|}}}}<!-- Check if droptable pages exists, if the page exists = it drops | -->{{#vardefine:Poor|{{#ifexist:DropTable:{{{1|{{PAGENAME}}}}} 1|1{{#if:{{#var:active}}||{{#vardefine:active|Poor}}}}|}}}}<!-- Check if droptable pages exists, if the page exists = it drops | ||
-->{{#vardefine:Common|{{#ifexist:DropTable:{{{1}}} 2|1{{#if:{{#var:active}}||{{#vardefine:active|Common}}}}|}}}}<!-- | -->{{#vardefine:Common|{{#ifexist:DropTable:{{{1|{{PAGENAME}}}}} 2|1{{#if:{{#var:active}}||{{#vardefine:active|Common}}}}|}}}}<!-- | ||
-->{{#vardefine:Uncommon|{{#ifexist:DropTable:{{{1}}} 3|1{{#if:{{#var:active}}||{{#vardefine:active|Uncommon}}}}|}}}}<!-- | -->{{#vardefine:Uncommon|{{#ifexist:DropTable:{{{1|{{PAGENAME}}}}} 3|1{{#if:{{#var:active}}||{{#vardefine:active|Uncommon}}}}|}}}}<!-- | ||
-->{{#vardefine:Rare|{{#ifexist:DropTable:{{{1}}} 4|1{{#if:{{#var:active}}||{{#vardefine:active|Rare}}}}|}}}}<!-- | -->{{#vardefine:Rare|{{#ifexist:DropTable:{{{1|{{PAGENAME}}}}} 4|1{{#if:{{#var:active}}||{{#vardefine:active|Rare}}}}|}}}}<!-- | ||
-->{{#vardefine:Epic|{{#ifexist:DropTable:{{{1}}} 5|1{{#if:{{#var:active}}||{{#vardefine:active|Epic}}}}|}}}}<!-- | -->{{#vardefine:Epic|{{#ifexist:DropTable:{{{1|{{PAGENAME}}}}} 5|1{{#if:{{#var:active}}||{{#vardefine:active|Epic}}}}|}}}}<!-- | ||
-->{{#vardefine:Legendary|{{#ifexist:DropTable:{{{1}}} 6|1{{#if:{{#var:active}}||{{#vardefine:active|Legendary}}}}|}}}}<!-- | -->{{#vardefine:Legendary|{{#ifexist:DropTable:{{{1|{{PAGENAME}}}}} 6|1{{#if:{{#var:active}}||{{#vardefine:active|Legendary}}}}|}}}}<!-- | ||
-->{{#vardefine:Unique|{{#ifexist:DropTable:{{#if:{{Weapon_Data|{{{1}}}|unique}}|{{Weapon_Data|{{{1}}}|unique}}|{{{1}}}}} 7|1{{#if:{{#var:active}}||{{#vardefine:active|Unique}}}}|}}}}<!-- Check if there is an artifact version for the unique | -->{{#vardefine:Unique|{{#ifexist:DropTable:{{#if:{{Weapon_Data|{{{1|{{PAGENAME}}}}}|unique}}|{{Weapon_Data|{{{1|{{PAGENAME}}}}}|unique}}|{{{1|{{PAGENAME}}}}}}} 7|1{{#if:{{#var:active}}||{{#vardefine:active|Unique}}}}|}}}}<!-- Check if there is an artifact version for the unique | ||
-->{{#if:{{#var:Poor}}{{#var:Common}}{{#var:Uncommon}}{{#var:Rare}}{{#var:Epic}}{{#var:Legendary}}{{#var:Unique}}| | -->{{#if:{{#var:Poor}}{{#var:Common}}{{#var:Uncommon}}{{#var:Rare}}{{#var:Epic}}{{#var:Legendary}}{{#var:Unique}}| | ||
==Dropped By== | ==Dropped By== | ||
Line 21: | Line 21: | ||
{{#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}}} 1}} | {{:DropTable:{{{1|{{PAGENAME}}}}} 1}} | ||
</div>|}}<!-- | </div>|}}<!-- | ||
-->{{#if:{{#var:Common}}|<div class="Common-data" {{#ifeq:Common|{{#var:active}}||style="display:none"}}> | -->{{#if:{{#var:Common}}|<div class="Common-data" {{#ifeq:Common|{{#var:active}}||style="display:none"}}> | ||
{{:DropTable:{{{1}}} 2}} | {{:DropTable:{{{1|{{PAGENAME}}}}} 2}} | ||
</div>|}}<!-- | </div>|}}<!-- | ||
-->{{#if:{{#var:Uncommon}}|<div class="Uncommon-data" {{#ifeq:Uncommon|{{#var:active}}||style="display:none"}}> | -->{{#if:{{#var:Uncommon}}|<div class="Uncommon-data" {{#ifeq:Uncommon|{{#var:active}}||style="display:none"}}> | ||
{{:DropTable:{{{1}}} 3}} | {{:DropTable:{{{1|{{PAGENAME}}}}} 3}} | ||
</div>|}}<!-- | </div>|}}<!-- | ||
-->{{#if:{{#var:Rare}}|<div class="Rare-data" {{#ifeq:Rare|{{#var:active}}||style="display:none"}}> | -->{{#if:{{#var:Rare}}|<div class="Rare-data" {{#ifeq:Rare|{{#var:active}}||style="display:none"}}> | ||
{{:DropTable:{{{1}}} 4}} | {{:DropTable:{{{1|{{PAGENAME}}}}} 4}} | ||
</div>|}}<!-- | </div>|}}<!-- | ||
-->{{#if:{{#var:Epic}}|<div class="Epic-data" {{#ifeq:Epic|{{#var:active}}||style="display:none"}}> | -->{{#if:{{#var:Epic}}|<div class="Epic-data" {{#ifeq:Epic|{{#var:active}}||style="display:none"}}> | ||
{{:DropTable:{{{1}}} 5}} | {{:DropTable:{{{1|{{PAGENAME}}}}} 5}} | ||
</div>|}}<!-- | </div>|}}<!-- | ||
-->{{#if:{{#var:Legendary}}|<div class="Legendary-data" {{#ifeq:Legendary|{{#var:active}}||style="display:none"}}> | -->{{#if:{{#var:Legendary}}|<div class="Legendary-data" {{#ifeq:Legendary|{{#var:active}}||style="display:none"}}> | ||
{{:DropTable:{{{1}}} 6}} | {{:DropTable:{{{1|{{PAGENAME}}}}} 6}} | ||
</div>|}}<!-- | </div>|}}<!-- | ||
-->{{#if:{{#var:Unique}}|<div class="Unique-data" {{#ifeq:Unique|{{#var:active}}||style="display:none"}}> | -->{{#if:{{#var:Unique}}|<div class="Unique-data" {{#ifeq:Unique|{{#var:active}}||style="display:none"}}> | ||
{{:DropTable:{{#if:{{Weapon_Data|{{{1}}}|unique}}|{{Weapon_Data|{{{1}}}|unique}}|{{{1}}}}} 7}} | {{:DropTable:{{#if:{{Weapon_Data|{{{1|{{PAGENAME}}}}}|unique}}|{{Weapon_Data|{{{1|{{PAGENAME}}}}}|unique}}|{{{1|{{PAGENAME}}}}}}} 7}} | ||
</div>|}} | </div>|}} | ||
|}}</includeonly><noinclude> | |}}</includeonly><noinclude> | ||
=Generate Drop Tables= | =Generate Drop Tables= | ||
Intended usage for individual pages: | Intended usage for individual pages: | ||
<pre>{{GenerateDropTables}}</pre> | |||
default value for item is -PAGENAME-, therefore the above code is same as | |||
<pre>{{GenerateDropTables|{{PAGENAME}}}}</pre> | <pre>{{GenerateDropTables|{{PAGENAME}}}}</pre> | ||
Revision as of 08:53, 12 December 2023
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
Common
Uncommon
Rare
Epic
Legendary
NameSorted by Total Expected Value (TEV) in Descending Order TEV = Sum of all (Count * Probability) | Type | Count | Probability |
---|---|---|---|
Loose Loot | 1 | 2.2222% | |
Monster | 1 | 1.575% | |
Monster | 1 | 1.575% | |
Monster | 1 | 1.3696% | |
Monster | 1 | 1.25% | |
Monster | 1 | 0.7683% | |
Monster | 1 | 0.7683% | |
Monster | 1 | 0.7683% | |
Monster | 1 | 0.7683% | |
Monster | 1 | 0.725% | |
Monster | 1 | 0.6304% | |
Loose Loot | 1 | 0.6178% | |
Loose Loot | 1 | 0.6178% | |
Monster | 1 | 0.5875% | |
Containers | 1 | 0.5059% | |
Containers | 1 | 0.5059% | |
Monster | 1 | 0.3537% | |
Monster | 1 | 0.3537% | |
Containers | 1 | 0.3398% | |
Containers | 1 | 0.3398% | |
Monster | 1 | 0.2866% | |
Containers | 1 | 0.2689% | |
Containers | 1 | 0.2689% | |
Monster | 1 | 0.2625% | |
Containers | 1 | 0.2534% | |
Containers | 1 | 0.2534% | |
Containers | 1 | 0.2534% | |
Containers | 1 | 0.2534% | |
Containers | 1 | 0.2534% | |
Containers | 1 | 0.2534% | |
Containers | 1 | 0.253% | |
Containers | 1 | 0.253% | |
Containers | 1 | 0.253% | |
Containers | 1 | 0.253% | |
Containers | 1 | 0.253% | |
Containers | 1 | 0.253% | |
Containers | 1 | 0.253% | |
Containers | 1 | 0.253% | |
Containers | 1 | 0.253% | |
Containers | 1 | 0.2189% | |
Containers | 1 | 0.2189% | |
Containers | 1 | 0.2189% | |
Monster | 1 | 0.1208% | |
Containers | 1 | 0.1079% | |
Containers | 1 | 0.1079% | |
Containers | 1 | 0.0865% | |
Containers | 1 | 0.0865% |
Example 2
Only displays the rarity it can drop
{{GenerateDropTables|Bone}}
Dropped By
Common
NameSorted by Total Expected Value (TEV) in Descending Order TEV = Sum of all (Count * Probability) | Type | Count | Probability |
---|---|---|---|
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% | |
Monster | 1 | 6.6667% |
Example 2
Doesn't display anything if there are no drops
{{GenerateDropTables|Potion of Luck}}