Difference between revisions of "Template:Material"

From Dragalia Lost Wiki
Jump to navigation Jump to search
>Seraii
>Eave
m
 
(24 intermediate revisions by 2 users not shown)
Line 46: Line 46:
 
<div class="panel-heading">{{InlineIcon|Icon Element|{{{ElementalType|}}}}} {{{Name|{{PAGENAME}}}}}</div>
 
<div class="panel-heading">{{InlineIcon|Icon Element|{{{ElementalType|}}}}} {{{Name|{{PAGENAME}}}}}</div>
 
<div class="panel-body" style="display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center">
 
<div class="panel-body" style="display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center">
<div style="width:350px;text-align:center">{{#ifexist: File:{{{Id|}}}.png | [[File:{{{Id|}}}.png|160px]] | [[File:Unknown.png|160px|link=File:{{{Id|}}}.png]] }}</div>
+
<div style="width:350px;text-align:center">{{#vardefine:icon|{{#ifexist: File:{{{Id|}}}.png | [[File:{{{Id|}}}.png|160px]] | [[File:Unknown.png|160px|link=File:{{{Id|}}}.png]] }}}}<!--
 +
If the (Small) version of the icon exists, show it in a tabber, otherwise just show the main icon
 +
-->{{exists|File:{{{Id|}}} (Small).png |
 +
then={{#tag:tabber|
 +
Icon= {{#var:icon}}
 +
{{!}}-{{!}}Small Icon= [[File:{{{Id|}}} (Small).png]] }} |
 +
else={{#var:icon}} }}</div>
 
<div style="flex-grow:1;text-align:center">
 
<div style="flex-grow:1;text-align:center">
 
<p style="width:300px;margin:15px auto;border-bottom:1px solid;margin-bottom:15px;font-size:1.2em;font-variant-caps: small-caps;font-weight:bold">Description</p>
 
<p style="width:300px;margin:15px auto;border-bottom:1px solid;margin-bottom:15px;font-size:1.2em;font-variant-caps: small-caps;font-weight:bold">Description</p>
Line 64: Line 70:
 
{{{Obtain|}}}
 
{{{Obtain|}}}
 
</div>
 
</div>
{{#ifeq:{{#cargo_query:tables=Weapons|fields=_pageName|where=CraftMaterial1="{{{Name|}}}" OR CraftMaterial2="{{{Name|}}}" OR CraftMaterial3="{{{Name|}}}" OR CraftMaterial4="{{{Name|}}}" OR CraftMaterial5="{{{Name|}}}"|group by=_pageName|default=0}}|0||<p style="margin:15px auto;border-bottom:1px solid;margin-bottom:15px;font-size:1.2em;font-variant-caps: small-caps;font-weight:bold">Craft Material For</p>
+
{{#ifeq: {{{MoveQuest1|}}} | 0 | |
 +
<p style="margin:15px auto;border-bottom:1px solid;margin-bottom:15px;font-size:1.2em;font-variant-caps: small-caps;font-weight:bold">Drop Locations</p>
 +
{{#cargo_query:tables=Quests
 +
  |fields=_pageName
 +
  |where=Id IN ({{{MoveQuest1}}},{{{MoveQuest2|0}}},{{{MoveQuest3|0}}},{{{MoveQuest4|0}}},{{{MoveQuest5|0}}})
 +
  |group by=_pageName|format=ul|default=}}
 +
}}<!--
 +
 
 +
-->{{#ifeq:{{#cargo_query:tables=Weapons|fields=_pageName|where=CraftMaterial1="{{{Name|}}}" OR CraftMaterial2="{{{Name|}}}" OR CraftMaterial3="{{{Name|}}}" OR CraftMaterial4="{{{Name|}}}" OR CraftMaterial5="{{{Name|}}}"|group by=_pageName|default=0}}|0||<p style="margin:15px auto;border-bottom:1px solid;margin-bottom:15px;font-size:1.2em;font-variant-caps: small-caps;font-weight:bold">Craft Material For</p>
 
<div style="max-height: 600px; overflow: auto;">
 
<div style="max-height: 600px; overflow: auto;">
{{#cargo_query:tables=Weapons|fields=CONCAT('[[File:',BaseId,' 01 ',FormId,'.png|24px|link=',_pageName,']] [[',_pageName,']]')|where=CraftMaterial1="{{{Name|}}}" OR CraftMaterial2="{{{Name|}}}" OR CraftMaterial3="{{{Name|}}}" OR CraftMaterial4="{{{Name|}}}" OR CraftMaterial5="{{{Name|}}}"|format=ul|group by=_pageName|default=:-|order by= ElementalTypeId ASC, TypeId ASC, Rarity DESC, Id DESC, WeaponName ASC}}
+
{{#cargo_query:tables=Weapons|fields=CONCAT('[[File:',BaseId,' 01 ',FormId,'.png|24px|link=',_pageName,']] [[',_pageName,'|',WeaponName,']]')|where=CraftMaterial1="{{{Name|}}}" OR CraftMaterial2="{{{Name|}}}" OR CraftMaterial3="{{{Name|}}}" OR CraftMaterial4="{{{Name|}}}" OR CraftMaterial5="{{{Name|}}}"|format=ul|group by=_pageName|default=:-|order by= ElementalTypeId ASC, TypeId ASC, Rarity DESC, Id DESC, WeaponName ASC}}
 
</div>}}
 
</div>}}
 
</div>
 
</div>
 
</div><!--
 
</div><!--
-->[[Category:Items]][[Category:Materials]]</includeonly>
+
-->{{#ifexist: Template:{{{Name}}} ||[[Category:Materials without Quick Icon]]}}{{#ifexist: Template:{{{Name}}}- ||[[Category:Materials without Quick Icon]]}}[[Category:Items]][[Category:Materials]]</includeonly>

Latest revision as of 06:30, 28 July 2020

50px Documentation

Usage

{{Material
|Id=
|Name=
|Description=
|Rarity=
|QuestEventId=
|Category=
|SortId=
|Obtain=
|Usage=
|MoveQuest1=
|MoveQuest2=
|MoveQuest3=
|MoveQuest4=
|MoveQuest5=
|PouchRarity=
|Exp=
|MaterialType=
}}

This template defines the table "Materials". This table has not been created yet.