ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

Template:Values: Difference between revisions

From ModEnc
Jump to navigation Jump to search
Vinifera7 (talk | contribs)
m Added limitations for some other value types.
Vinifera7 (talk | contribs)
m Reverted edits by Vinifera7 (Talk); changed back to last version by DCoder
Line 2: Line 2:
|signed integer
|signed integer
|signed integers
|signed integers
|int
|integer
|integer
|integers = [[Help:Values#Integers|Signed integers:]] All whole numbers from -2147483648 to 2147483647; in rare cases, only from -32768 to 32767. {{#if: {{{2|}}} | (Limited to: {{{2}}})}}
|integers = [[Help:Values#Integers|Signed integers:]] All whole numbers from -2147483648 to 2147483647; in rare cases, only from -32768 to 32767.
|unsigned integer
|unsigned integer
|unsigned integers = [[Help:Values#Integers|Unsigned integers:]] All non-negative whole numbers from 0 to either 32767, 2147483647 or 4294967296. {{#if: {{{2|}}} | (Limited to: {{{2}}})}}
|unsigned integers = [[Help:Values#Integers|Unsigned integers:]] All non-negative whole numbers from 0 to either 32767, 2147483647 or 4294967296.
|float
|float
|floats = [[Help:Values#Floating Point Values|Floating point values:]] Any decimal number (clearer range should be added in [[Template:Values]]) {{#if: {{{2|}}} | (Limited to: {{{2}}})}}
|floats = [[Help:Values#Floating Point Values|Floating point values:]] Any decimal number (clearer range should be added in [[Template:Values]])
|unsigned byte
|unsigned byte
|unsigned bytes
|unsigned bytes
Line 15: Line 14:
|signed byte
|signed byte
|signed bytes = [[Help:Values#Bytes|Signed Bytes:]] All whole numbers from -128 to 127.
|signed bytes = [[Help:Values#Bytes|Signed Bytes:]] All whole numbers from -128 to 127.
|bool
|boolean
|boolean
|booleans = [[Help:Values#Boolean values|Boolean values:]] yes or no, true or false, 1 or 0
|booleans = [[Help:Values#Boolean values|Boolean values:]] yes or no, true or false, 1 or 0
|str
|string
|string
|strings = [[Help:Values#Strings|Strings:]] Normal text. {{#if: {{{2|}}} | (Limited to: {{{2}}})}}
|strings = [[Help:Values#Strings|Strings:]] Normal text. {{#if: {{{2|}}} | (Limited to: {{{2}}})}}
Line 29: Line 26:
|locomotor
|locomotor
|locomotors = [[Help:Values#CLSIDs/Locomotors|CLSIDs:]] Usually [[Locomotors]], but can be [[AIGenerals|AIGeneral-names]] as well.
|locomotors = [[Help:Values#CLSIDs/Locomotors|CLSIDs:]] Usually [[Locomotors]], but can be [[AIGenerals|AIGeneral-names]] as well.
|percent
|lepton
|percents
|leptons = [[Lepton|Leptons:]] Whole numbers - 1 lepton is 1/256th of a map cell.
|percentage
|percentage
|percentages
|percentages
Line 54: Line 51:
*<code>colors</code>
*<code>colors</code>
*<code>clsids</code> '''or''' <code>locomotors</code>
*<code>clsids</code> '''or''' <code>locomotors</code>
*<code>leptons</code>
*<code>percentages</code>
*<code>percentages</code>
*<code>special</code>
*<code>special</code>

Revision as of 17:24, 21 April 2008

This template generates standardized value type descriptions for a number of common types, to be used in the values= parameter of Template:Flag.

Usage

{{Values|VALUE TYPE}}


Currently valid value types are:

  • signed integers or integers
  • unsigned integers
  • floats
  • unsigned bytes or bytes
  • signed bytes
  • booleans
  • strings
  • stringlist or listofstrings
  • colors
  • clsids or locomotors
  • leptons
  • percentages
  • special

In the case of strings and stringlist, a second parameter can be added to note what the strings are limited to. For example:

{{Values|stringlist|[[Animations]]}}

yields "Comma-separated list of strings. (Limited to: Animations)".

In cause of stringlist, an additional argument separator can be provided. It defaults to "Comma" and describes the separator between the list entries. For example:

{{Values|stringlist|[[Sound filenames]]|separator=Whitespace}}

yields "Whitespace-separated list of strings. (Limited to: Sound filenames)".