Template:SAI: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
m (headerize template params)
mNo edit summary
 
(28 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<includeonly>{{IconLink
<includeonly>{{IconLink
| {{#replace:{{{1}}}|:|}} Icon.webp
| {{#replace:{{#replace:{{#replace:{{#replace:{{{1}}}|:|}}|/|<nowiki/> <nowiki/>}}|(|<nowiki/> <nowiki/>}}|)|<nowiki/> <nowiki/>}} Icon.webp
| {{{1}}}
| {{{1}}}
| {{{2|{{{1}}} }}}
| {{{2|{{{1}}} }}}
| w = {{{w|24}}}
| size = {{{w|24}}}
| h = {{{h|{{{size|}}}}}}
| w = {{{w|}}}
| h = {{{h|}}}
| gap = {{{gap|}}}
| block = {{{block|}}}
| block = {{{block|}}}
| gap = {{{gap|}}}}}</includeonly><noinclude>[[Category:Templates]]{{DISPLAYTITLE:Template:SAI - '''{{Color|yellow|S}}'''pell and '''{{Color|yellow|A}}'''bility '''{{Color|yellow|I}}'''con}}
}}{{#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>[[Category:Templates]]{{DISPLAYTITLE:Template:SAI - '''{{Color|yellow|S}}'''pell and '''{{Color|yellow|A}}'''bility '''{{Color|yellow|I}}'''conlink}}
''Work in Progress''
A universal link template for Spells and Abilities. Once all Ability Icons get converted to Ability_Icon.webp it will be complete.
 
Works for spells:
 
{| class="wikitable"
| <code><nowiki>{{SAI|Magic Missile}}</nowiki></code> || <code><nowiki>{{SAI|Enlarge/Reduce}}</nowiki></code>
|-
| {{SAI|Magic Missile}} || {{SAI|Enlarge/Reduce}}
|}
 
And abilities:


A universal link template for Spells and Abilities. Once all Ability Icons get converted to Ability_Icon.webp it will be complete.
{| class="wikitable"
| <code><nowiki>{{SAI|Frenzy}}</nowiki></code> || <code><nowiki>{{SAI|Guided Strike}}</nowiki></code> || <code><nowiki>{{SAI|Acolyte of Nature}}</nowiki></code> || <code><nowiki>{{SAI|Rage: Bear Heart}}</nowiki></code> || <code><nowiki>{{SAI|Metamagic: Twinned Spell}}</nowiki></code> || <code><nowiki>{{SAI|Bardic Inspiration (Condition)}}</nowiki></code>
|-
| {{SAI|Frenzy}} || {{SAI|Guided Strike}} || {{SAI|Acolyte of Nature}} || {{SAI|Rage: Bear Heart}} || {{SAI|Metamagic: Twinned Spell}} ||  {{SAI|Bardic Inspiration (Condition)}}
|}
 
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]].


{{SAI|Magic Missile}}
Can have alternative link text as well as change its size: {{InfoBlob|<nowiki>{{SAI|Power Word Kill|Alias Link|w=40|size=40}}</nowiki>}}


{{SAI|Frenzy}}, {{SAI|Guided Strike}}, {{SAI|Acolyte of Nature}}, {{SAI|Rage: Bear Heart}}, {{SAI|Metamagic: Twinned Spell}}
{{SAI|Power Word Kill|Alias Link|w=40}}


{{SAI|Power Word Kill|True Strike|w=34}}
Can have alternative link text as well as change its size: {{InfoBlob|<nowiki>{{SAI|Power Word Kill|Alias Link|w=40|size=40}}</nowiki>}}


{{InfoBlob|<nowiki>{{SAI|Magic Missile}}</nowiki>}}
You can also add Concentration and Ritual icons {{InfoBlob|<nowiki>{{SAI|Aid|c=16}}, {{SAI|Disguise Self|r=16}}, {{SAI|Silence|c=16|r=16}}</nowiki>}} where the number is the size of the icon. Best to keep it 16px.


{{InfoBlob|<nowiki>{{SAI|Frenzy}}, {{SAI|Guided Strike}}, {{SAI|Acolyte of Nature}}, {{SAI|Rage: Bear Heart}}, {{SAI|Metamagic: Twinned Spell}}</nowiki>}}
: {{SAI|Aid|c=16}}
: {{SAI|Disguise Self|r=16}}
: {{SAI|Silence|c=16|r=16}}


{{InfoBlob|<nowiki>{{SAI|Power Word Kill|w=34}}</nowiki>}}
=== 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.


== Template parameters ==
== Template parameters ==
Line 29: Line 50:
"1": {
"1": {
"description": "Name of the ability",
"description": "Name of the ability",
"required": true
"required": true,
"label": "name",
"type": "wiki-page-name"
},
},
"2": {
"2": {
"description": "(optional) Alias for the link text"
"description": "Alias for the link text",
"label": "alias",
"type": "string"
},
},
"w": {
"w": {
"description": "(optional) Icon width. Defaults to 24",
"description": "Icon width. Defaults to 24",
"type": "number",
"label": "width"
},
"size": {
"description": "The size of the icon. Defaults to 24.",
"type": "number"
"type": "number"
},
},
"h": {
"block": {
"description": "(optional) Icon height",
"type": "boolean"
},
"gap": {
"type": "number"
"type": "number"
},
},
"size": {
"height": {
"description": "(optional) The size of the icon. This is equivalent to the \"w\" parameter. Defaults to 24."
"description": "Icon height",
},
"type": "number"
"block": {},
}
"gap": {}
},
},
"description": "Inserts a link for a spell or ability."
"description": "Inserts a link for a spell or ability.",
"paramOrder": [
"1",
"2",
"w",
"height",
"size",
"block",
"gap"
]
}
}
</templatedata>
</templatedata>
</noinclude>
</noinclude>

Navigation menu