Difference between revisions of "Template:PersonalCollectionIcon"

From Dragalia Lost Wiki
Jump to navigation Jump to search
>FlareKyn
>Boblers
(wyrmprint text color logic. adventurer and weapon level temporarily broken, will fix later)
Line 13: Line 13:
 
{{#vardefine:c1|{{#cargo_query:tables=Dragons|where=_pageName="{{#titleparts:{{{2}}}}}" OR FullName="{{#titleparts:{{{2}}}}}"|fields=CONCAT('[[File:', BaseId, ' 01.png|link=',{{{link|_pageName}}},']]')|group by=_pageName}}}}
 
{{#vardefine:c1|{{#cargo_query:tables=Dragons|where=_pageName="{{#titleparts:{{{2}}}}}" OR FullName="{{#titleparts:{{{2}}}}}"|fields=CONCAT('[[File:', BaseId, ' 01.png|link=',{{{link|_pageName}}},']]')|group by=_pageName}}}}
 
{{#vardefine:c5|[[File:{{{Unbind|}}} Unbind.png]]}}
 
{{#vardefine:c5|[[File:{{{Unbind|}}} Unbind.png]]}}
 +
}}<!--
 +
 +
-->{{#switch: {{{1|}}}
 +
|Adventurer=
 +
|Weapon=
 +
|Wyrmprint=
 +
{{#vardefine:derivedRarity|{{#cargo_query:tables=Wyrmprints|where=_pageName="{{#titleparts:{{{2}}}}}" OR Name="{{#titleparts:{{{2}}}}}"|fields=Rarity|group by=_pageName|no html}}}}
 +
{{#switch: {{#var:derivedRarity}}
 +
|5={{#vardefine:HardMaxLevel|100}} {{#vardefine:SoftMaxLevel|40 + ({{{Unbind|}}} * 15)}}
 +
|4={{#vardefine:HardMaxLevel|80}} {{#vardefine:SoftMaxLevel|{{#ifexpr:{{{Unbind|}}} < 2| 30 + ({{{Unbind|}}} * 10) | 30 + 20 + (({{{Unbind|}}}-2) * 15)}}}}
 +
|3={{#vardefine:HardMaxLevel|60}} {{#vardefine:SoftMaxLevel|20 + ({{{Unbind|}}} * 10)}}
 +
|2={{#vardefine:HardMaxLevel|30}} {{#vardefine:SoftMaxLevel|10 + ({{{Unbind|}}} * 5)}}
 +
}}
 +
|Dragon=
 +
}}<!--
 +
 +
-->{{#ifexpr: {{{Level|}}} = {{#var:HardMaxLevel}}|{{#vardefine:textColor|#36f2f1}}
 +
|{{#ifexpr: {{{Level|}}} = {{#var:SoftMaxLevel}}|{{#vardefine:textColor|#f8c933}}
 +
|{{#vardefine:textColor|#ffffff}}
 +
}}
 
}}<!--
 
}}<!--
  
Line 41: Line 61:
 
| x3={{#ifeq:{{{1|}}}|Adventurer|97|95}}
 
| x3={{#ifeq:{{{1|}}}|Adventurer|97|95}}
 
| y3=127
 
| y3=127
| c4=<p style="opacity: 1; color: #ffffff; font-weight:bold">Lv. {{{Level|}}}</p>
+
| c4=<p style="opacity: 1; color: {{#var:textColor}}; font-weight:bold">Lv. {{{Level|}}}</p>
 
| x4=22
 
| x4=22
 
| y4=121
 
| y4=121

Revision as of 04:57, 8 April 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}}
Expression error: Unexpected = operator.

Icon CircleRelease 02.png

Lv.

<p style="opacity: 1; color: Expression error: Unexpected > operator.; font-weight:bold; -webkit-text-stroke: 1px black; position: absolute; right:0;">+

Error: Table Adventurers not found.
{{PersonalCollectionIcon|Adventurer|Laxi|Rarity=5|Level=80|Nodes=50|Augments=3}}
Expression error: Missing operand for =.

Icon CircleRelease 02.png

Lv. 80

50

+3

Error: Table Adventurers not found.
{{PersonalCollectionIcon|Adventurer|Cleo|Rarity=5|Level=80|Nodes=50|Augments=18|Size=Normal}}
Expression error: Missing operand for =.

Icon CircleRelease 02.png

Lv. 80

50

+18

Error: Table Adventurers not found.
{{PersonalCollectionIcon|Adventurer|Su Fang|Rarity=5|Level=80|Nodes=50|Spiral|Size=Big}}
Expression error: Missing operand for =.

Icon CircleRelease 02.png

Lv. 80

50

<p style="opacity: 1; color: Expression error: Unexpected > operator.; font-weight:bold; -webkit-text-stroke: 1px black; position: absolute; right:0;">+

Error: Table Adventurers not found.
{{PersonalCollectionIcon|Adventurer|The Prince|Rarity=5|Level=95|Nodes=64|Spiral|Augments=200|Size=Giant}}
Expression error: Missing operand for =.

Icon CircleRelease 02.png

Lv. 95

64

+200

Error: Table Adventurers not found.
{{PersonalCollectionIcon|Weapon|Absolute Crimson|Level=95|Unbind=3|Augments=52|Size=Large}}
Expression error: Missing operand for =.

Lv. 95

3 Unbind.png

+52

Error: Table Weapons not found.
{{PersonalCollectionIcon|Wyrmprint|Valiant Crown|Level=9|Unbind=1|Augments=1|Size=Medium}}
Expression error: Missing operand for =.

Lv. 9

1 Unbind.png

+1

Error: Table Wyrmprints not found.
{{PersonalCollectionIcon|Wyrmprint|Valiant Crown|Level=100|Unbind=4|Augments=122}}
Expression error: Missing operand for =.

Lv. 100

4 Unbind.png

+122

Error: Table Wyrmprints not found.
{{PersonalCollectionIcon|Dragon|Cerberus|Level=100|Unbind=4|Augments=200}}
Expression error: Missing operand for =.

Lv. 100

4 Unbind.png

+200

Error: Table Dragons not found.