Welcome to the DFO World Wiki. With many major updates since the release of DFO, many items are missing. Visit Item Database Project to learn more.
Please remember to click "show preview" before saving the page.
Thanks for the updated logo snafuPop!

Difference between revisions of "Template:Recipe"

From DFO World Wiki
Jump to: navigation, search
(Created page with "<includeonly>{{{recipe|}}} Successful Synthesis Result: {{Item|{{#sub:{{{success result}}}|{{#pos:{{{success result}}}| }}}}}} ({{#explode:{{{success result}}}| |0}}) {{#if:...")
 
(add formatting options; use single parameter for ingredients and fail result)
Line 1: Line 1:
<includeonly>{{{recipe|}}}
+
<includeonly>{{#css:User:Gardios/Recipe box.css}}{{#if: {{NAMESPACE}} | <!-- don't create subobj within namespace --> | {{#subobject:recipe{{#vardefineecho:recipenumber|{{#expr:{{#var:recipenumber|-1}}+1}}}}
 
 
Successful Synthesis Result: {{Item|{{#sub:{{{success result}}}|{{#pos:{{{success result}}}| }}}}}} ({{#explode:{{{success result}}}| |0}})
 
 
 
{{#if:{{{fail result 1|}}}{{{fail result 2|}}}{{{fail result 3|}}}{{{fail result 4|}}}{{{fail result 5|}}}|
 
Failed Synthesis Result:
 
<ul>{{#arraymap:1,2,3,4,5|,|@@@|
 
{{#if:{{{fail result @@@|}}}|
 
<li>{{Item|{{#sub:{{{fail result @@@}}}|{{#pos:{{{fail result @@@}}}| }}}}}} ({{#explode:{{{fail result @@@}}}| |0}})</li>
 
}}
 
|}}
 
</ul>
 
 
 
<nowiki></nowiki>
 
|}}{{#if:{{{proficiency|}}}|Recommended Training Level: {{{proficiency}}} Lv. {{{proficiency level}}}
 
 
 
<nowiki></nowiki>
 
}}Necessary Materials:
 
<ul>{{#arraymap:1,2,3,4,5,6,7,8,9,10|,|@@@|
 
{{#if:{{{ingredient @@@|}}}|
 
<li>{{Item|{{#sub:{{{ingredient @@@}}}|{{#pos:{{{ingredient @@@}}}| }}}}}} ({{#explode:{{{ingredient @@@}}}| |0}})</li>
 
}}
 
|}}
 
</ul>
 
{{#if: {{NAMESPACE}} | <!-- don't create subobj within namespace --> | {{#subobject:recipe{{#vardefineecho:recipenumber|{{#expr:{{#var:recipenumber|-1}}+1}}}}
 
 
| Has game context =Recipe
 
| Has game context =Recipe
 
| Has recipe = {{{recipe|}}}
 
| Has recipe = {{{recipe|}}}
 +
| Has synthesizing npc = {{{npc|}}}
 
| Can be owned = {{#ifeq: {{{ownable|n}}} | y | y | n}}
 
| Can be owned = {{#ifeq: {{{ownable|n}}} | y | y | n}}
 
| Has successful synthesis result = {{#if:{{{success result|}}}|{{#explode:{{{success result}}}| |0}};{{#sub:{{{success result}}}|{{#pos:{{{success result}}}| }}}}}}
 
| Has successful synthesis result = {{#if:{{{success result|}}}|{{#explode:{{{success result}}}| |0}};{{#sub:{{{success result}}}|{{#pos:{{{success result}}}| }}}}}}
| Has failed synthesis result = {{#if:{{{fail result 1|}}}|{{#explode:{{{fail result 1}}}| |0}};{{#sub:{{{fail result 1}}}|{{#pos:{{{fail result 1}}}| }}}}}}
+
| Has failed synthesis result = {{#arraymap: {{{fail result|}}}|;|@@@|{{#explode:@@@| |0}};{{#sub:@@@|{{#pos:@@@| }}}}|###}}|+sep=###
| Has failed synthesis result = {{#if:{{{fail result 2|}}}|{{#explode:{{{fail result 2}}}| |0}};{{#sub:{{{fail result 2}}}|{{#pos:{{{fail result 2}}}| }}}}}}
 
| Has failed synthesis result = {{#if:{{{fail result 3|}}}|{{#explode:{{{fail result 3}}}| |0}};{{#sub:{{{fail result 3}}}|{{#pos:{{{fail result 3}}}| }}}}}}
 
| Has failed synthesis result = {{#if:{{{fail result 4|}}}|{{#explode:{{{fail result 4}}}| |0}};{{#sub:{{{fail result 4}}}|{{#pos:{{{fail result 4}}}| }}}}}}
 
| Has failed synthesis result = {{#if:{{{fail result 5|}}}|{{#explode:{{{fail result 5}}}| |0}};{{#sub:{{{fail result 5}}}|{{#pos:{{{fail result 5}}}| }}}}}}
 
 
| Has proficiency = {{#if:{{{proficiency|}}}|{{{proficiency}}};{{{proficiency level}}}}}
 
| Has proficiency = {{#if:{{{proficiency|}}}|{{{proficiency}}};{{{proficiency level}}}}}
| Has ingredient = {{#if:{{{ingredient 1|}}}|{{#explode:{{{ingredient 1}}}| |0}};{{#sub:{{{ingredient 1}}}|{{#pos:{{{ingredient 1}}}| }}}}}}
+
| Has ingredient = {{#arraymap: {{{ingredients|}}}|;|@@@|{{#explode:@@@| |0}};{{#sub:@@@|{{#pos:@@@| }}}}|###}}|+sep=###
| Has ingredient = {{#if:{{{ingredient 2|}}}|{{#explode:{{{ingredient 2}}}| |0}};{{#sub:{{{ingredient 2}}}|{{#pos:{{{ingredient 2}}}| }}}}}}
+
}}
| Has ingredient = {{#if:{{{ingredient 3|}}}|{{#explode:{{{ingredient 3}}}| |0}};{{#sub:{{{ingredient 3}}}|{{#pos:{{{ingredient 3}}}| }}}}}}
+
}}{{#switch:{{{format|}}}
| Has ingredient = {{#if:{{{ingredient 4|}}}|{{#explode:{{{ingredient 4}}}| |0}};{{#sub:{{{ingredient 4}}}|{{#pos:{{{ingredient 4}}}| }}}}}}
+
| Recipe list row = {{Recipe list result format|<!-- 1 -->|{{{recipe|}}}|<!-- 3 -->|{{{proficiency|}}}|{{{proficiency level|}}}|{{#explode:{{{success result}}}| |0}}|{{#sub:{{{success result}}}|{{#pos:{{{success result}}}| }}}}|{{#arraymap: {{{fail result|}}}|;|@@@|{{#explode:@@@| |0}} ({{#sub:@@@|{{#pos:@@@| }}}})|,}}|{{#arraymap: {{{ingredients|}}}|;|@@@|{{#explode:@@@| |0}} ({{#sub:@@@|{{#pos:@@@| }}}})|,}}}}
| Has ingredient = {{#if:{{{ingredient 5|}}}|{{#explode:{{{ingredient 5}}}| |0}};{{#sub:{{{ingredient 5}}}|{{#pos:{{{ingredient 5}}}| }}}}}}
+
|#default = <div class="recipe-box" id="recipe{{#var:recipenumber}}">
| Has ingredient = {{#if:{{{ingredient 6|}}}|{{#explode:{{{ingredient 6}}}| |0}};{{#sub:{{{ingredient 6}}}|{{#pos:{{{ingredient 6}}}| }}}}}}
+
<div class="header">Recipe: {{#sub:{{{success result|}}}|{{#pos:{{{success result|}}}| }}}}</div>
| Has ingredient = {{#if:{{{ingredient 7|}}}|{{#explode:{{{ingredient 7}}}| |0}};{{#sub:{{{ingredient 7}}}|{{#pos:{{{ingredient 7}}}| }}}}}}
+
<div class="subheader">Successful Synthesis Result</div>
| Has ingredient = {{#if:{{{ingredient 8|}}}|{{#explode:{{{ingredient 8}}}| |0}};{{#sub:{{{ingredient 8}}}|{{#pos:{{{ingredient 8}}}| }}}}}}
+
<div class="materials">
| Has ingredient = {{#if:{{{ingredient 9|}}}|{{#explode:{{{ingredient 9}}}| |0}};{{#sub:{{{ingredient 9}}}|{{#pos:{{{ingredient 9}}}| }}}}}}
+
<dl>
| Has ingredient = {{#if:{{{ingredient 10|}}}|{{#explode:{{{ingredient 10}}}| |0}};{{#sub:{{{ingredient 10}}}|{{#pos:{{{ingredient 10}}}| }}}}}}
+
<dt>{{#explode:{{{success result}}}| |0}}</dt>
 +
<dd>{{Item|{{#sub:{{{success result}}}|{{#pos:{{{success result}}}| }}}}}}</dd>
 +
</dl>
 +
</div>
 +
{{clear}}
 +
{{#if:{{{fail result|}}}|
 +
<div class="subheader">Failed Synthesis Result</div>
 +
<div class="materials">
 +
<dl>{{#arraymap: {{{fail result|}}}|;|@@@|
 +
<dt>{{#explode:@@@| |0}}</dt>
 +
<dd>{{Item|{{#sub:@@@|{{#pos:@@@| }}}}}}</dd>
 +
|}}
 +
</dl>
 +
</div>
 +
{{clear}}
 +
}}
 +
{{#if:{{{proficiency|}}}|<div class="subheader">Recommended Training Level</div>
 +
<div style="padding: 5px 10px 0px 10px;">{{{proficiency}}} Lv. {{{proficiency level}}}</div>
 
}}
 
}}
 +
<div class="subheader">Necessary Materials</div>
 +
<div class="materials">
 +
<dl>{{#arraymap: {{{ingredients|}}}|;|@@@|
 +
<dt>{{#explode:@@@| |0}}</dt>
 +
<dd>{{Item|{{#sub:@@@|{{#pos:@@@| }}}}}}</dd>
 +
|}}
 +
</dl>
 +
</div>
 +
{{clear}}
 +
</div>
 
}}</includeonly><noinclude>
 
}}</includeonly><noinclude>
 
== Description ==
 
== Description ==
Line 53: Line 53:
  
 
* Has recipe
 
* Has recipe
 +
* Has synthesizing npc
 
* Can be owned
 
* Can be owned
 
* Has successful synthesis result
 
* Has successful synthesis result
Line 62: Line 63:
 
<pre>{{Recipe
 
<pre>{{Recipe
 
| recipe =  
 
| recipe =  
 +
| npc =
 
| ownable =  
 
| ownable =  
 
| success result =  
 
| success result =  
| fail result 1 =
+
| fail result =  
| fail result 2 =
 
| fail result 3 =
 
| fail result 4 =
 
| fail result 5 =  
 
 
| proficiency =  
 
| proficiency =  
 
| proficiency level =  
 
| proficiency level =  
| ingredient 1 =  
+
| ingredients =  
| ingredient 2 =
+
| format =  
| ingredient 3 =
 
| ingredient 4 =
 
| ingredient 5 =
 
| ingredient 6 =
 
| ingredient 7 =
 
| ingredient 8 =
 
| ingredient 9 =
 
| ingredient 10 =  
 
 
}}</pre>
 
}}</pre>
  
Line 87: Line 77:
  
 
; recipe : Wiki page of the recipe item.
 
; recipe : Wiki page of the recipe item.
 +
; npc : Wiki page of the NPC synthesizing.
 
; ownable : Required. Set to ''y'' if the recipe item can be consumed to learn the recipe. Defaults to ''n''.
 
; ownable : Required. Set to ''y'' if the recipe item can be consumed to learn the recipe. Defaults to ''n''.
 
; success result : Required. Quantity and wiki page of the item that is the result of a successful synthesis. Expected format is the quantity, followed by a space, followed by the item's wiki page.
 
; success result : Required. Quantity and wiki page of the item that is the result of a successful synthesis. Expected format is the quantity, followed by a space, followed by the item's wiki page.
; fail result X : Quantity and wiki page of the item that is the result of a failed synthesis. Expected format is the quantity, followed by a space, followed by the item's wiki page.
+
; fail result : Quantity and wiki page of the item that is the result of a failed synthesis. Expected format is the quantity, followed by a space, followed by the item's wiki page. Separate multiple with a semicolon.
 
; proficiency : Required profession or recommended craft to use the recipe.
 
; proficiency : Required profession or recommended craft to use the recipe.
 
; proficiency level : Profession tier or recommended craft level to use the recipe.
 
; proficiency level : Profession tier or recommended craft level to use the recipe.
 
; recommended craft : Craft that is recommended.
 
; recommended craft : Craft that is recommended.
; ingredient X : Quantity and wiki page of the material that is used in the recipe. Expected format is the quantity, followed by a space, followed by the item's wiki page.
+
; ingredients : Quantity and wiki page of the material that is used in the recipe. Expected format is the quantity, followed by a space, followed by the item's wiki page. Separate multiple with a semicolon.
 +
; format : Display format of the recipe. Set to ''box'' to display the recipe in an infobox, or to ''Recipe list row'' to display it as a row used in conjunction with [[Template:Recipe list header]]. Defaults to ''box''.
  
 
=== Examples ===
 
=== Examples ===
Line 103: Line 95:
 
| proficiency = Alchemy
 
| proficiency = Alchemy
 
| proficiency level = 1
 
| proficiency level = 1
| ingredient 1 = 10 Low Grade Elemental Stone
+
| ingredients = 10 Low Grade Elemental Stone; 300 Clear Cube Fragment
| ingredient 2 = 300 Clear Cube Fragment
 
 
}}</pre>
 
}}</pre>
 
{{Recipe
 
{{Recipe
Line 112: Line 103:
 
| proficiency = Alchemy
 
| proficiency = Alchemy
 
| proficiency level = 1
 
| proficiency level = 1
| ingredient 1 = 10 Low Grade Elemental Stone
+
| ingredients = 10 Low Grade Elemental Stone; 300 Clear Cube Fragment
| ingredient 2 = 300 Clear Cube Fragment
 
 
}}
 
}}
  
<pre>{{Recipe
+
<pre>{{Recipe list header|show description=n}}
| recipe = Recipe: Thick-Armed Bracelet
+
{{Recipe
 +
| format = Recipe list row
 +
| npc = Roger Levin
 +
| ownable = n
 +
| success result = 1 Inferior Hardener
 +
| ingredients = 1 Raw Hardener; 50 Gold
 +
}}
 +
{{Recipe
 +
| format = Recipe list row
 +
| npc = Roger Levin
 +
| ownable = n
 +
| success result = 1 Stone of Delirium
 +
| ingredients = 10 Stone of Delirium Debris; 2500 Gold
 +
}}
 +
|}</pre>
 +
{{Recipe list header|show description=n}}
 +
{{Recipe
 +
| format = Recipe list row
 +
| npc = Roger Levin
 
| ownable = n
 
| ownable = n
| success result = 1 Thick-Armed Bracelet
+
| success result = 1 Inferior Hardener
| proficiency = Bracelet Craft
+
| ingredients = 1 Raw Hardener; 50 Gold
| proficiency level = 3
+
}}
| ingredient 1 = 100 High Grade Elemental Crystal
 
| ingredient 2 = 600 Gold cube Fragment
 
| ingredient 3 = 50 Useful Disassembler Parts
 
}}</pre>
 
 
{{Recipe
 
{{Recipe
| recipe = Recipe: Thick-Armed Bracelet
+
| format = Recipe list row
 +
| npc = Roger Levin
 
| ownable = n
 
| ownable = n
| success result = 1 Thick-Armed Bracelet
+
| success result = 1 Stone of Delirium
| proficiency = Bracelet Craft
+
| ingredients = 10 Stone of Delirium Debris; 2500 Gold
| proficiency level = 3
 
| ingredient 1 = 100 High Grade Elemental Crystal
 
| ingredient 2 = 600 Gold cube Fragment
 
| ingredient 3 = 50 Useful Disassembler Parts
 
 
}}
 
}}
 +
|}
  
 
[[Category:Formatting Templates]][[Category:Subobject Templates]]</noinclude>
 
[[Category:Formatting Templates]][[Category:Subobject Templates]]</noinclude>

Revision as of 19:12, 15 April 2016

Description

This template creates a recipe record and displays everything.

It creates a subobject with the following properties:

  • Has recipe
  • Has synthesizing npc
  • Can be owned
  • Has successful synthesis result
  • Has failed synthesis result
  • Has proficiency
  • Has ingredient

Usage

{{Recipe
| recipe = 
| npc = 
| ownable = 
| success result = 
| fail result = 
| proficiency = 
| proficiency level = 
| ingredients = 
| format = 
}}

Parameters

All parameters are optional unless stated otherwise.

recipe 
Wiki page of the recipe item.
npc 
Wiki page of the NPC synthesizing.
ownable 
Required. Set to y if the recipe item can be consumed to learn the recipe. Defaults to n.
success result 
Required. Quantity and wiki page of the item that is the result of a successful synthesis. Expected format is the quantity, followed by a space, followed by the item's wiki page.
fail result 
Quantity and wiki page of the item that is the result of a failed synthesis. Expected format is the quantity, followed by a space, followed by the item's wiki page. Separate multiple with a semicolon.
proficiency 
Required profession or recommended craft to use the recipe.
proficiency level 
Profession tier or recommended craft level to use the recipe.
recommended craft 
Craft that is recommended.
ingredients 
Quantity and wiki page of the material that is used in the recipe. Expected format is the quantity, followed by a space, followed by the item's wiki page. Separate multiple with a semicolon.
format 
Display format of the recipe. Set to box to display the recipe in an infobox, or to Recipe list row to display it as a row used in conjunction with Template:Recipe list header. Defaults to box.

Examples

{{Recipe
| recipe = Recipe: Rookie Alchemy Extractor
| ownable = y
| success result = 1 Rookie Alchemy Extractor
| proficiency = Alchemy
| proficiency level = 1
| ingredients = 10 Low Grade Elemental Stone; 300 Clear Cube Fragment
}}
Recipe: Rookie Alchemy Extractor
Successful Synthesis Result


Recommended Training Level
Alchemy Lv. 1
Necessary Materials


{{Recipe list header|show description=n}}
{{Recipe
| format = Recipe list row
| npc = Roger Levin
| ownable = n
| success result = 1 Inferior Hardener
| ingredients = 1 Raw Hardener; 50 Gold
}}
{{Recipe
| format = Recipe list row
| npc = Roger Levin
| ownable = n
| success result = 1 Stone of Delirium
| ingredients = 10 Stone of Delirium Debris; 2500 Gold
}}
|}
Icon Name Binding Recipe Profession/Craft Level Materials
Inferior Hardener.png Inferior Hardener (1)
Stone of Delirium.png Stone of Delirium (1)