Difference between revisions of "Template:Ability icon"

From Project: Gorgon Wiki
Jump to: navigation, search
(Restructuring to reduce the size, hopefully edits on this page will work now. Functionality lost: using {{Ability icon|None}} to get the blank image. Can only use {{Ability icon}} or {{Ability icon|}} instead)
m (Updating)
Line 1: Line 1:
 
{{ #if: {{{1|}}} |  
 
{{ #if: {{{1|}}} |  
{{ #replace: http://cdn.projectgorgon.com/v282/icons/icon_{{ #switch: {{{1|None}}}
+
{{ #replace: http://cdn.projectgorgon.com/v284/icons/icon_{{ #switch: {{{1|None}}}
 
| Acid Arrow = 3302
 
| Acid Arrow = 3302
 
| Acid Arrow 2 = 3302
 
| Acid Arrow 2 = 3302
Line 161: Line 161:
 
| Bruising Blow 4 = 2241
 
| Bruising Blow 4 = 2241
 
| Bruising Blow 5 = 2241
 
| Bruising Blow 5 = 2241
 +
| Bun-Fu Kick = 3691
 +
| Bun-Fu Kick 2 = 3691
 +
| Bun-Fu Kick 3 = 3691
 +
| Bun-Fu Kick 4 = 3691
 
| But I Love You = 3441
 
| But I Love You = 3441
 
| But I Love You 2 = 3441
 
| But I Love You 2 = 3441
Line 176: Line 180:
 
| Call Stabled Pet #4 = 2164
 
| Call Stabled Pet #4 = 2164
 
| Call Stabled Pet #5 = 2165
 
| Call Stabled Pet #5 = 2165
 +
| Carrot Power = 3697
 +
| Carrot Power 2 = 3697
 +
| Carrot Power 3 = 3697
 +
| Carrot Power 4 = 3697
 +
| Carrot Power 5 = 3697
 
| Cause Terror = 2104
 
| Cause Terror = 2104
 
| Cause Terror 2 = 2104
 
| Cause Terror 2 = 2104
Line 647: Line 656:
 
| Hamstring Throw 6 = 3598
 
| Hamstring Throw 6 = 3598
 
| Hamstring Throw 7 = 3598
 
| Hamstring Throw 7 = 3598
 +
| Hare Dash = 3698
 +
| Hare Dash 2 = 3698
 +
| Hare Dash 3 = 3698
 +
| Hare Dash 4 = 3698
 +
| Hare Dash 5 = 3698
 
| Harmlessness = 2255
 
| Harmlessness = 2255
 
| Harp 1 = 3564
 
| Harp 1 = 3564
Line 873: Line 887:
 
| Life Steal 5 = 2198
 
| Life Steal 5 = 2198
 
| Life Steal 6 = 2198
 
| Life Steal 6 = 2198
 +
| Long Ear = 3696
 +
| Long Ear 2 = 3696
 +
| Long Ear 3 = 3696
 +
| Long Ear 4 = 3696
 
| Long Shot = 3305
 
| Long Shot = 3305
 
| Long Shot 2 = 3305
 
| Long Shot 2 = 3305
Line 1,091: Line 1,109:
 
| Pinning Slash 2 = 3488
 
| Pinning Slash 2 = 3488
 
| Pinning Slash 3 = 3488
 
| Pinning Slash 3 = 3488
 +
| Play Dead = 3694
 +
| Play Dead 2 = 3694
 +
| Play Dead 3 = 3694
 +
| Play Dead 4 = 3694
 
| Poison Arrow = 3301
 
| Poison Arrow = 3301
 
| Poison Arrow 2 = 3301
 
| Poison Arrow 2 = 3301
Line 1,209: Line 1,231:
 
| Quick Bash 6 = 3642
 
| Quick Bash 6 = 3642
 
| Quick Bash 7 = 3642
 
| Quick Bash 7 = 3642
 +
| Rabbit Scratch = 3690
 +
| Rabbit Scratch 2 = 3690
 +
| Rabbit Scratch 3 = 3690
 +
| Rabbit Scratch 4 = 3690
 +
| Rabbit Scratch 5 = 3690
 +
| Rabbit Scratch 6 = 3690
 +
| Rabbit's Foot = 3695
 +
| Rabbit's Foot 2 = 3695
 +
| Rabbit's Foot 3 = 3695
 +
| Rabbit's Foot 4 = 3695
 
| Raise Skeletal Archer = 2199
 
| Raise Skeletal Archer = 2199
 
| Raise Skeletal Archer 2 = 2199
 
| Raise Skeletal Archer 2 = 2199
Line 1,462: Line 1,494:
 
| Snare Arrow 6 = 3320
 
| Snare Arrow 6 = 3320
 
| Snare Arrow 7 = 3320
 
| Snare Arrow 7 = 3320
 +
| Snow Hare Mode = 3693
 +
| Snow Hare Mode 2 = 3693
 +
| Snow Hare Mode 3 = 3693
 +
| Snow Hare Mode 4 = 3693
 +
| Snow Hare Mode 5 = 3693
 +
| Snow Hare Mode 6 = 3693
 +
| Snow Hare Mode 7 = 3693
 +
| Snow Hare Mode 8 = 3693
 
| Snow Raven Form = 3478
 
| Snow Raven Form = 3478
 
| Soberize = 3685
 
| Soberize = 3685
Line 1,652: Line 1,692:
 
| Thrusting Blade 3 = 3445
 
| Thrusting Blade 3 = 3445
 
| Thrusting Blade 4 = 3445
 
| Thrusting Blade 4 = 3445
 +
| Thump = 3692
 +
| Thump 2 = 3692
 +
| Thump 3 = 3692
 +
| Thump 4 = 3692
 +
| Thump 5 = 3692
 
| Thunderous Note = 3674
 
| Thunderous Note = 3674
 
| Thunderous Note 2 = 3674
 
| Thunderous Note 2 = 3674
Line 1,810: Line 1,855:
 
| You Were Adopted 4 = 3440
 
| You Were Adopted 4 = 3440
 
| You Were Adopted 5 = 3440
 
| You Were Adopted 5 = 3440
| #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/v282/icons/icon_<span style="color:red">Error: Ability not found</span>.png |  
+
http://cdn.projectgorgon.com/v284/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:23, 10 June 2017

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