Template:Ability icon: Difference between revisions

From Project Gorgon
Jump to navigation Jump to search
Extractum11 (talk | contribs)
m Updating
Extractum11 (talk | contribs)
m Updating
Line 1: Line 1:
{{ #if: {{{1|}}} |  
{{ #if: {{{1|}}} |  
{{ #replace: http://cdn.projectgorgon.com/v332/icons/icon_{{ #switch: {{{1|None}}}
{{ #replace: http://cdn.projectgorgon.com/v333/icons/icon_{{ #switch: {{{1|None}}}
| (Internal - SZ1) = 2202
| (Internal - SZ1) = 2202
| (Internal - SZ2) = 2202
| (Internal - SZ2) = 2202
Line 134: Line 134:
| Arrrrrrrrrow = 3310
| Arrrrrrrrrow = 3310
| Arrrrrrrrrow = 3310
| Arrrrrrrrrow = 3310
| Astral Strike = 3782
| Astral Strike 2 = 3782
| Astral Strike 3 = 3782
| Astral Strike 4 = 3782
| Astral Strike 5 = 3782
| Backstab = 3600
| Backstab = 3600
| Backstab 2 = 3600
| Backstab 2 = 3600
Line 195: Line 200:
| Bear Stun (Pet) 3 = 3619
| Bear Stun (Pet) 3 = 3619
| Bear Stun (Pet) 4 = 3619
| Bear Stun (Pet) 4 = 3619
| Bear Stun (Pet) 5 = 3619
| Bear Stun (Pet) 6 = 3619
| Bear Taunt (Pet) 1 = 2136
| Bear Taunt (Pet) 1 = 2136
| Bear Taunt (Pet) 2 = 2136
| Bear Taunt (Pet) 2 = 2136
Line 252: Line 259:
| Big Cat Root (Pet) 3 = 3619
| Big Cat Root (Pet) 3 = 3619
| Big Cat Root (Pet) 4 = 3619
| Big Cat Root (Pet) 4 = 3619
| Big Cat Root (Pet) 5 = 3619
| Big Cat Root (Pet) 6 = 3619
| Big Cat Ultrakill (Pet) 1 = 3619
| Big Cat Ultrakill (Pet) 1 = 3619
| Big Cat Ultrakill (Pet) 2 = 3619
| Big Cat Ultrakill (Pet) 2 = 3619
Line 844: Line 853:
| FaceOfDeathKill = 2131
| FaceOfDeathKill = 2131
| Fae Cold Sphere = 3496
| Fae Cold Sphere = 3496
| Fae Conduit = 3785
| Fae Conduit 2 = 3785
| Fae Conduit 3 = 3785
| Fae Conduit 4 = 3785
| Fae Conduit 5 = 3785
| Fae Conduit 6 = 3785
| Fae Conduit 7 = 3785
| Fae Ice Spear = 3499
| Fae Ice Spear = 3499
| Fae Ice Spear = 3499
| Fae Ice Spear = 3499
Line 850: Line 866:
| Fae Sword B = 3444
| Fae Sword B = 3444
| Fae Sword Kill = 3443
| Fae Sword Kill = 3443
| FaeConduitHeal = 3203
| Fairy Chime 1 = 3762
| Fairy Chime 1 = 3762
| Fairy Chime 2 = 3763
| Fairy Chime 2 = 3763
Line 856: Line 873:
| Fairy Chime 5 = 3766
| Fairy Chime 5 = 3766
| Fairy Chime 6 = 3767
| Fairy Chime 6 = 3767
| Fairy Fire = 3783
| Fairy Fire 2 = 3783
| Fairy Fire 3 = 3783
| Fairy Fire 4 = 3783
| Fairy Fire 5 = 3783
| Fairy Fire 6 = 3783
| Fairy Fire 7 = 3783
| Fairy Fire 8 = 3783
| Fairy Fire 9 = 3783
| Familiar's Recall = 3713
| Familiar's Recall = 3713
| Fan of Blades = 3602
| Fan of Blades = 3602
Line 1,032: Line 1,058:
| Forest Challenge 4 = 3753
| Forest Challenge 4 = 3753
| Forest Challenge 5 = 3753
| Forest Challenge 5 = 3753
| Free-Flutter = 3793
| Free-Flutter 2 = 3793
| Free-Flutter 3 = 3793
| Free-Summon Skeletal Archer = 2199
| Free-Summon Skeletal Archer = 2199
| Free-Summon Skeletal Archer 2 = 2199
| Free-Summon Skeletal Archer 2 = 2199
Line 1,247: Line 1,276:
| Heal Undead 7 = 2196
| Heal Undead 7 = 2196
| Heal Undead 8 = 2196
| Heal Undead 8 = 2196
| Healing Aura = 3328
| Healing Aura = 3328
| Healing Aura = 3328
| Healing Aura = 3328
| Healing Aura = 3328
| Healing Injection = 2108
| Healing Injection = 2108
Line 1,937: Line 1,963:
| Pinning Slash 3 = 3488
| Pinning Slash 3 = 3488
| Pinning Slash 4 = 3488
| Pinning Slash 4 = 3488
| Pixie Flare = 3784
| Pixie Flare 2 = 3784
| Pixie Flare 3 = 3784
| Pixie Flare 4 = 3784
| Pixie Flare 5 = 3784
| Pixie Flare 6 = 3784
| Pixie Flare 7 = 3784
| Pixie Flare 8 = 3784
| Pixie Flare 9 = 3784
| PixieRageSlash = 3445
| PixieRageSlash = 3445
| PixieSlash = 3445
| PixieSlash = 3445
Line 2,553: Line 2,588:
| Slice 8 = 3595
| Slice 8 = 3595
| Slice 9 = 3595
| Slice 9 = 3595
| Slicing Ice = 3595
| Slicing Ice 2 = 3595
| Slicing Ice 3 = 3595
| Slicing Ice 4 = 3595
| Slicing Ice 5 = 3595
| Slicing Ice 6 = 3595
| Slicing Ice 7 = 3595
| Slicing Ice 8 = 3595
| Slicing Ice 9 = 3595
| SlimeBite = 3303
| SlimeBite = 3303
| SlimeBiteB = 3303
| SlimeBiteB = 3303
Line 3,208: Line 3,252:
| #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/v332/icons/icon_<span style="color:red">Error: Ability not found</span>.png |  
http://cdn.projectgorgon.com/v333/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 02:46, 13 March 2020

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}}

{{ #replace: http://cdn.projectgorgon.com/v333/icons/icon_2120.png | http://cdn.projectgorgon.com/v333/icons/icon_Error: Ability not found.png | Error: Ability not found }}

{{ #replace: http://cdn.projectgorgon.com/v333/icons/icon_4003.png | http://cdn.projectgorgon.com/v333/icons/icon_Error: Ability not found.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}}

{{ #replace: http://cdn.projectgorgon.com/v333/icons/icon_2120.png | http://cdn.projectgorgon.com/v333/icons/icon_Error: Ability not found.png | Error: Ability not found }}

{{ #replace: http://cdn.projectgorgon.com/v333/icons/icon_2120.png | http://cdn.projectgorgon.com/v333/icons/icon_Error: Ability not found.png | Error: Ability not found }}

{{ #replace: http://cdn.projectgorgon.com/v333/icons/icon_2120.png | http://cdn.projectgorgon.com/v333/icons/icon_Error: Ability not found.png | Error: Ability not found }}


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>

{{ #replace: http://cdn.projectgorgon.com/v333/icons/icon_2120.png | http://cdn.projectgorgon.com/v333/icons/icon_Error: Ability not found.png | Error: Ability not found }}

{{ #replace: http://cdn.projectgorgon.com/v333/icons/icon_2120.png | http://cdn.projectgorgon.com/v333/icons/icon_Error: Ability not found.png | Error: Ability not found }}