Difference between revisions of "Template:Recipe"

From ChatWars Wiki
Jump to: navigation, search
 
(45 intermediate revisions by the same user not shown)
Line 1: Line 1:
{| class="wikitable floatright" style="width:330px; font-size:100%;"
+
<includeonly>
 +
<div class="recipe_template">
 +
{| class="wikitable floatright" style="width:350px; font-size:100%;"
 
|-
 
|-
| colspan="2" style="background: lightgrey;  text-align:center"| '''Info:''' '''{{{name}}}'''
+
| colspan="2" style="background: lightgrey;  text-align:center"| {{Emoticon|emoticon={{{icon}}}}} '''Info:''' '''{{{name}}}'''
|-
 
| '''Corresponding [[Skill]]'''  || {{#if:{{{skill|}}}|[[{{{skill}}}]]}}
 
 
|-
 
|-
 
{{#if:{{{skill|}}}|
 
{{#if:{{{skill|}}}|
{{!}} '''Skill level required'''
+
{{!}} style="text-align: right;  {{!}} '''Corresponding [[Skill]]'''
{{!}} {{#if:{{{skilllevel|}}}|{{{skilllevel}}}}}
+
{{!}}  [[{{{skill}}}]]
 +
{{!}}-}}
 +
{{#if:{{{skill|}}}|
 +
{{!}} style="text-align: right;  {{!}} '''Skill level required'''
 +
{{!}} {{#if:{{{skilllevel|}}}|{{{skilllevel}}}}}
 
{{!}}-}}
 
{{!}}-}}
 +
| style="text-align: right;" | '''Mana''' || {{{mana}}} [[Image:Mana.png|16px]]
 +
|-
 +
| style="text-align: right;" | '''Chatcommand''' || <code>{{{chatcommand}}}</code>
 +
|-
 
| colspan="2" style="background: lightgrey;  text-align:center"| '''Recipe'''  
 
| colspan="2" style="background: lightgrey;  text-align:center"| '''Recipe'''  
 
|-
 
|-
Line 20: Line 28:
 
{{!}}-}}
 
{{!}}-}}
 
{{#if:{{{ingredient3|}}}|
 
{{#if:{{{ingredient3|}}}|
{{!}} [[{{{ingredient3}}}]]
+
{{!}}  style="text-align: right; {{!}} [[{{{ingredient3}}}]]
 
{{!}} {{#if:{{{amount3|}}}|{{{amount3}}}}}
 
{{!}} {{#if:{{{amount3|}}}|{{{amount3}}}}}
 
{{!}}-}}
 
{{!}}-}}
 
{{#if:{{{ingredient4|}}}|
 
{{#if:{{{ingredient4|}}}|
{{!}} [[{{{ingredient4}}}]]
+
{{!}} style="text-align: right; {{!}}  [[{{{ingredient4}}}]]
 
{{!}} {{#if:{{{amount4|}}}|{{{amount4}}}}}
 
{{!}} {{#if:{{{amount4|}}}|{{{amount4}}}}}
 
{{!}}-}}
 
{{!}}-}}
 
{{#if:{{{ingredient5|}}}|
 
{{#if:{{{ingredient5|}}}|
{{!}} [[{{{ingredient5}}}]]
+
{{!}} style="text-align: right; {{!}}  [[{{{ingredient5}}}]]
 
{{!}} {{#if:{{{amount5|}}}|{{{amount5}}}}}
 
{{!}} {{#if:{{{amount5|}}}|{{{amount5}}}}}
 
{{!}}-}}
 
{{!}}-}}
 
{{#if:{{{ingredient6|}}}|
 
{{#if:{{{ingredient6|}}}|
{{!}} [[{{{ingredient6}}}]]
+
{{!}}  style="text-align: right; {{!}} [[{{{ingredient6}}}]]
 
{{!}} {{#if:{{{amount6|}}}|{{{amount6}}}}}
 
{{!}} {{#if:{{{amount6|}}}|{{{amount6}}}}}
 
{{!}}-}}
 
{{!}}-}}
 
{{#if:{{{ingredient7|}}}|
 
{{#if:{{{ingredient7|}}}|
{{!}} [[{{{ingredient7}}}]]  
+
{{!}}  style="text-align: right; {{!}} [[{{{ingredient7}}}]]  
 
{{!}} {{#if:{{{amount7|}}}|{{{amount7}}}}}
 
{{!}} {{#if:{{{amount7|}}}|{{{amount7}}}}}
 
{{!}}-}}
 
{{!}}-}}
 
{{#if:{{{ingredient8|}}}|
 
{{#if:{{{ingredient8|}}}|
{{!}} [[{{{ingredient8}}}]]  
+
{{!}} style="text-align: right; {{!}}  [[{{{ingredient8}}}]]  
 
{{!}} {{#if:{{{amount8|}}}|{{{amount8}}}}}
 
{{!}} {{#if:{{{amount8|}}}|{{{amount8}}}}}
 
{{!}}-}}
 
{{!}}-}}
 
{{#if:{{{ingredient9|}}}|
 
{{#if:{{{ingredient9|}}}|
{{!}} [[{{{ingredient9}}}]]
+
{{!}}  style="text-align: right; {{!}} [[{{{ingredient9}}}]]
 
{{!}} {{#if:{{{amount9|}}}|{{{amount9}}}}}
 
{{!}} {{#if:{{{amount9|}}}|{{{amount9}}}}}
 
{{!}}-}}
 
{{!}}-}}
 
{{#if:{{{ingredient10|}}}|
 
{{#if:{{{ingredient10|}}}|
{{!}} [[{{{ingredient10}}}]]
+
{{!}} style="text-align: right; {{!}}  [[{{{ingredient10}}}]]
 
{{!}} {{#if:{{{amount10|}}}|{{{amount10}}}}}
 
{{!}} {{#if:{{{amount10|}}}|{{{amount10}}}}}
 
{{!}}-}}
 
{{!}}-}}
 
 
|}
 
|}
 +
</div>
 +
</includeonly>
 
<noinclude>
 
<noinclude>
 
__NOTOC__
 
__NOTOC__
 +
=Documentation=
 +
The template is used to create a table with an overview for crafting/brewing recipes. Using the template results in a table on the right hand side of the page, text wrapping around. It is advised to put that template directly in the beginning of a page to get the recipe as infobox.
 +
 +
==Usage==
 +
The template is using the following variables, the links to the item pages are added automatically:
 +
<nowiki>
 +
{{Recipe
 +
|name=
 +
|icon=
 +
|skill=
 +
|skilllevel=
 +
|mana=
 +
|chatcommand=
 +
|ingredient1=
 +
|amount1=
 +
|ingredient2=
 +
|amount2=
 +
|ingredient3=
 +
|amount3=
 +
|ingredient4=
 +
|amount4=
 +
|ingredient5=
 +
|amount5=
 +
|ingredient6=
 +
|amount6=
 +
|ingredient7=
 +
|amount7=
 +
|ingredient8=
 +
|amount8=
 +
|ingredient9=
 +
|amount9=
 +
|ingredient10=
 +
|amount10=
 +
}}
 +
</nowiki>
 +
 +
==Example==
 +
<nowiki>
 +
{{Recipe
 +
|name=Champion Sword
 +
|icon=Workshop
 +
|skill=Crafting (Skill)
 +
|skilllevel=3
 +
|mana=150
 +
|chatcommand=/craft_w28
 +
|ingredient1=Champion Sword Recipe
 +
|amount1=1
 +
|ingredient2=Champion Blade
 +
|amount2=3
 +
|ingredient3=Ruby
 +
|amount3=3
 +
|ingredient4=Steel Mold
 +
|amount4=3
 +
|ingredient5=Coke
 +
|amount5=41
 +
|ingredient6=Metal Plate
 +
|amount6=41
 +
|ingredient7=Silver Alloy
 +
|amount7=27
 +
|ingredient8=
 +
|amount8=
 +
|ingredient9=
 +
|amount9=
 +
|ingredient10=
 +
|amount10=
 +
}}
 +
</nowiki>
 +
Results in:
 +
 +
{{Recipe
 +
|name=Champion Sword
 +
|icon=Workshop
 +
|skill=Crafting (Skill)
 +
|skilllevel=3
 +
|mana=150
 +
|chatcommand=/craft_w28
 +
|ingredient1=Champion Sword Recipe
 +
|amount1=1
 +
|ingredient2=Champion Blade
 +
|amount2=3
 +
|ingredient3=Ruby
 +
|amount3=3
 +
|ingredient4=Steel Mold
 +
|amount4=3
 +
|ingredient5=Coke
 +
|amount5=41
 +
|ingredient6=Metal Plate
 +
|amount6=41
 +
|ingredient7=Silver Alloy
 +
|amount7=27
 +
|ingredient8=
 +
|amount8=
 +
|ingredient9=
 +
|amount9=
 +
|ingredient10=
 +
|amount10=
 +
}}
 +
[[Category:Template]]
 
</noinclude>
 
</noinclude>

Latest revision as of 22:19, 24 July 2018


Documentation

The template is used to create a table with an overview for crafting/brewing recipes. Using the template results in a table on the right hand side of the page, text wrapping around. It is advised to put that template directly in the beginning of a page to get the recipe as infobox.

Usage

The template is using the following variables, the links to the item pages are added automatically:

 {{Recipe
 |name=
 |icon=
 |skill=
 |skilllevel=
 |mana=
 |chatcommand=
 |ingredient1=
 |amount1=
 |ingredient2=
 |amount2=
 |ingredient3=
 |amount3=
 |ingredient4=
 |amount4=
 |ingredient5=
 |amount5=
 |ingredient6=
 |amount6=
 |ingredient7=
 |amount7=
 |ingredient8=
 |amount8=
 |ingredient9=
 |amount9=
 |ingredient10=
 |amount10=
 }}

Example

 {{Recipe
 |name=Champion Sword
 |icon=Workshop
 |skill=Crafting (Skill)
 |skilllevel=3
 |mana=150 
 |chatcommand=/craft_w28
 |ingredient1=Champion Sword Recipe
 |amount1=1
 |ingredient2=Champion Blade
 |amount2=3
 |ingredient3=Ruby
 |amount3=3
 |ingredient4=Steel Mold
 |amount4=3
 |ingredient5=Coke
 |amount5=41
 |ingredient6=Metal Plate
 |amount6=41
 |ingredient7=Silver Alloy
 |amount7=27
 |ingredient8=
 |amount8=
 |ingredient9=
 |amount9=
 |ingredient10=
 |amount10=
 }}
 

Results in:


link={{{link}}} Info: Champion Sword
Corresponding Skill Crafting (Skill)
Skill level required 3
Mana 150 Mana.png
Chatcommand /craft_w28
Recipe
Ingredient Amount
Champion Sword Recipe 1
Champion Blade 3
Ruby 3
Steel Mold 3
Coke 41
Metal Plate 41
Silver Alloy 27