ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.
Difference between revisions of "Template:Values"
From ModEnc
m (Added limitations for some other value types.) |
|||
Line 2: | Line 2: | ||
|signed integer | |signed integer | ||
|signed integers | |signed integers | ||
− | |||
|integer | |integer | ||
− | |integers = [[Help:Values#Integers|Signed integers:]] All whole numbers from -2147483648 to 2147483647; in rare cases, only from -32768 to 32767. | + | |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. | + | |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]]) | + | |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. | ||
− | |||
|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 | ||
− | |||
|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. | ||
− | | | + | |lepton |
− | | | + | |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 19: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
orintegers
unsigned integers
floats
unsigned bytes
orbytes
signed bytes
booleans
strings
stringlist
orlistofstrings
colors
clsids
orlocomotors
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)
".