Template:Condition page: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
m (Removed "FreezeDuration" from first example.)
mNo edit summary
(12 intermediate revisions by 3 users not shown)
Line 10: Line 10:


}}<!-- Check if the stack ID is used by any other conditions and save it as #lvar:stackid --> {{#if:{{{stack id|}}}|{{#vardefine:counter|0
}}<!-- 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}}}'|format=template|template=counter
}}{{#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}}}}
}}{{#lvardef:stackid|{{#ifeq:{{#var:counter}}|1||1}}}}


Line 59: Line 59:


{{SmallIcon|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]]}}}}
{{SmallIcon|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/>
</div> {{#if: {{{grants|}}} |
 
<h2> Grants: </h2>
 
<div class="bg3wiki-tooltip-box bg3wiki-tooltip-gradient-common">
{{#invoke: ParseList | main | {{{grants}}} | type = htmlListNoBullets | useTemplate = SAI/fixed }}
</div>
 
}}{{#if: {{{condition|}}} |
 
<h2> Condition: {{{condition}}} </h2>
 
<div class="bg3wiki-tooltip-box bg3wiki-tooltip-gradient-common">
{{Condition | {{{condition}}}
| save = {{{condition save|}}}
| dc = {{{condition dc|}}}
| duration = {{{condition duration|}}}
}}
{{main namespace only|{{Inflicts|{{{condition}}}|cond}}}}
</div>
 
}}{{#if: {{{condition2|}}} | {{blank}}
 
<h2> Condition: {{{condition2}}} </h2>
 
<div class="bg3wiki-tooltip-box bg3wiki-tooltip-gradient-common">
{{Condition | {{{condition2}}}
| save = {{{condition2 save|}}}
| dc = {{{condition2 dc|}}}
| duration = {{{condition2 duration|}}}
}}
{{main namespace only|{{Inflicts|{{{condition2}}}|cond}}}}
</div>
 
}}{{#if: {{{condition3|}}} | {{blank}}
 
<h2> Condition: {{{condition3}}} </h2>
 
<div class="bg3wiki-tooltip-box bg3wiki-tooltip-gradient-common">
{{Condition | {{{condition3}}}
| save = {{{condition3 save|}}}
| dc = {{{condition3 dc|}}}
| duration = {{{condition3 duration|}}}
}}
{{main namespace only|{{Inflicts|{{{condition3}}}|passive}}}}
</div>
}}<references/>
{{#if:{{{notes|}}}|
{{#if:{{{notes|}}}|
== Notes ==
== Notes ==
{{{notes}}}
{{{notes}}}
}}
{{#if:{{{bugs|}}}|
== Bugs ==
{{{bugs}}}
[[Category:Bugs]]
}}{{#if:{{#lvar:stackid}}|{{blank}}
}}{{#if:{{#lvar:stackid}}|{{blank}}


Line 69: Line 120:
{{#cargo_query:
{{#cargo_query:
tables = conditions
tables = conditions
|fields = name, icon, effects
|fields = _pageName = page, name, icon, effects
|where = stack_id='{{{stack id}}}'
|where = stack_id='{{{stack id}}}'
|order by = name
|order by = name
Line 78: Line 129:
|outro={{ConditionsTableFooter}}
|outro={{ConditionsTableFooter}}
}}{{Main namespace only|[[Category:Conditions with shared stack IDs]]}}
}}{{Main namespace only|[[Category:Conditions with shared stack IDs]]}}
}}{{#if:{{{suppress sources|}}}||{{blank}}
}}{{#if: {{{suppress sources|}}} | | {{blank}}


== Sources of {{#lvar:name}} ==
== Sources of {{#lvar:name}} ==
{{Condition sources|{{#lvar:page}}}}
 
{{Condition sources | {{#lvar:page}} }}
}}
}}
<!--some housekeeping:categories and cargo-->{{Main namespace only|[[Category:Conditions]]}}{{#switch: {{{this is an example|}}}
<!--some housekeeping:categories and cargo-->{{Main namespace only|[[Category:Conditions]]{{#cargo_store: _table = conditions
| yes =
| #default = {{#cargo_store: _table = conditions
| name = {{#lvar:name}}
| name = {{#lvar:name}}
| icon = {{#lvar:icon}}
| icon = {{#lvar:icon}}
| brief = {{{brief | {{{effects|}}} }}}
| types = {{#lvar:type}}
| types = {{#lvar:type}}
}}
}}
}}</includeonly><noinclude>{{documentation|content=
}}</includeonly><noinclude>{{documentation}}{{#cargo_declare: _table = conditions
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.
 
<pre>
{{Condition page
| effects =
| type =
| honour mode =
| stack id =
| status groups =
| tick type =
| stack type =
| stack priority =
| properties =
| notes =
}}
</pre>
 
Examples:
 
== Blade Ward (Condition) ==
 
{{Condition page
| name = Blade Ward
| effects =
* Has [[resistance]] against {{DamageType|Bludgeoning}}, {{DamageType|Piercing}}, and {{DamageType|Slashing}} damage dealt by weapon attacks. Damage of these types is halved.
| this is an example = yes
| honour mode = * If you get hit by anything you are not resistant too, you immediately die.
| type = Cursed, Prone
| status groups = SG_RemoveOnRespec
| tick type = end
| stack id = HASTE
| stack priority = 10
| stack type = ignore
| properties = IgnoreResting, InitiateCombat, ApplyToDead
| notes = * note 1
* note 2
}}
 
== Bone Chilled (Condition) ==
 
{{Condition page
| name = Bone Chilled
| effects =
* Can not regain [[Hit Points]].
* If Undead, has {{Disadvantage}} on [[Attack Roll]]s.
| this is an example = yes
| stack id = MEENLOCK_FEAR
| tick type = end
| properties = FreezeDuration, IgnoreResting, InitiateCombat, ApplyToDead
}}
 
== Flesh Rot (Condition) ==
 
{{Condition 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
}}
 
== Multiple types example ==
 
{{Condition page
| name = Absolutely Ruined
| icon = Generic Death Icon.webp
| effects =
* How are you still alive?
* {{Disadvantage}} on [[Ability Check]]s and {{SavingThrow}}s using Charisma.
* Vulnerable to all damage.
| type = diseased, cursed,incapacitated, prone, charmed
| this is an example = yes
| suppress sources = true
}}
 
[[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 182: Line 152:
| properties = List (,) of String
| properties = List (,) of String
| stack_type = String
| stack_type = String
}}
}}</noinclude>
== Template data ==
<templatedata>
{
"params": {
"name": {
"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. 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. ",
"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"
}
},
"format": "block"
}
</templatedata>}}</noinclude>

Navigation menu