Template:SCP/doc: Difference between revisions

Template page
(Created page with "https://wiki.zeah.gg/w/index.php/Template:SCP/doc")
 
No edit summary
 
Line 1: Line 1:
https://wiki.zeah.gg/w/index.php/Template:SCP/doc
{{documentation}}
{{Invokes|SCP}}
The '''SCP''' template displays a clickable skill icon picture that links to the skill page. This can be also be used in other templates that display skill icons.
 
==Usage==
<pre>{{SCP|<skill>|<number>|link = (optional) yes}}</pre>
 
==Examples==
Just skill:<br/>
<pre>{{SCP|Magic}}</pre>
{{SCP|Magic}}
 
Skill and level:<br/>
<pre>{{SCP|Magic|50}}</pre>
{{SCP|Magic|50}}
 
Skill, level, and link:<br/>
<pre>{{SCP|Magic|50|link=yes}}</pre>
{{SCP|Magic|50|link=yes}}
 
==Non-skill Clickpics==
This template can produce a number of clickpics which are not skill icons.
 
{| class="wikitable"
! Name !! Image
|-
|(Default) || {{SCP|Skill}}
|-
|Quests || {{SCP|Quests}}
|-
|Combat || {{SCP|Combat}}
|-
|Minigame || {{SCP|Minigame}}
|-
|Diary || {{SCP|Diary}}
|-
|Music || {{SCP|Music}}
|-
|Favour || {{SCP|Favour}}
|-
|Time || {{SCP|Time}}
|}
 
==Parameters==
<templatedata>
{
    "description": "",
    "params": {
        "1": {
            "label": "Skill",
            "description": "The name of the skill.",
            "default": "Stats",
            "type": "string"
        },
        "2": {
            "label": "Level",
            "description": "The skill level to display.",
            "type": "number"
        },
        "link": {
            "label": "Link",
            "description": "Filled in with 'yes' to display the skill name as a link at the end.",
            "type": "string"
        },
        "sort": {
            "label": "Sort",
            "description": "Applies data-sort-value='level'| in front of the icon and text if used; Only use on the first instance in a table row.",
            "type": "string"
        }
    }
}
</templatedata>
 
<includeonly>[[Category:Image templates|{{PAGENAME}}]]</includeonly>

Latest revision as of 04:31, 5 March 2023

{{#invoke:Documentation|doc}}

Template:SCP invokes Module:SCP using Lua.

The SCP template displays a clickable skill icon picture that links to the skill page. This can be also be used in other templates that display skill icons.

Usage

{{SCP|<skill>|<number>|link = (optional) yes}}

Examples

Just skill:

{{SCP|Magic}}

{{#invoke:SCP|main}}

Skill and level:

{{SCP|Magic|50}}

{{#invoke:SCP|main}}

Skill, level, and link:

{{SCP|Magic|50|link=yes}}

{{#invoke:SCP|main}}

Non-skill Clickpics

This template can produce a number of clickpics which are not skill icons.

Name Image
(Default) main}}
Quests main}}
Combat main}}
Minigame main}}
Diary main}}
Music main}}
Favour main}}
Time main}}

Parameters

<templatedata> {

   "description": "",
   "params": {
       "1": {
           "label": "Skill",
           "description": "The name of the skill.",
           "default": "Stats",
           "type": "string"
       },
       "2": {
           "label": "Level",
           "description": "The skill level to display.",
           "type": "number"
       },
       "link": {
           "label": "Link",
           "description": "Filled in with 'yes' to display the skill name as a link at the end.",
           "type": "string"
       },
       "sort": {
           "label": "Sort",
           "description": "Applies data-sort-value='level'| in front of the icon and text if used; Only use on the first instance in a table row.",
           "type": "string"
       }
   }

} </templatedata>