Template:Ability icon/doc: Difference between revisions
mNo edit summary |
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 | 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== | ==Syntax== | ||
<pre> | <pre> | ||
{{Ability icon|<name>}} | {{Ability icon|<name>|<size selection>}} | ||
</pre> | </pre> | ||
| Line 13: | Line 13: | ||
: If omitted or empty, template returns a blank icon image. | : If omitted or empty, template returns a blank icon image. | ||
: If no match is found, template returns an error. | : 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 == | == Examples == | ||
=== Standard Use === | === Standard Use === | ||
<pre>{{Ability icon| | <pre> | ||
{{Ability icon|Ring of Fire}} | |||
{{Ability icon}} | |||
{{Ability icon|FakeAbilityReturnsError}} | |||
</pre> | |||
{{Ability icon|Ring of Fire}} | |||
{{Ability icon}} | |||
{{Ability icon|FakeAbilityReturnsError}} | |||
=== Resizing === | |||
<pre> | |||
{{Ability icon|Ring of Fire}} (default size is 64x64) | |||
{{Ability icon|Ring of Fire|64}} | |||
{{Ability icon|Ring of Fire|32}} | |||
</pre> | </pre> | ||
{{Ability icon| | {{Ability icon|Ring of Fire}} | ||
{{Ability icon|Ring of Fire|64}} | |||
{{Ability icon|Ring of Fire|32}} | |||
=== Alternative Resizing (old method) === | |||
You can also "manually" resize the images if you wish. | |||
<pre> | |||
<span class="extimage32px">{{Ability icon|Ring of Fire}}</span> | |||
<span class="extimage32px">{{Ability icon| | |||
<span class="extimage64px">{{Ability icon|Ring of Fire}}</span> | |||
</pre> | |||
<span class="extimage32px">{{Ability icon|Ring of Fire}}</span> | |||
<span class="extimage64px">{{Ability icon|Ring of Fire}}</span> | <span class="extimage64px">{{Ability icon|Ring of Fire}}</span> | ||
[[Category:Template_documentation]] | [[Category:Template_documentation]] | ||
Revision as of 03:20, 1 October 2021
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/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 }}
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/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_2120.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 }}
Alternative Resizing (old method)
You can also "manually" resize the images if you wish.
<span class="extimage32px">{{Ability icon|Ring of Fire}}</span>
<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 }}
{{ #replace: http://cdn.projectgorgon.com/v456/icons/icon_2120.png | http://cdn.projectgorgon.com/v456/icons/icon_.png | Error: Ability not found }}