Template:Condition page: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
m (Last edit? pt. 2)
(Rearranged the section layout so that condition sources is above the table of conditions with the same stack ID. The stack ID table can get very long which obscured the more pertinent information about the condition sources.)
(43 intermediate revisions by 5 users not shown)
Line 8: Line 8:
<!--backwards compat for disease-->
<!--backwards compat for disease-->
| {{#ifeq:{{{disease|}}}|yes|disease|{{{type|}}} }}
| {{#ifeq:{{{disease|}}}|yes|disease|{{{type|}}} }}
}}<!-- Check if the stack ID is used by any other conditions and save it as #lvar:stackid --> {{#if:{{{stack id|}}}|{{#vardefine:counter|0
}}{{#cargo_query:tables=conditions|fields=name|where=stack_id='{{{stack id}}}'||order by=name ASC|format=template|template=counter|default=
}}{{#lvardef:stackid|{{#ifeq:{{#var:counter}}|1||1}}}}
}}<!-- Status properties --> {{#lvardef:FreezeDuration|{{#if:{{#invoke:String2|matchAny|source={{{properties}}}|FreezeDuration}}|1|}}
}}{{PageSeo
}}{{PageSeo
| title = {{PAGENAME}}
| title = {{PAGENAME}}
Line 18: Line 23:
{{Condition type|{{#lvar:type}} }}}}{{#if:{{{honour mode|}}}|{{blank}}
{{Condition type|{{#lvar:type}} }}}}{{#if:{{{honour mode|}}}|{{blank}}


== [[Honour mode]] ==
== Honour mode ==
{{{honour mode}}}}}{{#if:{{#ifeq:{{#cargo_query:tables=conditions|where=stack_id='{{{stack id|}}}'|fields=name, effects}}|{{#cargo_query:tables=conditions|where=name='{{#lvar:name}}'|fields=name, effects}}||{{{stack id|}}}}}{{{status groups|}}}{{{tick type|}}}{{{stack type|}}}{{{properties|}}}|{{blank}}
{{{honour mode}}}}}{{#if:{{#lvar:stackid}}{{{status groups|}}}{{{tick type|}}}{{{stack type|}}}{{{properties|}}}|{{blank}}


== Properties ==
== Properties ==
{{#if: {{#ifeq:{{#cargo_query:tables=conditions|where=stack_id='{{{stack id|}}}'|fields=name, effects}}|{{#cargo_query:tables=conditions|where=name='{{#lvar:name}}'|fields=name, effects}}||{{{stack id|}}}}}|{{blank}}
{{#if:{{#lvar:stackid}}|{{blank}}


{{SmallIcon|Info Icon.png|link=Status ID}}[[Stack ID]]: {{code|{{{stack id}}}}}{{Main namespace only|[[Category:Has stack ID]]}}|{{Main namespace only|[[Category:No stack ID]]}}
{{SmIconLink|Info Icon.png|Stack ID}}: {{code|{{{stack id}}}}}{{Main namespace only|[[Category:Has stack ID]]}}|{{Main namespace only|[[Category:No stack ID]]}}
}}{{#if: {{{status groups|}}}|{{blank}}
}}{{#if: {{{status groups|}}}|{{blank}}
{{#arraydefine:status groups|{{{status groups|}}}|,}}
{{#arraydefine:status groups|{{{status groups|}}}|,}}
{{SmallIcon|Plus Icon.png|link=Status groups}}[[Status groups]]: {{#arrayprint:status groups|,&nbsp;|@|{{SG|@}}}}{{Main namespace only|[[Category:Has status groups]]}}|{{Main namespace only|[[Category:No status groups]]}}
{{SmIconLink|Plus Icon.png|Status groups}}: {{#arrayprint:status groups|,&nbsp;|@|{{SG|@}}}}{{Main namespace only|[[Category:Has status groups]]}}|{{Main namespace only|[[Category:No status groups]]}}
}}{{#if: {{{tick type|}}}|{{blank}}
}}{{#if: {{{tick type|}}}{{#lvar:FreezeDuration}}|{{blank}}


{{SmallIcon|Duration Icons.png}}[[Conditions#Duration|Loses duration]]: {{#switch: {{lc:{{{tick type}}}}}
{{SmIconLink|Duration Icons.png|Conditions#Duration|Loses duration}}: {{#if:{{#lvar:FreezeDuration}}|{{SP|FreezeDuration|No}}|{{#switch: {{lc:{{{tick type}}}}}
  | start | start turn | startturn = start of turn
  | start | start turn | startturn = start of turn
  | end | end turn | endturn = end of turn
  | end | end turn | endturn = end of turn
Line 37: Line 42:
  | none = N/A
  | none = N/A
  | #default = !syntax error!
  | #default = !syntax error!
}}{{Main namespace only|[[Category:Has tick type]]}}|{{Main namespace only|[[Category:No tick type]]}}}}{{#if: {{{stack type|}}}|{{blank}}
}}}}{{Main namespace only|[[Category:Has tick type]]}}|{{Main namespace only|[[Category:No tick type]]}}}}{{#if: {{{stack type|}}}|{{blank}}


{{SmallIcon|Sort Icon.png}}[[Conditions#Stack type|If already applied]]: {{#switch: {{lc:{{{stack type}}}}}
{{SmIconLink|Sort Icon.png|Conditions#Stack type|If already applied}}: {{#switch: {{lc:{{{stack type}}}}}
  | additive = add to duration
  | additive = add to duration
  | overwrite = replace current
  | overwrite = replace current
Line 48: Line 53:
}}{{#if: {{{stack priority|}}}|{{blank}}
}}{{#if: {{{stack priority|}}}|{{blank}}


{{SmallIcon|Empty Icon.png}}[[Stack priority]]: {{{stack priority}}}{{Main namespace only|[[Category:Has stack priority]]}}|{{Main namespace only|[[Category:No stack priority]]}}
{{SmIconLink|Empty Icon.png|Stack priority}}: {{{stack priority}}}{{Main namespace only|[[Category:Has stack priority]]}}|{{Main namespace only|[[Category:No stack priority]]}}
}}{{#if: {{{properties|}}}|{{blank}}
}}{{#if: {{{properties|}}}|{{blank}}


{{SmallIcon|Options Icon.png}}[[Status properties|More properties]]:{{#invoke:ParseList|main|{{#arraydefine:propertiesList|{{{properties|}}}|,}}{{#arrayprint:propertiesList|,|@|[[Status properties/@|@]]}}|type=htmlList}}{{Main namespace only|[[Category:Has status properties]]}}|{{Main namespace only|[[Category:No status properties]]}}}}|{{Main namespace only|[[Category:No stack ID]][[Category:No status groups]][[Category:No tick type]][[Category:No stack type]][[Category:No stack priority]][[Category:No status properties]]}}}}
{{SmIconLink|Options Icon.png|Status properties|More properties}}:{{#invoke:ParseList|main|{{#arraydefine:propertiesList|{{{properties|}}}|,}}{{#arrayprint:propertiesList|,|@|{{SP|@}}}}|type=htmlList}}{{Main namespace only|[[Category:Has status properties]]}}|{{Main namespace only|[[Category:No status properties]]}}}}|{{Main namespace only|[[Category:No stack ID]][[Category:No status groups]][[Category:No tick type]][[Category:No stack type]][[Category:No stack priority]][[Category:No status properties]]}}
</div><references/>
|{{Main namespace only|[[Category:Condition pages with no properties]]}}}}
{{#if:{{{notes|}}}|
</div> {{#if: {{{grants|}}} |
== Notes ==
 
{{{notes}}}
<h2> Grants: </h2>
}}{{#if:{{{stack id|}}}|{{#ifeq:{{#cargo_query:tables=conditions|where=stack_id='{{{stack id|}}}'|fields=name, effects}}|{{#cargo_query:tables=conditions|where=name='{{#lvar:name}}'|fields=name, effects}}||{{blank}}
 
<div class="bg3wiki-tooltip-box bg3wiki-tooltip-gradient-common">
== Conditions with the same stack ID ==
{{#invoke: ParseList | main | {{{grants}}} | type = htmlListNoBullets | useTemplate = SAI/fixed }}
Conditions with the [[stack ID]] {{code|{{{stack id}}}}}, only one of these can be applied at the same time:
</div>
{{#cargo_query:
tables = conditions
|fields = name, icon, effects
|where = stack_id='{{{stack id}}}'
|order by = name
|format=template
|named args = yes
|template=ConditionsTableRow
|intro={{ConditionsTableHeader}}
|outro={{ConditionsTableFooter}}
}}}}
}}{{#if:{{{suppress sources|}}}||{{blank}}


== Sources of {{#lvar:name}} ==
}}{{#if: {{{condition|}}} |
{{Condition sources|{{#lvar:page}}}}
}}
<!--some housekeeping:categories and cargo-->{{Main namespace only|[[Category:Conditions]]}}{{#switch: {{{this is an example|}}}
| yes =
| #default = {{#cargo_store: _table = conditions
| name = {{#lvar:name}}
| icon = {{#lvar:icon}}
| types = {{#lvar:type}}
}}
}}</includeonly><noinclude>{{documentation|content=
If the page title is {{C|Blah (Condition)}}, then you don't have to provide the {{C|name}} parameter.  Likewise, if the icon for the condition is called {{C|Blah Condition Icon.webp}} then you don't have to provide the {{C|icon}} parameter.


If a condition has multiple types, separate them with a semicolon.
<h2> Condition: {{{condition}}} </h2>


<pre>
<div class="bg3wiki-tooltip-box bg3wiki-tooltip-gradient-common">
{{Condition page
{{Condition | {{{condition}}}
| effects =
| save = {{{condition save|}}}
| type =
| dc = {{{condition dc|}}}
| honour mode =
| radius m = {{{condition radius m|}}}
| stack id =  
| duration = {{{condition duration|}}}
| status groups =
| tick type =  
| stack type =
| stack priority =  
| properties =
| notes =
}}
}}
</pre>
{{main namespace only|{{Inflicts|{{{condition}}}|cond|type=condition|dc={{{condition dc|}}}|save={{{condition save|}}}|duration={{{condition duration|}}}}}}}
</div>


Examples:
}}{{#if: {{{condition2|}}} | {{blank}}


== Blade Ward (Condition) ==
<h2> Condition: {{{condition2}}} </h2>


{{Condition page
<div class="bg3wiki-tooltip-box bg3wiki-tooltip-gradient-common">
| name = Blade Ward
{{Condition | {{{condition2}}}
| effects =
| save = {{{condition2 save|}}}
* Has [[resistance]] against {{DamageType|Bludgeoning}}, {{DamageType|Piercing}}, and {{DamageType|Slashing}} damage dealt by weapon attacks. Damage of these types is halved.
| dc = {{{condition2 dc|}}}
| this is an example = yes
| radius m = {{{condition2 radius m|}}}
| honour mode = * If you get hit by anything you are not resistant too, you immediately die.
| duration = {{{condition2 duration|}}}
| type = Cursed, Prone
| status groups = SG_RemoveOnRespec
| tick type = end
| stack id = HASTE
| stack priority = 10
| stack type = ignore
| properties = FreezeDuration, IgnoreResting, InitiateCombat, ApplyToDead
| notes = * note 1
* note 2
}}
}}
{{main namespace only|{{Inflicts|{{{condition2}}}|cond|type=condition|dc={{{condition2 dc|}}}|save={{{condition2 save|}}}|duration={{{condition2 duration|}}}}}}}
</div>
}}{{#if: {{{condition3|}}} | {{blank}}


== Bone Chilled (Condition) ==
<h2> Condition: {{{condition3}}} </h2>


{{Condition page
<div class="bg3wiki-tooltip-box bg3wiki-tooltip-gradient-common">
| name = Bone Chilled
{{Condition | {{{condition3}}}
| effects =  
| save = {{{condition3 save|}}}
* Can not regain [[Hit Points]].
| dc = {{{condition3 dc|}}}
* If Undead, has {{Disadvantage}} on [[Attack Roll]]s.
| radius m = {{{condition3 radius m|}}}
| this is an example = yes
| duration = {{{condition3 duration|}}}
| tick type = end
}}
| properties = FreezeDuration, IgnoreResting, InitiateCombat, ApplyToDead
{{main namespace only|{{Inflicts|{{{condition3}}}|cond|type=condition|dc={{{condition3 dc|}}}|save={{{condition3 save|}}}|duration={{{condition3 duration|}}}}}}}
</div>
}}<references/>
{{#if:{{{notes|}}}|
== Notes ==
{{{notes}}}
}}
}}
{{#if:{{{bugs|}}}|
== Bugs ==
{{{bugs}}}
[[Category:Bugs]]
}}{{#if: {{{suppress sources|}}} | | {{blank}}


== Flesh Rot (Condition) ==
== Sources of {{#lvar:name}} ==


{{Condition page
{{Condition sources | {{#lvar:page}} }}
| name = Flesh Rot
| effects =
* Flesh is decaying.
* {{Disadvantage}} on [[Ability Check]]s and {{SavingThrow}}s using Charisma.
* Vulnerable to all damage.
| type = diseased
| this is an example = yes
}}
}}
<!--some housekeeping:categories and cargo-->{{Main namespace only|[[Category:Conditions]]{{#cargo_store: _table = conditions
| name = {{#lvar:name}}
| icon = {{#lvar:icon}}
| brief = {{{brief|}}}
| types = {{#lvar:type}}
| condition_name = {{{condition|}}}
| condition2_name = {{{condition2|}}}
| condition3_name = {{{condition3|}}}
}}{{#if:{{#lvar:stackid}}|{{blank}}


== Multiple types example ==
== Conditions with the same stack ID ==
 
Conditions with the [[stack ID]] {{code|{{{stack id}}}}}, only one of these can be applied at the same time:
{{Condition page
{{#cargo_query:
| name = Absolutely Ruined
tables = conditions
| icon = Generic Death Icon.webp
|fields = _pageName = page, name, icon, effects
| effects =  
|where = stack_id='{{{stack id}}}'
* How are you still alive?
|order by = name
* {{Disadvantage}} on [[Ability Check]]s and {{SavingThrow}}s using Charisma.
|format=template
* Vulnerable to all damage.
|named args = yes
| type = diseased, cursed,incapacitated, prone, charmed
|template=ConditionsTableRow
| this is an example = yes
|intro={{ConditionsTableHeader}}
| suppress sources = true
|outro={{ConditionsTableFooter}}
}}{{Main namespace only|[[Category:Conditions with shared stack IDs]]}}
}}
}}
 
}}</includeonly><noinclude>{{documentation}}{{#cargo_declare: _table = conditions
[[Category:Page generating templates]][[Category:Condition templates]]
 
{{#cargo_declare: _table = conditions
| name = String (unique, mandatory)
| name = String (unique, mandatory)
| icon = File
| icon = File
| effects = Wikitext
| effects = Wikitext
| brief = Wikitext
| types = List (,) of String
| types = List (,) of String
| stack_id = string
| stack_id = string
Line 174: Line 157:
| properties = List (,) of String
| properties = List (,) of String
| stack_type = String
| stack_type = String
| condition_name = String
| condition_save = String
| condition_dc = String
| condition2_name = String
| condition2_save = String
| condition2_dc = String
| condition3_name = String
| condition3_save = String
| condition3_dc = String
}}
}}
== Template data ==
[[Category:Templates]]
<templatedata>
[[Category:Condition templates]]
{
[[Category:Page generating templates]]
"params": {
[[Category:Cargo templates]]
"name": {
</noinclude>
"description": "If specified, overrides the name.",
"type": "string",
"default": "Uses the name of the page, minus (Condition)."
},
"icon": {
"description": "If specified, overrides the icon.",
"type": "wiki-file-name",
"default": "Uses the \"name\" plus Condition.webp"
},
"disease": {
"description": "If specified, sets the type to be disease",
"type": "boolean",
"deprecated": true
},
"type": {
"description": "The type or types of the condition. If multiple, separate the types with commas.",
"type": "string",
"suggestedvalues": [
"Cursed",
"Diseased",
"Poisoned",
"Polymorphed",
"Charmed",
"Frightened",
"Incapacitated",
"Prone",
"Unconscious",
"Blinded",
"Maimed"
]
},
"stack id": {
"description": "Stack ID for the condition. Conditions with the same Stack ID can not be present at the same time.",
"type": "string",
"example": "HASTE, Polymorph_WildShape "
},
"status groups": {
"description": "Any status groups the condition belongs too. If multiple, separate the types with commas.",
"type": "string",
"example": "mad, invisible, helpable condition, light, weapon coating, "
},
"tick type": {
"description": "When the condition loses duration. This can be at the start or end of a turn. If marked with '''none''' the condition will be marked as not having a duration. This may be used by conditions who are active based on something else like a passive feature or standing near something. If you are unsure, leave it empty.",
"type": "string",
"suggestedvalues": [
            "start",
            "end",
            "none"
            ]
},
"stack type": {
"description": "Decides what happends when the condition is applied while already being present. '''additive''' adds the durations together, '''overwrite''' replaces the present condition and duration with the new, and '''ignore''' will keep the present condition and duration. This can be important on conditions who have the same stack ID as other conditions to show which of them takes priority, and for showing if you can increase the duration of a condition by applying it again.",
"type": "string",
"suggestedvalues": [
            "additive",
            "overwrite",
            "ignore"
            ]
},
"stack priority": {
"description": "Conditions with higher stack priority overwrite conditions with lower stack priority when applied. ",
"type": "string",
"example": "1, 3, 5, 10"
},
"properties": {
"description": "Properties for the condition. If multiple, separate the types with commas.",
"type": "string",
            "example": "FreezeDuration, IgnoreResting, InitiateCombat, ApplyToDead"
},
"effects": {
"description": "The description of the condition.",
"type": "content",
"suggested": true
},
"this is an example": {
"description": "If specified, does not insert into the Conditions table.",
"type": "boolean"
},
"suppress sources": {
"description": "If specified, will not display \"sources of\".",
"type": "boolean"
},
"honour mode": {
"description": "Changes that apply under the honour mode difficulty.",
"type": "string"
},
"notes": {
"description": "Notes, displayed before the list of sources",
"type": "string"
}
}
}
</templatedata>}}</noinclude>

Revision as of 17:58, 29 January 2025

Template documentation

If the page title is Blah (Condition), then you don't have to provide the name parameter. Likewise, if the icon for the condition is called Blah Condition Icon.webp then you don't have to provide the icon parameter.

If a condition has multiple types, separate them with a semicolon.

{{Condition page
| effects =
| type =
| honour mode = 
| stack id = 
| status groups = 
| tick type = 
| stack type = 
| stack priority = 
| properties = 
| grants = 
| creature = 
| creature actions = 
| condition =
| condition duration = 
| condition save = 
| condition dc =
| condition radius m =
| condition2 =
| condition2 duration = 
| condition2 save = 
| condition2 dc =
| condition2 radius m =
| condition3 =
| condition3 duration = 
| condition3 save = 
| condition3 dc =
| condition3 radius m =
| notes =
| bugs =
}}

Examples:

Blade Ward (Condition)

Condition Type Icon.pngCursedProne

Honour mode

  • If you get hit by anything you are not resistant too, you immediately die.

Properties

Stack ID Stack ID: HASTE

Status groups Status groups: SG_RemoveOnRespec

Loses duration Loses duration: end of turn

If already applied If already applied: don't apply

Stack priority Stack priority: 10

More properties More properties:

Notes

  • note 1
  • note 2

Bugs

  • bug 1
  • bug 2

Sources of Blade Ward

No results


Bone Chilled (Condition)

Sources of Bone Chilled

No results


Flesh Rot (Condition)

Condition Type Icon.pngDiseased

Sources of Flesh Rot

No results


Multiple types example

Condition Type Icon.pngDiseasedCursedIncapacitatedProneCharmed



Template data

No description.

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
namename

If specified, overrides the name.

Default
Uses the name of the page, minus (Condition).
Stringoptional
iconicon

If specified, overrides the icon.

Default
Uses the "name" plus Condition.webp
Fileoptional
diseasedisease

If specified, sets the type to be disease

Booleandeprecated
typetype

The type or types of the condition. If multiple, separate the types with commas.

Suggested values
Cursed Diseased Poisoned Polymorphed Charmed Frightened Incapacitated Prone Unconscious Blinded Maimed
Stringoptional
stack idstack id

Stack ID for the condition. Conditions with the same stack ID can not be present at the same time. If a stack ID is specified, it will only display if there are other conditions with that stack ID. It will also display those conditions.

Example
HASTE, Polymorph_WildShape
Stringoptional
status groupsstatus groups

Any status groups the condition belongs too. If multiple, separate the types with commas.

Example
mad, invisible, helpable condition, light, weapon coating,
Stringoptional
tick typetick type

When the condition loses duration. This can be at the start or end of a turn. If marked with '''none''' the condition will be marked as not having a duration. This may be used by conditions who are active based on something else like a passive feature or standing near something. If you are unsure, leave it empty.

Suggested values
start end none
Stringoptional
stack typestack type

Decides what happends when the condition is applied while already being present. '''additive''' adds the durations together, '''overwrite''' replaces the present condition and duration with the new, and '''ignore''' will keep the present condition and duration. This can be important on conditions who have the same stack ID as other conditions to show which of them takes priority, and for showing if you can increase the duration of a condition by applying it again.

Suggested values
additive overwrite ignore
Stringoptional
stack prioritystack priority

Conditions with higher stack priority overwrite conditions with lower stack priority when applied.

Example
1, 3, 5, 10
Stringoptional
propertiesproperties

Properties for the condition. If multiple, separate the types with commas.

Example
FreezeDuration, IgnoreResting, InitiateCombat, ApplyToDead
Stringoptional
effectseffects

The description of the condition.

Contentsuggested
briefbrief

Optional brief description to be used in infoboxes and other places where the text should be short. If left out, defaults to the same value as the effects field.

Contentsuggested
creaturecreature

The name of a creature to display in a box underneath the condition.

Example
Sheep
Stringoptional
creature actionscreature actions

A comma-separated list of actions to display underneath the creature stat box.

Example
Fire Bolt, Fireball
Stringoptional
conditioncondition

The full name of the condition (if any) that this action applies to its target/s. Leave blank if there is no condition.

Example
Hastened
Stringoptional
condition durationcondition duration

The duration in turns of the action's applied condition. Leave blank if the duration is unlimited.

Example
5
Numberoptional
condition savecondition save

The save that the action's target must roll to avoid or reduce its effects. Can use short or long name, e.g: "STR" or "Strength"

Suggested values
Strength Dexterity Constitution Intelligence Wisdom Charisma
Example
WIS
Stringoptional
condition dccondition dc

The optional fixed DC of the condition that targets have to pass to apply it

Example
12
Numberoptional
condition radius mcondition radius m

The optional radius, in meters, where this condition is applied

Example
3
Numberoptional
condition2condition2

The full name of the condition (if any) that is applied if there is a second condition.

Example
Hastened
Stringoptional
condition2 durationcondition2 duration

The duration in turns of the action's second condition. Leave blank if the duration is unlimited.

Example
5
Numberoptional
condition2 savecondition2 save

The save that the action's target must roll to avoid or reduce the effects of the second condition. Can use short or long name, e.g: "STR" or "Strength"

Suggested values
Strength Dexterity Constitution Intelligence Wisdom Charisma
Example
WIS
Stringoptional
condition2 dccondition2 dc

The optional fixed DC of the second condition that targets have to pass to apply it

Example
12
Numberoptional
condition2 radius mcondition2 radius m

The optional radius, in meters, where the third condition is applied

Example
3
Numberoptional
condition3condition3

The full name of the condition (if any) that is applied if there is a third condition.

Example
Hastened
Stringoptional
condition3 durationcondition3 duration

The duration in turns of the action's third condition. Leave blank if the duration is unlimited.

Example
5
Numberoptional
condition3 savecondition3 save

The save that the action's target must roll to avoid or reduce the effects of the third condition. Can use short or long name, e.g: "STR" or "Strength"

Suggested values
Strength Dexterity Constitution Intelligence Wisdom Charisma
Example
WIS
Stringoptional
condition3 dccondition3 dc

The optional fixed DC of the third condition that targets have to pass to apply it

Example
12
Numberoptional
grantsgrants

This specifies what spells/actions are granted to whoever has this condition

Example
Heart of the Storm
Stringoptional
this is an examplethis is an example

If specified, does not insert into the Conditions table.

Booleanoptional
suppress sourcessuppress sources

If specified, will not display "sources of".

Booleanoptional
honour modehonour mode

Changes that apply under the honour mode difficulty.

Stringoptional
notesnotes

Notes, displayed before the list of sources

Stringoptional
This template defines the table "conditions". View table.