Template:Condition/format: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
(Add type and examples.)
mNo edit summary
 
(33 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<includeonly>{{#lvardef:text|[[{{{name}}} (Condition)|{{#if:{{{altname|}}}|{{{altname}}}|{{{name}}} }}]]}}[[File:{{{icon}}}|frameless|{{#if:{{{inline|}}}|25px|30px}}|link=|{{{name}}}]] {{#if:{{{inline|}}}|{{#lvar:text}}|<strong>{{#lvar:text}}</strong>}} {{#if: {{{duration|}}}{{{save|}}} | <div> }}{{#if: {{{duration|}}} |
<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|}}} |
{{InfoBlob| {{Duration|{{{duration}}}}} }}
<p>{{InfoBlob | {{Duration | {{{duration}}} }} }}</p>
}} {{#if: {{{save|}}} |
}}{{#if: {{{save|}}} |
{{InfoBlob| {{SavingThrow|{{{save}}}}} }}
<p>{{InfoBlob | {{SavingThrow | {{{save}}} | dc = {{{dc|}}} }} }}</p>
}}{{#if: {{{duration|}}}{{{save|}}} | </div> }} {{#if:{{{inline|}}}||{{{effects}}}{{#if:{{{type|}}}|{{clear}}
}}{{#if: {{{radius m|}}} |
* {{Condition/Type|{{{type}}} }} }} }}</includeonly><noinclude>
<p>{{InfoBlob | {{Radius | m = {{{radius m}}} | showtext = true }} }}</p>
Meant to be used with a Cargo query.  Preview:
}}
<div>
{{{effects}}}
</div>
{{#if: {{{types|}}} |
<div>{{Condition Type | {{{types|}}} }}</div>
}}{{#if: {{{creature|}}} |


== Single effect description ==
<h3> Creature: {{{creature}}} </h3>


{{Condition/Format
<div class="bg3wiki-tooltip-box bg3wiki-tooltip-gradient-common">
| name = Bleeding
{{Creature
| icon = Bleeding Condition Icon.webp
| {{{creature}}}
| duration = 3
| physical only = yes
| save = CON
}}{{clear}}
| effects = Inflicts damage every turn.
{{#if: {{{creature actions|}}} |
{{#invoke: ParseList | main | {{{creature actions}}} | type = none | useTemplate = Spell action }}
}}
}}
</div>


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


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


== Save only ==
}} {{#if: {{{condition2|}}} |
 
{{Condition/Format
| 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">
| name = Bleeding
{{Condition | {{{condition2}}}
| icon = Bleeding Condition Icon.webp
| save = {{{condition2 save|}}}
| duration = 3
| dc = {{{condition2 dc|}}}
| save = CON
| duration = {{{condition2 duration|}}}
| 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.


{{Condition/Format
== Examples ==
{{Template demo
| style = list
| <nowiki>
{{Condition/format
| 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)
| name = Bleeding
| name = Bleeding
| icon = Bleeding Condition Icon.webp
| icon = Bleeding Condition Icon.webp
| save = CON
| save = CON
| effects =
| dc = 13
* Inflicts damage every turn.
| effects = * Inflicts damage every turn.
* Cured by healing.
| duration = Saving Throw
}}
}}
 
</nowiki>
== Icon and name only ==
|<nowiki>
 
{{Condition/format
{{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
| name = Bleeding
| name = Bleeding
| icon = Bleeding Condition Icon.webp
| icon = Bleeding Condition Icon.webp
Line 88: Line 83:
* 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
{{Condition/format
| name = Bleeding
| page = Polymorphed (Condition)
| icon = Bleeding Condition Icon.webp
| name = Polymorphed
| icon = Polymorphed Condition Icon.webp
| effects =
| effects =
* Oof owie ouch
* Creature is turned into a harmless sheep with 3 [[Hit Points]] for 5 turns.
| type = disease
* If the sheep's Hit Points are reduced to 0, the creature reverts to its original form with its original Hit Points.
| type = Polymorphed
| duration = 5
| creature = Sheep
| creature actions = Sleep, Bite (Dire Wolf)
}}
}}
 
</nowiki>
== Inline condition with a type ==
| <nowiki>
Should not show the type.
Inline example: {{Condition/format
{{Condition/Format
| page = Bleeding (Condition)
| name = Bleeding
| name = Bleeding
| icon = Bleeding Condition Icon.webp
| icon = Bleeding Condition Icon.webp
| inline = true
| inline = true
| type = disease
| types = diseased
}}. Blah blah blah.
</nowiki>
}}
}}


Line 111: Line 115:
<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>

Latest revision as of 09:34, 12 February 2025

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
{{Condition/format
| page = Polymorphed (Condition)
| name = Polymorphed
| icon = Polymorphed Condition Icon.webp
| effects =
* Creature is turned into a harmless sheep with 3 [[Hit Points]] for 5 turns.
* If the sheep's Hit Points are reduced to 0, the creature reverts to its original form with its original Hit Points.
| type = Polymorphed
| duration = 5
| creature = Sheep
| creature actions = Sleep, Bite (Dire Wolf)
}}
Renders as
Polymorphed Polymorphed

Duration: 5 turns

  • Creature is turned into a harmless sheep with 3 Hit Points for 5 turns.
  • If the sheep's Hit Points are reduced to 0, the creature reverts to its original form with its original Hit Points.

Creature: Sheep

Portrait Sheep.png
Portrait Frame.png

STR

12
(+1)

DEX

10

CON

11

HP Icon.png Hit Points

3

Creature AC Icon.png Armour Class

10

Sleep Sleep (+ )
Cast as a level 1 spell at will.
Bite Bite ()
Bite a target.
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