From Dark and Darker Wiki

(Added example)
(Added logic to generate tables with a manually provided list of items. This is used in template:craftable)
Line 3: Line 3:
Create the crafting rows and store them in the var:rows
Create the crafting rows and store them in the var:rows
-->{{#arraydefine:craftables|{{Merchant Data|{{{1}}}|Crafts|All}} }}<!--
-->{{#arraydefine:craftables|{{Merchant Data|{{{1}}}|Crafts|All}} }}<!--
-->{{#if:{{{2|}}}|{{#arraydefine:craftables|{{{2}}}}} }}<!--
-->{{#vardefine:rows|<!--
-->{{#vardefine:rows|<!--
-->{{#loop:i|0|{{#arraysize:craftables}}<!--
-->{{#loop:i|0|{{#arraysize:craftables}}<!--
Line 43: Line 44:
<pre>{{GenerateCraftingTable|Weaponsmith|header=yes|ingredient=Cyclops's Club}}</pre>
<pre>{{GenerateCraftingTable|Weaponsmith|header=yes|ingredient=Cyclops's Club}}</pre>
{{GenerateCraftingTable|Weaponsmith|header=yes|ingredient=Cyclops's Club}}
{{GenerateCraftingTable|Weaponsmith|header=yes|ingredient=Cyclops's Club}}
==Example==
<pre>{{GenerateCraftingTable|Weaponsmith|header=yes|Sterling Blade}}</pre>
{{GenerateCraftingTable|Weaponsmith|header=yes|Sterling Blade}}
==Example==
==Example==
<pre>{{GenerateCraftingTable|Alchemist|header=yes}}</pre>
<pre>{{GenerateCraftingTable|Alchemist|header=yes}}</pre>

Revision as of 14:11, 2 June 2024

Example

{{GenerateCraftingTable|Weaponsmith|header=yes|ingredient=Cyclops's Club}}
NameIngredientsTrader
Club1
Cyclops's Club1
Grave Essence1
Bone3
Weaponsmith

Example

{{GenerateCraftingTable|Weaponsmith|header=yes|Sterling Blade}}
NameIngredientsTrader
Longsword1
Silver Powder2
Weaponsmith

Example

{{GenerateCraftingTable|Alchemist|header=yes}}
NameIngredientsTrader
Iron Ore2
Alchemist
Copper Ore2
Alchemist
Cobalt Ore2
Alchemist
Rubysilver Ore2
Alchemist
Silver Coin45
Alchemist
Gold Ore2
Alchemist
Froststone Ore2
Alchemist
Gold Ingot1
Wolf Fang2
Wolf Claw3
Gold Coin300
Alchemist
Gold Ingot1
Golden Teeth1
Gold Coin300
Alchemist
Potion of Healing1
Lifeleaf1
Alchemist
Potion of Healing1
Lifeleaf2
Alchemist
Potion of Healing1
Lifeleaf3
Alchemist
Potion of Healing1
Lifeleaf5
Alchemist
Potion of Protection1
Phantom Flower1
Alchemist
Potion of Protection1
Phantom Flower2
Alchemist
Potion of Protection1
Phantom Flower3
Alchemist
Potion of Protection1
Phantom Flower5
Alchemist
Magic Protection Potion1
Wardweed1
Alchemist
Magic Protection Potion1
Wardweed2
Alchemist
Magic Protection Potion1
Wardweed3
Alchemist
Magic Protection Potion1
Wardweed5
Alchemist
Lifeleaf2
Phantom Flower2
Wardweed2
Alchemist
Lifeleaf4
Phantom Flower4
Wardweed4
Alchemist
Lifeleaf6
Phantom Flower6
Wardweed6
Alchemist
Lifeleaf8
Phantom Flower8
Wardweed8
Alchemist

Example

{{GenerateCraftingTable|Alchemist}}
NameIngredientsTrader
Iron Ore2
Alchemist
Copper Ore2
Alchemist
Cobalt Ore2
Alchemist
Rubysilver Ore2
Alchemist
Silver Coin45
Alchemist
Gold Ore2
Alchemist
Froststone Ore2
Alchemist
Gold Ingot1
Wolf Fang2
Wolf Claw3
Gold Coin300
Alchemist
Gold Ingot1
Golden Teeth1
Gold Coin300
Alchemist
Potion of Healing1
Lifeleaf1
Alchemist
Potion of Healing1
Lifeleaf2
Alchemist
Potion of Healing1
Lifeleaf3
Alchemist
Potion of Healing1
Lifeleaf5
Alchemist
Potion of Protection1
Phantom Flower1
Alchemist
Potion of Protection1
Phantom Flower2
Alchemist
Potion of Protection1
Phantom Flower3
Alchemist
Potion of Protection1
Phantom Flower5
Alchemist
Magic Protection Potion1
Wardweed1
Alchemist
Magic Protection Potion1
Wardweed2
Alchemist
Magic Protection Potion1
Wardweed3
Alchemist
Magic Protection Potion1
Wardweed5
Alchemist
Lifeleaf2
Phantom Flower2
Wardweed2
Alchemist
Lifeleaf4
Phantom Flower4
Wardweed4
Alchemist
Lifeleaf6
Phantom Flower6
Wardweed6
Alchemist
Lifeleaf8
Phantom Flower8
Wardweed8
Alchemist

Example

{{GenerateCraftingTable|Alchemist|ingredient=Silver Ore}}