From Dark and Darker Wiki

(Fixed issue with outdated and deleted template. Moved nested if statements into a switch block.)
(Implemented a fix for potions.)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<includeonly><!--
<includeonly><!--


-->{{#switch:1
-->{{#if:{{#pos:{{{1|{{PAGENAME}}}}}|Potion}}<!--
    |{{#if:{{Merchant Data|Alchemist|Crafts|{{{1|{{PAGENAME}}}}}|rarity}}|1}}=<!--
-->|{{#vardefine:item|{{#explode:{{{1|{{PAGENAME}}}}}| |1|2}}}}<!--
        -->{{#vardefine:merchant|Alchemist}}
    -->|{{#vardefine:item|{{{1|{{PAGENAME}}}}}}}}}<!--
    |{{#if:{{Merchant Data|Armourer|Crafts|{{{1|{{PAGENAME}}}}}|rarity}}|1}}=<!--
-->{{#arraydefine:merchants|{{{{{category|Armor}}} Data|{{#var:item}}|iscraftableby}}}}<!--
        -->{{#vardefine:merchant|Armourer}}
--><div {{#ifeq:{{#arraysize:merchants}}|0|style="display:none"}}>
    |{{#if:{{Merchant Data|Leathersmith|Crafts|{{{1|{{PAGENAME}}}}}|rarity}}|1}}=<!--
<h2>Craftable</h2>
        -->{{#vardefine:merchant|Leathersmith}}
{{{1|{{PAGENAME}} }}} is a [[Crafting|craftable item]].<!--
    |{{#if:{{Merchant Data|Tailor|Crafts|{{{1|{{PAGENAME}}}}}|rarity}}|1}}=<!--
-->{{#loop:i |0 |{{#arraysize:merchants}}<!--
        -->{{#vardefine:merchant|Tailor}}
-->|{{#vardefine:merchant|{{#arrayindex:merchants|{{#var:i}}}}}}<!--
    |{{#if:{{Merchant Data|Weaponsmith|Crafts|{{{1|{{PAGENAME}}}}}|rarity}}|1}}=<!--
    -->{{GenerateCraftingTable|{{#var:merchant}}|{{{1|{{PAGENAME}}}}}}}}}</div><!--
        -->{{#vardefine:merchant|Weaponsmith}} }}<!--
 
--><h2>Craftable</h2>
{{{1|{{PAGENAME}} }}} is a [[Crafting|craftable item]].
{{GenerateCraftingTable|{{#var:merchant}}|{{{1|{{PAGENAME}}}}}|header=y}}<!--


--></includeonly><noinclude>
--></includeonly><noinclude>
<pre>{{Craftable|Sterling Blade}}</pre>
==Example==
{{Craftable|Sterling Blade}}
<pre>{{Craftable|Golden Cloak}}</pre>
{{Craftable|Golden Cloak}}
==Example==
<pre>{{Craftable|Sterling Blade|category=Weapon}}</pre>
{{Craftable|Sterling Blade|category=Weapon}}
==Example==
<pre>{{Craftable|Grimsmile Ring|category=Accessory}}</pre>
{{Craftable|Grimsmile Ring|category=Accessory}}
==Example==
<pre>{{Craftable|Rare Potion of Healing|category=Utility}}</pre>
{{Craftable|Rare Potion of Healing|category=Utility}}
==Example==
<pre>{{Craftable|Gold Coin Bag|category=Misc}}</pre>
{{Craftable|Gold Coin Bag|category=Misc}}
</noinclude>
</noinclude>

Latest revision as of 06:45, 23 June 2024

Example

{{Craftable|Golden Cloak}}

Craftable

Golden Cloak is a craftable item.
NameIngredientsMerchantAffinity to UnlockAffinity values are collected manually by the community. If you spot an error, please kindly follow the link and fix it!
Splendid Cloak1
Gold Powder5
Tailor150

Example

{{Craftable|Sterling Blade|category=Weapon}}

Craftable

Sterling Blade is a craftable item.
NameIngredientsMerchantAffinity to UnlockAffinity values are collected manually by the community. If you spot an error, please kindly follow the link and fix it!
Longsword1
Silver Powder1
Weaponsmith25

Example

{{Craftable|Grimsmile Ring|category=Accessory}}

Craftable

Grimsmile Ring is a craftable item.
NameIngredientsMerchantAffinity to UnlockAffinity values are collected manually by the community. If you spot an error, please kindly follow the link and fix it!
Gold Ingot1
Golden Teeth5
Gold Coin300
Alchemist100

Example

{{Craftable|Rare Potion of Healing|category=Utility}}

Craftable

Rare Potion of Healing is a craftable item.
NameIngredientsMerchantAffinity to UnlockAffinity values are collected manually by the community. If you spot an error, please kindly follow the link and fix it!
Lifeleaf1
Alchemist25

Example

{{Craftable|Gold Coin Bag|category=Misc}}

Craftable

Gold Coin Bag is a craftable item.
NameIngredientsMerchantAffinity to UnlockAffinity values are collected manually by the community. If you spot an error, please kindly follow the link and fix it!
Troll Pelt1
Wolf Pelt4
Leathersmith25