Difference between revisions of "Template:SkillText"

From Dragalia Lost Wiki
Jump to navigation Jump to search
>Mornsta-gpuser
>Eave
(allow matching for multiple skill IDs)
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>{{doc}}[[Category:Templates]]</noinclude><includeonly>{{Icon|Skill|{{{Name|}}}|size=24px}}'''[[{{{Name|}}}]] Lv. {{{Level|}}}''': {{#cargo_query:tables=Skills|where=Name="{{{Name|}}}"|fields=CONCAT('',Description{{{Level|}}},' [',{{#switch:{{{Level}}}|1=Sp|2=SPLv2|Sp}},' SP]')|group by=_pageName}}</includeonly>
+
<noinclude>{{doc}}[[Category:Templates]]</noinclude><includeonly><!--
 +
-->{{#invoke:CargoQuery|main
 +
  |q?tables=Skills
 +
  |q?where={{#if: {{{Name|}}} | Name="{{{Name|}}}" | SkillId LIKE "%{{{Id}}}%" }}
 +
  |q?fields=_pageName=Link,SkillId,Description{{{Level|}}}=Description,{{#switch:{{{Level}}}|1=Sp|2=SPLv2|Sp}}=Sp
 +
  |q?groupBy=_pageName
 +
  |template=vardefine}}<!--
 +
-->{{Icon|Skill|{{#var:SkillId}}|size=24px}}'''[[{{#var:Link}}]] Lv. {{{Level|}}}''': {{#var:Description}} [{{#var:Sp}} SP]</includeonly>

Latest revision as of 02:24, 26 May 2020

50px Documentation

Example

{{SkillText
|Name=Pumpkin Prank
|Level=1}}

{{SkillText
|Name=Pumpkin Prank
|Level=2}}

{{SkillText
|Name=Akashic Repose
|Level=1}}

{{SkillText
|Id=301603011
|Level=1}}
Lua error: Error: Table Skills not found..
Error: Table Skills not found.
[[]] Lv. 1: [ SP] Lua error: Error: Table Skills not found..
Error: Table Skills not found.
[[]] Lv. 2: [ SP] Lua error: Error: Table Skills not found..
Error: Table Skills not found.
[[]] Lv. 1: [ SP] Lua error: Error: Table Skills not found..
Error: Table Skills not found.
[[]] Lv. 1: [ SP]