From Dark and Darker Wiki
mNo edit summary |
(Changing Template to use calls that work with Merchant Data.) |
||
Line 1: | Line 1: | ||
<includeonly>{{#arraydefine:craftables|{{ | <includeonly>{{#arraydefine:craftables|{{Merchant Data|{{{1}}}|Crafts|All}} }} | ||
{{ | {{ | ||
#loop: i | #loop: i | ||
Line 5: | Line 5: | ||
|{{#arraysize:craftables}} | |{{#arraysize:craftables}} | ||
|<nowiki/>{{#vardefine:craft|{{#arrayindex:craftables|{{#var:i}} }} }}<!-- | |<nowiki/>{{#vardefine:craft|{{#arrayindex:craftables|{{#var:i}} }} }}<!-- | ||
If the ingredient is in the list of ingredients for the craft | |||
OR the ingredient is empty, generate the crafting row. | |||
-->{{#if:{{#pos:{{Merchant Data|{{{1}}}|Crafts|{{#var:craft}}|ingredients}}|{{{ingredient|}}}}}{{#if:{{{ingredient|}}}||continue}}<!-- | |||
-->|{{GenerateCraftingRow|{{#var:craft}}}} }} | -->|{{GenerateCraftingRow|{{#var:craft}} }} }} | ||
}} | }} | ||
</includeonly><noinclude> | </includeonly><noinclude> | ||
Line 24: | Line 24: | ||
<pre> | <pre> | ||
{{CraftingTable| | {{CraftingTable| | ||
{{GenerateCraftingRows| | {{GenerateCraftingRows|Alchemist|ingredient=Gold}} | ||
}} | }} | ||
</pre> | </pre> | ||
{{CraftingTable| | {{CraftingTable| | ||
{{GenerateCraftingRows| | {{GenerateCraftingRows|Alchemist|ingredient=Gold}} | ||
}} | |||
==Example== | |||
<pre> | |||
{{CraftingTable| | |||
{{GenerateCraftingRows|Weaponsmith|ingredient=Gold}} | |||
}} | |||
</pre> | |||
{{CraftingTable| | |||
{{GenerateCraftingRows|Weaponsmith|ingredient=Gold}} | |||
}} | |||
==Example== | |||
<pre> | |||
{{CraftingTable| | |||
{{GenerateCraftingRows|Armourer|ingredient=Gold}} | |||
}} | |||
</pre> | |||
{{CraftingTable| | |||
{{GenerateCraftingRows|Armourer|ingredient=Gold}} | |||
}} | }} | ||
</noinclude> | </noinclude> |
Revision as of 05:11, 25 March 2024
Auto creates crafting row
Example
{{CraftingTable| {{GenerateCraftingRows|Alchemist}} }}
Example
{{CraftingTable| {{GenerateCraftingRows|Alchemist|ingredient=Gold}} }}
Example
{{CraftingTable| {{GenerateCraftingRows|Weaponsmith|ingredient=Gold}} }}
Example
{{CraftingTable| {{GenerateCraftingRows|Armourer|ingredient=Gold}} }}