Template:Passive inline: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
(Cleanup.)
(Inline template is now cargo'd, and can specify an alt name)
Line 1: Line 1:
<includeonly>{{#if: {{{item|}}} |
<includeonly>{{#cargo_query:
{{#cargo_query:
tables=passives
|fields=name, _pageName = link, {{#if: {{{2|}}} | CONCAT('{{#replace:{{{2}}}|'|\'}}') = altname, }}{{#if: {{{item|}}} | CONCAT('{{#cargo_query:
tables=item_icon
tables=item_icon
|fields=TRIM(icon),CONCAT('25'),CONCAT(''),CONCAT('No'),CONCAT('{{#replace:{{{item}}}|'|\'}}')
|fields=icon
|where=item_icon._pageName='{{#replace:{{{item}}}|'|\'}}'
|where=_pageName = "{{#replace:{{{item}}}|&#39;|\'}}"
|limit=1
|limit=1
|order by=item_icon._pageName
|default=
|default={{ItemIcon Internal|Generic Feature Icon.webp|25|||{{{item}}}}}
|format=template
|template=Trim
|more results text=
|more results text=
}}') = icon | icon}}
|where=_pageName = "{{#replace:{{{1}}}|&#39;|\'}}"
|limit=1
|format=template
|format=template
|template=ItemIcon Internal
|template=Passive inline/Format
}}&nbsp;[[{{{1}}}|{{{2|{{{1}}}}}}]]
|named args=yes
|
|default=[[{{{1}}}|{{{2|{{{1}}}}}}]]
{{IconLink
|more results text=
| {{#replace:{{#replace:{{#replace:{{#replace:{{{1}}}|:|}}|/|<nowiki/> <nowiki/>}}|(|<nowiki/> <nowiki/>}}|)|<nowiki/> <nowiki/>}} Icon.webp
}}</includeonly><noinclude>{{documentation|content={{shortcut|pass}}
| {{{1}}}
| {{{2| {{{1}}} }}}
| size = {{{w|24}}}
| w = {{{w|}}}
| h = {{{h|}}}
| gap = {{{gap|}}}
| block = true
}}}}</includeonly><noinclude>{{documentation|content={{shortcut|pass}}
Similar to [[Template:Passive]], but exclusively supports inline usage.
Similar to [[Template:Passive]], but exclusively supports inline usage.


{{InfoBlob|<nowiki>{{Pass|Opportunity Attack}}</nowiki>}}
{{InfoBlob|<nowiki>{{Pass|Darkvision}}</nowiki>}}


{{Pass|Opportunity Attack}}
{{Pass|Darkvision}}
 
With an alternative name
 
{{InfoBlob|<nowiki>{{Pass|Cat's Grace (passive feature)|Catty Grace}}</nowiki>}}
 
{{Pass|Cat's Grace (passive feature)|Catty Grace}}


To specify an item that grants this passive and to use its icon, use:
To specify an item that grants this passive and to use its icon, use:
Line 33: Line 36:


{{Pass|Defy Villainy|item=Jhannyl's Gloves}}
{{Pass|Defy Villainy|item=Jhannyl's Gloves}}
When the passive doesn't exist:
{{InfoBlob|<nowiki>{{Pass|Non-existant passive|It's gone}}</nowiki>}}
{{Pass|Non-existant passive|It's gone}}


== See also ==
== See also ==

Revision as of 20:11, 9 May 2024

Template documentation
Shortcut

Similar to Template:Passive, but exclusively supports inline usage.

{{Pass|Darkvision}}

Darkvision Darkvision

With an alternative name

{{Pass|Cat's Grace (passive feature)|Catty Grace}}

Catty Grace Catty Grace

To specify an item that grants this passive and to use its icon, use:

{{Pass|Defy Villainy|item=Jhannyl's Gloves}}

Defy Villainy Defy Villainy

When the passive doesn't exist:

{{Pass|Non-existant passive|It's gone}}

It's gone

See also

Template data

No description.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
passive name1

no description

Stringrequired
item2

specifies the item for which the icon should be pulled from

Stringoptional