From Dark and Darker Wiki

(Updated to us item property incraftingrecipe)
(Changed column order. Changed column widths.)
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><!--
<includeonly><!--


If @arg:2 has text
If @arg:2 has text
Line 5: Line 6:
Use @arg:2  
Use @arg:2  
-->|{{#arraydefine:craftables|{{{2}}}}}<!--
-->|{{#arraydefine:craftables|{{{2}}}}}<!--
Else if an @arg:ingredient was provided
Else use all of the Merchant's crafts
-->|{{#if:{{{ingredient|}}}<!--
-->|{{#arraydefine:craftables|{{Merchant Data|{{{1}}}|Crafts|All}}}}}}<!--
AND the @arg:ingredient is NOT used in a crafting recipe(s)
If @arg:ingredient was provided
-->|{{#if:{{{{{ingredientcategory|Misc}}} Data|{{{ingredient|}}}|incraftingrecipe}}<!--
-->{{#if:{{{ingredient|}}}<!--
-->|{{#arraydefine:craftables|{{Merchant Data|{{{1}}}|Crafts|All}}}}<!--
AND @arg:ingredient is NOT used in a crafting recipe(s)
Set the craftables array to empty
-->|{{#if:{{{{{ingredientcategory|Misc}}} Data|{{{ingredient}}}|incraftingrecipefor}}<!--
-->|{{#arraydefine:craftables|}}}}<!--
Set the craftables array to empty
Otherwise use the entire crafts list for the given merchant
-->||{{#arraydefine:craftables|}}}}}}<!--
-->|{{#arraydefine:craftables|{{Merchant Data|{{{1}}}|Crafts|All}}}}}}}}<!--
Otherwise do nothing


--><table cellspacing="0" class="wikitable sortable jquery-tablesorter" style="width:70%; min-width:500px; text-align:center; vertical-align:middle; {{#ifeq:{{#arraysize:craftables}}|0|display:none;}}"><!--
--><table cellspacing="0" class="wikitable sortable jquery-tablesorter" style="width:70%; min-width:500px; text-align:center; vertical-align:middle; {{#ifeq:{{#arraysize:craftables}}|0|display:none;}}"><!--
--><tr><th style="width:3%">Name</th><th style="width:5%">Ingredients</th><th style="width:2%">Merchant</th></tr><!--
--><tr><th style="width:2%">Name</th><!--
--><th style="width:5%">Ingredients</th><!--
--><th style="width:2%">Merchant</th><!--
--><th class="tooltip" style="width:2%">[[Template:Merchant Affinity|Affinity to Unlock]]<span class="tooltiptext-left" style="left:50%; transform:translate(-50%); bottom:75%; width:100%">Affinity values are collected manually by the community.  If you spot an error, please kindly follow the link and fix it!</span></th></tr><!--
-->{{#loop:i|0|{{#arraysize:craftables}}<!--
-->{{#loop:i|0|{{#arraysize:craftables}}<!--
-->|<tr><!-- Generate a crafting row for each element in @array:craftables
-->|<tr><!-- Generate a crafting row for each element in @array:craftables
Line 22: Line 26:
If @arg:ingredient is in the list of ingredients for @var:craft
If @arg:ingredient is in the list of ingredients for @var:craft
OR @arg:ingredient is empty
OR @arg:ingredient is empty
-->{{#if:  {{#pos:{{#vardefineecho:ingredients|{{Merchant Data|{{{1}}}|Crafts|{{#var:craft}}|ingredients}} }}|{{{ingredient| }}}}}<!--
-->{{#if:  {{#pos:{{#vardefineecho:ingredients|{{Merchant Data|{{{1}}}|Crafts|{{#var:craft}}|ingredients}} }}|{{{ingredient|}}}}}<!--
-->{{#if:{{{ingredient| }}}||continue}}<!--
-->{{#if:{{{ingredient|}}}||continue}}<!--
-->|{{#vardefine:rarity|{{Merchant Data|{{{1}}}|Crafts|{{#var:craft}}|rarity}} }}<!--
-->|{{#vardefine:rarity|{{Merchant Data|{{{1}}}|Crafts|{{#var:craft}}|rarity}}}}<!--
-->{{#arraydefine:ingredients|{{#var:ingredients}} }}<!--
-->{{#arraydefine:ingredients|{{#var:ingredients}}}}<!--
--><td>{{Iconbox<!--
--><td>{{Iconbox<!--
-->|{{#if:{{#pos:{{#var:craft}}|Potion}}<!--
-->|{{#if:{{#pos:{{#var:craft}}|Potion}}<!--
-->|{{#explode:{{#var:craft}}| |1|2}}<!--
-->|{{#explode:{{#var:craft}}| |1|2}}<!--
-->|{{#var:craft}} }}<!--
-->|{{#var:craft}}}}<!--
-->|size =x100px<!--
-->|size =x100px<!--
-->|amount ={{Merchant Data|{{{1}}}|Crafts|{{#var:craft}}|quantity}}<!--
-->|amount ={{Merchant Data|{{{1}}}|Crafts|{{#var:craft}}|quantity}}<!--
Line 35: Line 39:
-->|rarity ={{#var:rarity}} }}</td><!--
-->|rarity ={{#var:rarity}} }}</td><!--
--><td>{{#loop:i|0|{{#arraysize:ingredients}}<!--
--><td>{{#loop:i|0|{{#arraysize:ingredients}}<!--
-->|{{#vardefine:ingredient|{{#arrayindex:ingredients|{{#var:i}} }} }}<!--
-->|{{#vardefine:ingredient|{{#arrayindex:ingredients|{{#var:i}}}}}}<!--
-->{{Iconbox|<!--
-->{{Iconbox|<!--
-->{{#explode:{{#var:ingredient}}|-|1}}<!--
-->{{#explode:{{#var:ingredient}}|-|1}}<!--
Line 44: Line 48:
-->{{#if:{{#explode:{{#var:ingredient}}|-|2}}<!--
-->{{#if:{{#explode:{{#var:ingredient}}|-|2}}<!--
-->|{{#explode:{{#var:ingredient}}|-|2}}<!--
-->|{{#explode:{{#var:ingredient}}|-|2}}<!--
-->|{{Misc Data|{{#explode:{{#var:ingredient}}|-|1}}|Rarities}} }} }} }}</td><!--
-->|{{Misc Data|{{#explode:{{#var:ingredient}}|-|1}}|Rarities}}}}}}}}</td><!--
--><td>[[{{{1}}}]]</td>}}</tr>}}</table><!--
--><td>[[{{{1}}}]]</td><!--
--><td>{{Merchant Affinity|{{{1}}}|craftstoaffinity|{{#var:craft}} }}</td>}}</tr>}}</table><!--


--></includeonly><noinclude>
--></includeonly><noinclude>
=Parameters=
*1:
**Merchant Name
**default: empty string
*2:
**Item or List of Items separated by commas
**default: empty string
*ingredient:
**ingredient to search for
**default: empty string
*ingredientcategory:
**item category of ingredient <code>{Weapon, Armor, Accessory, Utility, Misc}</code>
**default: <code>Misc</code>
==Example==
<pre>{{GenerateCraftingTable|Alchemist|ingredient=Gold Coin}}</pre>
{{GenerateCraftingTable|Alchemist|ingredient=Gold Coin}}
==Example==
==Example==
<pre>{{GenerateCraftingTable|Weaponsmith|ingredient=Longsword|ingredientcategory=Weapon}}</pre>
<pre>{{GenerateCraftingTable|Weaponsmith|ingredient=Longsword|ingredientcategory=Weapon}}</pre>
{{GenerateCraftingTable|Weaponsmith|ingredient=Longsword|ingredientcategory=Weapon}}
{{GenerateCraftingTable|Weaponsmith|ingredient=Longsword|ingredientcategory=Weapon}}
==Example==
==Example==
<pre>{{GenerateCraftingTable|Weaponsmith|ingredient=Cyclops's Club}}</pre>
<pre>{{GenerateCraftingTable|Alchemist|ingredient=Golden Teeth}}</pre>
{{GenerateCraftingTable|Weaponsmith|ingredient=Cyclops's Club}}
{{GenerateCraftingTable|Alchemist|ingredient=Golden Teeth}}
==Example==
==Example==
<pre>{{GenerateCraftingTable|Weaponsmith|Sterling Blade}}</pre>
<pre>{{GenerateCraftingTable|Weaponsmith|Sterling Blade}}</pre>

Latest revision as of 21:29, 12 March 2025

Parameters

  • 1:
    • Merchant Name
    • default: empty string
  • 2:
    • Item or List of Items separated by commas
    • default: empty string
  • ingredient:
    • ingredient to search for
    • default: empty string
  • ingredientcategory:
    • item category of ingredient {Weapon, Armor, Accessory, Utility, Misc}
    • default: Misc

Example

{{GenerateCraftingTable|Alchemist|ingredient=Gold Coin}}
NameIngredientsMerchantAffinity to UnlockAffinity values are collected manually by the community. If you spot an error, please kindly follow the link and fix it!
Cockatrice's Lucky Feather1
Wolf Fang2
Wolf Claw3
Gold Coin300
Alchemist100
Gold Ingot1
Golden Teeth5
Gold Coin300
Alchemist100
Frozen Heart1
Cobalt Ingot2
Gold Coin300
Alchemist

Example

{{GenerateCraftingTable|Weaponsmith|ingredient=Longsword|ingredientcategory=Weapon}}
NameIngredientsMerchantAffinity to UnlockAffinity values are collected manually by the community. If you spot an error, please kindly follow the link and fix it!
Longsword1
Dark Matter1
Gold Ingot3
Gold Coin50
Weaponsmith150
Longsword1
Silver Powder1
Weaponsmith25

Example

{{GenerateCraftingTable|Alchemist|ingredient=Golden Teeth}}
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

{{GenerateCraftingTable|Weaponsmith|Sterling Blade}}
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

{{GenerateCraftingTable|Alchemist}}
NameIngredientsMerchantAffinity to UnlockAffinity values are collected manually by the community. If you spot an error, please kindly follow the link and fix it!
Iron Ore2
Alchemist0
Copper Ore2
Alchemist0
Cobalt Ore2
Alchemist0
Rubysilver Ore2
Alchemist0
Silver Coin45
Alchemist0
Gold Ore2
Alchemist0
Froststone Ore2
Alchemist0
Cockatrice's Lucky Feather1
Wolf Fang2
Wolf Claw3
Gold Coin300
Alchemist100
Gold Ingot1
Golden Teeth5
Gold Coin300
Alchemist100
Frozen Heart1
Cobalt Ingot2
Gold Coin300
Alchemist
Lifeleaf1
Alchemist0
Lifeleaf1
Alchemist25
Lifeleaf1
Alchemist50
Lifeleaf5
Alchemist?
Phantom Flower1
Alchemist0
Phantom Flower1
Alchemist25
Phantom Flower1
Alchemist50
Phantom Flower5
Alchemist?
Wardweed1
Alchemist0
Wardweed1
Alchemist25
Wardweed1
Alchemist50
Wardweed5
Alchemist?
Lifeleaf1
Wardweed1
Alchemist25
Lifeleaf1
Wardweed1
Alchemist50
Lifeleaf1
Wardweed1
Alchemist?
Phantom Flower1
Blue Eyeballs1
Alchemist
Lifeleaf1
Rotten Fluids1
Alchemist
Frozen Heart1
Glowing Blue Ice Eyes1
Alchemist
Demon Blood1
Armor Scrap2
Alchemist
Volcanic Ash1
Intact Skull6
Bone6
Alchemist
Token of Honor1
Rusty Broken Sword6
Bone6
Alchemist

Example

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