Template:SAI: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
No edit summary
(Add nowrap support for SAI)
 
(11 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<includeonly>{{#lvardef:}}{{IconLink
<includeonly>{{IconLink
| {{#replace:{{#replace:{{#replace:{{#replace:{{{1}}}|:|}}|/|<nowiki/> <nowiki/>}}|(|<nowiki/> <nowiki/>}}|)|<nowiki/> <nowiki/>}} Icon.webp
| {{#replace:{{#replace:{{#replace:{{#replace:{{{1}}}|:|}}|/|<nowiki/> <nowiki/>}}|(|<nowiki/> <nowiki/>}}|)|<nowiki/> <nowiki/>}} Icon.webp
| {{{1}}}
| {{{1}}}
Line 6: Line 6:
| w = {{{w|}}}
| w = {{{w|}}}
| h = {{{h|}}}
| h = {{{h|}}}
| gap = 2
| gap = {{{gap|}}}
| block = true
| block = {{{block|}}}
}}</includeonly><noinclude>[[Category:Templates]]{{DISPLAYTITLE:Template:SAI - '''{{Color|yellow|S}}'''pell and '''{{Color|yellow|A}}'''bility '''{{Color|yellow|I}}'''conlink}}
| nowrap = {{{nowrap|}}}
}}{{#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}}
A universal link template for Spells and Abilities. Once all Ability Icons get converted to Ability_Icon.webp it will be complete.
A universal link template for Spells and Abilities. Once all Ability Icons get converted to Ability_Icon.webp it will be complete.


Line 27: Line 28:
|}
|}


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. For passive features 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 have alternative link text as well as change its size: {{InfoBlob|<nowiki>{{SAI|Power Word Kill|Alias Link|w=40|size=40}}</nowiki>}}


{{SAI|Power Word Kill|Alias Link|w=40}}
{{SAI|Power Word Kill|Alias Link|w=40}}
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 {{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.
: {{SAI|Aid|c=16}}
: {{SAI|Disguise Self|r=16}}
: {{SAI|Silence|c=16|r=16}}


=== Inline example ===
=== Inline example ===

Latest revision as of 05:27, 29 July 2024

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:

{{SAI|Magic Missile}} {{SAI|Enlarge/Reduce}}
Magic Missile Magic Missile Enlarge/Reduce Enlarge/Reduce

And abilities:

{{SAI|Frenzy}} {{SAI|Guided Strike}} {{SAI|Acolyte of Nature}} {{SAI|Rage: Bear Heart}} {{SAI|Metamagic: Twinned Spell}} {{SAI|Bardic Inspiration (Condition)}}
Frenzy Frenzy Guided Strike Guided Strike Acolyte of Nature Acolyte of Nature Rage: Bear Heart Rage: Bear Heart Metamagic: Twinned Spell Metamagic: Twinned Spell Bardic Inspiration (Condition) Bardic Inspiration (Condition)

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 have alternative link text as well as change its size: {{SAI|Power Word Kill|Alias Link|w=40|size=40}}

Alias Link Alias Link

Can have alternative link text as well as change its size: {{SAI|Power Word Kill|Alias Link|w=40|size=40}}

You can also add Concentration and Ritual icons {{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.

Aid Aid
Disguise Self Disguise Self
Silence Silence

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.

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 24

Numberoptional
heightheight

Icon height

Numberoptional
sizesize

The size of the icon. Defaults to 24.

Numberoptional
blockblock

no description

Booleanoptional
gapgap

no description

Numberoptional