Difference between revisions of "Template:Function"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>DragoonWraith
imported>DragoonWraith
(updating link)
 
(33 intermediate revisions by the same user not shown)
Line 4: Line 4:


  <nowiki>{{Function</nowiki>
  <nowiki>{{Function</nowiki>
  origin            = whether the function came from the CS itself or was added by OBSE.
  | origin            = whether the function came from the CS itself or was added by OBSE.
                      valid values: CS1 (TES CS 1.0), CS1.1 (TES CS 1.1), CS1.2 (TES CS 1.2), OBSE
                        valid values: CS1 (TES CS 1.0), CS1.1 (TES CS 1.1), CS1.2 (TES CS 1.2), OBSE
  summary          = description of the function
  | summary          = description of the function
   
   
  ''name''              = the name of the function. The page name is the default value.
  | ''name''              = the name of the function. The page name is the default value.
  ''alias''            = An abbreviated version of the function name that can be
  | ''alias''            = An abbreviated version of the function name that can be
                      used instead of the long name.
                        used instead of the long name.
  ''returnVal ''        = what the function returns.
  | ''returnVal ''        = what the function returns.
  ''returnType''        = the type of the returned value.
  | ''returnType''        = the type of the returned value.
  ''referenceType''    = if appropriate, the type of reference that the function may be called
  | ''referenceType''    = if appropriate, the type of reference that the function may be called
                      on with the dot syntax
                        on with the dot syntax
  ''referenceOpt''      = if can take a reference, whether it ''must'' take a reference.
  | ''referenceOpt''      = if can take a reference, whether it ''must'' take a reference.
  ''arguments''        = List of arguments specified using the {{[[:Template:FunctionArgument|FunctionArgument]]}} template,
  | ''arguments''        = List of arguments specified using the {{[[:Template:FunctionArgument|FunctionArgument]]}} template,
                      or any other wiki syntax.
                        or any other wiki syntax.
   
   
  ''altName''          = the name of an alternate version of a function (e.g. the "C" Magic Effect functions)
  | ''altName''          = the name of an alternate version of a function (e.g. the "C" Magic Effect functions)
  ''altAlias''          = the alias of the alternate function.
  | ''altAlias''          = the alias of the alternate function.
  ''altRetVal''        = the return value of the alternate function, if different. Defaults to the same as the regular function.
  | ''altRetVal''        = the return value of the alternate function, if different. Defaults to the same as the regular function.
  ''altRetType''        = the return type of the alternate function, if different. Defaults to the same as the regular function.
  | ''altRetType''        = the return type of the alternate function, if different. Defaults to the same as the regular function.
  ''altRefType''        = if different from the regular function, the reference used by the alternate version.
  | ''altRefType''        = if different from the regular function, the reference used by the alternate version.
  ''altRefOpt''        = whether the alternate's reference is optional.
  | ''altRefOpt''        = whether the alternate's reference is optional.
  ''altArgs''          = List of arguments for the alternate version of the function.
  | ''altArgs''          = List of arguments for the alternate version of the function.
   
   
  ''alt2Name''          = the name of a second alternate version of a function
  | ''alt2Name''          = the name of a second alternate version of a function
  ''alt2Alias''        = the alias of any second alternate version of a function
  | ''alt2Alias''        = the alias of any second alternate version of a function
  ''alt2RetVal''        = the return value of the second alternate function, if different. Defaults to the same as the regular function.
  | ''alt2RetVal''        = the return value of the second alternate function, if different. Defaults to the same as the regular function.
  ''alt2RetType''        = the return type of the second alternate function, if different. Defaults to the same as the regular function.
  | ''alt2RetType''        = the return type of the second alternate function, if different. Defaults to the same as the regular function.
  ''alt2RefType''        = if different from the regular function, the reference used by the second alternate version.
  | ''alt2RefType''        = if different from the regular function, the reference used by the second alternate version.
  ''alt2RefOpt''        = whether the second alternate's reference is optional.
  | ''alt2RefOpt''        = whether the second alternate's reference is optional.
  ''alt2Args''          = List of arguments for the second alternate version of the function.
  | ''alt2Args''          = List of arguments for the second alternate version of the function.
   
   
  ''example''          = optionally, the function used as part of a script to serve as an example
  | ''example''          = optionally, the function used as part of a script to serve as an example
  ''CategoryList''      = the list of categories to which the page belongs
  | ''CategoryList''      = the list of categories to which the page belongs
  <nowiki>}}</nowiki>
  <nowiki>}}</nowiki>


