Template:Passive inline: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
mNo edit summary
(Added category)
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#cargo_query:
<includeonly>{{#cargo_query:
tables=passives
tables=passives
|fields=name, _pageName = link, icon, CONCAT('{{#replace:{{{2|}}}|'|\'}}') = altname, CONCAT('{{#replace:{{{item|}}}|'|\'}}') = item
|fields=name, _pageName = link, icon, CONCAT('{{#replace:{{{2|}}}|'|\'}}') = altname, CONCAT('{{#replace:{{{item|}}}|'|\'}}') = item, CONCAT('{{{w|25}}}') = w
|where=_pageName = "{{#replace:{{{1}}}|&#39;|\'}}"
|where=_pageName = "{{#replace:{{{1}}}|&#39;|\'}}" OR _pageName = "{{#replace:{{{1}}}|&#39;|\'}} (passive feature)"
|limit=1
|limit=1
|format=template
|format=template
|template=Passive inline/Format
|template=Passive inline/format
|named args=yes
|named args=yes
|default=[[{{{1}}}|{{{2|{{{1}}}}}}]]{{Main namespace only|[[Category:Pages with unknown passives]]}}
|default=[[{{{1}}}|{{{2|{{{1}}}}}}]]{{Main namespace only|[[Category:Pages with unknown passives]]}}
|more results text=
|more results text=
}}</includeonly><noinclude>{{documentation|content={{shortcut|pass}}
}}</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|Darkvision}}</nowiki>}}
The result is formatted using [[Template:Passive inline/format]]


{{Pass|Darkvision}}
== 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>
}}


With an alternative name
== See also ==
 
* {{t link|Passive}} - Large format
{{InfoBlob|<nowiki>{{Pass|Cat's Grace (passive feature)|Catty Grace}}</nowiki>}}
* {{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
{{Pass|Cat's Grace (passive feature)|Catty Grace}}


To specify an item that grants this passive and to use its icon, use:
=== Alternate icon sizes ===
 
* {{t link|SmPass}} - sets the default size to 20 instead of 25
{{InfoBlob|<nowiki>{{Pass|Defy Villainy|item=Jhannyl's Gloves}}</nowiki>}}
* {{t link|MdPass}} - sets the default size to 30 instead of 25
 
* {{t link|LgPass}} - sets the default size to 40 instead of 25
{{Pass|Defy Villainy|item=Ketheric's Shield}}
 
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 ==
* {{t link|PAS}}
* {{t link|passive}}


== Template data ==
== Template data ==
Line 45: Line 45:
"1": {
"1": {
"label": "passive name",
"label": "passive name",
            "description": "The name of the passive as appears in the passives table.",
"type": "string",
"type": "string",
"required": true
"required": true
},
},
"2": {
"2": {
"label": "altname",
"description": "Alternative display name",
"type": "string"
},
        "w": {
            "label": "width",
"description": "Size in pixels of the passive icon. Generally, you should stick with the default value.",
            "default": "25",
"type": "number"
},
"item": {
"label": "item",
"label": "item",
"description": "specifies the item for which the icon should be pulled from",
"description": "specifies the item for which the icon should be pulled from",
Line 56: Line 68:
"format": "inline"
"format": "inline"
}
}
</templatedata>}}</noinclude>
</templatedata>
[[Category:Templates]]
[[Category:Link templates]]
[[Category:Cargo templates]]
[[Category:Passive feature templates]]
}}</noinclude>

Latest revision as of 22:27, 10 February 2025

Template documentation
Shortcut

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

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

Alternate icon sizes

  • {{SmPass}} - sets the default size to 20 instead of 25
  • {{MdPass}} - sets the default size to 30 instead of 25
  • {{LgPass}} - sets the default size to 40 instead of 25

Template data

No description.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
passive name1

The name of the passive as appears in the passives table.

Stringrequired
altname2

Alternative display name

Stringoptional
widthw

Size in pixels of the passive icon. Generally, you should stick with the default value.

Default
25
Numberoptional
itemitem

specifies the item for which the icon should be pulled from

Stringoptional