Difference between revisions of "Template:PersonalCollectionIcon"

From Dragalia Lost Wiki
Jump to navigation Jump to search
>Eave
(remove all newlines)
>FlareKyn
 
(5 intermediate revisions by one other user not shown)
Line 20: Line 20:
 
-->{{#switch: {{{1|}}}
 
-->{{#switch: {{{1|}}}
 
|Adventurer=
 
|Adventurer=
   {{#vardefine:bgIcon|{{#cargo_query:tables=Adventurers
+
   {{#invoke:CargoQuery|main
       |where=FullName="{{#titleparts:{{{2}}}}}"
+
      |q?tables=Adventurers
       |fields=CONCAT(Id, ' 0', VariationId, ' r0', {{{Rarity|Rarity}}})
+
       |q?where=FullName="{{#titleparts:{{{2}}}}}"
       |group by=_pageName|no html}}}}<!--
+
       |q?fields=MaxLimitBreakCount,CONCAT(Id, ' 0', VariationId, ' r0', {{{Rarity|Rarity}}})=bgIcon,CONCAT({{{Rarity|Rarity}}})=derivedRarity
 +
       |?groupBy=_pageName
 +
      |template=vardefine}}<!--
 
-->{{#vardefine:overlayStyles|}}<!--
 
-->{{#vardefine:overlayStyles|}}<!--
-->{{#vardefine:MaxLimitBreakCount|{{#cargo_query:tables=Adventurers
 
      |where=FullName="{{#titleparts:{{{2}}}}}"
 
      |fields=MaxLimitBreakCount|group by=_pageName|no html}}}}<!--
 
-->{{#vardefine:derivedRarity|{{{Rarity|{{#cargo_query:tables=Adventurers
 
      |where=FullName="{{#titleparts:{{{2}}}}}"
 
      |fields=Rarity|group by=_pageName|no html}}}}}}}<!--
 
 
