Template:Condition page: Difference between revisions

From Baldur's Gate 3 Wiki
Jump to navigation Jump to search
No edit summary
(Change "disease" to "type". Display type.)
Line 1: Line 1:
<includeonly><div class="bg3wiki-tooltip-box">{{
<includeonly><div class="bg3wiki-tooltip-box"><!--Extract name and icon from the page title-->{{#lvardef: name
#lvardef: name | {{{name | {{#explode: {{#titleparts: {{PAGENAME}} }} | ( | 0 }} }}}
| {{{name | {{#explode: {{#titleparts: {{PAGENAME}} }} | ( | 0 }} }}}
}}{{
}}{{#lvardef: icon
#lvardef: icon | {{{icon | {{#replace: {{#lvar:name}} | : | }} Condition Icon.webp }}}
| {{{icon | {{#replace: {{#lvar:name}} | : | }} Condition Icon.webp }}}
}}{{NoExcerpt | {{icon| {{#lvar:icon}} |30}} '''{{#lvar:name}}''' }}
}}{{#lvardef: type
<!--backwards compat for disease-->
| {{#ifeq:{{{disease|}}}|yes|disease}}{{#if:{{{type|}}}|{{{type}}} }}
}}<!--Actual display starts here-->{{NoExcerpt | {{icon| {{#lvar:icon}} |30}} '''{{#lvar:name}}''' }}


{{{effects|}}} {{#ifeq: {{{disease|}}} | yes | {{blank}}
{{{effects|}}} {{#if: {{#lvar:type}} | {{blank}}
 
* {{Condition/Type|{{#lvar:type}} }}
* [[Disease|Diseased]]
}}</div><!--some housekeeping:categories and cargo-->{{#switch: {{{this is an example|}}}
}}</div>{{#switch: {{{this is an example|}}}
| yes =
| yes =
| #default = [[Category:Conditions]]
| #default = [[Category:Conditions]]
}}{{#switch: {{{this is an example|}}}
| yes =
| #default = {{#cargo_store: _table = conditions
| name = {{#lvar:name}}
| icon = {{#lvar:icon}}
| type = {{#lvar:type}}
}}
}}</includeonly><noinclude>
}}</includeonly><noinclude>
If the page title is {{C|Blah (Condition)}}, then you don't have to provide the {{C|name}} parameter.  Likewise, if the icon for the condition is called {{C|Blah Condition Icon.webp}} then you don't have to provide the {{C|icon}} parameter.
If the page title is {{C|Blah (Condition)}}, then you don't have to provide the {{C|name}} parameter.  Likewise, if the icon for the condition is called {{C|Blah Condition Icon.webp}} then you don't have to provide the {{C|icon}} parameter.
Line 17: Line 26:
{{ConditionPage
{{ConditionPage
| effects =
| effects =
| disease =
| type =
}}
}}
</pre>
</pre>
Line 50: Line 59:
* {{Disadvantage}} on [[Ability Check]]s and {{SavingThrow}}s using Charisma.
* {{Disadvantage}} on [[Ability Check]]s and {{SavingThrow}}s using Charisma.
* Vulnerable to all damage.
* Vulnerable to all damage.
| disease = yes
| type = disease
| this is an example = yes
| this is an example = yes
}}
}}
Line 60: Line 69:
| icon = File
| icon = File
| effects = Wikitext
| effects = Wikitext
| disease = Boolean
| type = String(disease, curse, poison)
}}
</noinclude><includeonly>{{#switch: {{{this is an example|}}}
| yes =
| #default = {{#cargo_store: _table = conditions
| name = {{#lvar:name}}
| icon = {{#lvar:icon}}
| disease = {{IfEmpty | {{{disease|}}} | no}}
}}
}}
}}</includeonly>
</noinclude>

Revision as of 13:11, 9 October 2023

If the page title is Blah (Condition), then you don't have to provide the name parameter. Likewise, if the icon for the condition is called Blah Condition Icon.webp then you don't have to provide the icon parameter.

{{ConditionPage
| effects =
| type =
}}

Examples:

Blade Ward (Condition)

Bone Chilled (Condition)

Flesh Rot (Condition)

This template defines the table "conditions". View table.