Template:Ability: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
m (clarify as requested on talk)
mNo edit summary
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly>[[File:{{{1}}} icon.png|frameless|{{{2|24}}}px|link={{{1}}}]] [[{{{1}}}]]</includeonly><noinclude>[[Category:Templates]]
<includeonly>{{#switch: {{{1|}}}
Represents the main 6 abilities. Please do '''not''' use this template for saving throws and ability checks. Use [[Template:Saving Throw]] and [[Template:Ability Check]] instead.
| Strength
| Dexterity
| Constitution
| Intelligence
| Wisdom
| Charisma = {{IconLink|{{{1}}} Small Icon.png|{{{1}}}|{{{2|{{{1}}}}}}|size={{{w|25}}}|nowrap=y}}
| #default = [[{{{1}}}|{{{2|{{{1}}}}}}]]
}}</includeonly><noinclude>{{documentation|content=
This template is used to visually represent the main 6 abilities. Do note that saving throws should instead use [[Template:Saving throw]], while ability checks should use [[Template:Ability Check]].


Use only with these six magic words:
== Usage ==
This is intended mainly for lists, not in-line in body content as per the [[Help:Style manual|Style Manual]]. The ability name is case sensitive and needs to exactly match (e.g. Strength, not STR).


<code><nowiki>{{Ability|Strength}}</nowiki></code>
== Examples ==
{{Ability|Strength}}
{{Template demo
| caption 1 = Basic usage
| <nowiki>{{Ability|Strength}}</nowiki>
| caption 2 = Adjusted icon size
| <nowiki>{{Ability|Dexterity|w=15}}</nowiki>
| caption 3 = Link alias
| <nowiki>{{Ability|Constitution|CON}}</nowiki>
| caption 4 = Alias and adjusted size
| <nowiki>{{Ability|Intelligence|INT|w=40}}</nowiki>
}}


<code><nowiki>{{Ability|Dexterity|15}}</nowiki></code>
== See also ==
{{Ability|Dexterity|15}}
* {{t link|Background}} - An equivalent template for [[backgrounds]]
* {{t link|Deity}} - An equivalent template for [[deities]]
* {{t link|Class}} - An equivalent template for [[classes]]
* {{t link|Race}} - An equivalent template for [[races|playable races]]
* {{t link|Skill}} - An equivalent template for [[skills]]


<code><nowiki>{{Ability|Constitution|30}}</nowiki></code>
== Template data==
{{Ability|Constitution|30}}
<templatedata>
 
{
<code><nowiki>{{Ability|Intelligence|20}}</nowiki></code>
    "description": "Insert a link to an ability score accompanied by the associated icon.",
{{Ability|Intelligence|20}}
    "format": "inline",
 
"params": {
<code><nowiki>{{Ability|Wisdom|20}}</nowiki></code>
"1": {
{{Ability|Wisdom|20}}
"label": "Ability name",
 
"description": "The name of the ability score.",
<code><nowiki>{{Ability|Charisma|40}}</nowiki></code>
"type": "string",
{{Ability|Charisma|40}}
            "suggestedvalues": [
 
                "Strength",
Parameter '''<nowiki>{{{2}}}</nowiki>''' defines the pixel size of the accompanying icon.  
                "Dexterity",
                "Constitution",
                "Intelligence",
                "Wisdom",
                "Charisma"
            ],
"required": true
},
"2": {
"label": "Alias",
"description": "A user-defined alias to be shown instead of the ability 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:42, 29 July 2024

Template documentation

This template is used to visually represent the main 6 abilities. Do note that saving throws should instead use Template:Saving throw, while ability checks should use Template:Ability Check.

Usage

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

Examples

Example Markup Renders as
Basic usage
{{Ability|Strength}}
Strength Strength
Adjusted icon size
{{Ability|Dexterity|w=15}}
Dexterity Dexterity
Link alias
{{Ability|Constitution|CON}}
CON CON
Alias and adjusted size
{{Ability|Intelligence|INT|w=40}}
INT INT

See also

Template data

Insert a link to an ability score accompanied by the associated icon.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Ability name1

The name of the ability score.

Suggested values
Strength Dexterity Constitution Intelligence Wisdom Charisma
Stringrequired
Alias2

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

Stringoptional
Icon sizew

The pixel size of the accompanying icon.

Numberoptional