Template:Infobox creature/passives format: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
(Change to generic feature icon)
(Specifying item always overrides, otherwise it will use the icon)
 
(3 intermediate revisions by the same user not shown)
Line 4: Line 4:
| block = yes
| block = yes
| size = 25
| size = 25
| {{#if: {{{icon|}}}
| {{#if: {{{item|}}}
  | {{{icon}}}
   | {{#cargo_query: tables = item_icon
   | {{#if: {{{item|}}}
    | fields = icon
    | {{#cargo_query: tables = item_icon
    | where = _pageName = "{{{item}}}"
      | fields = icon
    | format = template
      | where = _pageName = "{{{item}}}"
    | template = trim
      | format = template
    | limit = 1
      | template = trim
     | more results text =
      }}
     | Generic Feature Icon.webp
     }}
     }}
  | {{#if: {{{icon|}}} | {{{icon}}} | Generic Feature Icon.webp }}
   }}
   }}
| {{{_pageName}}}
| {{{_pageName}}}
Line 21: Line 20:
</div>
</div>
<div class="bg3wiki-pi-creature-detail-text">
<div class="bg3wiki-pi-creature-detail-text">
{{{brief}}}
{{#if:{{{brief|}}} | {{{brief}}} | {{{description}}} }}
</div>
</div>
</div></includeonly><noinclude>
</div></includeonly><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.