Template:Synthesis Recipe.RecipeList: Difference between revisions
(trying a template to generate recipe lists, although not working properly yet) |
mNo edit summary |
||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly><onlyinclude>- {{#ifeq:{{lc:{{{1}}}}}|none|style="display: none;"|<!-- | <includeonly><onlyinclude>-<!-- | ||
-->{{#ifeq:{{{result}}}|this|style="display: none;" | clever ways to not show desynth recipes and recipes where the item is the | ||
-->{{#ifeq:{{{hq result}}}|this|style="display: none;" | -->{{#ifeq:{{lc:{{{1}}}}}|none|style="display: none;"}}<!-- | ||
-->{{#ifeq:{{{ | if the recipe has only one ingredient with quantity one, then it is by definition a desynthesis of that ingredient (there might be exceptions...) | ||
-->{{#if:{{{ingredient 2|}}}{{{ingredient quantity|}}}{{#ifeq:{{lc:{{{crystal}}}}}|lightning||not using lightning crystal so it is not a desynth recipe}}||style="display: none;"}}<!-- | |||
if neither cap, crystal nor result (could add more) is given, then do not display the recipe because it isn't filled out | |||
-->{{#if:{{{cap|}}}{{{crystal|}}}{{{result|}}}||style="display:none;"}}<!-- | |||
-->{{#ifeq:{{{hq result}}}|{{{result}}}||{{#ifeq:{{{hq result}}}|this|style="display:none;"}}}}<!-- | |||
-->{{#ifeq:{{{hq 2 result}}}|{{{result}}}||{{#ifeq:{{{hq 2 result}}}|this|style="display:none;"}}}}<!-- | |||
-->{{#ifeq:{{{hq 3 result}}}|{{{result}}}||{{#ifeq:{{{hq 3 result}}}|this|style="display:none;"}}}}<!-- | |||
compare the level of the recipe against the rank and hide recipes which are outside of the level range. This is necessary because for some items multiple recipes exist which vary in level. dpl pulls the entire page if it categorizes as a certain range and all recipes end up here. So a manual sorting of the rows by level is necessary | |||
-->{{#ifexpr:{{{cap}}}<{{GetRankLevel|{{{phantom_arg}}}|min}}|style="display:none;"}}{{#ifexpr:{{{cap}}}>{{GetRankLevel|{{{phantom_arg}}}|max}}|style="display:none;"}}<!-- | |||
Start output code | |||
--> | |||
| | | | ||
[[ | [[%PAGE%|%TITLE%]]{{#if:{{{yield|}}}| x {{{yield}}}}}{{#if:{{{crafting tool|}}}|<br/> {{KeyItem}}[[{{{crafting tool}}}]]}} | ||
{{#if:{{{subcraft|}}}|<nowiki/> | {{#if:{{{subcraft|}}}|<nowiki/> | ||
:{{Craft|{{{subcraft}}}|{{{subcraft cap}}}}}}} | :{{Craft|{{{subcraft}}}|{{{subcraft cap}}}}}}} | ||
Line 10: | Line 25: | ||
{{{cap}}} | {{{cap}}} | ||
| | | | ||
[[{{{crystal}}}]] | [[{{{crystal}}} Crystal|{{Color|{{{crystal}}}|{{{crystal}}}}}]] | ||
| | |<!-- first ingredient always exists, there is no recipe with zero ingredients. quantities are optional with 1 being implied if none is given by the synthesis recipe template. Subsequent ingredients are checked if they exist, in a nested fashion --> | ||
<ul><li>[[{{{ingredient}}}]]{{#if:{{{ingredient quantity|}}}| x {{{ingredient quantity}}}}}<!-- | <ul><li>[[{{{ingredient}}}]]{{#if:{{{ingredient quantity|}}}| x {{{ingredient quantity}}}}}</li><!-- | ||
-- | -->{{#if:{{{ingredient 2|}}}|<li>[[{{{ingredient 2}}}]]{{#if:{{{ingredient 2 quantity|}}}| x {{{ingredient 2 quantity}}}}}</li><!-- | ||
-->{{#if:{{{ingredient 3|}}}|<li>[[{{{ingredient 3}}}]] | -->{{#if:{{{ingredient 3|}}}|<li>[[{{{ingredient 3}}}]]{{#if:{{{ingredient 3 quantity|}}}| x {{{ingredient 3 quantity}}}}}</li><!-- | ||
-->{{#if:{{{ingredient 4|}}}|<li>[[{{{ingredient 4}}}]] | -->{{#if:{{{ingredient 4|}}}|<li>[[{{{ingredient 4}}}]]{{#if:{{{ingredient 4 quantity|}}}| x {{{ingredient 4 quantity}}}}}</li><!-- | ||
-->{{#if:{{{ingredient 5|}}}|<li>[[{{{ingredient 5}}}]] | -->{{#if:{{{ingredient 5|}}}|<li>[[{{{ingredient 5}}}]]{{#if:{{{ingredient 5 quantity|}}}| x {{{ingredient 5 quantity}}}}}</li>}}}}}}}}</ul> | ||
| | |<!-- next line is complicated because: if no hq result is specified but a hq yield is specified, the synthesis recipe template will default to using the normal result with the hq yield as the hq. Also, the synthesis recipe allows to use "this" as a keyword to use the page title. all these cases must be caught here --> | ||
{{#if:{{{hq result|}}}|HQ: [[{{{hq result}}}]]{{#if:{{{hq yield|}}}| x {{{hq yield}}}}}<!-- | {{#if:{{{hq result|}}}{{{hq yield|}}}|HQ: [[{{#ifeq:{{{hq result}}}|this|%PAGE%{{!}}%TITLE%|{{{hq result|{{#ifeq:{{{result}}}|this|%PAGE%{{!}}%TITLE%|{{{result}}}}}}}}}}]]{{#if:{{{hq yield|}}}| x {{{hq yield}}}}}<!-- | ||
-->{{#if:{{{hq 2 result|}}}|<br/>HQ2: [[{{{hq 2 result}}}]]{{#if:{{{hq 2 yield|}}}| x {{{hq 2 yield}}}}}<!-- | -->{{#if:{{{hq 2 result|}}}{{{hq 2 yield|}}}|<br/>HQ2: [[{{{hq 2 result|{{#ifeq:{{{result}}}|this|%PAGE%{{!}}%TITLE%|{{{result}}}}}}}}]]{{#if:{{{hq 2 yield|}}}| x {{{hq 2 yield}}}}}<!-- | ||
-->{{#if:{{{hq 3 result|}}}|<br/>HQ3: [[{{{hq 3 result | -->{{#if:{{{hq 3 result|}}}{{{hq 3 yield|}}}|<br/>HQ3: [[{{{hq 3 result|{{#ifeq:{{{result}}}|this|%PAGE%{{!}}%TITLE%|{{{result}}}}}}}}]]{{#if:{{{hq 3 yield|}}}| x {{{hq 3 yield}}}}}<!-- | ||
-->}}}}|''none''}} | |||
-->}}}} | |||
</onlyinclude></includeonly> | </onlyinclude></includeonly> | ||
[[Category:DPL Phantom Templates]] | |||
==Usage== | |||
| | dpl phantom template to format the rows of [[Template:RecipeList]] | ||
| | |||
| | For usage, see [[Template:RecipeList]] | ||
| | |||
}} | ===Examples of [[Template:RecipeList]]=== | ||
<pre>{{RecipeList|craft=Alchemy|rank=Apprentice}}</pre> | |||
{{RecipeList|craft=Alchemy|rank=Apprentice}} |
Latest revision as of 14:38, 13 November 2024
Usage
dpl phantom template to format the rows of Template:RecipeList
For usage, see Template:RecipeList
Examples of Template:RecipeList
{{RecipeList|craft=Alchemy|rank=Apprentice}}
Item | Cap | Crystal | Ingredients | HQ | Horizon Changes |
---|---|---|---|---|---|
Prism Powder x 6 |
41 |
HQ: Prism Powder x 8 |
|||
Prism Powder x 12 |
41 |
none |
|||
Firesand x 2 |
41 |
||||
Bullet x 33
|
41 |
HQ: Bullet x 99 |
none
| ||
42 |
|||||
43 |
|
||||
Vitriol x 3 |
43 |
||||
42 |
HQ: Poison Kukri +1 |
||||
42 |
HQ: Bokuto +1 |
none
| |||
42 |
HQ: Hellfire Axe |
none
| |||
42 |
none |
none
| |||
43 |
HQ: Poison Katars +1 |
none
| |||
Sparkling Hand x 33
|
43 |
HQ: Sparkling Hand x 66 |
|||
44 |
HQ: Burning Claymore |
none
| |||
|
44 |
none |
none
| ||
45 |
none |
||||
Iron Bullet x 33
|
45 |
HQ: Iron Bullet x 99 |
none
| ||
45 |
HQ: Corrosive Dagger |
||||
|
46 |
none |
|||
|
46 |
HQ: Frog Lure |
|||
46 |
HQ: Flame Sword |
none
| |||
47 |
HQ: Flame Degen +1 |
||||
47 |
HQ: Corrosive Knife |
||||
47 |
none |
none
| |||
Fire Arrow x 33 |
47 |
HQ: Fire Arrow x 66 |
none
| ||
Fire Arrow x 33
|
48 |
|
HQ: Fire Arrow x 66 |
none
| |
49 |
none |
none
| |||
49 |
none |
none
| |||
49 |
HQ: Flame Blade +1 |
none
| |||
49 |
none |
none
| |||
50 |
|||||
50 |
none |
none
| |||
50 |
none |
none
| |||
50 |
HQ: Ether Drop x 2 |
none
|