Template:Skill icon: Difference between revisions

From FHX Wiki
(experimenting with article link format)
mNo edit summary
Line 27: Line 27:
* Can file pages have (skill) in the name? I believe () normally isn't allowed in windows file naming.
* Can file pages have (skill) in the name? I believe () normally isn't allowed in windows file naming.
** If so, I'd like to figure out how to exclude (skill) from the displayed article link (e.g. [[Hammer (skill)|Hammer]] or [[Hammer (skill)|Hammer]])
** If so, I'd like to figure out how to exclude (skill) from the displayed article link (e.g. [[Hammer (skill)|Hammer]] or [[Hammer (skill)|Hammer]])
** <code><nowiki>[[{{{1}}}|]]</nowiki></code> doesn't seem to work via template code, but works in the above example
** <code><nowiki>[[{{{1}}}|]]</nowiki></code> doesn't seem to work via template code, but works in the above example. Also tried <code><nowiki>&#124;</nowiki></code> and <code><nowiki>{{!}}</nowiki></code>.
* Add {{#if}} to include article link or only icon.
* Add {{#if}} to include article link or only icon.
** May not worry about this. Might be necessary to include article link each time a skill is referenced.  
** May not worry about this. Might be necessary to include article link each time a skill is referenced.  

Revision as of 04:24, 16 June 2024

Warning:
This template is in draft.


Description

{{skill icon|<skill name>}}

Displays a link to the skill and adds a skill icon in front of it.

Parameters

1 (unnamed parameter)
Skill name.
2 (unnamed parameter)
Icon size. Options: "big" (48px), "huge" (100px), or, blank (32px) - which is the default size.

Examples

Magic Defense is produced from {{skill icon|Magic Defense}}

Magic Defense is produced from {{skill icon|Magic Defense|big}}

Magic Defense is produced from {{skill icon|Magic Defense|huge}}

File:Revive icon.png Revive is produced from {{skill icon|Revive}}

File:Teleport icon.png Teleport is produced from {{skill icon|Teleport}}

File:Visit icon.png Visit is produced from {{skill icon|Visit}}

File:Invite icon.png Invite is produced from {{skill icon|Invite}}

File:Party Recall icon.png Party Recall is produced from {{skill icon|Party Recall}}

File:Hammer (skill) icon.png Hammer (skill) is produced from {{skill icon|Hammer (skill)}}


TODO:

  • Can file pages have (skill) in the name? I believe () normally isn't allowed in windows file naming.
    • If so, I'd like to figure out how to exclude (skill) from the displayed article link (e.g. Hammer or Hammer)
    • [[{{{1}}}|]] doesn't seem to work via template code, but works in the above example. Also tried | and {{!}}.
  • Add {{#if}} to include article link or only icon.
    • May not worry about this. Might be necessary to include article link each time a skill is referenced.
  • Import all skill icon image files (Skill Name icon.png)
    • need to get export
    • At least start with Teleport, Visit, Invite, Party Recall, and Revive as they are commonly referenced