Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Condition/Format: Difference between revisions

Template page
added non-breaking space between icon and
Updated documentation and added category
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{#lvardef:text|[[{{{page}}}|{{#if:{{{altname|}}}|{{{altname}}}|{{{name}}} }}]]}}<span
<includeonly>{{#if:{{{inline|}}}|<span class="bg3wiki-condition" style="white-space: nowrap">{{IconLink|{{{icon}}}|{{{page}}}|{{#if: {{{altname|}}} | {{{altname}}} | {{{name|{{{page}}}}}}}}|w={{{w|25}}}|h={{{w|25}}}}}</span>|<div class="bg3wiki-condition"><strong>{{IconLink|{{{icon}}}|{{{page}}}|{{#if: {{{altname|}}} | {{{altname}}} | {{{name|{{{page}}}}}}}}|w={{{w|30}}}|h={{{w|30}}}}}</strong>{{#if: {{{duration|}}} |
class="bg3wiki-condition"
<p>{{InfoBlob | {{Duration | {{{duration}}} }} }}</p>
{{#if:{{{inline|}}}|style="white-space:nowrap"}}
>[[File:{{{icon}}}|frameless|{{#if:{{{inline|}}}|{{{w|25}}}px|30px}}|link=|{{{name}}}]]&nbsp;{{#if:{{{inline|}}}|{{#lvar:text}}|<strong>{{#lvar:text}}</strong>}}{{#if: {{{duration|}}}{{{save|}}} | <div> }}{{#if: {{{duration|}}} |
{{InfoBlob| {{Duration|{{{duration}}}}} }}
}}{{#if: {{{save|}}} |
}}{{#if: {{{save|}}} |
{{InfoBlob| {{SavingThrow|{{{save}}}|dc={{{dc|}}}}} }}
<p>{{InfoBlob | {{SavingThrow | {{{save}}} | dc = {{{dc|}}} }} }}</p>
}}{{#if: {{{duration|}}}{{{save|}}} | </div> }}{{#if:{{{inline|}}}||{{{effects}}}{{#if:{{{types|}}}|{{clear}}
}}{{#if: {{{radius m|}}} |
{{Condition Type|{{{types|}}} }}
<p>{{InfoBlob | {{Radius | m = {{{radius m}}} | showtext = true }} }}</p>
}} }}</span></includeonly><noinclude>
Meant to be used with a Cargo query.  Preview:
 
== Single effect description ==
 
{{Condition/Format
| page = Bleeding (Condition)
| name = Bleeding
| icon = Bleeding Condition Icon.webp
| duration = 3
| save = CON
| effects = Inflicts damage every turn.
}}
}}
<div>
{{{effects}}}
</div>
{{#if: {{{types|}}} |
<div>{{Condition Type | {{{types|}}} }}</div>
}}{{#if: {{{condition|}}} |


== Duration only ==
<h3> Condition: {{{condition}}} </h3>


{{Condition/Format
<div class="bg3wiki-tooltip-box bg3wiki-tooltip-gradient-common">
| page = Bleeding (Condition)
{{Condition | {{{condition}}}
| name = Bleeding
| save = {{{condition save|}}}
| icon = Bleeding Condition Icon.webp
| dc = {{{condition dc|}}}
| duration = 3
| duration = {{{condition duration|}}}
| effects = Inflicts damage every turn.
}}
}}
</div>


== Save only ==
}} {{#if: {{{condition2|}}} |
 
{{Condition/Format
| page = Bleeding (Condition)
| name = Bleeding
| icon = Bleeding Condition Icon.webp
| save = CON
| effects = Inflicts damage every turn.
}}


= Effect listing =
<h3> Condition: {{{condition2}}} </h3>


{{Condition/Format
<div class="bg3wiki-tooltip-box bg3wiki-tooltip-gradient-common">
| page = Bleeding (Condition)
{{Condition | {{{condition2}}}
| name = Bleeding
| save = {{{condition2 save|}}}
| icon = Bleeding Condition Icon.webp
| dc = {{{condition2 dc|}}}
| duration = 3
| duration = {{{condition2 duration|}}}
| save = CON
| effects =
* Inflicts damage every turn.
* Cured by healing.
}}
}}
</div>


== Duration only ==
}}</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
| duration = 3
| effects = Bleeds you out.
| effects =
* Inflicts damage every turn.
* Cured by healing.
}}
}}
 
</nowiki>
== Save only ==
| <nowiki>
 
{{Condition/Format
{{Condition/Format
| page = Bleeding (Condition)
| page = Bleeding (Condition)
Line 74: Line 55:
| icon = Bleeding Condition Icon.webp
| icon = Bleeding Condition Icon.webp
| save = CON
| save = CON
| dc = 16
| dc = 13
| effects =
| effects = Inflicts damage every turn.
* Inflicts damage every turn.
| duration = Saving Throw
* Cured by healing.
}}
}}
 
</nowiki>
== Icon and name only ==
|<nowiki>
 
{{Condition/Format
| page = Bleeding (Condition)
| name = Bleeding
| icon = Bleeding Condition Icon.webp
| effects =
* Inflicts damage every turn.
* Cured by healing.
| inline = true
}}
 
== Alternative display name ==
{{Condition/Format
{{Condition/Format
| page = Bleeding (Condition)
| page = Bleeding (Condition)
Line 101: Line 69:
* Cured by healing.
* Cured by healing.
| altname = Oh no I'm bleeding
| altname = Oh no I'm bleeding
| types = Diseased
| duration =
}}
}}
 
</nowiki>
== Condition with a type ==
| <nowiki>
{{Condition/Format
Inline example: {{Condition/Format
| page = Bleeding (Condition)
| page = Bleeding (Condition)
| name = Bleeding
| name = Bleeding
| icon = Bleeding Condition Icon.webp
| icon = Bleeding Condition Icon.webp
| effects =
| inline = true
* Oof owie ouch
| types = diseased
| types = diseased
}}. Blah blah blah.
</nowiki>
}}
}}


== Condition with multiple types ==
{{Condition/Format
| page = Bleeding (Condition)
| name = Bleeding
| icon = Bleeding Condition Icon.webp
| effects =
* Oof owie ouch
| types = diseased,prone
}}
== Inline condition with a type ==
Should not show the type.
{{Condition/Format
| page = Bleeding (Condition)
| name = Bleeding
| icon = Bleeding Condition Icon.webp
| inline = true
| types = diseased
}}. Blablabla.
Should not wrap.
<div style="width:10px">{{Condition/Format
| page = Bleeding (Condition)
| name = Bleeding
| icon = Bleeding Condition Icon.webp
| inline = true
| types = diseased
}}</div>
[[Category:Condition templates]]
== 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": "The name of the condition.",
"description": "Name of the condition.",
"required": true,
"label": "name",
"type": "string"
"type": "string"
},
},
"icon": {
        "icon": {
"description": "The icon of the condition",
"description": "Icon file of the condition.",
"required": true,
"label": "icon",
"type": "wiki-file-name"
"type": "wiki-file-name"
},
},
"inline": {
        "altname": {
"description": "Whether the condition should be formatted inline",
"type": "boolean"
},
"duration": {},
"save": {},
"effects": {},
"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>