Template:Passive inline: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
m (HiddenDragon moved page Template:Pass to Template:Passive inline)
mNo edit summary
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly><includeonly>{{#if:{{{item|}}}|{{#cargo_query:
<includeonly>{{#cargo_query:
tables=item_icon
tables=passives
|fields=TRIM(icon),CONCAT('25'),CONCAT(''),CONCAT('No'),CONCAT('{{#replace:{{{item}}}|'|\'}}')
|fields=name, _pageName = link, icon, CONCAT('{{#replace:{{{2|}}}|'|\'}}') = altname, CONCAT('{{#replace:{{{item|}}}|'|\'}}') = item, CONCAT('{{{w|25}}}') = w
|where=item_icon._pageName='{{#replace:{{{item}}}|'|\'}}'
|where=_pageName = "{{#replace:{{{1}}}|&#39;|\'}}" OR _pageName = "{{#replace:{{{1}}}|&#39;|\'}} (passive feature)"
|limit=1
|limit=1
|order by=item_icon._pageName
|format=template
|default={{ItemIcon Internal|Generic Feature Icon.webp|25|||{{{item}}}}}
|template=Passive inline/format
|named args=yes
|default=[[{{{1}}}|{{{2|{{{1}}}}}}]]{{Main namespace only|[[Category:Pages with unknown passives]]}}
|more results text=
|more results text=
|format=template
}}</includeonly><noinclude>{{documentation|content={{shortcut|pass|PAS}}
|template=ItemIcon Internal
}} [[{{{1}}}|{{{2|{{{1}}}}}}]]|{{IconLink
| {{#replace:{{#replace:{{#replace:{{#replace:{{{1}}}|:|}}|/|<nowiki/> <nowiki/>}}|(|<nowiki/> <nowiki/>}}|)|<nowiki/> <nowiki/>}} Icon.webp
| {{{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>}}
The result is formatted using [[Template:Passive inline/format]]
 
{{Pass|Opportunity Attack}}
 
To specify an item that grants this passive and to use its icon, use:
 
{{InfoBlob|<nowiki>{{Pass|Defy Villainy|item=Jhannyl's Gloves}}</nowiki>}}


{{Pass|Defy Villainy|item=Jhannyl's Gloves}}
== Examples ==
{{Template demo
|caption 1 = Default usage
|<nowiki>{{Pass|Darkvision}}</nowiki>
|caption 2 = Alternative name
|<nowiki>{{Pass|Cat's Grace (passive feature)|Catty Grace}}</nowiki>
|caption 3 = Using an item's icon
|<nowiki>{{Pass|Defy Villainy|item=Ketheric's Shield}}</nowiki>
|caption 4 = Specify icon width
|<nowiki>{{Pass|High Spellcasting (+1)|item=Armour of Landfall|w=40}}</nowiki>
|caption 5 = When the passive doesn't exist
|<nowiki>{{Pass|Non-existant passive|It's gone}}</nowiki>
}}


== See also ==
== See also ==
* {{t link|PAS}}
* {{t link|PAS}} - Alias for Passive inline
* {{t link|passive}}
* {{t link|Passive}} - Large format
* {{t link|Passive feature page}} - Page generating template responsible for adding a passive into the passives Cargo table so that it can be referenced by this template.
* {{t link|Passive minimal}} - Displays just the description field of the passive


== Template data ==
== Template data ==
Line 53: Line 52:
"format": "inline"
"format": "inline"
}
}
</templatedata>}}</noinclude>
</templatedata>
[[Category:Templates]]
[[Category:Link templates]]
[[Category:Cargo templates]]
}}</noinclude>

Latest revision as of 20:51, 19 January 2025

Template documentation
Shortcuts

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

The result is formatted using Template:Passive inline/format

Examples

Example Markup Renders as
Default usage
{{Pass|Darkvision}}
Darkvision Darkvision
Alternative name
{{Pass|Cat's Grace (passive feature)|Catty Grace}}
Catty Grace Catty Grace
Using an item's icon
{{Pass|Defy Villainy|item=Ketheric's Shield}}
Defy Villainy Defy Villainy
Specify icon width
{{Pass|High Spellcasting (+1)|item=Armour of Landfall|w=40}}
High Spellcasting High Spellcasting
When the passive doesn't exist
{{Pass|Non-existant passive|It's gone}}
It's gone

See also

  • {{PAS}} - Alias for Passive inline
  • {{Passive}} - Large format
  • {{Passive feature page}} - Page generating template responsible for adding a passive into the passives Cargo table so that it can be referenced by this template.
  • {{Passive minimal}} - Displays just the description field of the passive

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