Difference between revisions of "Template:Stat"

From RimWorld Wiki
Jump to navigation Jump to search
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>[[Category:Stat]]{{#switch: {{lc:{{{set property|}}} }}
+
<includeonly><!--
  | 1 | yes | y | t | true ={{#set: Health Type = Stat | Stat Minimum = {{{minValue|{{{min value|}}} }}} | Stat Maximum = {{{maxValue|{{{max value|}}} }}} | Default Base Value = {{{default base value|{{{default value|}}} }}} }}}}'''{{PAGENAME}}''' is a [[Stat]]<!--{{#if: {{{minValue|{{{min value|{{{maxValue|{{{max value}}} }}} }}} }}}|&nbsp;({{#if:{{{minValue|}}}|&nbsp;Min: {{%|{{{minValue}}}}}}}{{#if:{{{maxValue|}}}|&nbsp;Max: {{%|{{{maxValue}}}}}}}&nbsp;)}}-->: {{Text | description | {{{description|}}} }}</includeonly><noinclude>{{Recode|reason=Display mins and maxes, but requires use of toStringStyle to handle - some stats are %, some are flat numbers}}{{Documentation}}</noinclude>
+
 
 +
SET PROPERTIES
 +
-->{{#switch: {{lc:{{{set property|}}} }}
 +
  | 0 | no | n | f | false =
 +
| #default =
 +
  {{#set: Description        = {{{description|}}}
 +
        | Stat Minimum       = {{{min value|}}}
 +
        | Stat Maximum      = {{{max value|}}}
 +
        | Default Base Value = {{{default base value|}}}
 +
        | To String Style    = {{{to string style|}}}
 +
        | Health Type        = Stat
 +
        | Effective Minimum  = {{#expr: {{{effective minimum|}}} }}
 +
        | Effective Maximum  = {{#expr: {{{effective maximum|}}} }}
 +
  }}
 +
  [[Category:{{#switch: {{{category|}}}
 +
    | BasicsPawn = Pawn Stat General
 +
    | PawnCombat = Pawn Stat Combat
 +
    | PawnSocial = Pawn Stat Social
 +
    | PawnMisc  = Pawn Stat Misc
 +
    | PawnWork  = Pawn Stat Work
 +
    | #default  = Stat}}]]
 +
}}<!--
 +
 
 +
DISPLAY TEXT
 +
-->'''{{PAGENAME}}''' is a [[stat]]: {{Text | description | {{{description|}}} }} {{#if: {{{min value|}}} | Its minimum allowed value is {{Format Number|{{{min value|}}}|{{{to string style|}}} }}{{#if: {{{effective minimum|}}} | &nbsp;(effectively limited to {{Format Number|{{{effective minimum|}}}|{{{to string style|}}} }})}}.}} {{#if: {{{max value|}}} | Its maximum allowed value is {{Format Number|{{{max value|}}}|{{{to string style|}}} }}{{#if: {{{effective maximum|}}} | &nbsp;(effectively limited to {{Format Number|{{{effective maximum|}}}|{{{to string style|}}} }})}}.}} {{#if: {{{min value|}}} | Its default value is {{Format Number|{{{default base value|}}}|{{{to string style|}}} }}.}}</includeonly><noinclude>{{Documentation}}</noinclude>

Latest revision as of 16:54, 22 November 2023

Documentation icon Template documentation[view] [edit] [history] [purge]

Creates the first line of a Stat page, displaying what it is, providing the description, categorizing the page and setting several page parameters.

Note: Description placed in the template should match the description of the stat in-game. Additional information and context can be added later. Links can be made from the text in the description.

The Capacity equivalent is Template: Capacity.

Example[edit]

Stat is a stat: Speed at which this person sows and harvests plants. Its minimum allowed value is 10% (effectively limited to 11%). Its maximum allowed value is 100% (effectively limited to 90%). Its default value is 50%.