Line 112: Line 112:
| CS1.2  = A function included in the [[The Elder Scrolls Construction Set|TES CS v1.2]].
| CS1.2  = A function included in the [[The Elder Scrolls Construction Set|TES CS v1.2]].
| OBSE = A function added by the [[:Category:Oblivion Script Extender|Oblivion Script Extender]].
| OBSE = A function added by the [[:Category:Oblivion Script Extender|Oblivion Script Extender]].
| #default = {{Error|missing function origin info}}
| #default = A function added by {{{origin | {{Error|missing function origin info}} }}}
}}
}}


<!-- syntax starts here: -->
<!-- syntax starts here: -->
'''Syntax:''' <sup>[[Function syntax|What is this?]]</sup>
'''Syntax:'''
<!--
 
Function syntax description link -->
<div id="catlinks" style="font-size: 75%; float: left; margin: -0.7em 1%; padding: 0 0.1em;">[[Help:Function syntax|What is this?]]</div>
<!--
<!--



Latest revision as of 00:21, 5 January 2012


This template is used to create correctly-formatted function documentation pages. Primarily for the sake of standardizing the syntax sections.

{{Function
  | origin            = whether the function came from the CS itself or was added by OBSE.
                        valid values: CS1 (TES CS 1.0), CS1.1 (TES CS 1.1), CS1.2 (TES CS 1.2), OBSE
  | summary           = description of the function

  | name              = the name of the function. The page name is the default value.
  | alias             = An abbreviated version of the function name that can be
                        used instead of the long name.
  | returnVal         = what the function returns.
  | returnType        = the type of the returned value.
  | referenceType     = if appropriate, the type of reference that the function may be called
                        on with the dot syntax
  | referenceOpt      = if can take a reference, whether it must take a reference.
  | arguments         = List of arguments specified using the {{FunctionArgument}} template,
                        or any other wiki syntax.

  | altName           = the name of an alternate version of a function (e.g. the "C" Magic Effect functions)
  | altAlias          = the alias of the alternate function.
  | altRetVal         = the return value of the alternate function, if different. Defaults to the same as the regular function.
  | altRetType        = the return type of the alternate function, if different. Defaults to the same as the regular function.
  | altRefType        = if different from the regular function, the reference used by the alternate version.
  | altRefOpt         = whether the alternate's reference is optional.
  | altArgs           = List of arguments for the alternate version of the function.

  | alt2Name          = the name of a second alternate version of a function
  | alt2Alias         = the alias of any second alternate version of a function
  | alt2RetVal         = the return value of the second alternate function, if different. Defaults to the same as the regular function.
  | alt2RetType        = the return type of the second alternate function, if different. Defaults to the same as the regular function.
  | alt2RefType        = if different from the regular function, the reference used by the second alternate version.
  | alt2RefOpt         = whether the second alternate's reference is optional.
  | alt2Args          = List of arguments for the second alternate version of the function.

  | example           = optionally, the function used as part of a script to serve as an example
  | CategoryList      = the list of categories to which the page belongs
}}

Example

{{Function
 |origin = OBSE
 |summary = Sets the constant effect barter factor of the magic effect.
 |name = SetMagicEffectBarterFactor
 |alias = SetMEBarterFactor
 |altName = SetMagicEffectBarterFactorC
 |altAlias = SetMEBarterFactorC
 |returnVal = nothing
 |returnType = void
 |arguments = 
  {{FunctionArgument
   |Name = newBarterFactor
   |Type = float
  }}{{FunctionArgument
   |Name = effect
   |Type = chars
  }}
 |altArgs = 
  {{FunctionArgument
   |Name = newBarterFactor
   |Type = float
  }}{{FunctionArgument
   |Name = effectCode
   |Type = long
  }}
 |example = SetMagicEffectBarterFactor 5 FIDG
 SetMEBarterFactorC 1.5 1397247044 ; code for SHLD
}}

Result

A function added by the Oblivion Script Extender.

Syntax:

(nothing) SetMagicEffectBarterFactor   
(nothing) SetMEBarterFactor   
(nothing) SetMagicEffectBarterFactorC   
(nothing) SetMEBarterFactorC

Sets the constant effect barter factor of the magic effect.

Example

SetMagicEffectBarterFactor 5 FIDG
SetMEBarterFactorC 1.5 1397247044 ; code for SHLD