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

Template:Ability: Difference between revisions

Template page
Content deleted Content added
No edit summary
Replaced content with "{{L|Category|Abilities|Abilit{{{1|y}}}}}"
Tag: Replaced
 
(67 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{L|Category|Abilities|Abilit{{{1|y}}}}}
<includeonly>
{{ContextBarHelper|Power Sources|
{{If
|{{{divine| }}}
|{{Tag
|Divine
|🙏
|c=#f9f06b
|l=:Category:Divine Abilities
}}
}}
{{If
|{{{magic| }}}
|{{Tag
|Magic
|✨
|c=#9141ac
|l=:Category:Magical Abilities
}}
}}
{{If
|{{{primal| }}}
|{{Tag
|Primal
|⛰️
|c=#986a44
|l=:Category:Primal Abilities
}}
}}
{{If
|{{{spiritual| }}}
|{{Tag
|Spirit
|🪭
|c=#deddda
|l=:Category:Spiritual Abilities
}}
}}
}}
{{ContextBarHelper|Elements|
{{If
|{{{life| }}}| {{Tag
|Life
|☀️
|c=#ffffff
|l=:Category:Life Spells
}}
}}
{{If
|{{{storm| }}}
|{{Tag
|Storm
|💧
|c=#3584e4
|l=:Category:Storm Spells
}}
}}
{{If
|{{{necro| }}}
|{{Tag
|Necromancy
|💀
|c=#3d3846
|l=:Category:Necromancy Spells
}}
}}
{{If
|{{{flame| }}}
|{{Tag
|Flame
|🔥
|c=#e01b24
|l=:Category:Flame Spells
}}
}}
{{If
|{{{nature| }}}
|{{Tag
|Nature
|🌱
|c=#33d17a
|l=:Category:Nature Spells
}}
}}
}}
{{ContextBarHelper|Usage|
{{If
|{{{oc| }}}
|{{Tag
|Out of Combat
|OC
|l=:Category:Out of Combat Abilities
}}
}}
{{If
|{{{bc| }}}
|{{Tag
|Before Combat
|BC
|l=:Category:Before Combat Abilities
}}
}}
{{If
|{{{ic| }}}
|{{Tag
|In Combat
|IC
|l=:Category:In Combat Abilities
}}
}}
}}
{{ContextBarHelper|{{If|{{{spell| }}}|Casting|Execution}} Time|{{ucfirst:{{lc:
{{{time
|{{#switch: {{{num|na}}}
| 0 = {{If
|{{{re| }}}
|Free reaction
|None (free action)
}}
| 1 = {{If
|{{{re| }}}
|Reaction
|1 action
}}
| 2 = 2 actions
| 3 = 3 actions
| na = {{If
|{{{ritual| }}}
|10 minutes
|{{If
|
}}
}}
}}
}}}
}} }} }}
{{ContextBarHelper|Delivery|
{{{delivery|
{{If
|{{{strike| }}}
|{{Tag
|Strike
|l=:Category:Strike Attack Abilities
}}
}}
{{If
|{{{ray| }}}
|{{Tag
|Ray
|l=:Category:Ray Abilities
}}
}}
{{If
|{{{ritual| }}}
|{{Tag
|Ritual
|l=:Category:Ritual Abilities
}}
}}
{{If
|{{{ball| }}}
|{{Tag
|Ball
|l=:Category:Ball Abilities
}}
}}
{{If
|{{{touch| }}}
|{{Tag
|Touch
|l=:Category:Touch Abilities
}}
}}
{{If
|{{{aura| }}}
|{{Tag
|Aura
|l=:Category:Aura Abilities
}}
}}
{{If
|{{{self| }}}
|{{Tag
|Self
|l=:Category:Self Abilities
}}
}}
{{If
|{{{passive| }}}
|{{Tag
|Passive
|l=:Category:Passive Abilities
}}
}}
{{If
|{{{tag| }}}
|{{Tag
|Tag
|l=:Category:Tag Abilities
}}
}}
}}} }}
{{ContextBarHelper|Delivery Modifiers|
{{{deliveryMod|
{{If
|{{{vitals| }}}
|{{Tag
|Vitals
|l=:Category:Vitals Attack Abilities
}}
}}
{{If
|{{{arm| }}}
|{{Tag
|Arm
|l=:Category:Arm Attack Abilities
}}
}}
{{If
|{{{leg| }}}
|{{Tag
|Leg
|l=:Category:Leg Attack Abilities
}}
}}
}}} }}
{{ContextBarHelper|Target|{{ucfirst:{{lc:
{{{target
|{{If
|{{{aura| }}}{{{cone| }}}{{{ball| }}}{{{field| }}}
| {{{targetType|creature}}}s within area of effect
| 1 {{{targetType|creature}}} within range
}}
}}}
}} }} }}
{{ContextBarHelper|Range|{{ucfirst:{{lc:
{{{range|
{{If
|{{{ray| }}}
|{{{rangeDist|60}}} feet
|{{If
|{{{ball| }}}
|{{{rangeDist|30}}} feet
|{{If
|{{{aura| }}}
|{{{rangeDist|10}}}-foot aura (centered on yourself)
|{{If
|{{{cone| }}}
|{{{rangeDist|15}}}-foot sphere (centered on yourself)
|{{If
|{{{cascade| }}}
|{{{rangeDist|60}}} feet
|{{If
|{{{fork| }}}
|{{{rangeDist|30}}} feet
}}
}}
}}
}}
}}
}}
}}}
}} }} }}
{{ContextBarHelper|Duration|{{Trim|{{ucfirst:{{lc:
{{{duration
|{{If
|{{{sustained| }}} {{{end| }}}
|1 minute
|{{If
|{{{ritual| }}}
|10 minutes
|{{If
|{{{ball| }}} {{{ray| }}} {{{aura| }}} {{{touch| }}} {{{self| }}} {{{tag| }}} {{{strike| }}} {{{vitals| }}} {{{leg| }}} {{{arm| }}}
|Instantaneous
}}
}}
}}
}}} }}{{If|{{{end| }}}|, or until end condition is met}} {{If|{{{sustained| }}}|([[Sustained]])}}
}} }} }}
----
{{{1}}} {{Trim|
{{#if: {{{mental| }}} | {{Cat|Mental Effects|name={{{name}}} }} }}
{{#if: {{{divine| }}} | {{Cat|Divine Abilities|name={{{name}}} }} }}
{{#if: {{{magic| }}} | {{Cat|Magical Abilities|name={{{name}}} }} }}
{{#if: {{{primal| }}} | {{Cat|Primal Abilities|name={{{name}}} }} }}
{{#if: {{{spiritual| }}} | {{Cat|Spiritual Abilities|name={{{name}}} }} }}
{{#if: {{{oc| }}} | {{Cat|Out of Combat Abilities|name={{{name}}} }} }}
{{#if: {{{bc| }}} | {{Cat|Before Combat Abilities|name={{{name}}} }} }}
{{#if: {{{ic| }}} | {{Cat|In Combat Abilities|name={{{name}}} }} }}
{{#if: {{{life| }}} | {{Cat|Life Spells|name={{{name}}} }} }}
{{#if: {{{storm| }}} | {{Cat|Storm Spells|name={{{name}}} }} }}
{{#if: {{{necro| }}} | {{Cat|Necromancy Spells|name={{{name}}}}} }}
{{#if: {{{flame| }}} | {{Cat|Flame Spells|name={{{name}}} }} }}
{{#if: {{{nature| }}} | {{Cat|Nature Spells|name={{{name}}} }} }}
{{#if: {{{spell| }}} | {{Cat|Spells|name={{{name}}} }} }}
{{#if: {{{skill| }}} | {{Cat|Skills|name={{{name}}} }} }}
{{#if: {{{stat| }}} | {{Cat|Stat Setting Abilities|name={{{name}}} }} }}
{{#if: {{{prof| }}} | {{Cat|Proficiency Setting Abilities|name={{{name}}} }} }}
{{#if: {{{flu| }}} | {{Cat|Fluency Setting Abilities|name={{{name}}} }} }}
{{#if: {{{class| }}} | {{Cat|Class Abilities|name={{{name}}} }} }}
{{#if: {{{standard| }}} |
{{Cat|Standard Abilities|name={{{name}}} }}
{{#if: {{{spell| }}} | {{Cat|Conjure Spells|name={{{name}}} }} }}
{{#if: {{{skill| }}} | {{Cat|Semblant Skills|name={{{name}}} }} }}
}}
{{#if: {{{sustained| }}} |
{{Cat|Sustained Abilities|name={{{name}}} }}
{{#if: {{{spell| }}} | {{Cat|Sustained Spells|name={{{name}}} }} }}
{{#if: {{{skill| }}} | {{Cat|Sustained Skills|name={{{name}}} }} }}
}}
{{#if: {{{ball| }}} |
{{Cat|Ball Abilities|name={{{name}}} }}
{{#if: {{{spell| }}} | {{Cat|Ball Spells|name={{{name}}} }} }}
{{#if: {{{skill| }}} | {{Cat|Ball Skills|name={{{name}}} }} }}
}}
{{#if: {{{ray| }}} |
{{Cat|Ray Abilities|name={{{name}}} }}
{{#if: {{{spell| }}} | {{Cat|Ray Spells|name={{{name}}} }} }}
{{#if: {{{skill| }}} | {{Cat|Ray Skills|name={{{name}}} }} }}
}}
{{#if: {{{aura| }}} |
{{Cat|Aura Abilities|name={{{name}}} }}
{{#if: {{{spell| }}} | {{Cat|Aura Spells|name={{{name}}} }} }}
{{#if: {{{skill| }}} | {{Cat|Aura Skills|name={{{name}}} }} }}
}}
{{#if: {{{touch| }}} |
{{Cat|Touch Abilities|name={{{name}}} }}
{{#if: {{{spell| }}} | {{Cat|Touch Spells|name={{{name}}} }} }}
{{#if: {{{skill| }}} | {{Cat|Touch Skills|name={{{name}}} }} }}
}}
{{#if: {{{self| }}} |
{{Cat|Self Abilities|name={{{name}}} }}
{{#if: {{{spell| }}} | {{Cat|Self Spells|name={{{name}}} }} }}
{{#if: {{{skill| }}} | {{Cat|Self Skills|name={{{name}}} }} }}
}}
{{#if: {{{passive| }}} |
{{Cat|Passive Abilities|name={{{name}}} }}
{{#if: {{{spell| }}} | {{Cat|Passive Spells|name={{{name}}} }} }}
{{#if: {{{skill| }}} | {{Cat|Passive Skills|name={{{name}}} }} }}
}}
{{#if: {{{tag| }}} |
{{Cat|Tag Abilities|name={{{name}}} }}
{{#if: {{{spell| }}} | {{Cat|Tag Spells|name={{{name}}} }} }}
{{#if: {{{skill| }}} | {{Cat|Tag Skills|name={{{name}}} }} }}
}}
{{#if: {{{ritual| }}} |
{{Cat|Ritual Abilities|name={{{name}}} }}
{{#if: {{{spell| }}} | {{Cat|Ritual Spells|name={{{name}}} }} }}
{{#if: {{{skill| }}} | {{Cat|Ritual Skills|name={{{name}}} }} }}
}}
{{#if: {{{strike| }}} |
{{Cat|Strike Attack Abilities|name={{{name}}} }}
{{#if: {{{spell| }}} | {{Cat|Strike Attack Spells|name={{{name}}} }} }}
{{#if: {{{skill| }}} | {{Cat|Strike Attack Skills|name={{{name}}} }} }}
}}
{{#if: {{{vitals| }}} |
{{Cat|Vitals Attack Abilities|name={{{name}}} }}
{{#if: {{{spell| }}} | {{Cat|Vitals Attack Spells|name={{{name}}} }} }}
{{#if: {{{skill| }}} | {{Cat|Vitals Attack Skills|name={{{name}}} }} }}
}}
{{#if: {{{leg| }}} |
{{Cat|Leg Attack Abilities|name={{{name}}} }}
{{#if: {{{spell| }}} | {{Cat|Leg Attack Spells|name={{{name}}} }} }}
{{#if: {{{skill| }}} | {{Cat|Leg Attack Skills|name={{{name}}} }} }}
}}
{{#if: {{{arm| }}} |
{{Cat|Arm Attack Abilities|name={{{name}}} }}
{{#if: {{{spell| }}} | {{Cat|Arm Attack Spells|name={{{name}}} }} }}
{{#if: {{{skill| }}} | {{Cat|Arm Attack Skills|name={{{name}}} }} }}
}}
{{#switch: {{{stat| }}}
| int = {{Cat|Intelligence Setting Abilities|name={{{name}}} }}
| str = {{Cat|Strength Setting Abilities|name={{{name}}} }}
| mov = {{Cat|Movement Setting Abilities|name={{{name}}} }}
| per = {{Cat|Perception Setting Abilities|name={{{name}}} }}
| snk = {{Cat|Sneak Setting Abilities|name={{{name}}} }}
| #default =
}}
{{#switch: {{{class| }}}
| ber = {{Cat|Berserker Abilities|name={{{name}}} }}
| bar = {{Cat|Berserker Abilities|name={{{name}}} }}
| due = {{Cat|Duelist Abilities|name={{{name}}} }}
| sam = {{Cat|Duelist Abilities|name={{{name}}} }}
| vet = {{Cat|Veteran Abilities|name={{{name}}} }}
| kni = {{Cat|Knight Abilities|name={{{name}}} }}
| pal = {{Cat|Paladin Abilities|name={{{name}}} }}
| ass = {{Cat|Assassin Abilities|name={{{name}}} }}
| cor = {{Cat|Corsair Abilities|name={{{name}}} }}
| ama = {{Cat|Corsair Abilities|name={{{name}}} }}
| arc = {{Cat|Archer Abilities|name={{{name}}} }}
| thi = {{Cat|Thief Abilities|name={{{name}}} }}
| ran = {{Cat|Ranger Abilities|name={{{name}}} }}
| fla = {{Cat|Flame Mage Abilities|name={{{name}}} }}
| sto = {{Cat|Storm Mage Abilities|name={{{name}}} }}
| lif = {{Cat|Life Mage Abilities|name={{{name}}} }}
| nec = {{Cat|Necromancer Abilities|name={{{name}}} }}
| nat = {{Cat|Nature Mage Abilities|name={{{name}}} }}
| #default =
}}
{{#switch: {{{rank|nr}}}
| 0 = {{Cat|Journeyman Abilities|name={{{name}}} }}
| 1 = {{Cat|Rank 1 Abilities|name={{{name}}} {{Cat|Ranked Abilities}} }}
| 2 = {{Cat|Rank 2 Abilities|name={{{name}}} {{Cat|Ranked Abilities}} }}
| 3 = {{Cat|Rank 3+ Abilities|name={{{name}}} {{Cat|Ranked Abilities}} }}
| nr = {{Cat|Non-ranked Abilities|name={{{name}}} }}
| #default = {{Cat|Non-standard Abilities|name={{{name}}} }}
}}
{{#switch: {{{num| -1}}}
| -1 =
| 0 = {{#if: {{{re| }}} |
{{Cat|Reactive Abilities|name={{{name}}} }}
{{Cat|Free Reaction Abilities|name={{{name}}} }}
{{#if: {{{spell| }}} |
{{Cat|Reactive Spells|name={{{name}}} }}
{{Cat|Free Reaction Spells|name={{{name}}} }}
}}
{{#if: {{{skill| }}} |
{{Cat|Reactive Skills|name={{{name}}} }}
{{Cat|Free Reaction Skills|name={{{name}}} }}
}} |
{{Cat|Active Abilities|name={{{name}}} }}
{{Cat|Free Action Abilities|name={{{name}}} }}
{{#if: {{{spell| }}} |
{{Cat|Active Spells|name={{{name}}} }}
{{Cat|Free Action Spells|name={{{name}}} }}
}}
{{#if: {{{skill| }}} |
{{Cat|Active Skills|name={{{name}}} }}
{{Cat|Free Action Skills|name={{{name}}} }}
}}
}}
| 1 = {{#if: {{{re| }}} |
{{Cat|Reactive Abilities|name={{{name}}} }}
{{Cat|Reaction Abilities|name={{{name}}} }}
{{#if: {{{spell| }}} |
{{Cat|Reactive Spells|name={{{name}}} }}
{{Cat|Reaction Spells|name={{{name}}} }}
}}
{{#if: {{{skill| }}} |
{{Cat|Reactive Skills|name={{{name}}} }}
{{Cat|Reaction Skills|name={{{name}}} }}
}} |
{{Cat|Active Abilities|name={{{name}}} }}
{{Cat|Single Action Abilities|name={{{name}}} }}
{{#if: {{{spell| }}} |
{{Cat|Active Spells|name={{{name}}} }}
{{Cat|Single Action Spells|name={{{name}}} }}
}}
{{#if: {{{skill| }}} |
{{Cat|Active Skills|name={{{name}}} }}
{{Cat|Single Action Skills|name={{{name}}} }}
}}
}}
| 2 = {{Cat|Active Abilities|name={{{name}}} }}
{{Cat|Double Action Abilities|name={{{name}}} }}
{{#if: {{{spell| }}} |
{{Cat|Active Spells|name={{{name}}} }}
{{Cat|Double Action Spells|name={{{name}}} }}
}}
{{#if: {{{skill| }}} |
{{Cat|Active Skills|name={{{name}}} }}
{{Cat|Double Action Skills|name={{{name}}} }}
}}
| 3 = {{Cat|Active Abilities|name={{{name}}} }}
{{Cat|Triple Action Abilities|name={{{name}}} }}
{{#if: {{{spell| }}} |
{{Cat|Active Spells|name={{{name}}} }}
{{Cat|Triple Action Spells|name={{{name}}} }}
}}
{{#if: {{{skill| }}} |
{{Cat|Active Skills|name={{{name}}} }}
{{Cat|Triple Action Skills|name={{{name}}} }}
}}
| #default =
}}
{{Cat|Abilities|name={{{name}}}}} }}</includeonly><noinclude>
== Template Frontend ==
This template is designed for tagging and categorizing abilities, spells, and related game elements. It supports a wide range of parameters to provide detailed metadata, such as the type of ability, its delivery method, associated elements, power sources, and more.
=== Parameters ===
* <code>1</code>: str (required)
*: The main content or description of the ability.
* <code>name</code>: str (required)
*: The name of the ability or spell, used for categorization.
==== Power Sources ====
* <code>divine</code>: bool (optional, defaults to <code>0</code>)
*: Indicates whether the ability is associated with the Divine power source.
* <code>magic</code>: bool (optional, defaults to <code>0</code>)
*: Indicates whether the ability is associated with the Magic power source.
* <code>primal</code>: bool (optional, defaults to <code>0</code>)
*: Indicates whether the ability is associated with the Primal power source.
* <code>spiritual</code>: bool (optional, defaults to <code>0</code>)
*: Indicates whether the ability is associated with the Spirit power source.
==== Elements ====
* <code>life</code>: bool (optional, defaults to <code>0</code>)
*: Indicates whether the ability is associated with the Life element.
* <code>storm</code>: bool (optional, defaults to <code>0</code>)
*: Indicates whether the ability is associated with the Storm element.
* <code>necro</code>: bool (optional, defaults to <code>0</code>)
*: Indicates whether the ability is associated with the Necromancy element.
* <code>flame</code>: bool (optional, defaults to <code>0</code>)
*: Indicates whether the ability is associated with the Flame element.
* <code>nature</code>: bool (optional, defaults to <code>0</code>)
*: Indicates whether the ability is associated with the Nature element.
==== Usage ====
* <code>oc</code>: bool (optional, defaults to <code>0</code>)
*: Indicates if the ability is usable out of combat.
* <code>bc</code>: bool (optional, defaults to <code>0</code>)
*: Indicates if the ability is usable before combat.
* <code>ic</code>: bool (optional, defaults to <code>0</code>)
*: Indicates if the ability is usable in combat.
==== Casting/Execution Time ====
* <code>time</code>: str (optional)
*: Use to override the default casting or execution time.
* <code>re</code>: bool (optional, defaults to <code>0</code>)
*: Indicates if the ability is reactive.
* <code>num</code>: int (optional, defaults to <code>na</code>)
*: Specifies the number of actions (or reactions) required to cast or execute the ability.
*: Use <code>0</code> for free actions (or free reactions).
*: Possible values: <code>0</code>, <code>1</code>, <code>2</code>, <code>3</code>, <code>na</code>.
==== Delivery ====
* <code>delivery</code>: str (optional)
*: Use to override the default delivery method.
* <code>self</code>: bool (optional, defaults to <code>0</code>)
*: Indicates if the ability is self-targeted.
* <code>strike</code>: bool (optional, defaults to <code>0</code>)
*: Indicates if the ability is a strike attack (requires a weapon).
* <code>bite</code>: bool (optional, defaults to <code>0</code>)
*: Indicates if the ability is a bite ability.
* <code>blood</code>: bool (optional, defaults to <code>0</code>)
*: Indicates if the ability is a blood ability.
* <code>ritual</code>: bool (optional, defaults to <code>0</code>)
*: Indicates if the ability is delivered through a ritual.
* <code>ray</code>: bool (optional, defaults to <code>0</code>)
*: Indicates if the ability is delivered as a ray.
* <code>ball</code>: bool (optional, defaults to <code>0</code>)
*: Indicates if the ability is delivered as a ball.
* <code>touch</code>: bool (optional, defaults to <code>0</code>)
*: Indicates if the ability is delivered through touch.
* <code>aura</code>: bool (optional, defaults to <code>0</code>)
*: Indicates if the ability is delivered as an aura.
* <code>tag</code>: bool (optional, defaults to <code>0</code>)
*: Indicates if the ability is a tag ability.
* <code>cone</code>: bool (optional, defaults to <code>0</code>)
*: Indicates if the ability is a cone ability.
* <code>cascade</code>: bool (optional, defaults to <code>0</code>)
*: Indicates if the ability is a cascade ability.
* <code>fork</code>: bool (optional, defaults to <code>0</code>)
*: Indicates if the ability is a fork ability.
* <code>field</code>: bool (optional, defaults to <code>0</code>)
*: Indicates if the ability is some other field.
===== Delivery Modifiers =====
* <code>deliveryMod</code>: str (optional)
*: Use to override the default delivery modifier description.
* <code>vitals</code>: bool (optional, defaults to <code>0</code>)
*: Indicates if the ability is a vitals attack.
* <code>leg</code>: bool (optional, defaults to <code>0</code>)
*: Indicates if the ability is a leg attack.
* <code>arm</code>: bool (optional, defaults to <code>0</code>)
*: Indicates if the ability is an arm attack.
* <code>passive</code>: bool (optional, defaults to <code>0</code>)
*: Indicates if the ability is passive.
==== Target ====
* <code>target</code>: str (optional)
*: Use to override the default target description.
* <code>targetType</code>: str (optional, defaults to <code>creature</code>)
*: Specifies the type of target (e.g., creature, item).
==== Range ====
* <code>range</code>: str (optional)
*: Use to override the default range description.
* <code>rangeDist</code>: int (optional, defaults varies by <code>delivery</code>)
*: Specifies the range distance in feet.
==== Duration ====
* <code>duration</code>: str (optional)
*: Use to override the default duration description.
* <code>sustained</code>: bool (optional, defaults to <code>0</code>)
*: Indicates if the ability is sustained.
* <code>end</code>: bool (optional, defaults to <code>0</code>)
*: Indicates if the ability has some other end condition.

=== Additional Information ===
The template supports numerous parameters for categorizing abilities into various categories automatically. Boolean parameters (e.g., <code>life</code>, <code>storm</code>) trigger their respective tags and categories when set to a truthy value.

== Template Backend ==
The backend utilizes nested logic and conditional structures to generate tags and categories dynamically based on the provided parameters. This approach ensures flexibility and reduces the need for manual categorization.

Key features include:
* Tagging elements, power sources, and delivery methods using the <code>{{Tag}}</code> sub-template.
* Categorizing abilities dynamically based on the combination of parameters (e.g., elements, power sources, combat phases).
* Supporting fallback values and default behaviors for missing parameters.

For optimal usage, ensure that all required parameters are supplied and optional parameters are set thoughtfully to achieve desired categorizations.
</noinclude>

Latest revision as of 06:58, 21 January 2025