Template:Infobox Recipe: Difference between revisions

From Brighter Shores Wiki
Jump to navigation Jump to search
Content added Content deleted
No edit summary
No edit summary
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#vardefine:mat1cost|{{formatnum:{{#ask:[[{{{mat1}}}]]|?Value=|mainlabel=-}}|R}}}}{{#vardefine:mat2cost|{{formatnum:{{#ask:[[{{{mat2}}}]]|?Value=|mainlabel=-}}|R}}}}{{#vardefine:output1cost|{{formatnum:{{#ask:[[{{{output1}}}]]|?Value=|mainlabel=-}}|R}}}}{| class="wikitable"
<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"
! colspan="4" | Requirements
! colspan="4" | Requirements
|-
|-
Line 17: 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 32: Line 30:
}}
}}
! colspan="3" | Total cost
! colspan="3" | Total cost
| style="text-align: right;" {{!}} {{Currency|{{#vardefineecho:totalcost|{{#expr:{{#varexists:mat1total|{{#var:mat1total}}|0}} <!--+ {{#varexists:mat2total|{{#var:mat2total}}|0}}-->}}}}}}
| style="text-align: right;" {{!}} {{Currency|{{#vardefineecho:totalcost|{{#expr:{{#varexists:mat1total|{{#var:mat1total}}|0}} + {{#varexists:mat2total|{{#var:mat2total}}|0}}}}}}}}
|-
|-
! colspan="2" | Ouput
! colspan="2" | Ouput
Line 38: Line 36:
! Cost
! Cost
|-
|-
{{!}} [[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 45: 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>
|}

Revision as of 22:40, 5 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 Cost
Fishing Spear 2 24
Profit 19 992

Blank infobox

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