Ad placeholder

Template:Condition: Difference between revisions

Jump to navigation Jump to search
Updated documentation and added category
No edit summary
(Updated documentation and added category)
Line 10: Line 10:
| default = [[{{{1}}} (Condition)|{{{1}}}]]{{Main namespace only|[[Category:Pages with unknown conditions]]}}
| default = [[{{{1}}} (Condition)|{{{1}}}]]{{Main namespace only|[[Category:Pages with unknown conditions]]}}
}}{{#if:{{{border|}}}|</div></div>||}}</onlyinclude></includeonly><noinclude>{{documentation|content=
}}{{#if:{{{border|}}}|</div></div>||}}</onlyinclude></includeonly><noinclude>{{documentation|content=
Use this to display a condition.  Examples follow.
Use this to display detailed information about a condition.


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 ===
== Examples ==
{{Template demo
| style = list
| <nowiki>{{Condition | Bleeding }}</nowiki>
| <nowiki>{{Condition | Bleeding | altname=oh no i'm bleeding | duration = 2 | save = CON }}</nowiki>
| <nowiki>
{{Condition
| Bleeding
| save = Constitution
| duration = 2
| dc = weapon action
| border = 1
}}</nowiki>
| <nowiki>{{Condition | Feverish | radius m = 3 | duration = Long rest}}</nowiki>
}}


Usage:
=== Inline example ===
 
This template can also be used inline, but refer to {{t link|Condition inline}} for a template designed for that.
<pre>
{{Template demo
{{Condition | Bleeding }}
| <nowiki>{{Condition | Bleeding | inline = true }}</nowiki>
</pre>
| <nowiki>{{Cond|Bleeding}}</nowiki>
 
}}
Result:
----
{{Condition | Bleeding }}
----
 
=== With duration ===
 
Usage:
 
<pre>
{{Condition | Bleeding | duration = 2 }}
</pre>


Result:
== See also ==
----
* {{t link|Condition/Format}} - An internal template actually responsible for formatting this template.
{{Condition | Bleeding | duration = 2 }}
* {{t link|Condition inline}} - Similar template that just displays the icon of the condition. For use in inline text.
----
* {{t link|Condition page}} - Page generating template responsible for adding a condition into the condition Cargo table so that it can be referenced by this template.


=== With saving throw ===
== Template parameters ==
 
<templatedata>
Usage:
{
 
"description": "Display a block of information about a condition.",
<pre>
    "format": "inline",
{{Condition | Bleeding | save = CON }}
"params": {
</pre>
"1": {
 
"description": "Name of the condition. This should match an entry in the conditions Cargo table.",
Result:
"required": true,
----
"label": "name",
{{Condition | Bleeding | save = CON }}
"type": "string"
----
},
 
        "altname": {
=== With radius ===
"description": "An alternative display name for the condition link.",
 
"type": "string"
Usage:
},
 
"duration": {
<pre>
            "description": "Duration of the condition. This is generally a number of turns, but refer to Template:Duration for special values.",
{{Condition | Bleeding | radius m = 3 }}
            "type": "string",
</pre>
            "suggestedvalues": ["Long rest", "Permanent", "Saving Throw", "Whilst on surface"],
 
            "example": "10"
Result:
        },
----
"save": {
{{Condition | Bleeding | radius m = 3 }}
            "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"],
=== With duration and saving throw ===
            "example": "Strength"
 
        },
Usage:
        "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.",
<pre>
            "type": "string",
{{Condition | Bleeding | save = CON | duration = 2 | dc = 15 }}
            "suggestedvalues": ["caster", "weapon action"],
</pre>
            "example": "15"
 
        },
Result:
"radius m": {
----
            "description": "Radius of the condition in metres. This is rarely used.",
{{Condition | Bleeding | save = CON | duration = 2 | dc = 15 }}
            "type": "number"
----
        },
 
        "inline": {
=== With a border ===
"description": "Whether the condition should be formatted inline. See also Template:Condition inline.",
 
"type": "boolean",
Use {{InfoBlob|<nowiki>border = 1</nowiki>}} to add a border.
            "deprecated": true
 
}
<pre>
}
{{Condition | Bleeding | save = CON | duration = 2 | border = 1}}
}
</pre>
</templatedata>}}
 
[[Category:Templates]]
Result:
----
{{Condition | Bleeding | save = CON | duration = 2 | border = 1}}
----
 
=== Inline-friendly ===
 
Usage:
<pre>
{{Condition | Bleeding | inline = true }}
</pre>
 
Result: blabla {{Condition | Bleeding | inline = true }} blabla
 
=== Alternative display name ===
<pre>
{{Condition | Bleeding | save = CON | altname=oh no i'm bleeding | duration = 2 }}
</pre>
 
Result:
{{Condition | Bleeding | save = CON | altname=oh no i'm bleeding | duration = 2 }}
 
== Also displays types ==
{{Condition | Feverish }}
}}
[[Category:Condition templates]]
[[Category:Condition templates]]
</noinclude>
</noinclude>

Navigation menu