Template:Condition page: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
No edit summary
(Add multiple type support.)
Line 5: Line 5:
}}{{#lvardef: type
}}{{#lvardef: type
<!--backwards compat for disease-->
<!--backwards compat for disease-->
| {{#ifeq:{{{disease|}}}|yes|disease}}{{#if:{{{type|}}}|{{{type}}} }}
| {{#ifeq:{{{disease|}}}|yes|disease|{{{type|}}} }}
}}<!--Actual display starts here-->{{NoExcerpt | {{icon| {{#lvar:icon}} |30}} '''{{#lvar:name}}''' }}
}}{{#arraydefine:types|{{#lvar:type}}|,}}<!--Actual display starts here-->{{NoExcerpt | {{icon| {{#lvar:icon}} |30}} '''{{#lvar:name}}''' }}


{{{effects|}}} {{#if: {{#lvar:type}} | {{blank}}
{{{effects|}}} {{#if: {{#lvar:type}} | <br>
* {{Condition/Type|{{#lvar:type}} }}
{{#arrayprint:types|<br>|@|{{Condition Type|@}} }}
}}</div><!--some housekeeping:categories and cargo-->{{Main namespace only|[[Category:Conditions]]}}{{#switch: {{{this is an example|}}}
}}</div><!--some housekeeping:categories and cargo-->{{Main namespace only|[[Category:Conditions]]}}{{#switch: {{{this is an example|}}}
| yes =
| yes =
Line 15: Line 15:
| name = {{#lvar:name}}
| name = {{#lvar:name}}
| icon = {{#lvar:icon}}
| icon = {{#lvar:icon}}
| type = {{#lvar:type}}
| types = {{#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.
If a condition has multiple types, separate them with a semicolon.


<pre>
<pre>
Line 29: Line 31:
Examples:
Examples:


= Blade Ward (Condition) =
== Blade Ward (Condition) ==


{{ConditionPage
{{ConditionPage
Line 38: Line 40:
}}
}}


= Bone Chilled (Condition) =
== Bone Chilled (Condition) ==


{{ConditionPage
{{ConditionPage
Line 48: Line 50:
}}
}}


= Flesh Rot (Condition) =
== Flesh Rot (Condition) ==


{{ConditionPage
{{ConditionPage
Line 56: Line 58:
* {{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.
| type = disease
| type = diseased
| this is an example = yes
}}
 
== Multiple types example ==
 
{{ConditionPage
| name = Absolutely Ruined
| icon = Generic Death Icon.webp
| effects =
* How are you still alive?
* {{Disadvantage}} on [[Ability Check]]s and {{SavingThrow}}s using Charisma.
* Vulnerable to all damage.
| type = diseased, cursed,incapacitated, prone, charmed
| this is an example = yes
| this is an example = yes
}}
}}
Line 66: Line 81:
| icon = File
| icon = File
| effects = Wikitext
| effects = Wikitext
| type = String(disease, curse, poison)
| types = List (,) of String
}}
}}
</noinclude>
 
== Template data ==
<templatedata>
{
"params": {
"name": {
"description": "If specified, overrides the name.",
"type": "string",
"default": "Uses the name of the page, minus (Condition)."
},
"icon": {
"description": "If specified, overrides the icon.",
"type": "wiki-file-name",
"default": "Uses the \"name\" plus Condition.webp"
},
"disease": {
"description": "If specified, sets the type to be disease",
"type": "boolean",
"deprecated": true
},
"type": {
"description": "The type or types of the condition. If multiple, separate the types with commas.",
"type": "string"
},
"effects": {
"description": "The description of the condition.",
"type": "content",
"suggested": true
},
"this is an example": {
"description": "If specified, does not insert into the Conditions table.",
"type": "boolean"
}
}
}
</templatedata></noinclude>

Revision as of 15:52, 11 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.

If a condition has multiple types, separate them with a semicolon.

{{ConditionPage
| effects =
| type =
}}

Examples:

Blade Ward (Condition)

Bone Chilled (Condition)

Flesh Rot (Condition)

Condition Type Icon.pngDiseased

Multiple types example

Condition Type Icon.pngDiseased
Condition Type Icon.pngCursed
Condition Type Icon.pngIncapacitated
Condition Type Icon.pngProne
Condition Type Icon.pngCharmed

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

Template data

No description.

Template parameters

ParameterDescriptionTypeStatus
namename

If specified, overrides the name.

Default
Uses the name of the page, minus (Condition).
Stringoptional
iconicon

If specified, overrides the icon.

Default
Uses the "name" plus Condition.webp
Fileoptional
diseasedisease

If specified, sets the type to be disease

Booleandeprecated
typetype

The type or types of the condition. If multiple, separate the types with commas.

Stringoptional
effectseffects

The description of the condition.

Contentsuggested
this is an examplethis is an example

If specified, does not insert into the Conditions table.

Booleanoptional