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"
(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> | + | <includeonly>{{#css:User:Gardios/Recipe box.css}}{{#if: {{NAMESPACE}} | <!-- don't create subobj within namespace --> | {{#subobject:recipe{{#vardefineecho:recipenumber|{{#expr:{{#var:recipenumber|-1}}+1}}}} |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | }} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | {{#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 = {{# | + | | Has failed synthesis result = {{#arraymap: {{{fail result|}}}|;|@@@|{{#explode:@@@| |0}};{{#sub:@@@|{{#pos:@@@| }}}}|###}}|+sep=### |
− | |||
− | |||
− | | | ||
− | | | ||
| Has proficiency = {{#if:{{{proficiency|}}}|{{{proficiency}}};{{{proficiency level}}}}} | | Has proficiency = {{#if:{{{proficiency|}}}|{{{proficiency}}};{{{proficiency level}}}}} | ||
− | | Has ingredient = {{# | + | | Has ingredient = {{#arraymap: {{{ingredients|}}}|;|@@@|{{#explode:@@@| |0}};{{#sub:@@@|{{#pos:@@@| }}}}|###}}|+sep=### |
− | + | }} | |
− | | | + | }}{{#switch:{{{format|}}} |
− | | | + | | 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:@@@| }}}})|,}}}} |
− | | | + | |#default = <div class="recipe-box" id="recipe{{#var:recipenumber}}"> |
− | | | + | <div class="header">Recipe: {{#sub:{{{success result|}}}|{{#pos:{{{success result|}}}| }}}}</div> |
− | + | <div class="subheader">Successful Synthesis Result</div> | |
− | + | <div class="materials"> | |
− | | | + | <dl> |
− | + | <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 | + | | fail result = |
− | |||
− | |||
− | |||
− | |||
| proficiency = | | proficiency = | ||
| proficiency level = | | proficiency level = | ||
− | | | + | | ingredients = |
− | | | + | | format = |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
}}</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 | + | ; 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. | ||
− | ; | + | ; 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 | ||
− | | | + | | ingredients = 10 Low Grade Elemental Stone; 300 Clear Cube Fragment |
− | |||
}}</pre> | }}</pre> | ||
{{Recipe | {{Recipe | ||
Line 112: | Line 103: | ||
| proficiency = Alchemy | | proficiency = Alchemy | ||
| proficiency level = 1 | | proficiency level = 1 | ||
− | | | + | | ingredients = 10 Low Grade Elemental Stone; 300 Clear Cube Fragment |
− | |||
}} | }} | ||
− | <pre>{{Recipe | + | <pre>{{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 | ||
+ | }} | ||
+ | |}</pre> | ||
+ | {{Recipe list header|show description=n}} | ||
+ | {{Recipe | ||
+ | | format = Recipe list row | ||
+ | | npc = Roger Levin | ||
| ownable = n | | ownable = n | ||
− | | success result = 1 | + | | success result = 1 Inferior Hardener |
− | | | + | | ingredients = 1 Raw Hardener; 50 Gold |
− | + | }} | |
− | |||
− | |||
− | |||
− | }} | ||
{{Recipe | {{Recipe | ||
− | | | + | | format = Recipe list row |
+ | | npc = Roger Levin | ||
| ownable = n | | ownable = n | ||
− | | success result = 1 | + | | success result = 1 Stone of Delirium |
− | | | + | | ingredients = 10 Stone of Delirium Debris; 2500 Gold |
− | |||
− | |||
− | |||
− | |||
}} | }} | ||
+ | |} | ||
[[Category:Formatting Templates]][[Category:Subobject Templates]]</noinclude> | [[Category:Formatting Templates]][[Category:Subobject Templates]]</noinclude> |
Revision as of 19:12, 15 April 2016
Contents
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 (1) | — | — | — |
| ||
Stone of Delirium (1) | — | — | — |
|