Template:Ability (LW2)/doc

From UFOpaedia
< Template:Ability (LW2)
Revision as of 07:53, 4 February 2017 by Tvol (talk | contribs) (Major Update; see documentation)
Jump to navigation Jump to search

Skeleton

{{Ability_(LW2)
    | s_image   =
    | s_caption = 
    | s_link    =
    | s_name    = 
    | s_descr   =
    | s_id      =
    | s_templateName = {{subst:FULLPAGENAME}} 
    {{ #if: {{{ b_name |}}} | {{!}} b_name = {{{b_name}}} |}}
    {{ #if: {{{ b_descr |}}} | {{!}} b_descr = {{{b_descr}}} |}}
    {{ #if: {{{ b_info |}}} | {{!}} b_info = {{{b_info}}} |}}
    {{ #if: {{{ b_table |}}} | {{!}} b_table = {{{b_table}}} |}}
}}

Parameters

s_image : Image filename without link or prefix, but including extension, e.g. Image_name.jpg. This get's expanded in the template to blahblah

s_caption : Rollover text for the main image.

s_link : Title of page on wiki or URL for the main image to link to. Do not use this to link to a template page! It should lead to a content page in the Main namespace. See s_templateName below for that.

s_name : The perk/ability name.

s_descr : A (shortish) description of the perk.

s_id : ID of HTML elements. This should contain no special characters, no spaces, and must be unique across the wiki for future compability. A good option is the ability's name suffixed with the game it belongs to, e.g. on the {{Aggression (LW2)}} template it would read aggressionLW (yes, the beginning lowercase is intentional; please useCamelCase.)

s_templateName : The base name of the ability template page, including namespace. E.g. for {{Aggression (LW2)}} this value will read Template:Aggression (LW2). The function in the skeleton will do this for you the first time the page is saved.

Passthroughs

This section of the skeleton should not be modified nor ommitted.

The if parser functions of this section pass these parameters on from the caller to the Ability template only if they are declared. Otherwise nothing is passed to {{Ability_(LW2)}} and thus {{Ability_(LW2)}} will use its default values. Therefore, when calling an ability template, these values should only be declared if you want to make the behaviour of the call explicit.

b_name : Set if name is visible. 0: Always invisible. 1: Always visible. Default: 0.

b_descr : Set if description is visible. 0: Always invisible. 1: Always visible. Default: 0.

b_info : Set if info icon is visible. 0: Always invisible. 1: Always visible. Default: 0.

b_table : Set if extra padding should be added. This is intended for use in tables, such as {{Class Tree (LW2)}}. 0: Never have extra padding. 1: Always have extra padding. Default: 0.

Depreciated or Removed

s_info : Removed 04-Feb-2017 . Was previously used to add info rollover text. This text has since been moved to the /Info subpage of each ability template. Superceded by s_templateName.

Bugs

None known.