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

Template:Action: Difference between revisions

Template page
Content deleted Content added
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#if: {{{trigger|}}} | '''Trigger:''' {{{trigger}}}[[Category:Triggered Actions]]<br /> }}{{#if: {{{requirements|}}} | '''Requirements:''' {{{requirements}}}[[Category:Actions with Requirements]]<br /> }}<br />{{{1}}}<br />{{#if: {{{crit success|}}} | <br />'''Critical Success:''' {{{crit success}}} }}{{#if: {{{success|}}} | <br />'''Success:''' {{{success}}} }}{{#if: {{{fail|}}} | <br />'''Failure:''' {{{fail}}} }}{{#if: {{{crit fail|}}} | <br />'''Critical Failure:''' {{{crit fail}}} }}
<includeonly>{{Trim|{{#if: {{{trigger| }}} | '''Trigger:''' {{{trigger}}}{{Cat|Triggered Actions|name={{{name}}} }}<br /> }}{{#if: {{{requirements| }}} | '''Requirements:''' {{{requirements}}}{{Cat|Actions with Requirements|name={{{name}}} }}<br /> }}<br />{{{1}}}<br />{{#if: {{{crit success| }}} | <br />'''Critical Success:''' {{{crit success}}} }}{{#if: {{{success| }}} | <br />'''Success:''' {{{success}}} }}{{#if: {{{fail| }}} | <br />'''Failure:''' {{{fail}}} }}{{#if: {{{crit fail| }}} | <br />'''Critical Failure:''' {{{crit fail}}} }}
{{#if: {{{special|}}} | [[Category:Specialty Actions]] | [[Category:Basic Actions]] }}
{{#if: {{{special| }}} | {{Cat|Specialty Actions|name={{{name}}} }} | {{Cat|Basic Actions|name={{{name}}} }} }}
{{#if: {{{move|}}} | [[Category:Movement Actions]] }}
{{#if: {{{move| }}} | {{Cat|Movement Actions|name={{{name}}} }} }}
{{#if: {{{attack|}}} | [[Category:Attack Actions]] }}
{{#if: {{{attack| }}} | {{Cat|Attack Actions|name={{{name}}} }} }}
{{#if: {{{manipulate|}}} | [[Category:Manipulation Actions]] }}
{{#if: {{{manipulate| }}} | {{Cat|Manipulation Actions|name={{{name}}} }} }}
{{#if: {{{concentrate|}}} | [[Category:Concentration Actions]] }}
{{#if: {{{concentrate| }}} | {{Cat|Concentration Actions|name={{{name}}} }} }}
{{#if: {{{secret|}}} | [[Category:Secret Actions]] }}
{{#if: {{{secret| }}} | {{Cat|Secret Actions|name={{{name}}} }} }}
{{#if: {{{re|}}} | [[Category:Reactions]] | [[Category:Normal Actions]] }}
{{#if: {{{re| }}} | {{Cat|Reactions|name={{{name}}} }} | {{Cat|Normal Actions|name={{{name}}} }} }}
{{#switch: {{{num|1}}}
{{#switch: {{{num|1}}}
| 0 = {{#if: {{{re|}}} | [[Category:Free Reactions]] | [[Category:Free Actions]] }}
| 0 = {{#if: {{{re| }}} | {{Cat|Free Reactions|name={{{name}}} }} | {{Cat|Free Actions|name={{{name}}} }} }}
| 1 = {{#if: {{{re|}}} | [[Category:Non-free Reactions]] | [[Category:Single Actions]][[Category:Non-free Actions]] }}
| 1 = {{#if: {{{re| }}} | {{Cat|Non-free Reactions|name={{{name}}} }} | {{Cat|Single Actions|name={{{name}}} }}{{Cat|Non-free Actions|name={{{name}}} }} }}
| 2 = {{#if: {{{re|}}} | [[Category:Non-free Reactions]] | [[Category:Double Actions]][[Category:Non-free Actions]] }}
| 2 = {{#if: {{{re| }}} | {{Cat|Non-free Reactions|name={{{name}}} }} | {{Cat|Double Actions|name={{{name}}} }}{{Cat|Non-free Actions|name={{{name}}} }} }}
| 3 = {{#if: {{{re|}}} | [[Category:Non-free Reactions]] | [[Category:Triple Actions]][[Category:Non-free Actions]] }}
| 3 = {{#if: {{{re| }}} | {{Cat|Non-free Reactions|name={{{name}}} }} | {{Cat|Triple Actions|name={{{name}}} }}{{Cat|Non-free Actions|name={{{name}}} }} }}
| #default = {{#if: {{{re|}}} | [[Category:Non-free Reactions]] | [[Category:Single Actions]][[Category:Non-free Actions]] }}
| #default = {{#if: {{{re| }}} | {{Cat|Non-free Reactions|name={{{name}}} }} | {{Cat|Single Actions|name={{{name}}} }}{{Cat|Non-free Actions|name={{{name}}} }} }}
}}
}}
[[Category:Actions]]</includeonly><noinclude>
{{Cat|Actions|name={{{name}}} }} }}</includeonly><noinclude>
== Template Frontend ==
== Template Frontend ==
This template is used to format and categorize actions based on their parameters. It provides flexibility for defining detailed action information, such as success outcomes and specific characteristics.
This template is used to define and categorize various [[:Category:Actions|Action types]] based on provided parameters, such as their triggers, requirements, and outcomes. It provides a consistent format for presenting details about actions.


=== Parameters ===
=== Parameters ===
* <code>1</code>: string (required)
* <code>1</code>: str (required)
*: The main description or content of the action.
*: The main description or text of the action.
* <code>trigger</code>: string (optional)
* <code>trigger</code>: str (optional)
*: The condition or event that triggers the action. When provided, the action is categorized as a [[:Category:Triggered Actions|Triggered Action]].
*: Specifies the trigger condition for the action. If provided, the action will be categorized as a [[:Category:Triggered Actions|Triggered Action]].
* <code>requirements</code>: string (optional)
* <code>requirements</code>: str (optional)
*: The prerequisites or conditions required to perform the action. When provided, the action is categorized as a [[:Category:Actions with Requirements|Required Action]].
*: Details any requirements for performing the action. If provided, the action will be categorized as having requirements.
* <code>crit success</code>: string (optional)
* <code>crit success</code>: str (optional)
*: Text describing the result of a critical success.
*: The outcome or effect of the action when it critically succeeds.
* <code>success</code>: string (optional)
* <code>success</code>: str (optional)
*: Text describing the result of a success.
*: The outcome or effect of the action when it succeeds.
* <code>fail</code>: string (optional)
* <code>fail</code>: str (optional)
*: Text describing the result of a failure.
*: The outcome or effect of the action when it fails.
* <code>crit fail</code>: string (optional)
* <code>crit fail</code>: str (optional)
*: Text describing the result of a critical failure.
*: The outcome or effect of the action when it critically fails.
* <code>special</code>: boolean (optional)
* <code>special</code>: bool (optional, defaults to <code>0</code>)
*: Determines if the action is a [[:Category:Specialty Actions|Specialty Action]]. If omitted, the action is categorized as a [[:Category:Basic Actions|Basic Action]].
*: Indicates if the action is a [[:Category:Specialty Actions|Specialty Action]]. If not set, defaults to a [[:Category:Basic Actions|Basic Action]].
* <code>move</code>: boolean (optional)
* <code>move</code>: bool (optional, defaults to <code>0</code>)
*: Determines if the action is categorized as a [[:Category:Movement Actions|Movement Action]].
*: Categorizes the action as a [[:Category:Movement Actions|Movement Action]].
* <code>attack</code>: boolean (optional)
* <code>attack</code>: bool (optional, defaults to <code>0</code>)
*: Determines if the action is categorized as an [[:Category:Attack Actions|Attack Action]].
*: Categorizes the action as an [[:Category:Attack Actions|Attack Action]].
* <code>manipulate</code>: boolean (optional)
* <code>manipulate</code>: bool (optional, defaults to <code>0</code>)
*: Determines if the action is categorized as a [[:Category:Manipulation Actions|Manipulation Action]].
*: Categorizes the action as a [[:Category:Manipulation Actions|Manipulation Action]].
* <code>concentrate</code>: boolean (optional)
* <code>concentrate</code>: bool (optional, defaults to <code>0</code>)
*: Determines if the action is categorized as a [[:Category:Concentration Actions|Concentration Action]].
*: Categorizes the action as a [[:Category:Concentration Actions|Concentration Action]].
* <code>secret</code>: boolean (optional)
* <code>secret</code>: bool (optional, defaults to <code>0</code>)
*: Determines if the action is categorized as a [[:Category:Secret Actions|Secret Action]].
*: Categorizes the action as a [[:Category:Secret Actions|Secret Action]].
* <code>re</code>: boolean (optional, defaults to <code>0</code>)
* <code>re</code>: bool (optional, defaults to <code>0</code>)
*: Indicates whether the action is a reaction. When true, the action is categorized as a [[:Category:Reactions|Reaction]]. Otherwise, it is categorized as a [[:Category:Normal Actions|Normal Action]].
*: Indicates if the action is a [[:Category:Reactions|Reaction]]. Otherwise, it's a [[:Category:Normal Actions|Normal Action]].
* <code>num</code>: integer (optional, defaults to <code>1</code>)
* <code>num</code>: integer (optional, defaults to <code>1</code>)
*: Specifies the number of actions this action consumes. Values of 0, 1, 2, or 3 determine whether the action is categorized as a Free, Single, Double, or Triple Action, respectively.
*: Specifies the number of action points the action consumes. Used to further categorize the action.

=== Additional Information ===
This template assigns appropriate categories based on the provided parameters, making it easier to organize and retrieve information about actions. Ensure all necessary details are provided for proper categorization.


== Template Backend ==
== Template Backend ==
This template dynamically categorizes actions and formats their display. Boolean parameters like <code>special</code>, <code>move</code>, and others directly assign the corresponding categories. The <code>num</code> parameter and <code>re</code> handle the differentiation between free, single, double, and other action types for both reactions and normal actions.
This template uses conditional logic to assign categories based on provided parameters. It ensures that each action is correctly described and categorized for easy navigation and filtering on the wiki.
</noinclude>
</noinclude>

Latest revision as of 05:24, 25 December 2024

Template Frontend

This template is used to define and categorize various Action types based on provided parameters, such as their triggers, requirements, and outcomes. It provides a consistent format for presenting details about actions.

Parameters

  • 1: str (required)
    The main description or text of the action.
  • trigger: str (optional)
    Specifies the trigger condition for the action. If provided, the action will be categorized as a Triggered Action.
  • requirements: str (optional)
    Details any requirements for performing the action. If provided, the action will be categorized as having requirements.
  • crit success: str (optional)
    Text describing the result of a critical success.
  • success: str (optional)
    Text describing the result of a success.
  • fail: str (optional)
    Text describing the result of a failure.
  • crit fail: str (optional)
    Text describing the result of a critical failure.
  • special: bool (optional, defaults to 0)
    Indicates if the action is a Specialty Action. If not set, defaults to a Basic Action.
  • move: bool (optional, defaults to 0)
    Categorizes the action as a Movement Action.
  • attack: bool (optional, defaults to 0)
    Categorizes the action as an Attack Action.
  • manipulate: bool (optional, defaults to 0)
    Categorizes the action as a Manipulation Action.
  • concentrate: bool (optional, defaults to 0)
    Categorizes the action as a Concentration Action.
  • secret: bool (optional, defaults to 0)
    Categorizes the action as a Secret Action.
  • re: bool (optional, defaults to 0)
    Indicates if the action is a Reaction. Otherwise, it's a Normal Action.
  • num: integer (optional, defaults to 1)
    Specifies the number of action points the action consumes. Used to further categorize the action.

Additional Information

This template assigns appropriate categories based on the provided parameters, making it easier to organize and retrieve information about actions. Ensure all necessary details are provided for proper categorization.

Template Backend

This template dynamically categorizes actions and formats their display. Boolean parameters like special, move, and others directly assign the corresponding categories. The num parameter and re handle the differentiation between free, single, double, and other action types for both reactions and normal actions.