Difference between revisions of "Template:Weapon Tooltip"

From Dragalia Lost Wiki
Jump to navigation Jump to search
>Eave
(first attempt at creating this template. using raw table instead of wikitext to avoid escaping due to somewhat complex if expressions)
>Caledor92
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>{{doc}}[[Category:Templates]]</noinclude><includeonly><table class="wikitable">
+
<noinclude>{{doc}}[[Category:Tooltip Templates]]</noinclude><includeonly>{| class="wikitable" style="width: 100%;"
<caption style="white-space:nowrap;">{{{Rarity|}}} {{InlineIcon|Icon Rarity|{{{Rarity|}}}}}{{InlineIcon|Icon Element|{{{Element|}}}}}{{InlineIcon|Icon Weapon|{{{Type|}}}}} {{{Name|}}}<br/>HP: {{{MaxHp|}}} Str: {{{MaxAtk|}}}</caption>
+
|+<div style="white-space:nowrap;">{{{Rarity|}}} {{InlineIcon|Icon Rarity|{{{Rarity|}}}}}{{InlineIcon|Icon Element|{{{Element|}}}}}{{InlineIcon|Icon Weapon|{{{Type|}}}}} {{{Name|}}}<br/>HP: {{{MaxHp|}}} Strength: {{{MaxAtk|}}}</div>
{{#ifexpr: {{{SkillName|}}} |
+
! Skills || Abilities
<tr><th>Skills</th></tr>
+
|-
<tr><td style="white-space:nowrap;">{{Icon|Skill|{{{SkillName|}}}|size=32px}} [[{{{SkillName|}}}]]</td></tr>
+
|<div style="white-space:nowrap;">{{#if:{{{SkillName|}}}|{{Icon|Skill|{{{SkillName|}}}|size=32px}} [[{{{SkillName|}}}]]|None}}</div>
| }}
+
|{{#ifexpr:{{{Abilities11|}}}|{{#cargo_query:tables=Abilities|fields=CONCAT('<div style="white-space:nowrap;">[[File:', AbilityIconName, '.png|32px|link=', _pageName, ']] [[', _pageName, '|', Name, ']]</div>')|where=Id={{{Abilities11|0}}} OR Id={{{Abilities21|0}}}|default=|order by=_rowID|delimiter=}}|None}}
{{#ifexpr: {{{Abilities11|}}} |
+
|}</includeonly>
<tr><th>Abilities</th></tr>
 
<tr><td>{{#cargo_query:tables=Abilities|fields=CONCAT('<div style="white-space:nowrap;">[[File:', AbilityIconName, '.png|32px|link=', _pageName, ']] [[', _pageName, ']]</div>')|where=Id={{{Abilities11|0}}} OR Id={{{Abilities21|0}}}|default=|order by=_pageName|delimiter=}}</td></tr>
 
| }}
 
</table></includeonly>
 

Latest revision as of 09:37, 26 November 2019

50px Documentation

Usage

Typically used via Template:TooltipIcon of type 'Weapon' instead of invoking directly.

{{TooltipIcon|Weapon|Fólkvangr}}
{{TooltipIcon|Weapon|Ocean Lord}}
{{TooltipIcon|Weapon|Tornado Tail}}
{{TooltipIcon|Weapon|Crimson}}
{{TooltipIcon|Weapon|Levatein}}
{{TooltipIcon|Weapon|Vulcanrage}}
{{TooltipIcon|Weapon|Latchkey}}

Example

Unknown.png
Error: Table Weapons not found.
Unknown.png
Error: Table Weapons not found.
Unknown.png
Error: Table Weapons not found.
Unknown.png
Error: Table Weapons not found.
Unknown.png
Error: Table Weapons not found.
Unknown.png
Error: Table Weapons not found.
Unknown.png
Error: Table Weapons not found.