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
No edit summary
Line 1: Line 1:
<includeonly>
<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|
{{ContextBarHelper|Elements|
{{If
{{If
Line 43: Line 81:
|c=#33d17a
|c=#33d17a
|l=:Category:Nature Spells
|l=:Category:Nature Spells
}}
}}
}}
{{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
}}
}}
}}
}}
Line 110: Line 110:
}}
}}
}}
}}
{{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|
{{ContextBarHelper|Delivery|
{{{delivery|
{{{delivery|
Line 198: Line 223:
}}}
}}}
}}
}}
{{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|Target|{{ucfirst:{{lc:
{{ContextBarHelper|Target|{{ucfirst:{{lc:
{{{target
{{{target
|{{If
|{{If
|{{{aura| }}}{{{cone| }}}{{{ball| }}}
|{{{aura| }}}{{{cone| }}}{{{ball| }}}{{{field| }}}
| {{{targetType|creature}}}s within area of effect
| {{{targetType|creature}}}s within area of effect
| 1 {{{targetType|creature}}} within range
| 1 {{{targetType|creature}}} within range
Line 474: Line 474:
{{Cat|Abilities|name={{{name}}}}} }}</includeonly><noinclude>
{{Cat|Abilities|name={{{name}}}}} }}</includeonly><noinclude>
== Template Frontend ==
== Template Frontend ==
This template categorizes abilities, spells, and skills based on the specified parameters. It is used for organizing content into appropriate categories for easy navigation and grouping.
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 ===
=== Parameters ===
* <code>1</code>: str (required)
* <code>1</code>: str (required)
*: The name or description of the ability, spell, or skill.
*: The main content or description of the ability.
* <code>mental</code>: bool (optional, defaults to <code>0</code>)
* <code>name</code>: str (required)
*: Indicates if the ability has a mental effect.
*: The name of the ability or spell, used for categorization.
==== Power Sources ====
* <code>divine</code>: bool (optional, defaults to <code>0</code>)
* <code>divine</code>: bool (optional, defaults to <code>0</code>)
*: Specifies if the ability is divine.
*: Indicates whether the ability is associated with the Divine power source.
* <code>magic</code>: bool (optional, defaults to <code>0</code>)
* <code>magic</code>: bool (optional, defaults to <code>0</code>)
*: Specifies if the ability is magical.
*: Indicates whether the ability is associated with the Magic power source.
* <code>primal</code>: bool (optional, defaults to <code>0</code>)
* <code>primal</code>: bool (optional, defaults to <code>0</code>)
*: Indicates if the ability is primal in nature.
*: Indicates whether the ability is associated with the Primal power source.
* <code>spiritual</code>: bool (optional, defaults to <code>0</code>)
* <code>spiritual</code>: bool (optional, defaults to <code>0</code>)
*: Indicates if the ability is spiritual.
*: Indicates whether the ability is associated with the Spirit power source.
==== Elements ====
* <code>oc</code>: bool (optional, defaults to <code>0</code>)
*: Tags the ability as out-of-combat.
* <code>bc</code>: bool (optional, defaults to <code>0</code>)
*: Tags the ability as before combat.
* <code>ic</code>: bool (optional, defaults to <code>0</code>)
*: Tags the ability as in-combat.
* <code>life</code>: bool (optional, defaults to <code>0</code>)
* <code>life</code>: bool (optional, defaults to <code>0</code>)
*: Indicates if the spell belongs to the Life domain.
*: Indicates whether the ability is associated with the Life element.
* <code>storm</code>: bool (optional, defaults to <code>0</code>)
* <code>storm</code>: bool (optional, defaults to <code>0</code>)
*: Indicates if the spell belongs to the Storm domain.
*: Indicates whether the ability is associated with the Storm element.
* <code>necro</code>: bool (optional, defaults to <code>0</code>)
* <code>necro</code>: bool (optional, defaults to <code>0</code>)
*: Indicates if the spell belongs to the Necromancy domain.
*: Indicates whether the ability is associated with the Necromancy element.
* <code>flame</code>: bool (optional, defaults to <code>0</code>)
* <code>flame</code>: bool (optional, defaults to <code>0</code>)
*: Indicates if the spell belongs to the Flame domain.
*: Indicates whether the ability is associated with the Flame element.
* <code>nature</code>: bool (optional, defaults to <code>0</code>)
* <code>nature</code>: bool (optional, defaults to <code>0</code>)
*: Indicates if the spell belongs to the Nature domain.
*: Indicates whether the ability is associated with the Nature element.
==== Usage ====
* <code>spell</code>: bool (optional, defaults to <code>0</code>)
* <code>oc</code>: bool (optional, defaults to <code>0</code>)
*: Marks the entry as a spell.
*: Indicates if the ability is usable out of combat.
* <code>skill</code>: bool (optional, defaults to <code>0</code>)
* <code>bc</code>: bool (optional, defaults to <code>0</code>)
*: Marks the entry as a skill.
*: Indicates if the ability is usable before combat.
* <code>standard</code>: bool (optional, defaults to <code>0</code>)
* <code>ic</code>: bool (optional, defaults to <code>0</code>)
*: Identifies the entry as a standard conjure spell or a semblant skill.
*: Indicates if the ability is usable in combat.
* <code>ball</code>: bool (optional, defaults to <code>0</code>)
==== Casting/Execution Time ====
*: Identifies the entry as a ball-type spell or skill.
* <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>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>)
* <code>ray</code>: bool (optional, defaults to <code>0</code>)
*: Identifies the entry as a ray-type spell or skill.
*: 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>)
* <code>aura</code>: bool (optional, defaults to <code>0</code>)
*: Identifies the entry as an aura-type spell or skill.
*: Indicates if the ability is delivered as an aura.
* <code>touch</code>: bool (optional, defaults to <code>0</code>)
*: Identifies the entry as a touch-type spell or skill.
* <code>passive</code>: bool (optional, defaults to <code>0</code>)
*: Tags the entry as passive.
* <code>tag</code>: bool (optional, defaults to <code>0</code>)
* <code>tag</code>: bool (optional, defaults to <code>0</code>)
*: Tags the entry for grouping under tags.
*: Indicates if the ability is a tag ability.
* <code>ritual</code>: bool (optional, defaults to <code>0</code>)
* <code>cone</code>: bool (optional, defaults to <code>0</code>)
*: Tags the entry as a ritual.
*: Indicates if the ability is a cone ability.
* <code>action</code>: str (optional)
* <code>cascade</code>: bool (optional, defaults to <code>0</code>)
*: Indicates if the ability is a cascade ability.
*: Specifies a custom action type for the skill.
* <code>rank</code>: str (optional, defaults to <code>nr</code>)
* <code>fork</code>: bool (optional, defaults to <code>0</code>)
*: Specifies the rank of the ability (e.g., 0 for Journeyman, 1 for Rank 1).
*: Indicates if the ability is a fork ability.
* <code>num</code>: str (optional, defaults to <code>na</code>)
* <code>field</code>: bool (optional, defaults to <code>0</code>)
*: Indicates if the ability is some other field.
*: Specifies the number of actions required for this ability (e.g., 0 for free, 1 for single).
===== Delivery Modifiers =====
* <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.

=== 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 ==
== Template Backend ==
This template utilizes a series of conditional statements to determine the appropriate categories based on the parameters provided. It ensures that content is accurately sorted and easily discoverable through the MediaWiki categorization system.
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>
</noinclude>

Revision as of 02:28, 27 December 2024

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

  • 1: str (required)
    The main content or description of the ability.
  • name: str (required)
    The name of the ability or spell, used for categorization.

Power Sources

  • divine: bool (optional, defaults to 0)
    Indicates whether the ability is associated with the Divine power source.
  • magic: bool (optional, defaults to 0)
    Indicates whether the ability is associated with the Magic power source.
  • primal: bool (optional, defaults to 0)
    Indicates whether the ability is associated with the Primal power source.
  • spiritual: bool (optional, defaults to 0)
    Indicates whether the ability is associated with the Spirit power source.

Elements

  • life: bool (optional, defaults to 0)
    Indicates whether the ability is associated with the Life element.
  • storm: bool (optional, defaults to 0)
    Indicates whether the ability is associated with the Storm element.
  • necro: bool (optional, defaults to 0)
    Indicates whether the ability is associated with the Necromancy element.
  • flame: bool (optional, defaults to 0)
    Indicates whether the ability is associated with the Flame element.
  • nature: bool (optional, defaults to 0)
    Indicates whether the ability is associated with the Nature element.

Usage

  • oc: bool (optional, defaults to 0)
    Indicates if the ability is usable out of combat.
  • bc: bool (optional, defaults to 0)
    Indicates if the ability is usable before combat.
  • ic: bool (optional, defaults to 0)
    Indicates if the ability is usable in combat.

Casting/Execution Time

  • time: str (optional)
    Use to override the default casting or execution time.
  • re: bool (optional, defaults to 0)
    Indicates if the ability is reactive.
  • num: int (optional, defaults to na)
    Specifies the number of actions (or reactions) required to cast or execute the ability.
    Use 0 for free actions (or free reactions).
    Possible values: 0, 1, 2, 3, na.

Delivery

  • delivery: str (optional)
    Use to override the default delivery method.
  • self: bool (optional, defaults to 0)
    Indicates if the ability is self-targeted.
  • strike: bool (optional, defaults to 0)
    Indicates if the ability is a strike attack (requires a weapon).
  • bite: bool (optional, defaults to 0)
    Indicates if the ability is a bite ability.
  • ritual: bool (optional, defaults to 0)
    Indicates if the ability is delivered through a ritual.
  • ray: bool (optional, defaults to 0)
    Indicates if the ability is delivered as a ray.
  • ball: bool (optional, defaults to 0)
    Indicates if the ability is delivered as a ball.
  • touch: bool (optional, defaults to 0)
    Indicates if the ability is delivered through touch.
  • aura: bool (optional, defaults to 0)
    Indicates if the ability is delivered as an aura.
  • tag: bool (optional, defaults to 0)
    Indicates if the ability is a tag ability.
  • cone: bool (optional, defaults to 0)
    Indicates if the ability is a cone ability.
  • cascade: bool (optional, defaults to 0)
    Indicates if the ability is a cascade ability.
  • fork: bool (optional, defaults to 0)
    Indicates if the ability is a fork ability.
  • field: bool (optional, defaults to 0)
    Indicates if the ability is some other field.
Delivery Modifiers
  • vitals: bool (optional, defaults to 0)
    Indicates if the ability is a vitals attack.
  • leg: bool (optional, defaults to 0)
    Indicates if the ability is a leg attack.
  • arm: bool (optional, defaults to 0)
    Indicates if the ability is an arm attack.
  • passive: bool (optional, defaults to 0)
    Indicates if the ability is passive.

Target

  • target: str (optional)
    Use to override the default target description.
  • targetType: str (optional, defaults to creature)
    Specifies the type of target (e.g., creature, item).

Range

  • range: str (optional)
    Use to override the default range description.
  • rangeDist: int (optional, defaults varies by delivery)
    Specifies the range distance in feet.

Duration

  • duration: str (optional)
    Use to override the default duration description.
  • sustained: bool (optional, defaults to 0)
    Indicates if the ability is sustained.

Additional Information

The template supports numerous parameters for categorizing abilities into various categories automatically. Boolean parameters (e.g., life, storm) 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 {{{1}}} 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.