Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Infobox creature/passives format: Difference between revisions

Template page
(Support specifying item icon.)
(Specifying item always overrides, otherwise it will use the icon)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly><div class="bg3wiki-infobox-creature-passive">
<includeonly><div class="bg3wiki-pi-creature-detail">
<div class="bg3wiki-infobox-creature-passive-name">
<div class="bg3wiki-pi-creature-detail-title">
{{IconLink
{{IconLink
| block = yes
| block = yes
| size = 25
| size = 25
| {{IfEmpty | {{{icon|}}} | {{{item icon|}}} | Generic Buff Icon.webp }}
| {{#if: {{{item|}}}
  | {{#cargo_query: tables = item_icon
    | fields = icon
    | where = _pageName = "{{{item}}}"
    | format = template
    | template = trim
    | limit = 1
    | more results text =
    }}
  | {{#if: {{{icon|}}} | {{{icon}}} | Generic Feature Icon.webp }}
  }}
| {{{_pageName}}}
| {{{_pageName}}}
| {{{name}}}
| '''{{{name}}}'''
}}
}}
</div>
</div>
<div class="bg3wiki-infobox-creature-passive-brief">
<div class="bg3wiki-pi-creature-detail-text">
{{{brief}}}
{{#if:{{{brief|}}} | {{{brief}}} | {{{description}}} }}
</div>
</div>
</div></includeonly><noinclude>
</div></includeonly><noinclude>
Line 38: Line 48:
| name = Ambusher (+1)
| name = Ambusher (+1)
| icon =
| icon =
| item icon = Scale Mail PlusTwo Unfaded Icon.png
| item = Scale Mail +2
| brief = +1 to [[initiative]]
| brief = +1 to [[initiative]]
}}
}}
Line 47: Line 57:
| name = Ambusher (+1)
| name = Ambusher (+1)
| icon =
| icon =
| item icon = Scale Mail PlusTwo Unfaded Icon.png
| item = Scale Mail +2
| brief = Gain +1 to [[initiative]] rolls.
| brief = Gain +1 to [[initiative]] rolls.
}}
}}
</noinclude>
</noinclude>

Latest revision as of 23:27, 21 September 2024

Used to format passive features in the infobox. Meant to be invoked by Template:Infobox creature/passives query.

Examples:

{{Infobox creature/passives format
| _pageName = Cull the Weak (Drider)
| name = Cull the Weak
| icon = Generic Physical Icon.webp
| brief = Deals +2d6 damage to targets below 50% HP.
}}

Deals +2d6 damage to targets below 50% HP.

{{Infobox creature/passives format
| _pageName = Ambusher (+1)
| name = Ambusher (+1)
| icon =
| item = Scale Mail +2
| brief = +1 to [[initiative]]
}}

Gain +1 to initiative rolls.