Difference between revisions of "Template:Stat"

From RimWorld Wiki
Jump to navigation Jump to search
m (Better code readability, Fixed default value for "Round To Five Over" (hopefully), and added default values for "Default Base Value" (1) and "Show Developmental Stage Filter" (Baby, Child, Adult))
m (Nullified "Show Developmental Stage Filter" Default Value to remove some clutter, at least until all Stats have this property filled out)
 
(2 intermediate revisions by the same user not shown)
Line 59: Line 59:
 
| No Skill Factor = {{{no skill factor|1}}}<!-- Default = 1f -->
 
| No Skill Factor = {{{no skill factor|1}}}<!-- Default = 1f -->
 
| No Skill Offset = {{{no skill offset|}}}
 
| No Skill Offset = {{{no skill offset|}}}
| Round To Five Over = {{{round to five over|{{#if: Stat Maximum|{{{P|Stat Maximum}}} }} }}}<!-- Default = float.MaxValue -->
+
| Round To Five Over = {{{round to five over|{{#if:{{P|Stat Maximum}}|{{P|Stat Maximum}} }} }}}<!-- Default = float.MaxValue -->
 
| Value If Missing = {{{value if missing|}}}
 
| Value If Missing = {{{value if missing|}}}
 
<!-- Lists -->
 
<!-- Lists -->
Line 79: Line 79:
 
| To String Style Unfinalized = {{{to string style unfinalized|}}}<!--ToStringStyle?-->
 
| To String Style Unfinalized = {{{to string style unfinalized|}}}<!--ToStringStyle?-->
 
| Mutable Stats = {{{mutable stats|}}}<!--Hashset<StatDef>-->
 
| Mutable Stats = {{{mutable stats|}}}<!--Hashset<StatDef>-->
| Show Developmental Stage Filter = {{{show developmental stage filter|Baby, Child, Adult}}}<!-- Default = DevelopmentalStage.Baby | DevelopmentalStage.Child | DevelopmentalStage.Adult --><!--DevelopmentalStage-->
+
| Show Developmental Stage Filter = {{{show developmental stage filter|<!--Baby, Child, Adult-->}}}<!-- Default = DevelopmentalStage.Baby | DevelopmentalStage.Child | DevelopmentalStage.Adult --><!--DevelopmentalStage-->
 
| Post Process Curve = {{{post process curve|}}}<!--SimpleCurve-->
 
| Post Process Curve = {{{post process curve|}}}<!--SimpleCurve-->
 
| Disable If Skill Disabled = {{{disable if skill disabled|}}}<!--SkillDef-->
 
| Disable If Skill Disabled = {{{disable if skill disabled|}}}<!--SkillDef-->
Line 87: Line 87:
 
| Worker Class = {{{worker class|}}}<!-- Default = typeof(StatWorker) --><!--Type-->
 
| Worker Class = {{{worker class|}}}<!-- Default = typeof(StatWorker) --><!--Type-->
 
   }}
 
   }}
  {{#if:{{{P|Always Hide}}}|[[Category:Stats - Always Hide]]}}
 
  {{#if:{{{P|For Information Only}}}|[[Category:Stats - For Information Only]]}}
 
 
   [[Category:{{#switch: {{{category|}}}
 
   [[Category:{{#switch: {{{category|}}}
 
| Important
 
| Important

Latest revision as of 19:16, 23 September 2024

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%.