Template:Ability icon: Difference between revisions

From Project Gorgon
Jump to navigation Jump to search
Extractum11 (talk | contribs)
m Updating
ExtraBot (talk | contribs)
m Automatically generated. If there's an issue, please message Extractum11 on Discord - Subglacious#0413
Line 1: Line 1:
<includeonly>{{ #switch: {{{2}}} | 1 | 32 = <span class="extimage32px"> | 2 | 64 = <span class="extimage64px"> | }}{{ #if: {{{1|}}} |  
<includeonly>{{ #switch: {{{2}}} | 1 | 32 = <span class="extimage32px"> | 2 | 64 = <span class="extimage64px"> | }}{{ #if: {{{1|}}} |  
{{ #replace: http://cdn.projectgorgon.com/v356/icons/icon_{{ #switch: {{padleft: | 1 | {{ lc: {{{1}}} }} }}  
{{ #replace: http://cdn.projectgorgon.com/v357/icons/icon_{{ #switch: {{padleft: | 1 | {{ lc: {{{1}}} }} }}  
| a = {{ #switch: {{{1}}}
| a = {{ #switch: {{{1}}}
| Acid Arrow = 3302
| Acid Arrow = 3302
Line 433: Line 433:
| Call Stabled Pet #6 = 2166
| Call Stabled Pet #6 = 2166
| Calm Horse = 3830
| Calm Horse = 3830
| Canter = 3836
| Carrot Power = 3697
| Carrot Power = 3697
| Carrot Power 2 = 3697
| Carrot Power 2 = 3697
Line 501: Line 502:
| Cloud Sight 5 = 3485
| Cloud Sight 5 = 3485
| Cloud Sight 6 = 3485
| Cloud Sight 6 = 3485
| Coax = 3830
| Coax = 3832
| Cobra Strike = 2105
| Cobra Strike = 2105
| Cobra Strike 2 = 2105
| Cobra Strike 2 = 2105
Line 1,163: Line 1,164:
}}
}}
| g = {{ #switch: {{{1}}}
| g = {{ #switch: {{{1}}}
| Gallop = 3830
| Gallop = 3837
| Galvanize = 3800
| Galvanize = 3800
| Galvanize 2 = 3800
| Galvanize 2 = 3800
Line 1,177: Line 1,178:
| GargoyleStun = 2105
| GargoyleStun = 2105
| Gazluk Officer's Battle Cry = 3658
| Gazluk Officer's Battle Cry = 3658
| Gentle Horse = 3835
| Get It Off Me = 2141
| Get It Off Me = 2141
| Get It Off Me 2 = 2141
| Get It Off Me 2 = 2141
Line 1,696: Line 1,698:
| Look At My Hammer 7 = 3473
| Look At My Hammer 7 = 3473
| Look At My Hammer 8 = 3473
| Look At My Hammer 8 = 3473
| Lope = 3833
| Love Tap = 3751
| Love Tap = 3751
| Love Tap 2 = 3751
| Love Tap 2 = 3751
Line 2,821: Line 2,824:
| Soothe 5 = 2221
| Soothe 5 = 2221
| Soothe 6 = 2221
| Soothe 6 = 2221
| Soothe Horse = 3834
| Soul Bite = 3796
| Soul Bite = 3796
| Soul Bite 2 = 3796
| Soul Bite 2 = 3796
Line 2,988: Line 2,992:
| Summon = 2201
| Summon = 2201
| Summon = 2201
| Summon = 2201
| Summon Death on a Leash = 3810
| Summon Deer = 2251
| Summon Deer = 2251
| Summon Deer 2 = 2251
| Summon Deer 2 = 2251
Line 2,994: Line 2,997:
| Summon Deer 4 = 2251
| Summon Deer 4 = 2251
| Summon Deer 5 = 2251
| Summon Deer 5 = 2251
| Summon a Death on a Leash = 3810
| Summon a Fae Dragon = 6398
| Summon a Fae Dragon = 6398
| Summon a Gargoyle = 3809
| Summon a Gargoyle = 3626
| Summon a Kraken Pet = 6255
| Summon a Kraken Pet = 6255
| Summon a Radish = 3809
| Summon a Radish = 3809
| Summon a Winter Beet = 3809
| Summon a Winter Beet = 3809
| Summon a Worghest = 3809
| Summon a Worghest = 3629
| Super Fireball = 2107
| Super Fireball = 2107
| Super Fireball 2 = 2107
| Super Fireball 2 = 2107
Line 3,495: Line 3,499:
}}
}}
}}.png  
}}.png  
| http://cdn.projectgorgon.com/v356/icons/icon_.png <!-- result when no match is found, will be #replaced -->
| http://cdn.projectgorgon.com/v357/icons/icon_.png <!-- result when no match is found, will be #replaced -->
| <span style="color:red">Error: Ability not found</span> }} | [[File:Item-icon-none.png]] }}{{ #switch: {{{2}}} | 1 | 2 | 32 | 64 = </span> | }}</includeonly><noinclude>
| <span style="color:red">Error: Ability not found</span> }} | [[File:Item-icon-none.png]] }}{{ #switch: {{{2}}} | 1 | 2 | 32 | 64 = </span> | }}</includeonly><noinclude>
{{Documentation}}
{{Documentation}}
[[Category:Formatting templates]]
[[Category:Formatting templates]]
</noinclude>
</noinclude>

Revision as of 21:40, 5 February 2022

Template documentation (for the above template, sometimes hidden or invisible) [view] [edit] [history] [refresh]

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/v357/icons/icon_2120.png | http://cdn.projectgorgon.com/v357/icons/icon_.png | Error: Ability not found }}

{{ #replace: http://cdn.projectgorgon.com/v357/icons/icon_.png | http://cdn.projectgorgon.com/v357/icons/icon_.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/v357/icons/icon_2120.png | http://cdn.projectgorgon.com/v357/icons/icon_.png | Error: Ability not found }}

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

{{ #replace: http://cdn.projectgorgon.com/v357/icons/icon_2120.png | http://cdn.projectgorgon.com/v357/icons/icon_.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/v357/icons/icon_2120.png | http://cdn.projectgorgon.com/v357/icons/icon_.png | Error: Ability not found }}

{{ #replace: http://cdn.projectgorgon.com/v357/icons/icon_2120.png | http://cdn.projectgorgon.com/v357/icons/icon_.png

| Error: Ability not found }}
The above text is transcluded from Template:Ability icon/doc; you can change it or view its history.
If you're done making changes, please refresh the text.
Please add categories and interwikis to Template:Ability icon/doc. (View all subpages of this page.)