Template:Condition: Difference between revisions

From Baldur's Gate 3 Wiki
Jump to navigation Jump to search
(do not show more results text)
(Add inline use case)
Line 1: Line 1:
<includeonly>{{#if:{{{border|}}}|<div style="padding-bottom: 1em"><div class="bg3wiki-tooltip-box">||}}{{#cargo_query: tables = conditions
<includeonly><onlyinclude>{{#if:{{{border|}}}|<div style="padding-bottom: 1em"><div class="bg3wiki-tooltip-box">||}}{{#cargo_query: tables = conditions
| fields = name, icon, effects, CONCAT('{{{save|}}}') = save, CONCAT('{{{duration|}}}') = duration
| fields = name, icon, effects, CONCAT('{{{save|}}}') = save, CONCAT('{{{duration|}}}') = duration, CONCAT('{{{skip effect|}}}') = skip effect
| where = name = '{{#replace: {{{1}}} | ' | '' }}'
| where = name = '{{#replace: {{{1}}} | ' | '' }}'
| format = template
| format = template
Line 8: Line 8:
| order by = _ID
| order by = _ID
| more results text=
| more results text=
}}{{#if:{{{border|1}}}|</div></div>||}}</includeonly><noinclude>
}}{{#if:{{{border|1}}}|</div></div>||}}</onlyinclude></includeonly><noinclude>
Use this to display a condition.  Examples follow.
Use this to display a condition.  Examples follow.


This template just runs the Cargo query.  For the formatting, see: [[Template:Condition/Format]]
This template just runs the Cargo query.  For the formatting, see: [[Template:Condition/Format]]


----
=== Base usage ===


Usage:
Usage:
Line 25: Line 25:
{{Condition | Bleeding }}
{{Condition | Bleeding }}
----
----
=== With duration ===


Usage:
Usage:
Line 36: Line 38:
{{Condition | Bleeding | duration = 2 }}
{{Condition | Bleeding | duration = 2 }}
----
----
=== With saving throw ===


Usage:
Usage:
Line 47: Line 51:
{{Condition | Bleeding | save = CON }}
{{Condition | Bleeding | save = CON }}
----
----
=== With duration and saving throw ===


Usage:
Usage:
Line 58: Line 64:
{{Condition | Bleeding | save = CON | duration = 2 }}
{{Condition | Bleeding | save = CON | duration = 2 }}
----
----
=== With a border ===


Use {{InfoBlob|<nowiki>border = 1</nowiki>}} to add a border.
Use {{InfoBlob|<nowiki>border = 1</nowiki>}} to add a border.
Line 69: Line 77:
{{Condition | Bleeding | save = CON | duration = 2 | border = 1}}
{{Condition | Bleeding | save = CON | duration = 2 | border = 1}}
----
----
=== Inline-friendly ===
Usage:
<pre>
{{Condition | Bleeding | skip effect = true }}
</pre>
Result: blabla {{Condition | Bleeding | skip effect = true }} blabla
</noinclude>
</noinclude>

Revision as of 21:14, 27 September 2023

Use this to display a condition. Examples follow.

This template just runs the Cargo query. For the formatting, see: Template:Condition/Format

Base usage

Usage:

{{Condition | Bleeding }}

Result:


Bleeding [[{{{page}}}|Bleeding]]

With duration

Usage:

{{Condition | Bleeding | duration = 2 }}

Result:


Bleeding [[{{{page}}}|Bleeding]]

Duration: 2 turns


With saving throw

Usage:

{{Condition | Bleeding | save = CON }}

Result:


Bleeding [[{{{page}}}|Bleeding]]

Constitution saving throw


With duration and saving throw

Usage:

{{Condition | Bleeding | save = CON | duration = 2 }}

Result:


Bleeding [[{{{page}}}|Bleeding]]

Duration: 2 turns

Constitution saving throw


With a border

Use border = 1 to add a border.

{{Condition | Bleeding | save = CON | duration = 2 | border = 1}}

Result:


Bleeding [[{{{page}}}|Bleeding]]

Duration: 2 turns

Constitution saving throw


Inline-friendly

Usage:

{{Condition | Bleeding | skip effect = true }}
Result: blabla
Bleeding [[{{{page}}}|Bleeding]]
blabla