Template:Condition page: Difference between revisions
Jump to navigation
Jump to search
Cursed
Incapacitated
Prone
Charmed
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 | | {{#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}} | {{ | {{{effects|}}} {{#if: {{#lvar:type}} | <br> | ||
{{#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}} | ||
| | | 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 = | | 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 | ||
| | | 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)
- Has resistance against Bludgeoning, Piercing, and Slashing damage dealt by weapon attacks. Damage of these types is halved.
Bone Chilled (Condition)
- Can not regain Hit Points.
- If Undead, has Disadvantage on Attack Rolls.
Flesh Rot (Condition)
- Flesh is decaying.
- Disadvantage on Ability Checks and Saving throws using Charisma.
- Vulnerable to all damage.
Multiple types example
- How are you still alive?
- Disadvantage on Ability Checks and Saving throws using Charisma.
- Vulnerable to all damage.
Cursed
Incapacitated
Prone
Charmed
This template defines the table "conditions". View table.
Template data
No description.
Parameter | Description | Type | Status | |
---|---|---|---|---|
name | name | If specified, overrides the name.
| String | optional |
icon | icon | If specified, overrides the icon.
| File | optional |
disease | disease | If specified, sets the type to be disease | Boolean | deprecated |
type | type | The type or types of the condition. If multiple, separate the types with commas. | String | optional |
effects | effects | The description of the condition. | Content | suggested |
this is an example | this is an example | If specified, does not insert into the Conditions table. | Boolean | optional |