From Dark and Darker Wiki

(Changing Template to use calls that work with Merchant Data.)
(Implemented a fix for potions.)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><!--
<includeonly><!--
-->{{#if:<!--
 
If the Alchemist crafts this item, then set the merchant to Alchemist.
-->{{#if:{{#pos:{{{1|{{PAGENAME}}}}}|Potion}}<!--
-->{{#if:{{Merchant Data|Alchemist|Crafts|{{{1|{{PAGENAME}}}}}|rarity}}<!--
-->|{{#vardefine:item|{{#explode:{{{1|{{PAGENAME}}}}}| |1|2}}}}<!--
-->|{{#vardefineecho:merchant|Alchemist}}<!--
    -->|{{#vardefine:item|{{{1|{{PAGENAME}}}}}}}}}<!--
Else if the Armourer crafts this item, then set the merchant to Armourer.
-->{{#arraydefine:merchants|{{{{{category|Armor}}} Data|{{#var:item}}|iscraftableby}}}}<!--
-->|{{#if:{{Merchant Data|Armourer|Crafts|{{{1|{{PAGENAME}}}}}|rarity}}<!--
--><div {{#ifeq:{{#arraysize:merchants}}|0|style="display:none"}}>
-->|{{#vardefineecho:merchant|Armourer}}<!--
<h2>Craftable</h2>
Else if the Leathersmith crafts this item, then set the merchant to Leathersmith.
{{{1|{{PAGENAME}} }}} is a [[Crafting|craftable item]].<!--
-->|{{#if:{{Merchant Data|Leathersmith|Crafts|{{{1|{{PAGENAME}}}}}|rarity}}<!--
-->{{#loop:i |0 |{{#arraysize:merchants}}<!--
-->|{{#vardefineecho:merchant|Leathersmith}}<!--
-->|{{#vardefine:merchant|{{#arrayindex:merchants|{{#var:i}}}}}}<!--
Else if the Tailor crafts this item, then set the merchant to Tailor.
    -->{{GenerateCraftingTable|{{#var:merchant}}|{{{1|{{PAGENAME}}}}}}}}}</div><!--
-->|{{#if:{{Merchant Data|Tailor|Crafts|{{{1|{{PAGENAME}}}}}|rarity}}<!--
 
-->|{{#vardefineecho:merchant|Tailor}}<!--
--></includeonly><noinclude>
Else if the Weaponsmith crafts this item, then set the merchant to Weaponsmith.
==Example==
-->|{{#if:{{Merchant Data|Weaponsmith|Crafts|{{{1|{{PAGENAME}}}}}|rarity}}<!--
<pre>{{Craftable|Golden Cloak}}</pre>
-->|{{#vardefineecho:merchant|Weaponsmith}} }} }} }} }} }}|
{{Craftable|Golden Cloak}}
==Craftable==
==Example==
{{{1|{{PAGENAME}}}}} is a [[Crafting|craftable]].
<pre>{{Craftable|Sterling Blade|category=Weapon}}</pre>
{{CraftingTable|
{{Craftable|Sterling Blade|category=Weapon}}
{{GenerateCraftingRow|{{#var:merchant}}|{{{1|{{PAGENAME}}}}} }}
==Example==
}} }}</includeonly><noinclude>
<pre>{{Craftable|Grimsmile Ring|category=Accessory}}</pre>
<pre>{{Craftable|Gold Powder}}</pre>
{{Craftable|Grimsmile Ring|category=Accessory}}
{{Craftable|Sterling Blade}}
==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.
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.
NameIngredientsMerchant
Potion of Healing1
Lifeleaf2
Alchemist

Example

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

Craftable

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