Template:Condition/Format: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
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>
}}</div>}}</includeonly><noinclude>
}}{{#if: {{{condition|}}} |
Meant to be used with a Cargo query.  Preview:


== Single effect description ==
<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|}}}
| save = CON
| effects = Inflicts damage every turn.
}}
}}
</div>


== Duration only ==
}} {{#if: {{{condition2|}}} |


{{Condition/Format
<h3> Condition: {{{condition2}}} </h3>
| page = Bleeding (Condition)
| name = Bleeding
| icon = Bleeding Condition Icon.webp
| duration = 3
| effects = Inflicts damage every turn.
}}


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


= Effect listing =
}}</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.
| save = CON
| effects =
* Inflicts damage every turn.
* Cured by healing.
}}
 
== Duration only ==
 
{{Condition/Format
| page = Bleeding (Condition)
| name = Bleeding
| icon = Bleeding Condition Icon.webp
| duration = 3
| effects =
* Inflicts damage every turn.
* Cured by healing.
}}
}}
 
</nowiki>
== Save only ==
| <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 = 16
| dc = 13
| effects =
| effects = Inflicts damage every turn.
* Inflicts damage every turn.
| duration = Saving Throw
* Cured by healing.
}}
}}
 
</nowiki>
== Name and icon only, inline ==
|<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.
| inline = true
| altname = Oh no I'm bleeding
}}
 
== Name, icon, effects only ==
 
{{Condition/Format
| page = Bleeding (Condition)
| name = Bleeding
| icon = Bleeding Condition Icon.webp
| effects = Bleeds you out.
}}
 
== Name, icon, effects, types ==
 
{{Condition/Format
| page = Bleeding (Condition)
| name = Bleeding
| icon = Bleeding Condition Icon.webp
| effects = Bleeds you out.
| types = Diseased
| types = Diseased
| duration =
}}
}}
 
</nowiki>
== Alternative display name ==
| <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
| effects =
| inline = true
* Inflicts damage every turn.
* Cured by healing.
| altname = Oh no I'm bleeding
}}
 
== Condition with a type ==
 
{{Condition/Format
| page = Bleeding (Condition)
| name = Bleeding
| icon = Bleeding Condition Icon.webp
| effects =
* 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>

Latest revision as of 23:24, 21 July 2024

Template documentation

Template responsible for formatting {{Condition}}. This is intended for internal use by the parent template only.

Examples

Markup
{{Condition/Format
| page = Bleeding (Condition)
| name = Bleeding
| icon = Bleeding Condition Icon.webp
| effects = Bleeds you out.
}}
Renders as
Bleeding Bleeding

Bleeds you out.

Markup
{{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
Bleeding Bleeding

Duration: Until successful Saving Throw

DC 13  Constitution saving throw

Inflicts damage every turn.

Markup
{{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
Oh no I'm bleeding Oh no I'm bleeding
  • Inflicts damage every turn.
  • Cured by healing.
Markup
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: Bleeding Bleeding. Blah blah blah.

Template data

Display a block of information about a condition.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
namepage

Condition page to link to.

Page namerequired
namename

Name of the condition.

Stringrequired
iconicon

Icon file of the condition.

Filerequired
altnamealtname

An alternative display name for the condition link.

Stringoptional
durationduration

Duration of the condition. This is generally a number of turns, but refer to Template:Duration for special values.

Suggested values
Long rest Permanent Saving Throw Whilst on surface
Example
10
Stringoptional
savesave

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)

Suggested values
STR DEX CON INT WIS CHA
Example
Strength
Stringoptional
dcdc

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.

Suggested values
caster weapon action
Example
15
Stringoptional
typestypes

Any condition types the condition belongs to.

Example
Diseased
Stringoptional
radius mradius m

Radius of the condition in metres. This is rarely used.

Numberoptional
inlineinline

Whether the condition should be formatted inline. See also Template:Condition inline.

Booleandeprecated