Template:Passive list: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
(honour mode superscript)
(Added the ability to cargo query an item icon)
Line 1: Line 1:
<includeonly><includeonly>{{#lvardef:}}<dd>{{#if:{{{custom|}}}|{{SmIconLink|{{{custom}}}|{{{2}}}|{{{1}}}}}|{{IconLink
<includeonly><includeonly>{{#lvardef:}}<dd>{{#if:{{{custom|}}}|{{SmIconLink|{{{custom}}}|{{{2}}}|{{{1}}}}}|{{#if:{{{item|}}}|{{#cargo_query:
tables=item_icon
|fields=TRIM(icon),CONCAT('{{{2|{{{1}}}}}}'),CONCAT('{{{2|{{{1}}}}}}')
|where=item_icon._pageName="{{{item}}}"
|limit=1
|order by=item_icon._pageName
|default={{SmIconLink|{{{item}}} Unfaded Icon.png|{{{2|{{{1}}}}}}}}
|more results text=
|format=template
|template=SmIconLink
}}|{{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 8: Line 18:
| gap = {{{gap|}}}
| gap = {{{gap|}}}
| block = true
| block = true
}}}}{{#if:{{{t|}}}|{{Tactician}}|}}{{#if:{{{honour|}}}|{{Honour}}|}}</dd></includeonly><noinclude>A version of [[Template:SAI]] that adds {{InfoBlob|<nowiki><dd></nowiki>}}-list around it.
}}}}}}{{#if:{{{t|}}}|{{Tactician}}|}}{{#if:{{{honour|}}}|{{Honour}}|}}</dd></includeonly><noinclude>A version of [[Template:SAI]] that adds {{InfoBlob|<nowiki><dd></nowiki>}}-list around it.


Useful for '''PAS'''-sive features on infoboxes.
Useful for '''PAS'''-sive features on infoboxes.
Line 14: Line 24:
Example:
Example:


{{InfoBlob|<nowiki>{{PAS|Opportunity Attack}}{{PAS|Fey Ancestry}}{{PAS|Evasion|t=1}}</nowiki>}}
{{InfoBlob|<nowiki>{{PAS|Opportunity Attack}}{{PAS|Fey Ancestry}}{{PAS|Evasion|t=1}}{{PAS|Darkvision (passive feature)|Darkvision|honour=1}}</nowiki>}}


{{PAS|Opportunity Attack}}{{PAS|Fey Ancestry}}{{PAS|Evasion|t=1}}{{PAS|Darkvision|honour=1}}
{{PAS|Opportunity Attack}}{{PAS|Fey Ancestry}}{{PAS|Evasion|t=1}}{{PAS|Darkvision|honour=1}}
To specify an item that grants this passive and to use its icon, use:
{{InfoBlob|<nowiki>{{PAS|Authority|item=Cloth of Authority}}</nowiki>}}
{{PAS|Authority|item=Cloth of Authority}}


If you need a custom iconlink use:
If you need a custom iconlink use:

Revision as of 22:34, 12 December 2023

A version of Template:SAI that adds <dd>-list around it.

Useful for PAS-sive features on infoboxes.

Example:

{{PAS|Opportunity Attack}}{{PAS|Fey Ancestry}}{{PAS|Evasion|t=1}}{{PAS|Darkvision (passive feature)|Darkvision|honour=1}}

Opportunity Attack Opportunity Attack
Fey Ancestry Fey Ancestry
Evasion EvasionTTactician
Darkvision DarkvisionHHonour
To specify an item that grants this passive and to use its icon, use: {{PAS|Authority|item=Cloth of Authority}}
Authority Authority
If you need a custom iconlink use: {{PAS|Balance|Leather Armour +2|custom=Leather Armour PlusTwo Icon.png}}
Balance Balance