-->{{#vardefine:HardMaxNodes|{{#ifexpr:{{#var:MaxLimitBreakCount}} = 5|{{#ifeq:{{{3|}}}|Spiral|70|99}}|50}}}}<!--
 
-->{{#vardefine:HardMaxNodes|{{#ifexpr:{{#var:MaxLimitBreakCount}} = 5|{{#ifeq:{{{3|}}}|Spiral|70|99}}|50}}}}<!--
 
-->{{#vardefine:SoftMaxNodes|{{#ifeq:{{{3|}}}|Spiral|70|{{#expr:{{#var:derivedRarity}}*10}}}}}}<!--
 
-->{{#vardefine:SoftMaxNodes|{{#ifeq:{{{3|}}}|Spiral|70|{{#expr:{{#var:derivedRarity}}*10}}}}}}<!--
Line 49: Line 45:
 
     -->color:{{#var:nodeColor}};display:flex;justify-content:center;font-size:{{#var:Size}}em">[[File:Icon CircleRelease 02.png|x{{#expr:{{#var:Size}}*22}}px|link=]]{{#var:Nodes}}}}
 
     -->color:{{#var:nodeColor}};display:flex;justify-content:center;font-size:{{#var:Size}}em">[[File:Icon CircleRelease 02.png|x{{#expr:{{#var:Size}}*22}}px|link=]]{{#var:Nodes}}}}
 
|Weapon=
 
|Weapon=
   {{#vardefine:bgIcon|{{#cargo_query:tables=Weapons
+
   {{#invoke:CargoQuery|main
       |where=_pageName="{{#titleparts:{{{2}}}}}" OR WeaponName="{{#titleparts:{{{2}}}}}"
+
      |q?tables=Weapons
       |fields=CONCAT(BaseId, ' 01 ', FormId)
+
       |q?where=_pageName="{{#titleparts:{{{2}}}}}" OR WeaponName="{{#titleparts:{{{2}}}}}"
       |group by=_pageName|no html}}}}<!--
+
       |q?fields=CONCAT(BaseId, ' 01 ', FormId)=bgIcon,Rarity=derivedRarity
 +
       |?groupBy=_pageName
 +
      |template=vardefine}}<!--
 
-->{{#vardefine:overlayStyles|border-radius: 0 0 6% 6%/39%;}}<!--
 
-->{{#vardefine:overlayStyles|border-radius: 0 0 6% 6%/39%;}}<!--
-->{{#vardefine:derivedRarity|{{#cargo_query:tables=Weapons
 
      |where=_pageName="{{#titleparts:{{{2}}}}}" OR WeaponName="{{#titleparts:{{{2}}}}}"
 
      |fields=Rarity|group by=_pageName|no html}}}}<!--
 
 
-->{{#switch: {{#var:derivedRarity}}
 
-->{{#switch: {{#var:derivedRarity}}
 
     |6={{#vardefine:HardMaxLevel|200}} {{#vardefine:SoftMaxLevel|{{#expr:100+({{#var:Unbind}}*25)}}}}
 
     |6={{#vardefine:HardMaxLevel|200}} {{#vardefine:SoftMaxLevel|{{#expr:100+({{#var:Unbind}}*25)}}}}
Line 65: Line 60:
 
   }}
 
   }}
 
|Wyrmprint=
 
|Wyrmprint=
   {{#vardefine:bgIcon|{{#cargo_query:tables=Wyrmprints
+
   {{#invoke:CargoQuery|main
       |where=_pageName="{{#titleparts:{{{2}}}}}" OR Name="{{#titleparts:{{{2}}}}}"
+
      |q?tables=Wyrmprints
       |fields=CONCAT(BaseId, ' 0{{#ifexpr:{{#var:Unbind}}>1|2|1}}')
+
       |q?where=_pageName="{{#titleparts:{{{2}}}}}" OR Name="{{#titleparts:{{{2}}}}}"
       |group by=_pageName|no html}}}}<!--
+
       |q?fields=CONCAT(BaseId, ' 0{{#ifexpr:{{#var:Unbind}}>1|2|1}}')=bgIcon,Rarity=derivedRarity
 +
       |?groupBy=_pageName
 +
      |template=vardefine}}<!--
 
-->{{#vardefine:overlayStyles|border-radius: 0 0 6% 6%/39%;}}<!--
 
-->{{#vardefine:overlayStyles|border-radius: 0 0 6% 6%/39%;}}<!--
-->{{#vardefine:derivedRarity|{{#cargo_query:tables=Wyrmprints
 
      |where=_pageName="{{#titleparts:{{{2}}}}}" OR Name="{{#titleparts:{{{2}}}}}"
 
      |fields=Rarity|group by=_pageName|no html}}}}<!--
 
 
-->{{#switch: {{#var:derivedRarity}}
 
-->{{#switch: {{#var:derivedRarity}}
 
     |5={{#vardefine:HardMaxLevel|100}} {{#vardefine:SoftMaxLevel|{{#expr:40+({{#var:Unbind}}*15)}}}}
 
     |5={{#vardefine:HardMaxLevel|100}} {{#vardefine:SoftMaxLevel|{{#expr:40+({{#var:Unbind}}*15)}}}}
Line 80: Line 74:
 
   }}
 
   }}
 
|Dragon=
 
|Dragon=
   {{#vardefine:bgIcon|{{#cargo_query:tables=Dragons
+
   {{#invoke:CargoQuery|main
       |where=_pageName="{{#titleparts:{{{2}}}}}" OR FullName="{{#titleparts:{{{2}}}}}"
+
      |q?tables=Dragons
       |fields=CONCAT(BaseId, ' 01')|group by=_pageName|no html}}}}<!--
+
       |q?where=_pageName="{{#titleparts:{{{2}}}}}" OR FullName="{{#titleparts:{{{2}}}}}"
 +
       |q?fields=CONCAT(BaseId, ' 0', VariationId)=bgIcon,Rarity=derivedRarity
 +
      |?groupBy=_pageName
 +
      |template=vardefine}}<!--
 
-->{{#vardefine:overlayStyles|
 
-->{{#vardefine:overlayStyles|
 
       clip-path:polygon(0 0, 100% 0, 100% 75%, 95.5% 75%, 95.5% 100%, 4% 100%, 4% 75%, 0 75%);
 
       clip-path:polygon(0 0, 100% 0, 100% 75%, 95.5% 75%, 95.5% 100%, 4% 100%, 4% 75%, 0 75%);
 
       height:13.75‬%;}}<!--
 
       height:13.75‬%;}}<!--
-->{{#vardefine:derivedRarity|{{#cargo_query:tables=Dragons
 
      |where=_pageName="{{#titleparts:{{{2}}}}}" OR FullName="{{#titleparts:{{{2}}}}}"
 
      |fields=Rarity|group by=_pageName|no html}}}}<!--
 
 
-->{{#switch: {{#var:derivedRarity}}
 
-->{{#switch: {{#var:derivedRarity}}
 
     |5={{#vardefine:HardMaxLevel|100}} {{#vardefine:SoftMaxLevel|{{#expr:40+({{#var:Unbind}}*15)}}}}
 
     |5={{#vardefine:HardMaxLevel|100}} {{#vardefine:SoftMaxLevel|{{#expr:40+({{#var:Unbind}}*15)}}}}

Latest revision as of 04:39, 5 May 2020

50px Documentation

Details

A template to create icons for personal collections. Still a work in progress, but it's usable as it is.

Text will be colored like how it is in game.
Level and Nodes: Blue if hard capped, orange if soft capped, white otherwise.
Augments: Blue if capped, orange otherwise.

Examples

{{PersonalCollectionIcon|Adventurer|Elisanne}}
Lua error: Error: Table Adventurers not found..
80px
Lv. Expression error: Unexpected < operator.
Icon CircleRelease 02.pngExpression error: Unexpected < operator.
{{PersonalCollectionIcon|Adventurer|Laxi|Rarity=5|Level=80|Nodes=50|Augments=3}}
Lua error: Error: Table Adventurers not found..
80px
Lv. Expression error: Unexpected < operator.
Icon CircleRelease 02.pngExpression error: Unexpected < operator.
+3
{{PersonalCollectionIcon|Adventurer|Cleo|Rarity=5|Level=80|Nodes=50|Augments=18|Size=Normal}}
Lua error: Error: Table Adventurers not found..
160px
Lv. Expression error: Unexpected < operator.
Icon CircleRelease 02.pngExpression error: Unexpected < operator.
+18
{{PersonalCollectionIcon|Adventurer|Su Fang|Rarity=5|Level=80|Nodes=50|Spiral|Size=Big}}
Lua error: Error: Table Adventurers not found..
240px
Lv. -1
Icon CircleRelease 02.png50
{{PersonalCollectionIcon|Adventurer|The Prince|Rarity=5|Level=95|Nodes=64|Spiral|Augments=200|Size=Giant}}
Lua error: Error: Table Adventurers not found..
320px
Lv. -1
Icon CircleRelease 02.png64
+200
{{PersonalCollectionIcon|Weapon|Absolute Crimson|Level=95|Unbind=3|Augments=52|Size=Large}}
Lua error: Error: Table Weapons not found..
240px
Lv. -1
3 Unbind.png
+52
{{PersonalCollectionIcon|Wyrmprint|Valiant Crown|Level=9|Unbind=1|Augments=1|Size=Medium}}
Lua error: Error: Table Wyrmprints not found..
160px
Lv. -1
1 Unbind.png
+1
{{PersonalCollectionIcon|Wyrmprint|Valiant Crown|Level=100|Unbind=4|Augments=122}}
Lua error: Error: Table Wyrmprints not found..
80px
Lv. -1
4 Unbind.png
+122
{{PersonalCollectionIcon|Dragon|Cerberus|Level=100|Unbind=4|Augments=200}}
Lua error: Error: Table Dragons not found..
80px
Lv. -1
4 Unbind.png
+200