mNo edit summary |
HiddenDragon (talk | contribs) mNo edit summary |
||
(10 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
| {{{1}}} | | {{{1}}} | ||
| {{{2|{{{1}}} }}} | | {{{2|{{{1}}} }}} | ||
| w = {{{w|25}}} | |||
| w = {{{w|}}} | |||
| h = {{{h|}}} | | h = {{{h|}}} | ||
| | | size = {{{w|25}}} | ||
| | | nowrap = yes | ||
}}{{#if:{{{c|}}}|{{Nbts}}{{Icon|Concentration Icon.png|{{{c|16}}}px|link=Concentration|caption=}}|}}{{#if:{{{r|}}}|{{Nbts}}{{Icon|Ritual_Spell_Icon.png|{{{r|16}}}px|link=Ritual Spells|caption=}}|}}</includeonly><noinclude> | }}{{#if:{{{c|}}}|{{Nbts}}{{Icon|Concentration Icon.png|{{{c|16}}}px|link=Concentration|caption=}}|}}{{#if:{{{r|}}}|{{Nbts}}{{Icon|Ritual_Spell_Icon.png|{{{r|16}}}px|link=Ritual Spells|caption=}}|}}</includeonly><noinclude> | ||
A universal link template for Spells and | {{Documentation|content= | ||
{{Shortcut|SAI}} | |||
A universal link template for Spells and Actions. Once all Ability Icons get converted to Ability_Icon.webp it will be complete. | |||
Works for spells: | Works for spells: | ||
{{Template demo | |||
| style = table | |||
| | | <nowiki>{{SAI|Magic Missile}}</nowiki> | ||
| <nowiki>{{SAI|Enlarge/Reduce}}</nowiki> | |||
}} | |||
And abilities: | And abilities: | ||
{| | {{Template demo | ||
| | | style = table | ||
| <nowiki>{{SAI|Frenzy}}</nowiki> | |||
| <nowiki>{{SAI|Guided Strike}}</nowiki> | |||
| <nowiki>{{SAI|Acolyte of Nature}}</nowiki> | |||
| <nowiki>{{SAI|Rage: Bear Heart}}</nowiki> | |||
| <nowiki>{{SAI|Metamagic: Twinned Spell}}</nowiki> | |||
}} | |||
But as for conditions, not all conditions are supported this way. If the link name contains {{InfoBlob|:}}, {{InfoBlob|/}}, {{InfoBlob|(}} or {{InfoBlob|)}}, they will be removed in the icon name. In some cases, inline use is undesirable for passive features, in which case use [[Template:PAS]]. | But as for conditions, not all conditions are supported this way. If the link name contains {{InfoBlob|:}}, {{InfoBlob|/}}, {{InfoBlob|(}} or {{InfoBlob|)}}, they will be removed in the icon name. In some cases, inline use is undesirable for passive features, in which case use [[Template:PAS]]. | ||
Can | Can change its size: | ||
{{Template demo | |||
| style = table | |||
| <nowiki>{{SAI|Power Word Kill|w=40}}</nowiki> | |||
}} | |||
Can have alternative link text as well as change its size: | |||
{{SAI|Power Word Kill|Alias Link|w=40}} | {{Template demo | ||
| style = table | |||
| <nowiki>{{SAI|Power Word Kill|Alias Link|w=40}}</nowiki> | |||
}} | |||
You can also add Concentration and Ritual icons: | |||
{{Template demo | |||
| style = table | |||
| <nowiki>{{SAI|Aid|c=16}}</nowiki> | |||
| <nowiki>{{SAI|Disguise Self|r=16}}</nowiki> | |||
| <nowiki>{{SAI|Silence|c=16|r=16}}</nowiki> | |||
}} | |||
...where the number is the size of the icon. Best to keep it 16px. | |||
=== Inline example === | === Inline example === | ||
Lorem ipsum dolor sit amet, consectetur {{SAI|Guided Strike}} elit. Sed porta ornare ipsum nec hendrerit. Etiam tempus placerat dui, nec ornare neque tempus sit amet. Integer convallis erat eget sollicitudin mattis. Integer vehicula consectetur risus, eu suscipit lacus faucibus a. Aliquam tempor sagittis dignissim. Vestibulum sed faucibus nibh. Donec in pharetra ex. Suspendisse potenti. | Lorem ipsum dolor sit amet, consectetur {{SAI|Guided Strike}} elit. Sed porta ornare ipsum nec hendrerit. Etiam tempus placerat dui, nec ornare neque tempus sit amet. Integer convallis erat eget sollicitudin mattis. Integer vehicula consectetur risus, eu suscipit lacus faucibus a. Aliquam tempor sagittis dignissim. Vestibulum sed faucibus nibh. Donec in pharetra ex. Suspendisse potenti. | ||
== See also == | |||
* {{Tlink|LgSAI}} - sets the default size to 40 instead of 25 | |||
* {{Tlink|MdSAI}} - sets the default size to 30 instead of 25 | |||
* {{Tlink|SmSAI}} - sets the default size to 20 instead of 25 | |||
== Template parameters == | == Template parameters == | ||
Line 60: | Line 81: | ||
}, | }, | ||
"w": { | "w": { | ||
"description": "Icon width. Defaults to | "description": "Icon width. Defaults to 25", | ||
"type": "number", | "type": "number", | ||
"label": "width" | "label": "width" | ||
}, | }, | ||
" | "h": { | ||
"description": " | "description": "Icon height. Defaults to 25", | ||
"type": "number" | "type": "number", | ||
"label": "height" | |||
}, | }, | ||
" | "c": { | ||
"type": " | "description": "Icon size in pixels of the concentration icon. Hidden by default", | ||
"type": "number", | |||
"label": "concentration icon" | |||
}, | }, | ||
" | "r": { | ||
" | "description": "Icon size in pixels of the ritual icon. Hidden by default", | ||
"type": "number", | |||
"label": "ritual icon" | |||
" | |||
" | |||
} | } | ||
}, | }, | ||
Line 84: | Line 106: | ||
"2", | "2", | ||
"w", | "w", | ||
" | "h", | ||
"c", | |||
"r" | |||
] | ] | ||
} | } | ||
</templatedata> | </templatedata> | ||
}} | |||
[[Category:Templates]] | |||
[[Category:Link templates]] | |||
</noinclude> | </noinclude> |
Latest revision as of 21:32, 10 February 2025
- {{SAI}}
A universal link template for Spells and Actions. Once all Ability Icons get converted to Ability_Icon.webp it will be complete.
Works for spells:
Markup | Renders as |
---|---|
{{SAI|Magic Missile}} | |
{{SAI|Enlarge/Reduce}} |
And abilities:
Markup | Renders as |
---|---|
{{SAI|Frenzy}} | |
{{SAI|Guided Strike}} | |
{{SAI|Acolyte of Nature}} | |
{{SAI|Rage: Bear Heart}} | |
{{SAI|Metamagic: Twinned Spell}} |
But as for conditions, not all conditions are supported this way. If the link name contains :, /, ( or ), they will be removed in the icon name. In some cases, inline use is undesirable for passive features, in which case use Template:PAS.
Can change its size:
Markup | Renders as |
---|---|
{{SAI|Power Word Kill|w=40}} |
Can have alternative link text as well as change its size:
Markup | Renders as |
---|---|
{{SAI|Power Word Kill|Alias Link|w=40}} |
You can also add Concentration and Ritual icons:
Markup | Renders as |
---|---|
{{SAI|Aid|c=16}} | ![]() |
{{SAI|Disguise Self|r=16}} | ![]() |
{{SAI|Silence|c=16|r=16}} | ![]() ![]() |
...where the number is the size of the icon. Best to keep it 16px.
Inline example
Lorem ipsum dolor sit amet, consectetur elit. Sed porta ornare ipsum nec hendrerit. Etiam tempus placerat dui, nec ornare neque tempus sit amet. Integer convallis erat eget sollicitudin mattis. Integer vehicula consectetur risus, eu suscipit lacus faucibus a. Aliquam tempor sagittis dignissim. Vestibulum sed faucibus nibh. Donec in pharetra ex. Suspendisse potenti.
See also
- {{LgSAI}} - sets the default size to 40 instead of 25
- {{MdSAI}} - sets the default size to 30 instead of 25
- {{SmSAI}} - sets the default size to 20 instead of 25
Template parameters
Inserts a link for a spell or ability.
Parameter | Description | Type | Status | |
---|---|---|---|---|
name | 1 | Name of the ability | Page name | required |
alias | 2 | Alias for the link text | String | optional |
width | w | Icon width. Defaults to 25 | Number | optional |
height | h | Icon height. Defaults to 25 | Number | optional |
concentration icon | c | Icon size in pixels of the concentration icon. Hidden by default | Number | optional |
ritual icon | r | Icon size in pixels of the ritual icon. Hidden by default | Number | optional |