Template:RecipeList.dpl: Difference between revisions

From HorizonXI Wiki
(trying a template to generate recipe lists, although not working properly yet)
 
m (some code improvements and a lot of commentary)
 
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:{{{ingredient}}}|this|style="display: none;"|}}}}}}}}
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|}}}||style="display: none;"}}<!--
if the item is the ingredient of the recipe, then it is a desynthesis recipe. Unfortunately, in a phantom template it seems not possible to use %PAGE% or %TITLE% to check if the pagename is equal to the ingredient, so we can only check against the "keyword" "this".
-->{{#ifeq:{{{ingredient}}}|this|style="display: none;"|}}<!--
if neither cap, crystal nor result (could add more) is given, then do not display the recipe because it isnt filled out
-->{{#if:{{{cap|}}}{{{crystal|}}}{{{result|}}}||style="display:none;"}}<!--
there is a another complicated case: if an item is obtainable as a HQ from a synth, that page will list the recipe. But that needs to be removed from the table because the recipe will be listed under what is the NQ. The check for that is tricky because it needs to check that:
- HQ == this (cant detect pagename, need to use "this")
- result != HQ (because it might just be the same, e.g. items where the HQ is just more quantity)
and the same for HQ2 and HQ3
 
the occurences which are still in the table are then pages where "this" has not been used by the full name of the item. Because the .dpl template cannot check equality between a parameter and the page's name, there is no way to know whether we are looking at the recipe from the NQ page (stay in table) or the HQ page (should not be in table).
 
-->{{#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;"}}}}
<!--
 
Start output code
-->
|
|
[[{{{result}}}]]{{#if:{{{yield|}}}|&nbsp;x&nbsp;{{{yield}}}}}{{#if:{{{crafting tool|}}}|<br/>&emsp;{{KeyItem}}[[{{{crafting tool}}}]]}}
[[%PAGE%|%TITLE%]]{{#if:{{{yield|}}}|&nbsp;x&nbsp;{{{yield}}}}}{{#if:{{{crafting tool|}}}|<br/>&emsp;{{KeyItem}}[[{{{crafting tool}}}]]}}
{{#if:{{{subcraft|}}}|<nowiki/>
{{#if:{{{subcraft|}}}|<nowiki/>
:{{Craft|{{{subcraft}}}|{{{subcraft cap}}}}}}}
:{{Craft|{{{subcraft}}}|{{{subcraft cap}}}}}}}
Line 11: Line 30:
|
|
[[{{{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|}}}|&nbsp;x&nbsp;{{{ingredient quantity}}}}}<!--
<ul><li>[[{{{ingredient}}}]]{{#if:{{{ingredient quantity|}}}|&nbsp;x&nbsp;{{{ingredient quantity}}}}}</li><!--
--></li>{{#if:{{{ingredient 2|}}}|<li>[[{{{ingredient 2}}}]]</li>{{#if:{{{ingredient 2 quantity|}}}|&nbsp;x&nbsp;{{{ingredient 2 quantity}}}}}}}<!--
-->{{#if:{{{ingredient 2|}}}|<li>[[{{{ingredient 2}}}]]{{#if:{{{ingredient 2 quantity|}}}|&nbsp;x&nbsp;{{{ingredient 2 quantity}}}}}</li><!--
-->{{#if:{{{ingredient 3|}}}|<li>[[{{{ingredient 3}}}]]</li>{{#if:{{{ingredient 3 quantity|}}}|&nbsp;x&nbsp;{{{ingredient 3 quantity}}}}}}}<!--
-->{{#if:{{{ingredient 3|}}}|<li>[[{{{ingredient 3}}}]]{{#if:{{{ingredient 3 quantity|}}}|&nbsp;x&nbsp;{{{ingredient 3 quantity}}}}}</li><!--
-->{{#if:{{{ingredient 4|}}}|<li>[[{{{ingredient 4}}}]]</li>{{#if:{{{ingredient 4 quantity|}}}|&nbsp;x&nbsp;{{{ingredient 4 quantity}}}}}}}<!--
-->{{#if:{{{ingredient 4|}}}|<li>[[{{{ingredient 4}}}]]{{#if:{{{ingredient 4 quantity|}}}|&nbsp;x&nbsp;{{{ingredient 4 quantity}}}}}</li><!--
-->{{#if:{{{ingredient 5|}}}|<li>[[{{{ingredient 5}}}]]</li>{{#if:{{{ingredient 5 quantity|}}}|&nbsp;x&nbsp;{{{ingredient 5 quantity}}}}}}}</ul>
-->{{#if:{{{ingredient 5|}}}|<li>[[{{{ingredient 5}}}]]{{#if:{{{ingredient 5 quantity|}}}|&nbsp;x&nbsp;{{{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|}}}|&nbsp;x&nbsp;{{{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|}}}|&nbsp;x&nbsp;{{{hq yield}}}}}<!--
-->{{#if:{{{hq 2 result|}}}|<br/>HQ2: [[{{{hq 2 result}}}]]{{#if:{{{hq 2 yield|}}}|&nbsp;x&nbsp;{{{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|}}}|&nbsp;x&nbsp;{{{hq 2 yield}}}}}<!--
-->{{#if:{{{hq 3 result|}}}|<br/>HQ3: [[{{{hq 3 result}}}]]{{#if:{{{hq 3 yield|}}}|&nbsp;x&nbsp;{{{hq 3 yield}}}}}<!--
-->{{#if:{{{hq 3 result|}}}{{{hq 3 yield|}}}|<br/>HQ3: [[{{{hq 3 result|{{#ifeq:{{{result}}}|this|%PAGE%{{!}}%TITLE%|{{{result}}}}}}}}]]{{#if:{{{hq 3 yield|}}}|&nbsp;x&nbsp;{{{hq 3 yield}}}}}<!--
-->{{#if:{{{hq 4 result|}}}|<br/>HQ 4:[[{{{hq 4 result}}}]]{{#if:{{{hq 4 yield|}}}|&nbsp;x&nbsp;{{{hq 4 yield}}}}}<!--
-->}}}}|''none''}}
-->}}}}}}}}
</onlyinclude></includeonly>
</onlyinclude></includeonly>
{{#dpl:
{{#dpl:
|category=Alchemy/Amateur
|category=Alchemy/Apprentice
|notcategory=Alchemy/Subcraft
|notcategory=Alchemy/Subcraft
|include={Synthesis Recipe¦RecipeList.dpl}
|include={Synthesis Recipe¦RecipeList.dpl}
|table=class="horizon-table alchemy-table center-col-2 center-col-3",-,Item,Cap,Crystal,Ingredients,HQ
|table=class="horizon-table alchemy-table center-col-2 center-col-3",-,Item,Cap,Crystal,Ingredients,HQ
|tablesortcol=3
|tablesortcol=3<!-- need to use +1 here because the additional linebreak at the beginning of the phantom template that is used to apply classes and styles to the rows somehow counts as a column here -->
}}
}}

Latest revision as of 14:07, 16 September 2024

Item Cap Crystal Ingredients HQ

Prism Powder x 8

36

Light

HQ: Prism Powder x 10
HQ2: Prism Powder x 11
HQ3: Prism Powder x 12

Prism Powder x 6

41

Light

HQ: Prism Powder x 8
HQ2: Prism Powder x 10
HQ3: Prism Powder x 12

Prism Powder x 12

41

Light

none

Firesand x 3

39

Earth

HQ: Firesand x 6
HQ2: Firesand x 9
HQ3: Firesand x 12

Firesand x 2

40

Earth

HQ: Firesand x 4
HQ2: Firesand x 6
HQ3: Firesand x 8

Firesand x 4
Key ItemTrituration

40

Earth

HQ: Firesand x 8
HQ2: Firesand x 12

Firesand x 2

41

Earth

HQ: Firesand x 4
HQ2: Firesand x 6
HQ3: Firesand x 8

Firesand

{{{cap}}}

[[{{{crystal}}}]]

  • [[{{{ingredient}}}]]

none

Bullet x 33

Goldsmithing (18)

41

Fire

HQ: Bullet x 99

Vitriol

42

Water

HQ: Vitriol x 2
HQ2: Vitriol x 3
HQ3: Vitriol x 4

Vitriol

43

Water

HQ: Vitriol x 2
HQ2: Vitriol x 3
HQ3: Vitriol x 4

Vitriol x 3
Key ItemTrituration

43

Water

HQ: Vitriol x 6
HQ2: Vitriol x 9
HQ3: Vitriol x 12

Vitriol

{{{cap}}}

[[{{{crystal}}}]]

  • [[{{{ingredient}}}]]

none

Poison Kukri

42

Water

HQ: Poison Kukri +1

Poison Kukri

{{{cap}}}

[[{{{crystal}}}]]

  • [[{{{ingredient}}}]]

none

Poison Kukri +1

42

Water

HQ: Poison Kukri +1

Poison Kukri +1

{{{cap}}}

[[{{{crystal}}}]]

  • [[{{{ingredient}}}]]

none

Bokuto

42

Water

HQ: Bokuto +1

Bokuto +1

42

Water

HQ: Bokuto +1

Hellfire Axe

42

Earth

HQ: Hellfire Axe

Inferno Axe

42

Earth

HQ: Hellfire Axe

Prominence Sword

42

Earth

none

Poison Katars

43

Water

HQ: Poison Katars +1

Poison Katars +1

43

Water

HQ: Poison Katars +1

Sparkling Hand x 33

Goldsmithing (18)

43

Light

HQ: Sparkling Hand x 66
HQ2: Sparkling Hand x 99

Burning Claymore

44

Earth

HQ: Burning Claymore

Flame Claymore

44

Earth

HQ: Burning Claymore

Prominence Axe

45

Earth

none

Iron Bullet x 33

Smithing (22)

45

Fire

HQ: Iron Bullet x 99

Iron Bullet

{{{cap}}}

[[{{{crystal}}}]]

  • [[{{{ingredient}}}]]

none

Corrosive Dagger

45

Water

HQ: Corrosive Dagger

Corrosive Dagger

45

Lightning

none

Acid Dagger

45

Water

HQ: Corrosive Dagger

Acid Dagger

45

Lightning

none

Lizard Lure

Smithing (9)

46

Fire

HQ: Frog Lure
HQ2: Shrimp Lure
HQ3: Lizard Lure

Frog Lure

Smithing (9)

46

Fire

HQ: Frog Lure
HQ2: Shrimp Lure
HQ3: Lizard Lure

Frog Lure

Goldsmithing (12)

47

Fire

none

Frog Lure

Goldsmithing (Information Needed)

47-48

Fire

none

Frog Lure

46

Lightning

none

Shrimp Lure

Smithing (9)

46

Fire

HQ: Frog Lure
HQ2: this
HQ3: Lizard Lure

Shrimp Lure

Goldsmithing (21)

48

Fire

none

Shrimp Lure

46

Lightning

HQ: Glass Fiber

Worm Lure

Goldsmithing (12)

46

Fire

none

Worm Lure

Smithing (9)

46

Fire

HQ: Frog Lure
HQ2: Shrimp Lure
HQ3: Lizard Lure

Worm Lure

Lightning

HQ: Brass Ingot x 1

Fire Sword

46

Earth

HQ: Flame Sword

Fire Sword

46

Lightning

none

Flame Degen

47

Earth

HQ: Flame Degen +1

Flame Degen

47

Lightning

HQ: Firesand
HQ2: Steel Ingot x 2

Acid Knife

47

Water

HQ: Corrosive Knife

Acid Knife

{{{cap}}}

[[{{{crystal}}}]]

  • [[{{{ingredient}}}]]

none

Corrosive Knife

47

Water

HQ: Corrosive Knife

Corrosive Knife

{{{cap}}}

[[{{{crystal}}}]]

  • [[{{{ingredient}}}]]

none

Flame Degen +1

47

Earth

HQ: Flame Degen +1

Vulcan Claymore

47

Earth

none

Carbon Fishing Rod

49

Light

none

Carbon Fishing Rod

53

Fire

none

Carbon Fishing Rod

53

Lightning

HQ: Carbon Fiber x 2
HQ2: Glass Fiber x 3
HQ3: Glass Fiber x 4

Sacred Sword

49

Light

none

Sacred Sword

49

Lightning

none

Flame Blade

49

Earth

HQ: Flame Blade +1

Flame Blade

49

Lightning

none

Flame Blade +1

49

Earth

HQ: Flame Blade +1

Melt Dagger

49

Water

none

Ether

50

Water

HQ: Ether +1
HQ2: Ether +2
HQ3: Ether +3

Ether +1

50

Water

HQ: Ether +1
HQ2: Ether +2
HQ3: Ether +3

Ether +2

50

Water

HQ: Ether +1
HQ2: Ether +2
HQ3: Ether +3

Ether +3

50

Water

HQ: Ether +1
HQ2: Ether +2
HQ3: Ether +3

Vulcan Degen

50

Earth

none

Vulcan Degen

50

Lightning

none

Melt Knife

50

Water

none