Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Spell action icon link: Difference between revisions

Template page
mNo edit summary
mNo edit summary
 
(10 intermediate revisions by the same user not shown)
Line 3: Line 3:
| {{{1}}}
| {{{1}}}
| {{{2|{{{1}}} }}}
| {{{2|{{{1}}} }}}
| size = {{{w|24}}}
| w = {{{w|25}}}
| w = {{{w|}}}
| h = {{{h|}}}
| h = {{{h|}}}
| gap = {{{gap|}}}
| size = {{{w|25}}}
| block = {{{block|}}}
| 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>[[Category:Templates]]{{DISPLAYTITLE:Template:SAI - '''{{Color|yellow|S}}'''pell and '''{{Color|yellow|A}}'''bility '''{{Color|yellow|I}}'''conlink}}
}}{{#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 Abilities. Once all Ability Icons get converted to Ability_Icon.webp it will be complete.
{{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
{| class="wikitable"
| style = table
| <code><nowiki>{{SAI|Magic Missile}}</nowiki></code> || <code><nowiki>{{SAI|Enlarge/Reduce}}</nowiki></code>
| <nowiki>{{SAI|Magic Missile}}</nowiki>
|-
| <nowiki>{{SAI|Enlarge/Reduce}}</nowiki>
| {{SAI|Magic Missile}} || {{SAI|Enlarge/Reduce}}
}}
|}


And abilities:
And abilities:


{| class="wikitable"
{{Template demo
| <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>
| style = table
|-
| <nowiki>{{SAI|Frenzy}}</nowiki>
| {{SAI|Frenzy}} || {{SAI|Guided Strike}} || {{SAI|Acolyte of Nature}} || {{SAI|Rage: Bear Heart}} || {{SAI|Metamagic: Twinned Spell}} ||  {{SAI|Bardic Inspiration (Condition)}}
| <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 have alternative link text as well as change its size: {{InfoBlob|<nowiki>{{SAI|Power Word Kill|Alias Link|w=40|size=40}}</nowiki>}}
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>
}}


Can have alternative link text as well as change its size: {{InfoBlob|<nowiki>{{SAI|Power Word Kill|Alias Link|w=40|size=40}}</nowiki>}}
You can also add Concentration and Ritual icons:


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.
{{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>
}}


: {{SAI|Aid|c=16}}
...where the number is the size of the icon. Best to keep it 16px.
: {{SAI|Disguise Self|r=16}}
: {{SAI|Silence|c=16|r=16}}


=== 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 24",
"description": "Icon width. Defaults to 25",
"type": "number",
"type": "number",
"label": "width"
"label": "width"
},
},
"size": {
"h": {
"description": "The size of the icon. Defaults to 24.",
"description": "Icon height. Defaults to 25",
"type": "number"
"type": "number",
"label": "height"
},
},
"block": {
"c": {
"type": "boolean"
"description": "Icon size in pixels of the concentration icon. Hidden by default",
"type": "number",
"label": "concentration icon"
},
},
"gap": {
"r": {
"type": "number"
"description": "Icon size in pixels of the ritual icon. Hidden by default",
},
"type": "number",
"height": {
"label": "ritual icon"
"description": "Icon height",
"type": "number"
}
}
},
},
Line 84: Line 106:
"2",
"2",
"w",
"w",
"height",
"h",
"size",
        "c",
"block",
        "r"
"gap"
]
]
}
}
</templatedata>
</templatedata>
}}
[[Category:Templates]]
[[Category:Link templates]]
</noinclude>
</noinclude>

Latest revision as of 21:32, 10 February 2025

Template documentation
Shortcut

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}}
Magic Missile Magic Missile
{{SAI|Enlarge/Reduce}}
Enlarge/Reduce Enlarge/Reduce

And abilities:

Markup Renders as
{{SAI|Frenzy}}
Frenzy Frenzy
{{SAI|Guided Strike}}
Guided Strike Guided Strike
{{SAI|Acolyte of Nature}}
Acolyte of Nature Acolyte of Nature
{{SAI|Rage: Bear Heart}}
Rage: Bear Heart Rage: Bear Heart
{{SAI|Metamagic: Twinned Spell}}
Metamagic: Twinned Spell 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}}
Power Word Kill Power Word Kill

Can have alternative link text as well as change its size:

Markup Renders as
{{SAI|Power Word Kill|Alias Link|w=40}}
Alias Link Alias Link

You can also add Concentration and Ritual icons:

Markup Renders as
{{SAI|Aid|c=16}}
Aid Aid
{{SAI|Disguise Self|r=16}}
Disguise Self Disguise Self
{{SAI|Silence|c=16|r=16}}
Silence Silence

...where the number is the size of the icon. Best to keep it 16px.

Inline example

Lorem ipsum dolor sit amet, consectetur Guided Strike 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

  • {{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.

Template parameters

ParameterDescriptionTypeStatus
name1

Name of the ability

Page namerequired
alias2

Alias for the link text

Stringoptional
widthw

Icon width. Defaults to 25

Numberoptional
heighth

Icon height. Defaults to 25

Numberoptional
concentration iconc

Icon size in pixels of the concentration icon. Hidden by default

Numberoptional
ritual iconr

Icon size in pixels of the ritual icon. Hidden by default

Numberoptional