Template:Skill: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
(Remove alias parameter and instead use standard aliasing syntax with the second parameter)
mNo edit summary
 
(4 intermediate revisions by the same user not shown)
Line 19: Line 19:
| Survival = {{IconLink|{{{1}}} Icon.png|{{{1}}}|{{{2|{{{1}}}}}}|size={{{w|25}}}|nowrap=y}}
| Survival = {{IconLink|{{{1}}} Icon.png|{{{1}}}|{{{2|{{{1}}}}}}|size={{{w|25}}}|nowrap=y}}
| #default = [[{{{1}}}|{{{2|{{{1}}}}}}]]
| #default = [[{{{1}}}|{{{2|{{{1}}}}}}]]
}}</includeonly><noinclude>
}}</includeonly><noinclude>{{documentation|content=
Usage: {{code|<nowiki>{{Skill|Athletics}}</nowiki>}}
Insert a link to one of the [[Skills|skills]], accompanied by the associated icon.


Result: {{Skill|Athletics}}
== Usage ==
This is intended mainly for lists, not in-line in body content as per the [[Help:Style manual|Style Manual]]. The skill name is case sensitive and needs to exactly match (e.g. Sleight of Hand, not Sleight Of Hand).


or Result: {{Skill|History|w=40}} {{code|<nowiki>{{Skill|History|w=40}}</nowiki>}}
== Examples ==
{{Template demo
| style = table
| caption 1 = Basic usage
| <nowiki>{{Skill|Athletics}}</nowiki>
| caption 2 = Adjusted icon size
| <nowiki>{{Skill|History|w=40}}</nowiki>
| caption 3 = Link alias
| <nowiki>{{Skill|Acrobatics|Acrobatic}}</nowiki>
| caption 4 = Alias and adjusted size
| <nowiki>{{Skill|Stealth|Sneaky|w=20}}</nowiki>
}}


With Alias: {{code|<nowiki>{{Skill|Acrobatics|Acrobatic}}</nowiki>}}
== See also ==
 
* {{t link|Ability}} - An equivalent template for [[abilities|ability scores]]
Result: {{Skill|Acrobatics|Acrobatic}}
* {{t link|Background}} - An equivalent template for [[backgrounds]]
* {{t link|Class}} - An equivalent template for [[classes]]
* {{t link|Deity}} - An equivalent template for [[deities]]
* {{t link|Race}} - An equivalent template for [[races|playable races]]


== Template data==
<templatedata>
{
    "description": "Insert a link to a skill accompanied by the associated icon. For use in lists and similar contexts only. This should not be used inline in the body of a paragraph as per the style manual. In those cases, use a normal link instead.",
    "format": "inline",
"params": {
"1": {
"label": "Skill name",
"description": "The name of the skill. This is case sensitive.",
"type": "string",
            "suggestedvalues": [
                "Acrobatics",
                "Animal Handling",
                "Arcana",
                "Athletics",
                "Deception",
                "History",
                "Insight",
                "Intimidation",
                "Investigation",
                "Medicine",
                "Nature",
                "Perception",
                "Performance",
                "Persuasion",
                "Religion",
                "Sleight of Hand",
                "Stealth",
                "Survival"
            ],
"required": true
},
        "2": {
"label": "Alias",
"description": "A user-defined alias to be shown instead of the skill name.",
"type": "string"
},
"w": {
"label": "Icon size",
"description": "The pixel size of the accompanying icon.",
"type": "number"
}
}
}
</templatedata>}}
[[Category:Templates]]
[[Category:Link templates]]
</noinclude>
</noinclude>

Latest revision as of 21:44, 29 July 2024

Template documentation

Insert a link to one of the skills, accompanied by the associated icon.

Usage

This is intended mainly for lists, not in-line in body content as per the Style Manual. The skill name is case sensitive and needs to exactly match (e.g. Sleight of Hand, not Sleight Of Hand).

Examples

Example Markup Renders as
Basic usage
{{Skill|Athletics}}
Athletics Athletics
Adjusted icon size
{{Skill|History|w=40}}
History History
Link alias
{{Skill|Acrobatics|Acrobatic}}
Acrobatic Acrobatic
Alias and adjusted size
{{Skill|Stealth|Sneaky|w=20}}
Sneaky Sneaky

See also

Template data

Insert a link to a skill accompanied by the associated icon. For use in lists and similar contexts only. This should not be used inline in the body of a paragraph as per the style manual. In those cases, use a normal link instead.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Skill name1

The name of the skill. This is case sensitive.

Suggested values
Acrobatics Animal Handling Arcana Athletics Deception History Insight Intimidation Investigation Medicine Nature Perception Performance Persuasion Religion Sleight of Hand Stealth Survival
Stringrequired
Alias2

A user-defined alias to be shown instead of the skill name.

Stringoptional
Icon sizew

The pixel size of the accompanying icon.

Numberoptional