Difference between revisions of "Template:Ability icon"

From Project: Gorgon Wiki
Jump to: navigation, search
m
m
Line 1: Line 1:
 
{{ #if: {{{1|}}} |  
 
{{ #if: {{{1|}}} |  
{{ #replace: http://cdn.projectgorgon.com/v304/icons/icon_{{ #switch: {{{1|None}}}
+
{{ #replace: http://cdn.projectgorgon.com/v307/icons/icon_{{ #switch: {{{1|None}}}
 
| (Internal - SoD1) = 3665
 
| (Internal - SoD1) = 3665
 
| (Internal - SoD2) = 3665
 
| (Internal - SoD2) = 3665
Line 247: Line 247:
 
| Cause Terror 2 = 2104
 
| Cause Terror 2 = 2104
 
| Cause Terror 3 = 2104
 
| Cause Terror 3 = 2104
| Charged Chomp = 2230
 
 
| Charm Rat = 2135
 
| Charm Rat = 2135
 
| Chew Cud = 2150
 
| Chew Cud = 2150
Line 672: Line 671:
 
| Flashing Strike 8 = 3443
 
| Flashing Strike 8 = 3443
 
| Flashing Strike 9 = 3443
 
| Flashing Strike 9 = 3443
| Flesh to Fuel = 3202
+
| Flesh to Fuel = 3747
| Flesh to Fuel 2 = 3202
+
| Flesh to Fuel 2 = 3747
| Flesh to Fuel 3 = 3202
+
| Flesh to Fuel 3 = 3747
| Flesh to Fuel 4 = 3202
+
| Flesh to Fuel 4 = 3747
 
| Free-Summon Skeletal Archer = 2199
 
| Free-Summon Skeletal Archer = 2199
 
| Free-Summon Skeletal Archer 2 = 2199
 
| Free-Summon Skeletal Archer 2 = 2199
Line 1,380: Line 1,379:
 
| Psi Adrenaline Wave 3 = 3204
 
| Psi Adrenaline Wave 3 = 3204
 
| Psi Adrenaline Wave 4 = 3204
 
| Psi Adrenaline Wave 4 = 3204
| Psi Armor Wave = 3203
+
| Psi Armor Wave = 3202
| Psi Armor Wave 2 = 3203
+
| Psi Armor Wave 2 = 3202
| Psi Armor Wave 3 = 3203
+
| Psi Armor Wave 3 = 3202
| Psi Armor Wave 4 = 3203
+
| Psi Armor Wave 4 = 3202
| Psi Armor Wave 5 = 3203
+
| Psi Armor Wave 5 = 3202
| Psi Health Wave = 3202
+
| Psi Health Wave = 3746
| Psi Health Wave 2 = 3202
+
| Psi Health Wave 2 = 3746
| Psi Health Wave 3 = 3202
+
| Psi Health Wave 3 = 3746
| Psi Health Wave 4 = 3202
+
| Psi Health Wave 4 = 3746
| Psi Health Wave 5 = 3202
+
| Psi Health Wave 5 = 3746
| Psi Power Wave = 3042
+
| Psi Power Wave = 3203
| Psi Power Wave 2 = 3042
+
| Psi Power Wave 2 = 3203
| Psi Power Wave 3 = 3042
+
| Psi Power Wave 3 = 3203
| Psi Power Wave 4 = 3042
+
| Psi Power Wave 4 = 3203
| Psi Power Wave 5 = 3042
+
| Psi Power Wave 5 = 3203
 
| Psychoanalyze = 2118
 
| Psychoanalyze = 2118
 
| Psychoanalyze 2 = 2118
 
| Psychoanalyze 2 = 2118
Line 1,782: Line 1,781:
 
| Soothe 4 = 2221
 
| Soothe 4 = 2221
 
| Soothe 5 = 2221
 
| Soothe 5 = 2221
 +
| Spade Assault = 3748
 +
| Spade Assault 2 = 3748
 +
| Spade Assault 3 = 3748
 +
| Spade Assault 4 = 3748
 +
| Spade Assault 5 = 3748
 +
| Spade Assault 6 = 3748
 
| Spark of Death = 3430
 
| Spark of Death = 3430
 
| Spark of Death 2 = 3430
 
| Spark of Death 2 = 3430
Line 2,137: Line 2,142:
 
| #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/v304/icons/icon_<span style="color:red">Error: Ability not found</span>.png |  
+
http://cdn.projectgorgon.com/v307/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 11:54, 1 October 2018

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