Template:Condition/Format: Difference between revisions
HiddenDragon (talk | contribs) mNo edit summary |
(Updated documentation and added category) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 3: | Line 3: | ||
}}{{#if: {{{save|}}} | | }}{{#if: {{{save|}}} | | ||
<p>{{InfoBlob | {{SavingThrow | {{{save}}} | dc = {{{dc|}}} }} }}</p> | <p>{{InfoBlob | {{SavingThrow | {{{save}}} | dc = {{{dc|}}} }} }}</p> | ||
}}{{#if: {{{radius m|}}} | | |||
<p>{{InfoBlob | {{Radius | m = {{{radius m}}} | showtext = true }} }}</p> | |||
}} | }} | ||
<div> | <div> | ||
Line 9: | Line 11: | ||
{{#if: {{{types|}}} | | {{#if: {{{types|}}} | | ||
<div>{{Condition Type | {{{types|}}} }}</div> | <div>{{Condition Type | {{{types|}}} }}</div> | ||
}} | }}{{#if: {{{condition|}}} | | ||
<h3> Condition: {{{condition}}} </h3> | |||
{{Condition | <div class="bg3wiki-tooltip-box bg3wiki-tooltip-gradient-common"> | ||
| | {{Condition | {{{condition}}} | ||
| | | save = {{{condition save|}}} | ||
| | | dc = {{{condition dc|}}} | ||
| duration = | | duration = {{{condition duration|}}} | ||
| | |||
}} | }} | ||
</div> | |||
}} {{#if: {{{condition2|}}} | | |||
{{ | <h3> Condition: {{{condition2}}} </h3> | ||
}} | |||
= | <div class="bg3wiki-tooltip-box bg3wiki-tooltip-gradient-common"> | ||
{{Condition | {{{condition2}}} | |||
{{Condition | | save = {{{condition2 save|}}} | ||
| | | dc = {{{condition2 dc|}}} | ||
| | | duration = {{{condition2 duration|}}} | ||
| | |||
| | |||
| | |||
}} | }} | ||
</div> | |||
= | }}</div>}}</includeonly><noinclude>{{documentation|content= | ||
Template responsible for formatting {{t link|Condition}}. This is intended for internal use by the parent template only. | |||
== Examples == | |||
{{Template demo | |||
| style = list | |||
| <nowiki> | |||
{{Condition/Format | {{Condition/Format | ||
| page = Bleeding (Condition) | | page = Bleeding (Condition) | ||
| name = Bleeding | | name = Bleeding | ||
| icon = Bleeding Condition Icon.webp | | icon = Bleeding Condition Icon.webp | ||
| effects = Bleeds you out. | |||
| effects = | |||
}} | }} | ||
</nowiki> | |||
| <nowiki> | |||
{{Condition/Format | {{Condition/Format | ||
| page = Bleeding (Condition) | | page = Bleeding (Condition) | ||
Line 75: | Line 55: | ||
| icon = Bleeding Condition Icon.webp | | icon = Bleeding Condition Icon.webp | ||
| save = CON | | save = CON | ||
| dc = | | dc = 13 | ||
| effects = | | effects = Inflicts damage every turn. | ||
| duration = Saving Throw | |||
}} | }} | ||
</nowiki> | |||
|<nowiki> | |||
{{Condition/Format | {{Condition/Format | ||
| page = Bleeding (Condition) | | page = Bleeding (Condition) | ||
Line 90: | Line 68: | ||
* Inflicts damage every turn. | * Inflicts damage every turn. | ||
* Cured by healing. | * Cured by healing. | ||
| | | altname = Oh no I'm bleeding | ||
| types = Diseased | | types = Diseased | ||
| duration = | |||
}} | }} | ||
</nowiki> | |||
| <nowiki> | |||
Inline example: {{Condition/Format | |||
{{Condition/Format | |||
| page = Bleeding (Condition) | | page = Bleeding (Condition) | ||
| name = Bleeding | | name = Bleeding | ||
| icon = Bleeding Condition Icon.webp | | icon = Bleeding Condition Icon.webp | ||
| | | inline = true | ||
| types = diseased | | types = diseased | ||
}}. Blah blah blah. | |||
</nowiki> | |||
}} | }} | ||
== Template data == | == Template data == | ||
<templatedata> | <templatedata> | ||
{ | { | ||
"description": "Display a block of information about a condition.", | |||
"format": "inline", | |||
"params": { | "params": { | ||
"page": { | |||
"description": "Condition page to link to.", | |||
"required": true, | |||
"label": "name", | |||
"type": "wiki-page-name" | |||
}, | |||
"name": { | "name": { | ||
"description": " | "description": "Name of the condition.", | ||
"required": true, | |||
"label": "name", | |||
"type": "string" | "type": "string" | ||
}, | }, | ||
"icon": { | |||
"description": " | "description": "Icon file of the condition.", | ||
"required": true, | |||
"label": "icon", | |||
"type": "wiki-file-name" | "type": "wiki-file-name" | ||
}, | }, | ||
"altname": { | |||
"description": "An alternative display name for the condition link.", | "description": "An alternative display name for the condition link.", | ||
"type": "string" | "type": "string" | ||
}, | |||
"duration": { | |||
"description": "Duration of the condition. This is generally a number of turns, but refer to Template:Duration for special values.", | |||
"type": "string", | |||
"suggestedvalues": ["Long rest", "Permanent", "Saving Throw", "Whilst on surface"], | |||
"example": "10" | |||
}, | |||
"save": { | |||
"description": "Ability used for the saving throw to resist this condition. Accepts abilities in either the shorthand (e.g. STR) or long form (e.g. Strength)", | |||
"type": "string", | |||
"suggestedvalues": ["STR", "DEX", "CON", "INT", "WIS", "CHA"], | |||
"example": "Strength" | |||
}, | |||
"dc": { | |||
"description": "The difficulty class of the saving throw to resist this condition. This is either a fixed number or a special value like \"caster\". Refer to Template:Saving Throw for these special values.", | |||
"type": "string", | |||
"suggestedvalues": ["caster", "weapon action"], | |||
"example": "15" | |||
}, | |||
"types": { | |||
"description": "Any condition types the condition belongs to.", | |||
"type": "string", | |||
"example": "Diseased" | |||
}, | |||
"radius m": { | |||
"description": "Radius of the condition in metres. This is rarely used.", | |||
"type": "number" | |||
}, | |||
"inline": { | |||
"description": "Whether the condition should be formatted inline. See also Template:Condition inline.", | |||
"type": "boolean", | |||
"deprecated": true | |||
} | } | ||
} | } | ||
} | } | ||
</templatedata> | </templatedata>}} | ||
[[Category:Templates]] | |||
[[Category:Condition templates]] | |||
</noinclude> | </noinclude> |
Latest revision as of 23:24, 21 July 2024
Template responsible for formatting {{Condition}}. This is intended for internal use by the parent template only.
Examples
{{Condition/Format | page = Bleeding (Condition) | name = Bleeding | icon = Bleeding Condition Icon.webp | effects = Bleeds you out. }}Renders as
Bleeds you out.
{{Condition/Format | page = Bleeding (Condition) | name = Bleeding | icon = Bleeding Condition Icon.webp | save = CON | dc = 13 | effects = Inflicts damage every turn. | duration = Saving Throw }}Renders as
{{Condition/Format | page = Bleeding (Condition) | name = Bleeding | icon = Bleeding Condition Icon.webp | effects = * Inflicts damage every turn. * Cured by healing. | altname = Oh no I'm bleeding | types = Diseased | duration = }}Renders as
- Inflicts damage every turn.
- Cured by healing.
Inline example: {{Condition/Format | page = Bleeding (Condition) | name = Bleeding | icon = Bleeding Condition Icon.webp | inline = true | types = diseased }}. Blah blah blah.Renders as
Inline example: . Blah blah blah.
Template data
Display a block of information about a condition.
Parameter | Description | Type | Status | |
---|---|---|---|---|
name | page | Condition page to link to. | Page name | required |
name | name | Name of the condition. | String | required |
icon | icon | Icon file of the condition. | File | required |
altname | altname | An alternative display name for the condition link. | String | optional |
duration | duration | Duration of the condition. This is generally a number of turns, but refer to Template:Duration for special values.
| String | optional |
save | save | Ability used for the saving throw to resist this condition. Accepts abilities in either the shorthand (e.g. STR) or long form (e.g. Strength)
| String | optional |
dc | dc | The difficulty class of the saving throw to resist this condition. This is either a fixed number or a special value like "caster". Refer to Template:Saving Throw for these special values.
| String | optional |
types | types | Any condition types the condition belongs to.
| String | optional |
radius m | radius m | Radius of the condition in metres. This is rarely used. | Number | optional |
inline | inline | Whether the condition should be formatted inline. See also Template:Condition inline. | Boolean | deprecated |