Difference between revisions of "Template:Recipe"
Jump to navigation
Jump to search
Freedom4556 (talk | contribs) m |
|||
(114 intermediate revisions by 7 users not shown) | |||
Line 1: | Line 1: | ||
< | {{#vardefine:recipecnt|{{#expr:{{#var:recipecnt|0}}+1}}}}<div class="recipe-box" style="padding-bottom:0.4em; margin: 10px 1em 10px 0;"> | ||
{| | {{#if: {{#ifeq:{{{debug|n}}}|y||{{NAMESPACE}}}} | <!-- no subobject if outside mainspace --> | | ||
|- | {{#arraymap: {{{class|}}} |,|@@@|[[Category:@@@ recipes]]|}}<!-- --> | ||
{{#subobject:recipe{{#var:recipecnt}} | |||
|-{{#if: {{{ | | Has context=Recipe | ||
| {{{ | | Has canonical name ={{#titleparts:{{BASEPAGENAME}}}} | ||
|} | | Has recipe source ={{#switch:{{lc:{{{source|}}}}} | ||
</ | | tome | crafting tome = Crafting tome | ||
<noinclude> | | #default = {{ucfirst:{{{source|}}}}} <!-- source = class --> | ||
}} | |||
| Has recipe type ={{ucfirst:{{{type|}}}}} <!-- meal, miscellany, etc --> | |||
| Has recipe yield = {{{yield|{{{quantity|1}}}}}} | |||
| Has crafting difficulty = {{{difficulty|1}}} | |||
| Has crafting durability = {{{durability|}}} | |||
| Has maximum quality = {{{max-quality|}}} | |||
| Has recipe rank = {{#if:{{{rank|}}}|{{{rank|}}}|0}} | |||
| Allows quick synthesis = {{#if:{{{quick-synthesis|}}}|no|yes}} | |||
| Requires qs craftsmanship = {{{qs-craftsmanship|}}} | |||
| Requires qs control = {{{qs-control|}}} | |||
| Allows high quality = {{#if:{{{hq|}}}|no|yes}} | |||
| Learned from recipe sheet = {{{sheet|}}}|+sep=; | |||
| Requires craftsmanship = {{{craftsmanship|}}} | |||
| Requires control = {{{control|}}} | |||
| Requires elemental aspect = {{ucfirst:{{{aspect|}}}}} | |||
| Requires crafting level = {{{level|1}}} | |||
| Requires specialization = {{#if:{{{specialization|}}}|yes|no}} | |||
| Requires equipment = {{{equipment-req|}}} | |||
| Requires status = {{{status-req|}}} | |||
| Is expert recipe = {{#if:{{{expert-recipe|}}}|yes|no}} | |||
| Is collectable recipe = {{#if:{{{collectable|}}}|yes|no}} | |||
| Requires class = {{{class|}}} |+sep=, | |||
| Class count = {{#len:{{#arraymap:{{{class}}}|,|@@@|.|}}}} | |||
| Has ingredient = {{#if: {{{ingredient1|}}} | 1;{{#explode:{{{ingredient1}}}| |0}};{{#sub:{{{ingredient1}}}|{{#pos:{{{ingredient1}}}| }}}} }} | |||
| Has ingredient = {{#if: {{{ingredient2|}}} | 2;{{#explode:{{{ingredient2}}}| |0}};{{#sub:{{{ingredient2}}}|{{#pos:{{{ingredient2}}}| }}}} }} | |||
| Has ingredient = {{#if: {{{ingredient3|}}} | 3;{{#explode:{{{ingredient3}}}| |0}};{{#sub:{{{ingredient3}}}|{{#pos:{{{ingredient3}}}| }}}} }} | |||
| Has ingredient = {{#if: {{{ingredient4|}}} | 4;{{#explode:{{{ingredient4}}}| |0}};{{#sub:{{{ingredient4}}}|{{#pos:{{{ingredient4}}}| }}}} }} | |||
| Has ingredient = {{#if: {{{ingredient5|}}} | 5;{{#explode:{{{ingredient5}}}| |0}};{{#sub:{{{ingredient5}}}|{{#pos:{{{ingredient5}}}| }}}} }} | |||
| Has ingredient = {{#if: {{{ingredient6|}}} | 6;{{#explode:{{{ingredient6}}}| |0}};{{#sub:{{{ingredient6}}}|{{#pos:{{{ingredient6}}}| }}}} }} | |||
| Has ingredient = {{#if: {{{ingredient7|}}} | 7;{{#explode:{{{ingredient7}}}| |0}};{{#sub:{{{ingredient7}}}|{{#pos:{{{ingredient7}}}| }}}} }} | |||
| Has ingredient = {{#if: {{{ingredient8|}}} | 8;{{#explode:{{{ingredient8}}}| |0}};{{#sub:{{{ingredient8}}}|{{#pos:{{{ingredient8}}}| }}}} }} | |||
| Can be queried for base ingredients = {{ucfirst:{{{base ingredients|y}}}}} | |||
| Has item data object = {{PAGENAME}} | |||
}} | |||
}} | |||
<div id="recipe{{#var:recipecnt}}" class="heading">{{{name|{{BASEPAGENAME}}}}}</div> | |||
<div class="wrapper"> | |||
{{#if:{{{expert-recipe|}}}|<div align="center" style="color:#F08E37">[[File:Expert recipe icon.png|link=Expert Recipes]] '''Expert Recipe'''[[Category:Expert recipes]]</div>|}}{{#if:{{{collectable|}}}|<div align="center">[[File:Collectable recipe icon.png|link=Collectables]] '''Collectable'''[[Category:Collectables]]</div>|}} | |||
; Source | |||
: {{#switch:{{lc:{{{source|}}}}} | |||
| sheet | recipe sheet = {{#vardefine:sheet_count|0}}{{#arraymap:{{{sheet}}}|;|@@@|{{#ifexpr:{{#var:sheet_count}}=3|<div class="mw-collapsible mw-collapsed"><small>more...</small><div class="mw-collapsible-content">}}{{cname|@@@}}{{#vardefine:sheet_count|{{#expr:{{#var:sheet_count|0}}+1}}}}|<br>}}{{#ifexpr:{{#var:sheet_count}}>3|</div></div>}} | |||
| #default = {{ucfirst:{{{source|''Unspecified''}}}}} | |||
}}{{#if:{{{type|}}}| | |||
; Type | |||
: {{ucfirst:{{{type}}}}} }}{{#if: {{{class|}}} | ; Class{{#ifexpr: {{#vardefineecho:class_count|{{#len:{{#arraymap:{{{class}}}|,|@@@|.|}}}}}} > 1|es}} | |||
: {{#arraymap:{{{class|}}}|,|@@@|{{@@@|name=y}} {{#if:{{{specialization|}}}|<small>([[Specialist]] only)</small>}}|<br>}} | |||
; Level | |||
: {{{level|1}}} {{#switch:{{{rank|}}}|1=★|2=★★|3=★★★|4=★★★★|5=★★★★★|#default=}} | |||
; Durability | |||
: {{{durability|}}} | |||
; Difficulty | |||
: {{{difficulty|}}} | |||
; Max quality | |||
: {{{max-quality|}}} | |||
{{#if:{{{quality-req|}}}| | |||
; Quality req. | |||
: {{{quality-req|}}} | |||
}} | |||
; Yield | |||
: {{#if: {{{upper quantity|}}} | <span style="border-bottom:1px dotted silver" title="The output quantity varies between these two values for this recipe.">{{{yield|{{{quantity|1}}}}}} – {{{upper quantity|}}}</span> | {{{yield|{{{quantity|1}}}}}} }} | |||
</div> | |||
{{clear}} | |||
<div class="subheading">Characteristics</div> | |||
{{clear}} | |||
<div class="characteristics"> | |||
; Quick Synthesis | |||
: {{#if:{{{quick-synthesis|}}}|Unavailable|Available}}<!-- -->{{#if:{{{qs-craftsmanship|}}}{{{qs-control|}}}| | |||
; QS requirements | |||
: {{#if:{{{qs-craftsmanship|}}}|[[Craftsmanship]]: {{{qs-craftsmanship}}} {{#if:{{{qs-control|}}}| | |||
; :[[Control]]: {{{qs-control}}}}}|{{#if:{{{qs-control|}}}|[[Control]]: {{{qs-control}}}}}}} | |||
}} | |||
; High Quality | |||
: {{#if:{{{collectable|}}}|Collectable|{{#if:{{{hq|}}}|Unavailable|Available}}}}{{#if:{{{craftsmanship|}}}| | |||
; Craftsmanship req. | |||
: {{{craftsmanship|}}} | |||
}}{{#if:{{{craftsmanship-rec|}}}| | |||
; Craftsmanship rec. | |||
: {{{craftsmanship-rec|}}} | |||
}}{{#if:{{{control|}}}| | |||
; Control req. | |||
: {{{control|}}} | |||
}}{{#if:{{{control-rec|}}}| | |||
; Control rec. | |||
: {{{control-rec|}}} | |||
}}{{#if:{{{status-req|}}}| | |||
; Status req. | |||
: [[{{{status-req|}}}]] | |||
}}{{#if:{{{equipment-req|}}}| | |||
; Equipment req. | |||
: {{item icon|{{{equipment-req|}}}}} | |||
}}{{#if:{{{aspect|}}}| | |||
; Aspect | |||
: {{ucfirst:{{{aspect|}}}}} | |||
}} | |||
}}</div> | |||
{{clear}} | |||
<div class="subheading">Ingredients</div> | |||
<div class="ingredients" style="padding-left:1em"> | |||
{{#arraymap:{{{ingredient1|}}}; {{{ingredient2|}}}; {{{ingredient3|}}}; {{{ingredient4|}}}; {{{ingredient5|}}}; {{{ingredient6|}}}; {{{ingredient7|}}}; {{{ingredient8|}}}|;|@@@|{{#iferror:{{#expr:@@@*1}} | |||
|<!-- if expr returns error, @@@ contains alpha --> | |||
; {{#explode:@@@| |0}} | |||
: {{item icon|{{#sub:@@@|{{#pos:@@@| }}}}}} | |||
|<!-- if expr doesn't error, @@@ is numeric --> | |||
; 1 | |||
: {{item icon|@@@}} | |||
}}|\n}} | |||
</div> | |||
{{clear}}</div><noinclude> | |||
== Description == | |||
<pre>{{Recipe | |||
| name = | |||
| source = | |||
| sheet = | |||
| type = | |||
| yield = | |||
| class = | |||
| level = | |||
| difficulty = | |||
| durability = | |||
| max-quality = | |||
| quality-req = | |||
| rank = | |||
| quick-synthesis = | |||
| qs-craftsmanship = | |||
| qs-control = | |||
| hq = | |||
| craftsmanship = | |||
| craftsmanship-rec = | |||
| control = | |||
| control-rec = | |||
| aspect = | |||
| specialization = | |||
| ingredient1 = | |||
| ingredient(2-8) = | |||
}}</pre> | |||
== Parameters == | |||
; name : The recipe name (defaults to <code>BASEPAGENAME</code>) | |||
; source | |||
: How the recipe is learned: | |||
:* <code>class</code> - Learned automatically by levelling a class. | |||
:* <code>recipe sheet</code> - Learned from a [[recipe sheet]]; requires parameter <code>sheet</code> below. | |||
; sheet : The name of the recipe sheet item that teaches the recipe; only use for <code>source = recipe sheet</code>. If learnt by multiple sources, separate sources with a semicolon ";". | |||
; type : The recipe type, i.e. the header it appears under in the recipe list. | |||
; yield: The number of items produced from the recipe. Defaults to 1. | |||
; class : The classes that can use the recipe. Accepts a comma-separated list (e.g. <code>class = culinarian, alchemist</code>). | |||
; level : The level required in a class to use the recipe. | |||
; difficulty | |||
: Recipe difficulty. | |||
; durability | |||
: Recipe durability. | |||
; max-quality | |||
: Maximum recipe quality. | |||
; quality-req | |||
: Minimum quality required for synthesis. Only applicable to certain recipes. | |||
; rank | |||
: Recipe rank. Defaults to <code>none</code>. Accepts from 1 to 4. | |||
; quick-synthesis | |||
: Whether an item can be crafted through quick synthesis. Set anything to disable QS for the item. Defaults to <code>yes</code>. | |||
; qs-craftsmanship | |||
: Optional. Craftsmanship required in order to unlock quick synthesis for this recipe. | |||
; qs-control | |||
: Optional. Control required in order to unlock quick synthesis for this recipe. | |||
; hq | |||
: Whether an item can be high quality. Set anything to disable HQ for the item. Defaults to <code>yes</code>. | |||
; craftsmanship | |||
: Optional. Craftsmanship required in order to craft this item. | |||
; craftsmanship-rec | |||
: Optional. Craftsmanship Recommended | |||
; control | |||
: Optional. Control required in order to craft this item. | |||
; control-rec | |||
: Optional. Control Recommended | |||
; aspect | |||
: Optional. Elemental aspect required in order to craft this item. Accepts: ''earth'', ''wind'', ''water'' or ''lightning''. | |||
; specialization | |||
: Whether an item requires a specialist. Set anything to enable specialization requirement for the item. Defaults to <code>no</code>. | |||
; ingredient1 | |||
: Required. The ingredients of the recipe (including crystals). Value should be a quantity followed by an item name. | |||
:* <code><quantity> <item name></code>, e.g. <code>1 Lowland Grapes</code> | |||
; ingredient2 | |||
; ingredient3 | |||
; ingredient4 | |||
; ingredient5 | |||
; ingredient6 | |||
; ingredient7 | |||
; ingredient8 | |||
: Optional. Same functionality as ingredient1. | |||
== Example == | |||
<pre> | <pre> | ||
{{Recipe | {{Recipe | ||
| | | name = Raisins | ||
| | | source = Class | ||
| | | type = Meal | ||
| | | class = Culinarian | ||
| | | level = 3 | ||
| yield = 3 | |||
| difficulty = 10 | |||
| | | durability = 40 | ||
| | | max-quality = 339 | ||
| | | craftsmanship = 300 | ||
| | | ingredient1 = 1 Fire Shard | ||
| | | ingredient2 = 1 Lowland Grapes | ||
| | |||
| | |||
}} | }} | ||
</pre> | </pre> | ||
</noinclude> | {{Recipe | ||
| name = Raisins | |||
| source = Class | |||
| type = Meal | |||
| class = Culinarian | |||
| level = 3 | |||
| yield = 3 | |||
| difficulty = 10 | |||
| durability = 40 | |||
| max-quality = 339 | |||
| craftsmanship = 300 | |||
| ingredient1 = 1 Fire Shard | |||
| ingredient2 = 1 Lowland Grapes | |||
}} | |||
[[Category:Infobox templates|Recipe]] | |||
[[Category:Subobject templates]]</noinclude> |
Latest revision as of 15:29, 24 September 2023
Recipe
- Source
- Unspecified
Ingredients
Description
{{Recipe | name = | source = | sheet = | type = | yield = | class = | level = | difficulty = | durability = | max-quality = | quality-req = | rank = | quick-synthesis = | qs-craftsmanship = | qs-control = | hq = | craftsmanship = | craftsmanship-rec = | control = | control-rec = | aspect = | specialization = | ingredient1 = | ingredient(2-8) = }}
Parameters
- name
- The recipe name (defaults to
BASEPAGENAME
) - source
- How the recipe is learned:
class
- Learned automatically by levelling a class.recipe sheet
- Learned from a recipe sheet; requires parametersheet
below.
- sheet
- The name of the recipe sheet item that teaches the recipe; only use for
source = recipe sheet
. If learnt by multiple sources, separate sources with a semicolon ";". - type
- The recipe type, i.e. the header it appears under in the recipe list.
- yield
- The number of items produced from the recipe. Defaults to 1.
- class
- The classes that can use the recipe. Accepts a comma-separated list (e.g.
class = culinarian, alchemist
). - level
- The level required in a class to use the recipe.
- difficulty
- Recipe difficulty.
- durability
- Recipe durability.
- max-quality
- Maximum recipe quality.
- quality-req
- Minimum quality required for synthesis. Only applicable to certain recipes.
- rank
- Recipe rank. Defaults to
none
. Accepts from 1 to 4. - quick-synthesis
- Whether an item can be crafted through quick synthesis. Set anything to disable QS for the item. Defaults to
yes
. - qs-craftsmanship
- Optional. Craftsmanship required in order to unlock quick synthesis for this recipe.
- qs-control
- Optional. Control required in order to unlock quick synthesis for this recipe.
- hq
- Whether an item can be high quality. Set anything to disable HQ for the item. Defaults to
yes
. - craftsmanship
- Optional. Craftsmanship required in order to craft this item.
- craftsmanship-rec
- Optional. Craftsmanship Recommended
- control
- Optional. Control required in order to craft this item.
- control-rec
- Optional. Control Recommended
- aspect
- Optional. Elemental aspect required in order to craft this item. Accepts: earth, wind, water or lightning.
- specialization
- Whether an item requires a specialist. Set anything to enable specialization requirement for the item. Defaults to
no
. - ingredient1
- Required. The ingredients of the recipe (including crystals). Value should be a quantity followed by an item name.
<quantity> <item name>
, e.g.1 Lowland Grapes
- ingredient2
- ingredient3
- ingredient4
- ingredient5
- ingredient6
- ingredient7
- ingredient8
- Optional. Same functionality as ingredient1.
Example
{{Recipe | name = Raisins | source = Class | type = Meal | class = Culinarian | level = 3 | yield = 3 | difficulty = 10 | durability = 40 | max-quality = 339 | craftsmanship = 300 | ingredient1 = 1 Fire Shard | ingredient2 = 1 Lowland Grapes }}
Raisins
- Source
- Class
- Type
- Meal
- Class
- CUL
- Level
- 3
- Durability
- 40
- Difficulty
- 10
- Max quality
- 339
- Yield
- 3
Characteristics
- Quick Synthesis
- Available
- High Quality
- Available
- Craftsmanship req.
- 300
Ingredients