Module:Recipe/doc
This is the documentation page for Module:Recipe
Module:Recipe Documentation
[edit source]This module displays crafting recipes showing how items combine to create new items.
Single Recipe
[edit source]Display a single crafting recipe:
{{#invoke:Recipe|display
|input1=Pumpkin_Slice
|input2=Empty_Bowl
|output=Pumpkin_Puree
}}
With quantities:
{{#invoke:Recipe|display
|input1=Pumpkin_Slice
|input1qty=3
|input2=Empty_Bowl
|input2qty=2
|output=Pumpkin_Puree
}}
Recipe Parameters
[edit source]| Parameter | Description |
|---|---|
| input1, input2, ... input6 | Input item names (up to 6 inputs) |
| input1qty, input2qty, etc. | Quantity for each input (default: 1) |
| output | The resulting item name |
| outputqty | Quantity produced (default: 1) |
| station | Required crafting station (optional) |
| spriteSize | Size of item sprites (default: 32) |
Recipe List
[edit source]Display multiple recipes in a table:
{{#invoke:Recipe|list
|title=Weapon Recipes
|recipe1=Wood+Stone=Stone Axe
|recipe2=Wood+Iron Bar=Iron Sword@Anvil
|recipe3=2xLeather+Iron Bar=Leather Armor@Workbench
|recipe4=3xWood+2xRope=Raft
}}
Recipe String Format
[edit source]Each recipe uses the format:
[qty]xItem1+[qty]xItem2=Output[@Station]
Examples:
Wood+Stone=Axe- Simple recipeWood+Iron Bar=Sword@Anvil- Recipe with station2xWood+3xStone=Wall- Recipe with quantities2xIron Bar=4xNails@Anvil- Multiple output
Inline Recipe
[edit source]For showing a recipe within text:
Combine {{#invoke:Recipe|inline|Wood|Stone|Axe}} to make your first tool.
Examples
[edit source]Cooking Recipes
[edit source]{{#invoke:Recipe|list
|title=Cooking Recipes
|recipe1=Raw Meat+Salt=Cooked Meat@Campfire
|recipe2=Flour+Water+Egg=Dough@Kitchen
|recipe3=Dough+Blueberry=Blueberry Muffin@Oven
|recipe4=2xFish+Lemon=Fish Dinner@Campfire
}}
Weapon Crafting
[edit source]{{#invoke:Recipe|list
|title=Weapons
|recipe1=2xWood+Silver Bar=Silver Dagger@Anvil
|recipe2=3xWood+2xString+Iron Bar=Crossbow@Workbench
|recipe3=Wood+4xIron Bar=Battle Axe@Anvil
|recipe4=2xWood+Iron Bar=Shovel@Workbench
}}
Single Featured Recipe
[edit source]{{#invoke:Recipe|display
|input1=Silver Bar
|input1qty=2
|input2=Wood
|input3=Magic Gem
|output=Silver Dagger
|station=Enchanting Table
|spriteSize=48
}}
Required CSS
[edit source]Add this to your wiki's Common.css:
/* Recipe Container */
.recipe-container {
display: flex;
align-items: center;
gap: 10px;
padding: 10px;
background-color: #1a1a2e;
border: 2px solid #4a4a6a;
border-radius: 5px;
margin: 10px 0;
width: fit-content;
}
.recipe-inputs {
display: flex;
align-items: center;
gap: 5px;
}
.recipe-slot {
display: flex;
flex-direction: column;
align-items: center;
padding: 5px;
background-color: #2a2a4e;
border: 1px solid #3a3a5a;
border-radius: 3px;
position: relative;
min-width: 50px;
}
.recipe-slot-empty {
background-color: #1a1a2e;
min-width: 50px;
min-height: 50px;
}
.recipe-quantity {
position: absolute;
bottom: 2px;
right: 2px;
background-color: #000;
color: #fff;
font-size: 12px;
padding: 1px 4px;
border-radius: 2px;
}
.recipe-item-name {
font-size: 10px;
color: #aaa;
margin-top: 3px;
text-align: center;
}
.recipe-plus {
font-size: 24px;
color: #888;
padding: 0 5px;
}
.recipe-arrow {
font-size: 28px;
color: #9edc60;
padding: 0 10px;
}
.recipe-output {
display: flex;
align-items: center;
}
.recipe-station {
font-size: 12px;
color: #9bddff;
margin-top: 5px;
font-style: italic;
}
/* Recipe List/Table */
.recipe-list {
background-color: #1a1a2e;
border: 2px solid #4a4a6a;
border-radius: 5px;
padding: 10px;
margin: 10px 0;
}
.recipe-list-title {
font-size: 18px;
font-weight: bold;
color: #ffd700;
margin-bottom: 10px;
padding-bottom: 5px;
border-bottom: 1px solid #4a4a6a;
}
.recipe-table {
width: 100%;
border-collapse: collapse;
}
.recipe-table-header th {
text-align: left;
padding: 8px;
color: #aaa;
border-bottom: 1px solid #4a4a6a;
}
.recipe-row td {
padding: 8px;
border-bottom: 1px solid #2a2a4e;
}
.recipe-cell-arrow {
color: #9edc60;
font-size: 20px;
text-align: center;
width: 40px;
}
.recipe-cell-station {
color: #9bddff;
}
.recipe-inline-item {
display: inline-flex;
align-items: center;
gap: 4px;
}
/* Inline recipe */
.recipe-inline {
display: inline-flex;
align-items: center;
gap: 4px;
background-color: #2a2a4e;
padding: 2px 6px;
border-radius: 3px;
}