Difference between revisions of "Template:Ability icon"

From Project: Gorgon Wiki
Jump to: navigation, search
m (Updating)
m (Updating)
Line 1: Line 1:
 
{{ #if: {{{1|}}} |  
 
{{ #if: {{{1|}}} |  
{{ #replace: http://cdn.projectgorgon.com/v341/icons/icon_{{ #switch: {{{1|None}}}
+
{{ #replace: http://cdn.projectgorgon.com/v342/icons/icon_{{ #switch: {{{1|None}}}
 
| (Internal - SZ1) = 2202
 
| (Internal - SZ1) = 2202
 
| (Internal - SZ2) = 2202
 
| (Internal - SZ2) = 2202
Line 557: Line 557:
 
| Conditioning Shock 5 = 3771
 
| Conditioning Shock 5 = 3771
 
| Conditioning Shock 6 = 3771
 
| Conditioning Shock 6 = 3771
 +
| Conduit = 3203
 
| Confusing Double = 3543
 
| Confusing Double = 3543
 
| Confusing Double 2 = 3543
 
| Confusing Double 2 = 3543
Line 613: Line 614:
 
| Dalvos Pain Bubble = 3327
 
| Dalvos Pain Bubble = 3327
 
| Dance 1 = 3612
 
| Dance 1 = 3612
 +
| Dance 1 (variant B) = 3811
 +
| Dance 1 (variant C) = 3817
 
| Dance 2 = 3613
 
| Dance 2 = 3613
 +
| Dance 2 (variant B) = 3812
 +
| Dance 2 (variant C) = 3818
 
| Dance 3 = 3614
 
| Dance 3 = 3614
 +
| Dance 3 (variant B) = 3813
 +
| Dance 3 (variant C) = 3819
 
| Dance 4 = 3615
 
| Dance 4 = 3615
 +
| Dance 4 (variant B) = 3814
 +
| Dance 4 (variant C) = 3820
 
| Dance 5 = 3616
 
| Dance 5 = 3616
 +
| Dance 5 (variant B) = 3815
 +
| Dance 5 (variant C) = 3821
 
| Dance 6 = 3617
 
| Dance 6 = 3617
 +
| Dance 6 (variant B) = 3816
 +
| Dance 6 (variant C) = 3822
 
| Darkness Ball = 3043
 
| Darkness Ball = 3043
 
| Darkness Bolt = 3428
 
| Darkness Bolt = 3428
Line 901: Line 914:
 
| Fae Tornado Opener = 3496
 
| Fae Tornado Opener = 3496
 
| Fae Tornado Rage = 3496
 
| Fae Tornado Rage = 3496
| FaeConduitHeal = 3203
 
 
| Fairy Chime 1 = 3762
 
| Fairy Chime 1 = 3762
 
| Fairy Chime 2 = 3763
 
| Fairy Chime 2 = 3763
Line 2,946: Line 2,958:
 
| Summon Deer 4 = 2251
 
| Summon Deer 4 = 2251
 
| Summon Deer 5 = 2251
 
| Summon Deer 5 = 2251
 +
| Summon a Fae Dragon = 6398
 +
| Summon a Gargoyle = 3809
 +
| Summon a Kraken Pet = 6255
 
| Summon a Radish = 3809
 
| Summon a Radish = 3809
 +
| Summon a Worghest = 3809
 
| Super Fireball = 2107
 
| Super Fireball = 2107
 
| Super Fireball 2 = 2107
 
| Super Fireball 2 = 2107
Line 3,384: Line 3,400:
 
| #default = {{ #if: {{ #pos: {{{1|}}} | : }} |  4003 | <span style="color:red">Error: Ability not found</span> }}
 
| #default = {{ #if: {{ #pos: {{{1|}}} | : }} |  4003 | <span style="color:red">Error: Ability not found</span> }}
 
}}.png |  
 
}}.png |  
http://cdn.projectgorgon.com/v341/icons/icon_<span style="color:red">Error: Ability not found</span>.png |  
+
http://cdn.projectgorgon.com/v342/icons/icon_<span style="color:red">Error: Ability not found</span>.png |  
 
<span style="color:red">Error: Ability not found</span> }} | [[File:Item-icon-none.png]] }}<noinclude>
 
<span style="color:red">Error: Ability not found</span> }} | [[File:Item-icon-none.png]] }}<noinclude>
 
{{Ability icon/Explanation}}
 
{{Ability icon/Explanation}}
 
[[Category:Formatting templates]]
 
[[Category:Formatting templates]]
 
</noinclude>
 
</noinclude>

Revision as of 23:00, 26 March 2021

Item-icon-none.png

Description

This accepts an ability name as input and returns the in-game icon. Most of these are 64x64, but you can resize them if needed. See the Examples section below.

Syntax

{{Ability icon|<name>|<size selection>}}

Parameters

<name>
The name of the ability. It must match exactly what is displayed in-game (e.g. "Super Fireball", not "SUPER fireball" or "Fireball")
If omitted or empty, template returns a blank icon image.
If no match is found, template returns an error.
<size selection>
1 or 32 for 32x32.
2 or 64 for 64x64.
If omitted, empty, or anything else, image isn't resized.

Examples

Standard Use

{{Ability icon|Ring of Fire}}

{{Ability icon}}

{{Ability icon|FakeAbilityReturnsError}}

icon_2120.png

Item-icon-none.png

Error: Ability not found


Resizing

{{Ability icon|Ring of Fire}} <!-- default size is 64x64 -->

{{Ability icon|Ring of Fire|64}}

{{Ability icon|Ring of Fire|32}}

icon_2120.png

icon_2120.png

icon_2120.png


Alternative Resizing (old method)

You can also manually resize the images if you wish (using the template just wraps the image in this span automatically).

<span class="extimage32px">{{Ability icon|Ring of Fire}}</span>

<span class="extimage64px">{{Ability icon|Ring of Fire}}</span>

icon_2120.png

icon_2120.png