From Dark and Darker Wiki

Raw Salad (talk | contribs)
Created page with "=Overview= Functions for making Crafting table. Data comes from Data:Merchant.json. =Functions= ==draw_table== Creates a table of craftables ===Parameters=== * ''merchant'' - Merchant of interest * ''item'' - Singular item for which to create a table * ''ingredient'' - Ingredient name, used to filter the provided merchant's crafts for those which use the ingredient ==draw_table examples== ===Void Blade, Weaponsmith=== ---- <pre>{{#invoke:Craft|draw_table|item=..."
 
Raw Salad (talk | contribs)
Added new functions to doc
Line 6: Line 6:
Creates a table of craftables
Creates a table of craftables


===Parameters===
<tabber>
* ''merchant'' - Merchant of interest
|-| Parameters=
* ''item'' - Singular item for which to create a table
* ''merchant'' - Merchant of interest.
* ''ingredient'' - Ingredient name, used to filter the provided merchant's crafts for those which use the ingredient
* ''item'' - Singular item for which to create a table.
* ''ingredient'' - Ingredient name. Used to filter the provided merchant's crafts for those which use the ingredient.


==draw_table examples==
|-| Examples=
===Void Blade, Weaponsmith===
----
<pre>{{#invoke:Craft|draw_table|item=Void Blade|merchant=Weaponsmith}}</pre>
<pre>{{#invoke:Craft|draw_table|item=Void Blade|merchant=Weaponsmith}}</pre>
{{#invoke:Craft|draw_table|item=Void Blade|merchant=Weaponsmith}}




{{#invoke:Craft|draw_table|item=Void Blade|merchant=Weaponsmith}}
===Weaponsmith, Iron Ingot===
----
----
<pre>{{#invoke:Craft|draw_table|merchant=Weaponsmith|ingredient=Iron Ingot}}</pre>
<pre>{{#invoke:Craft|draw_table|merchant=Weaponsmith|ingredient=Iron Ingot}}</pre>
{{#invoke:Craft|draw_table|merchant=Weaponsmith|ingredient=Iron Ingot}}




{{#invoke:Craft|draw_table|merchant=Weaponsmith|ingredient=Iron Ingot}}
===Weaponsmith===
----
----
<pre>{{#invoke:Craft|draw_table|merchant=Weaponsmith}}</pre>
<pre>{{#invoke:Craft|draw_table|merchant=Weaponsmith}}</pre>
{{#invoke:Craft|draw_table|merchant=Weaponsmith}}
</tabber>
==draw_ingredient_table==
Creates a table of craftables filtered for a specific ingredient.
<tabber>
|-| Parameters=
* ''ingredient'' - Singular ingredient.
* ''category'' - Ingredient's item category. Used to lookup merchant recipe presence.
|-| Examples=
<pre>{{#invoke:Craft|draw_ingredient_table|category=Misc|ingredient=Iron Ingot}}</pre>
{{#invoke:Craft|draw_ingredient_table|category=Misc|ingredient=Iron Ingot}}
</tabber>
==draw_craftable_table==
Creates a table of craftables filtered for specific item crafting recipes.
<tabber>
|-| Parameters=
* ''item'' - Singular item for which to create a table.
* ''category'' - Item's item category. Used to lookup merchant crafting presence.
|-| Examples=
<pre>{{#invoke:Craft|draw_craftable_table|item=Void Blade|category=Weapon}}</pre>
{{#invoke:Craft|draw_craftable_table|item=Void Blade|category=Weapon}}




{{#invoke:Craft|draw_table|merchant=Weaponsmith}}
----
<pre>{{#invoke:Craft|draw_craftable_table|category=Misc|item=Iron Ingot}}</pre>
{{#invoke:Craft|draw_craftable_table|category=Misc|item=Iron Ingot}}
</tabber>

Revision as of 20:46, 8 April 2026

Overview

Functions for making Crafting table. Data comes from Data:Merchant.json.

Functions

draw_table

Creates a table of craftables

  • merchant - Merchant of interest.
  • item - Singular item for which to create a table.
  • ingredient - Ingredient name. Used to filter the provided merchant's crafts for those which use the ingredient.

{{#invoke:Craft|draw_table|item=Void Blade|merchant=Weaponsmith}}
NameIngredientsMerchant
1
1
3
50



{{#invoke:Craft|draw_table|merchant=Weaponsmith|ingredient=Iron Ingot}}
NameIngredientsMerchant
2
1



{{#invoke:Craft|draw_table|merchant=Weaponsmith}}
NameIngredientsMerchant
2
1
1
1
1
1
1
1
1
1
3
50
1
1
1
1
5
50
3
3
1
1
3
50
1
1
1
1
2
3
50
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
1
2
3
50
1
2
1
1
1
1
1
1
1
1
3
3
1
2
1
1
1
2
1
1
2
2
50
1
1
1
2
50
3
1
1
3
3
50
1
1
1
2
50
1
2
1
1
3
1
1
1
1
1
1
1
1
2
1
1
3
6
50
1
1
1
2
3
1
1
60
1
1
3
3
50
1
2
5
3
50
1
1
3
3
50
1
1
3
50
1
1
1
1
1
1
1
1
1
1
2
1
1
1
1
1
1
3
1
1
1
50
1
1
5
2
50
1
1
3
50

draw_ingredient_table

Creates a table of craftables filtered for a specific ingredient.

  • ingredient - Singular ingredient.
  • category - Ingredient's item category. Used to lookup merchant recipe presence.

{{#invoke:Craft|draw_ingredient_table|category=Misc|ingredient=Iron Ingot}}

Script error: The function "draw_ingredient_table" does not exist.

draw_craftable_table

Creates a table of craftables filtered for specific item crafting recipes.

  • item - Singular item for which to create a table.
  • category - Item's item category. Used to lookup merchant crafting presence.

{{#invoke:Craft|draw_craftable_table|item=Void Blade|category=Weapon}}

Script error: The function "draw_craftable_table" does not exist.



{{#invoke:Craft|draw_craftable_table|category=Misc|item=Iron Ingot}}

Script error: The function "draw_craftable_table" does not exist.