From Dark and Darker Wiki

(Fixed issue with outdated and deleted template. Moved nested if statements into a switch block.)
(Changed to use item property iscraftableby)
Line 1: Line 1:
<includeonly><!--
<includeonly><!--


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

Revision as of 05:23, 23 June 2024

Example

{{Craftable|Golden Cloak}}

Craftable

Iron Ingot is a craftable item.

Example

{{Craftable|Golden Cloak}}

Craftable

Golden Cloak is a craftable item.
NameIngredientsMerchant
Splendid Cloak1
Gold Powder5
Tailor

Example

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

Craftable

Sterling Blade is a craftable item.
NameIngredientsMerchant
Longsword1
Silver Powder2
Weaponsmith

Example

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

Craftable

Grimsmile Ring is a craftable item.
NameIngredientsMerchant
Gold Ingot1
Golden Teeth1
Gold Coin300
Alchemist

Example

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

Craftable

Rare Potion of Healing is a craftable item.

Example

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

Craftable

Gold Coin Bag is a craftable item.
NameIngredientsMerchant
Troll Pelt1
Wolf Pelt4
Leathersmith