Difference between revisions of "Template:AbilityDisplay"
Jump to navigation
Jump to search
[[
[[
>Canim44 (#css -> Widget:css) |
>Eave m (whoops) |
||
| (32 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
| − | <noinclude>{{doc}}[[Category:Templates]]</noinclude><includeonly><!-- | + | <noinclude>{{doc}}[[Category:Templates]]</noinclude><includeonly>{{#widget:Template/AbilityDisplay/css}}<!-- |
| − | + | Code to determine which table we want to use | |
| − | + | -->{{#if:{{{isCoability|}}} | {{#vardefine:table|CoAbilities}} | {{#vardefine:table|Abilities}} }}<!-- | |
| − | -->{{#if:{{{isCoability|}}} | {{#vardefine:table|CoAbilities}} | {{#vardefine:table|Abilities}} }}<!-- | + | Code to determine how many levels this ability has |
| − | |||
| − | |||
-->{{#vardefine:level | -->{{#vardefine:level | ||
| − | |{{#ifexpr: {{{Lv5|}}} |5 | + | |{{#ifexpr: {{{Lv5|}}} |5 |
| − | + | |{{#ifexpr: {{{Lv4|}}} |4 | |
| − | + | |{{#ifexpr: {{{Lv3|}}} |3 | |
| − | + | |{{#ifexpr: {{{Lv2|}}} |2 | |
| − | + | |{{#ifexpr: {{{Lv1|}}} |1 |}} | |
| − | + | }} | |
| + | }} | ||
| + | }} | ||
}} | }} | ||
| − | + | }}<!-- Table Display Code | |
| − | + | -- Display Ability Cap for Wyrmprints | |
| − | + | -->{{#if:{{{DisplayCap|}}} | |
| − | + | |<div class="ability-table"> | |
| − | -- | + | <div class="ability-header" style="position:relative;"> |
| − | {{#if:{{{DisplayCap|}}}| | + | {{AbilityDisplayHeader|icon={{#cargo_query:tables={{#var:table}}|fields=AbilityIconName=icon|where=Id='{{{Lv{{#var:level}}|}}}'|group by=_pageName|named args=yes|limit=1|more results text=|no html}}|name={{#cargo_query:tables={{#var:table}}|fields=GenericName=name|where=Id='{{{Lv{{#var:level}}|}}}'|group by=_pageName|named args=yes|limit=1|more results text=|no html|default={{{Lv{{#var:level}}|}}}}}|event={{{event|0}}}}} |
| − | + | </div> | |
| − | + | <div style="padding:12px 12px 6px;border:1px solid skyblue;border-top:none;"> | |
| − | + | {{tab/start|default={{#var:level}} }} | |
| − | + | {{tab/header|Lv1}} | |
| − | {{ | + | {{#cargo_query:tables={{#var:table}},AbilityLimitedGroup|join on={{#var:table}}.AbilityLimitedGroupId1=AbilityLimitedGroup.Id|fields=Details,AbilityLimitedText=,PartyPowerWeight=Might|where={{#var:table}}.Id='{{{Lv1|}}}'|default=N/A|format=list}}<!-- |
| − | + | -->{{#ifexpr: {{#var:level}} >= 2 | <nowiki/> | |
| − | / | + | {{tab/header|Lv2}} |
| − | + | {{#cargo_query:tables={{#var:table}},AbilityLimitedGroup|join on={{#var:table}}.AbilityLimitedGroupId1=AbilityLimitedGroup.Id|fields=Details,AbilityLimitedText=,PartyPowerWeight=Might|where={{#var:table}}.Id='{{{Lv2|}}}'|default=N/A|format=list}} | |
| − | {{#ifexpr: {{#var:level}} >= 2| | + | }}{{#ifexpr: {{#var:level}} >= 3 | <nowiki/> |
| − | {{ | + | {{tab/header|Lv3}} |
| − | + | {{#cargo_query:tables={{#var:table}},AbilityLimitedGroup|join on={{#var:table}}.AbilityLimitedGroupId1=AbilityLimitedGroup.Id|fields=Details,AbilityLimitedText=,PartyPowerWeight=Might|where={{#var:table}}.Id='{{{Lv3|}}}'|default=N/A|format=list}} | |
| − | + | }}{{#ifexpr: {{#var:level}} >= 4 | <nowiki/> | |
| − | {{#ifexpr: {{#var:level}} >= 3| | + | {{tab/header|Lv4}} |
| − | {{ | + | {{#cargo_query:tables={{#var:table}},AbilityLimitedGroup|join on={{#var:table}}.AbilityLimitedGroupId1=AbilityLimitedGroup.Id|fields=Details,AbilityLimitedText=,PartyPowerWeight=Might|where={{#var:table}}.Id='{{{Lv4|}}}'|default=N/A|format=list}} |
| − | + | }}{{#ifexpr: {{#var:level}} >= 5 | <nowiki/> | |
| − | + | {{tab/header|Lv5}} | |
| − | {{#ifexpr: {{#var:level}} >= 4| | + | {{#cargo_query:tables={{#var:table}},AbilityLimitedGroup|join on={{#var:table}}.AbilityLimitedGroupId1=AbilityLimitedGroup.Id|fields=Details,AbilityLimitedText=,PartyPowerWeight=Might|where={{#var:table}}.Id='{{{Lv5|}}}'|default=N/A|format=list}} |
| − | {{ | ||
| − | |||
| − | |||
| − | {{#ifexpr: {{#var:level}} >= 5| | ||
| − | {{ | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
}} | }} | ||
| − | {{# | + | {{tab/end}} |
| − | {{ | + | </div> |
| − | Lv2 | + | </div> |
| − | |q?tables={{#var:table}} | + | |<div class="ability-table" style="padding-top:40px"> |
| − | |q?fields=GenericName=Name,AbilityIconName=Icon,Details,PartyPowerWeight=Might,CONCAT('{{{event|0}}}')=Event | + | <div style="padding:12px 12px 6px;border:1px solid skyblue;border-top:none;"> |
| − | |q?where=Id='{{{Lv2|}}}' | + | {{tab/start|default={{#var:level}} }} |
| − | |q?groupBy=_pageName | + | {{tab/header|Lv1}} |
| − | |default=N/A | + | {{#invoke:CargoQuery|main|q?tables={{#var:table}} |
| − | |template=AbilityDisplayTab | + | |q?fields=GenericName=Name,AbilityIconName=Icon,Details,PartyPowerWeight=Might,CONCAT('{{{event|0}}}')=Event |
| − | }} | + | |q?where=Id='{{{Lv1|}}}'|q?groupBy=_pageName|default=N/A|template=AbilityDisplayTab}}<!-- |
| − | + | -->{{#ifexpr: {{#var:level}} >= 2 | <nowiki/> | |
| − | {{#ifexpr: {{#var:level}} >= 3| | + | {{tab/header|Lv2}} |
| − | {{ | + | {{#invoke:CargoQuery|main|q?tables={{#var:table}} |
| − | + | |q?fields=GenericName=Name,AbilityIconName=Icon,Details,PartyPowerWeight=Might,CONCAT('{{{event|0}}}')=Event | |
| − | |q?tables={{#var:table}} | + | |q?where=Id='{{{Lv2|}}}'|q?groupBy=_pageName|default=N/A|template=AbilityDisplayTab}} |
| − | |q?fields=GenericName=Name,AbilityIconName=Icon,Details,PartyPowerWeight=Might,CONCAT('{{{event|0}}}')=Event | + | }}{{#ifexpr: {{#var:level}} >= 3 | <nowiki/> |
| − | |q?where=Id='{{{Lv3|}}}' | + | {{tab/header|Lv3}} |
| − | |q?groupBy=_pageName | + | {{#invoke:CargoQuery|main|q?tables={{#var:table}} |
| − | |default=N/A | + | |q?fields=GenericName=Name,AbilityIconName=Icon,Details,PartyPowerWeight=Might,CONCAT('{{{event|0}}}')=Event |
| − | |template=AbilityDisplayTab | + | |q?where=Id='{{{Lv3|}}}'|q?groupBy=_pageName|default=N/A|template=AbilityDisplayTab}} |
| − | }} | + | }}{{#ifexpr: {{#var:level}} >= 4 | <nowiki/> |
| − | + | {{tab/header|Lv4}} | |
| − | {{#ifexpr: {{#var:level}} >= 4| | + | {{#invoke:CargoQuery|main|q?tables={{#var:table}} |
| − | {{ | + | |q?fields=GenericName=Name,AbilityIconName=Icon,Details,PartyPowerWeight=Might,CONCAT('{{{event|0}}}')=Event |
| − | + | |q?where=Id='{{{Lv4|}}}'|q?groupBy=_pageName|default=N/A|template=AbilityDisplayTab}} | |
| − | |q?tables={{#var:table}} | + | }}{{#ifexpr: {{#var:level}} >= 5 | <nowiki/> |
| − | |q?fields=GenericName=Name,AbilityIconName=Icon,Details,PartyPowerWeight=Might,CONCAT('{{{event|0}}}')=Event | + | {{tab/header|Lv5}} |
| − | |q?where=Id='{{{Lv4|}}}' | + | {{#invoke:CargoQuery|main|q?tables={{#var:table}} |
| − | |q?groupBy=_pageName | + | |q?fields=GenericName=Name,AbilityIconName=Icon,Details,PartyPowerWeight=Might,CONCAT('{{{event|0}}}')=Event |
| − | |default=N/A | + | |q?where=Id='{{{Lv5|}}}'|q?groupBy=_pageName|default=N/A|template=AbilityDisplayTab}} |
| − | |template=AbilityDisplayTab | + | }} |
| − | }} | + | {{tab/end}} |
| − | + | </div> | |
| − | {{#ifexpr: {{#var:level}} >= 5| | + | </div> |
| − | {{ | + | }}</includeonly> |
| − | |||
| − | |q?tables={{#var:table}} | ||
| − | |q?fields=GenericName=Name,AbilityIconName=Icon,Details,PartyPowerWeight=Might,CONCAT('{{{event|0}}}')=Event | ||
| − | |q?where=Id='{{{Lv5|}}}' | ||
| − | |q?groupBy=_pageName | ||
| − | |default=N/A | ||
| − | |template=AbilityDisplayTab | ||
| − | }} | ||
| − | |||
| − | }} | ||
| − | } | ||
| − | |||
Latest revision as of 06:29, 15 April 2020
Example
{{AbilityDisplay|isCoability=1|Lv1=101050003|Lv2=101050004|Lv3=101050005|Lv4=101050007|Lv5=101050010}}
{{AbilityDisplay|Lv1=110060004|Lv2=110060005|Lv3=110060006|DisplayCap=1}}
{{AbilityDisplay|Lv1=320000905|Lv2=320000906|DisplayCap=1}} <-- doesn't have a cap, shouldn't display anything
Lv1
Lua error: Error: Table CoAbilities not found..
Lv2
Lua error: Error: Table CoAbilities not found..
Lv3
Lua error: Error: Table CoAbilities not found..
Lv4
Lua error: Error: Table CoAbilities not found..
Lv5
Lua error: Error: Table CoAbilities not found..
Error: Table Abilities not found.
]]
Lv1
Error: Table Abilities not found.
Lv2
Error: Table Abilities not found.
Lv3
Error: Table Abilities not found.
Error: Table Abilities not found.
]]
Lv1
Error: Table Abilities not found.
Lv2
Error: Table Abilities not found.
Mana Spiral Update
Abilities that change family midway (Cassandra's)
{{AbilityDisplay|Lv1=110120003|Lv2=110120004|Lv3=721}}
{{AbilityDisplay|Lv1=110020404|Lv2=110020406|Lv3=682}}
Lv1
Lua error: Error: Table Abilities not found..
Lv2
Lua error: Error: Table Abilities not found..
Lv3
Lua error: Error: Table Abilities not found..
Lv1
Lua error: Error: Table Abilities not found..
Lv2
Lua error: Error: Table Abilities not found..
Lv3
Lua error: Error: Table Abilities not found..
Long Names
{{AbilityDisplay|Lv1=584|}}
{{AbilityDisplay|Lv1=585}}
{{AbilityDisplay|Lv1=584|Lv2=585}}
Lv1
Lua error: Error: Table Abilities not found..
Lv1
Lua error: Error: Table Abilities not found..
Lv1
Lua error: Error: Table Abilities not found..
Lv2
Lua error: Error: Table Abilities not found..