Template:Infobox Recipe: Difference between revisions

No edit summary
No edit summary
 
(8 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{#vardefine:mat1cost|{{formatnum:{{#ask:[[{{{mat1}}}]]|?Value=|mainlabel=-}}|R}}}}
<includeonly>{{#vardefine:mat1cost|{{#if:{{{mat1|}}}|{{formatnum:{{#ask:[[{{{mat1}}}]]|?Value=|mainlabel=-}}|R}}|0}}}}{{#vardefine:mat2cost|{{#if:{{{mat2|}}}|{{formatnum:{{#ask:[[{{{mat2}}}]]|?Value=|mainlabel=-}}|R}}|0}}}}{{#vardefine:mat2total|0}}{{#vardefine:output1cost|{{#if:{{{output1|}}}|{{formatnum:{{#ask:[[{{{output1}}}]]|?Value=|mainlabel=-}}|R}}|0}}}}{| class="wikitable"
{{#vardefine:mat2cost|{{#if:{{{mat2|}}}|{{formatnum:{{#ask:[[{{{mat2}}}]]|?Value=|mainlabel=-}}|R}}|0}}}}
{{#vardefine:output1cost|{{formatnum:{{#ask:[[{{{output1}}}]]|?Value=|mainlabel=-}}|R}}}}
{| class="wikitable"
! colspan="4" | Requirements
! colspan="4" | Requirements
|-
|-
Line 20: Line 17:
! Cost
! Cost
|-
|-
{{#if:{{{mat1|}}}|
| {{#if:{{{mat1|}}}|[[File:{{{mat1}}}.png|30px]]|{{Unknown}}}}
{{!}} [[File:{{{mat1}}}.png|30px]]
| {{#if:{{{mat1|}}}|[[{{{mat1}}}]]|{{Unknown}}}}
{{!}} [[{{{mat1}}}]]
| style="text-align: right;" {{!}} {{{mat1qty|1}}}
{{!}} style="text-align: right;" {{!}} {{{mat1qty|1}}}
| style="text-align: right;" {{!}} {{Currency|{{#vardefineecho:mat1total|{{#expr:{{{mat1qty|1}}} * {{#if:{{#var:mat1cost}}|{{#var:mat1cost}}|0}}}}}}}}
|-
{{!}} style="text-align: right;" {{!}} {{Currency|{{#vardefineecho:mat1total|{{#expr:{{{mat1qty|1}}} * {{#if:{{#var:mat1cost}}|{{#var:mat1cost}}|0}}}}}}}}
{{!}}-
}}
{{#if:{{{mat2|}}}|
{{#if:{{{mat2|}}}|
{{!}} [[File:{{{mat2}}}.png|30px]]
{{!}} [[File:{{{mat2}}}.png|30px]]
Line 39: Line 34:
! colspan="2" | Ouput
! colspan="2" | Ouput
! Quantity
! Quantity
! Cost
! Value
|-
|-
{{!}} [[File:{{{output1}}}.png|30px]]
| {{#if:{{{output1|}}}|[[File:{{{output1}}}.png|30px]]|{{Unknown}}}}
{{!}} [[{{{output1}}}]]
| {{#if:{{{output1|}}}|[[{{{output1}}}]]|{{Unknown}}}}
| style="text-align: right;" {{!}} {{{output1qty|1}}}
| style="text-align: right;" {{!}} {{{output1qty|1}}}
| style="text-align: right;" {{!}} {{Currency|{{#vardefineecho:output1costtotal|{{#expr:{{{output1qty|1}}} * {{#if:{{#var:output1cost}}|{{#var:output1cost}}|0}}}}}}}}
| style="text-align: right;" {{!}} {{Currency|{{#vardefineecho:output1costtotal|{{#expr:{{{output1qty|1}}} * {{#if:{{#var:output1cost}}|{{#var:output1cost}}|0}}}}}}}}
Line 48: Line 43:
! colspan="3" | Profit
! colspan="3" | Profit
| style="text-align: right;" {{!}} {{Currency|{{#expr:{{#var:output1costtotal}} - {{#var:totalcost}}}}}}
| style="text-align: right;" {{!}} {{Currency|{{#expr:{{#var:output1costtotal}} - {{#var:totalcost}}}}}}
|}</includeonly><noinclude>{{/doc}}</noinclude>
|}

Latest revision as of 13:02, 7 November 2024

Template documentation
This documentation is transcluded from Template:Infobox Recipe/doc. [edit] [history] [purge]

The Infobox Recipe template is used to show the details of a recipe step in item articles, such as a potion mixture or adding a cooking ingredient. It can also be used to display the experience gained for item creation.

Parameters

Parameter Format Usage Mandatory?
facility Link to facility The name of the facility that is required to create the item; e.g. facility = Standard Potion Station will display

Standard Potion Station

Yes
profession profession name The profession in which experience is gained, or which has a level requirement, for creating the item Yes
level Integer The level required in the profession to create the item. Yes
exp number The amount of experience gained for performing the action. Yes
mat1 Exact name of the item The primary item used for performing the craft. e.g. Brown Kelp for Brown Kelp Yes
mat1qty Integer The amount of the material used in the process.

This parameter can be removed if it would be 1

Yes
mat2 Exact name of the item The secondary item used for performing the craft. e.g. Brown Kelp for Brown Kelp Yes
mat2qty Integer The amount of the material used in the process.

This parameter can be removed if it would be 1

Yes
output1 Exact name of the item The item created by performing the craft. e.g. Brown Kelp for Brown Kelp Yes
output1qty Integer The amount of the output created in the process. No

Example

This is an example that uses random values just to display the functionality of the template.

{{Infobox Recipe
|facility = 
|profession = Alchemist
|level = 123
|exp = 9876
|mat1 = Brown Kelp
|mat1qty = 6
|mat2 = Basic Omelette
|mat2qty = 3
|output1 = Fishing Spear
|output1qty = 2
}}
Requirements
Facility Standard Potion Station
Profession Level XP
Alchemist 123 9876
Material Quantity Cost
Brown Kelp 6 3
Basic Omelette 3 1 8
Total cost 4 8
Ouput Quantity Value
Fishing Spear 2 24
Profit 19 992

Blank infobox

{{Infobox Recipe
|facility = 
|profession = 
|level = 
|exp = 
|mat1 = 
|mat1qty = 
|mat2 = 
|mat2qty = 
|output1 = 
|output1qty = 
}}