Template:Ability icon/doc: Difference between revisions

From Project Gorgon
Jump to navigation Jump to search
Extractum11 (talk | contribs)
m Extractum11 moved page Template:Ability icon/Explanation to Template:Ability icon/doc: To use {{Documentation}}
Extractum11 (talk | contribs)
mNo edit summary
Line 1: Line 1:
__NOTOC__
__NOTOC__
==Description==
==Description==
This accepts an ability name as input and returns the in-game icon. Most of these are 64x64, but you can use CSS to force or resize them. See the Examples section below.
This accepts an ability name as input and returns the in-game icon. Most of these are 64x64, but you can use CSS to resize them. See the Examples section below.


==Syntax==
==Syntax==
Line 11: Line 11:
; <name>
; <name>
: The name of the ability. It must match exactly what is displayed in-game (e.g. "Super Fireball", not "SUPER fireball" or "Fireball")
: 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.


== Examples ==  
== Examples ==  


=== Basic Use ===
=== Standard Use ===
<pre>{{Ability icon|Regrowth}} {{Ability icon|Ring of Fire}}</pre>
<pre>{{Ability icon|Regrowth}} {{Ability icon|Ring of Fire}}
 
{{Ability icon}} {{Ability icon|FakeAbilityReturnsError}}
</pre>
{{Ability icon|Regrowth}} {{Ability icon|Ring of Fire}}
{{Ability icon|Regrowth}} {{Ability icon|Ring of Fire}}


{{Ability icon}} {{Ability icon|FakeAbilityReturnsError}}


=== Forcing 32x32 size ===
=== Forcing 32x32 size ===

Revision as of 18:08, 4 April 2021

Description

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

Syntax

{{Ability icon|<name>}}

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.

Examples

Standard Use

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

{{Ability icon}} {{Ability icon|FakeAbilityReturnsError}}

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

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

Forcing 32x32 size

<span class="extimage32px">{{Ability icon|Regrowth}}</span>

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


Forcing 64x64 size

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

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