From Dark and Darker Wiki

m (generateloottables now shows last update at top of generation)
(Separated Unique tab into Uniques and Artifacts tabs.)
 
(20 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#vardefine:active}}<!--
<!--
-->{{#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|{{PAGENAME}}}}} 2|1{{#if:{{#var:active}}||{{#vardefine:active|Common}}}}|}}}}<!--
-->{{#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|{{#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}}|
==Dropped By==
Loot/drop tables last updated for {{:TODO|LootTables}}
{{#if:{{#var:Poor}}|{{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}}}}|}}


NOTE TO FUTURE EDITORS:
This template makes the assumption that Artifacts only exist for weapons. If this is not the case, the template will need to be updated to account for that.


{{#if:{{#var:Poor}}|
--><includeonly>{{#vardefine:active}}<!--
<div class="Poor-data" {{#ifeq:Poor|{{#var:active}}||style="display:none"}}>  
Rarity flags for whether or not the item has a drop table for that rarity.
{{:DropTable:{{{1|{{PAGENAME}}}}} 1}}
-->{{#vardefine:Junk|<!--
</div>|}}<!--
-->{{#ifexist:DropTable:{{{1|{{PAGENAME}}}}} 0<!--
-->{{#if:{{#var:Common}}|<div class="Common-data" {{#ifeq:Common|{{#var:active}}||style="display:none"}}>
-->|1<!-- Var Junk is set to 1 if the DropTable exists.
{{:DropTable:{{{1|{{PAGENAME}}}}} 2}}
-->{{#if:{{#var:active}}<!-- First DropTable that exists is set to active.
</div>|}}<!--
-->||{{#vardefine:active|Junk}} }} }} }}<!--
-->{{#if:{{#var:Uncommon}}|<div class="Uncommon-data" {{#ifeq:Uncommon|{{#var:active}}||style="display:none"}}>
-->{{#vardefine:Poor|<!--
{{:DropTable:{{{1|{{PAGENAME}}}}} 3}}
-->{{#ifexist:DropTable:{{{1|{{PAGENAME}}}}} 1<!--
</div>|}}<!--
-->|1<!--
-->{{#if:{{#var:Rare}}|<div class="Rare-data" {{#ifeq:Rare|{{#var:active}}||style="display:none"}}>
-->{{#if:{{#var:active}}<!--
{{:DropTable:{{{1|{{PAGENAME}}}}} 4}}
-->||{{#vardefine:active|Poor}} }} }} }}<!--
</div>|}}<!--
-->{{#vardefine:Common|<!--
-->{{#if:{{#var:Epic}}|<div class="Epic-data" {{#ifeq:Epic|{{#var:active}}||style="display:none"}}>
-->{{#ifexist:DropTable:{{{1|{{PAGENAME}}}}} 2<!--
{{:DropTable:{{{1|{{PAGENAME}}}}} 5}}
-->|1<!--
</div>|}}<!--
-->{{#if:{{#var:active}}<!--
-->{{#if:{{#var:Legendary}}|<div class="Legendary-data" {{#ifeq:Legendary|{{#var:active}}||style="display:none"}}>
-->||{{#vardefine:active|Common}} }} }} }}<!--
{{:DropTable:{{{1|{{PAGENAME}}}}} 6}}
-->{{#vardefine:Uncommon|<!--
</div>|}}<!--
-->{{#ifexist:DropTable:{{{1|{{PAGENAME}}}}} 3<!--
-->{{#if:{{#var:Unique}}|<div class="Unique-data" {{#ifeq:Unique|{{#var:active}}||style="display:none"}}>
-->|1<!--
{{:DropTable:{{#if:{{Weapon_Data|{{{1|{{PAGENAME}}}}}|unique}}|{{Weapon_Data|{{{1|{{PAGENAME}}}}}|unique}}|{{{1|{{PAGENAME}}}}}}} 7}}
-->{{#if:{{#var:active}}<!--
</div>|}}<br>
-->||{{#vardefine:active|Uncommon}} }} }} }}<!--
|}}</includeonly><noinclude>
-->{{#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|<!--
-->{{#ifexist:DropTable:{{{1|{{PAGENAME}}}}} 7<!--
-->|1<!--
-->{{#if:{{#var:active}}<!--
-->||{{#vardefine:active|Unique}} }} }} }}<!--
-->{{#vardefine:Artifact|<!--
If the item has a unique weapon variant check the DropTable for it. Else check the DropTable for the item itself.
-->{{#ifexist:DropTable:{{#if:{{Weapon Data|{{{1|{{PAGENAME}}}}}|artifactname}}|{{Weapon Data|{{{1|{{PAGENAME}}}}}|artifactname}} 8|{{{1|{{PAGENAME}}}}} 8}}<!--
-->|1<!--
-->{{#if:{{#var:active}}<!--
-->||{{#vardefine:active|Artifact}} }} }} }}<!--
 
If the item has no drop tables, display nothing.
--><span style="width:100%; {{#if:{{#var:Junk}}{{#var:Poor}}{{#var:Common}}{{#var:Uncommon}}{{#var:Rare}}{{#var:Epic}}{{#var:Legendary}}{{#var:Unique}}{{#var:Artifact}}<!--
-->|display:inline-block"><h2>Dropped By</h2><!--
-->|display:none">}}<!--
--><p style="width:fit-content; border:1px solid #DD952A; text-align:center; padding:5px; font-weight:bold; margin:9px; border-radius:10px;">Drop Tables last updated for {{#explode:{{:TODO|DropTables}}|$|0|2}}</p><br><!--
-->{{#if:{{#var:Junk}}<!-- If the item has a drop table for the rarity, display the tab for it.
-->|{{TabToggle|Junk|Junk|active={{#ifeq:Junk|{{#var:active}}|yes|no}} }} }}<!--
-->{{#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:Artifact}}<!--
-->|{{TabToggle|Artifact|Artifact|active={{#ifeq:Artifact|{{#var:active}}|yes|no}} }} }}<!--
 
-->{{#if:{{#var:Junk}}<!--
-->|<div class="Junk-data" style="width:75%;{{#ifeq:Junk|{{#var:active}}|| display:none;}}"><!--
-->{{:DropTable:{{{1|{{PAGENAME}}}}} 0}}</div>}}<!--
-->{{#if:{{#var:Poor}}<!--
-->|<div class="Poor-data" style="width:75%;{{#ifeq:Poor|{{#var:active}}|| display:none;}}"><!--
-->{{:DropTable:{{{1|{{PAGENAME}}}}} 1}}</div>}}<!--
-->{{#if:{{#var:Common}}<!--
-->|<div class="Common-data"style="width:75%;{{#ifeq:Common|{{#var:active}}|| display:none;}}"><!--
-->{{:DropTable:{{{1|{{PAGENAME}}}}} 2}}</div>}}<!--
-->{{#if:{{#var:Uncommon}}<!--
-->|<div class="Uncommon-data"style="width:75%;{{#ifeq:Uncommon|{{#var:active}}|| display:none;}}"><!--
-->{{:DropTable:{{{1|{{PAGENAME}}}}} 3}}</div>}}<!--
-->{{#if:{{#var:Rare}}<!--
-->|<div class="Rare-data"style="width:75%;{{#ifeq:Rare|{{#var:active}}|| display:none;}}"><!--
-->{{:DropTable:{{{1|{{PAGENAME}}}}} 4}}</div>}}<!--
-->{{#if:{{#var:Epic}}<!--
-->|<div class="Epic-data"style="width:75%;{{#ifeq:Epic|{{#var:active}}|| display:none;}}"><!--
-->{{:DropTable:{{{1|{{PAGENAME}}}}} 5}}</div>}}<!--
-->{{#if:{{#var:Legendary}}<!--
-->|<div class="Legendary-data"style="width:75%;{{#ifeq:Legendary|{{#var:active}}|| display:none;}}"><!--
-->{{:DropTable:{{{1|{{PAGENAME}}}}} 6}}</div>}}<!--
-->{{#if:{{#var:Unique}}<!--
-->|<div class="Unique-data"style="width:75%;{{#ifeq:Unique|{{#var:active}}|| display:none;}}"><!--
-->{{:DropTable:{{{1|{{PAGENAME}}}}} 7}}</div>}}<!--
-->{{#if:{{#var:Artifact}}<!--
-->|<div class="Artifact-data"style="width:75%;{{#ifeq:Artifact|{{#var:active}}|| display:none;}}"><!--
If the item has a artifact variant display the DropTable for it. Else display the DropTable for the item itself.
-->{{:DropTable:{{#if:{{Weapon Data|{{{1|{{PAGENAME}}}}}|artifactname}}<!--
-->|{{Weapon Data|{{{1|{{PAGENAME}}}}}|artifactname}} 8<!--
-->|{{{1|{{PAGENAME}}}}} 8}}}}</div>}}</span><!--
 
--><span style="font-size:18px; width:100%; {{#if:{{#var:Junk}}{{#var:Poor}}{{#var:Common}}{{#var:Uncommon}}{{#var:Rare}}{{#var:Epic}}{{#var:Legendary}}{{#var:Unique}}{{#var:Artifact}}<!--
-->|display:none"><!--
-->|display:inline-block"><h2>Dropped By</h2>}}<!--
--><p style="padding:20px">Nothing. Currently no drop source provides this item.</p></span><!--
 
 
--></includeonly><noinclude>
=Generate Drop Tables=
=Generate Drop Tables=
Intended usage for individual pages:
==Example==
<pre>{{GenerateDropTables}}</pre>
<pre>{{GenerateDropTables|Cinder}}</pre>
default value for item is -PAGENAME-, therefore the above code is same as
{{GenerateDropTables|Cinder}}
<pre>{{GenerateDropTables|{{PAGENAME}}}}</pre>
 
==Example 1==
<pre>{{GenerateDropTables|Arming Sword}}</pre>


{{GenerateDropTables|Arming Sword}}
==Example==
<pre>{{GenerateDropTables|Halberd}}</pre>
{{GenerateDropTables|Halberd}}


==Example 2==
==Example==
<pre>{{GenerateDropTables|Armet}}</pre>
<pre>{{GenerateDropTables|Armet}}</pre>
{{GenerateDropTables|Armet}}
{{GenerateDropTables|Armet}}


 
==Example==
==Example 3==
Only displays the rarity it can drop
Only displays the rarity it can drop
<pre>{{GenerateDropTables|Bone}}</pre>
<pre>{{GenerateDropTables|Bone}}</pre>
{{GenerateDropTables|Bone}}
{{GenerateDropTables|Bone}}


==Example 4==
==Example==
Doesn't display anything if there are no drops
Displays that no sources drop the item. The intention is to display true negatives and avoid the confusion of users wondering if no dropped by section is a wiki error.
<pre>{{GenerateDropTables|Potion of Luck}}</pre>
<pre>{{GenerateDropTables|Potion of Luck}}</pre>
{{GenerateDropTables|Potion of Luck}}
{{GenerateDropTables|Potion of Luck}}


</noinclude>
</noinclude>

Latest revision as of 10:42, 26 July 2024

Generate Drop Tables

Example

{{GenerateDropTables|Cinder}}

Dropped By

Drop Tables last updated for Patch:6.6#Hotfix 69-2


Artifact

Nothing. Currently no drop source provides this item.

Example

{{GenerateDropTables|Halberd}}

Dropped By

Drop Tables last updated for Patch:6.6#Hotfix 69-2


Common
Uncommon
Rare
Epic
Legendary
Artifact

Nothing. Currently no drop source provides this item.

Example

{{GenerateDropTables|Armet}}

Dropped By

Drop Tables last updated for Patch:6.6#Hotfix 69-2


Poor
Common
Uncommon
Rare
Epic
Legendary
Unique
Drop Source Table at 0 Luck
NameSorted by Total Expected Value (TEV) in Descending Order
TEV = Sum of all (Count * Probability)
TypeCountProbability
Containers10.3205%

Nothing. Currently no drop source provides this item.

Example

Only displays the rarity it can drop

{{GenerateDropTables|Bone}}

Dropped By

Drop Tables last updated for Patch:6.6#Hotfix 69-2


Common
Drop Source Table at 0 Luck
NameSorted by Total Expected Value (TEV) in Descending Order
TEV = Sum of all (Count * Probability)
TypeCountProbability
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%
Monster16.6667%

Nothing. Currently no drop source provides this item.

Example

Displays that no sources drop the item. The intention is to display true negatives and avoid the confusion of users wondering if no dropped by section is a wiki error.

{{GenerateDropTables|Potion of Luck}}

Drop Tables last updated for Patch:6.6#Hotfix 69-2


Dropped By

Nothing. Currently no drop source provides this item.