Difference between revisions of "Template:Stat"

From RimWorld Wiki
Jump to navigation Jump to search
m (Undo revision 151306 by JuliaCat (talk))
Tag: Undo
m (Nullified "Show Developmental Stage Filter" Default Value to remove some clutter, at least until all Stats have this property filled out)
(8 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
  | 0 | no | n | f | false =
 
  | 0 | no | n | f | false =
 
  | #default =
 
  | #default =
   {{#set: Description       = {{{description|}}}
+
   {{#set: Description = {{{description|}}}
        | Stat Minimum      = {{{min value|}}}
+
| Def Name = {{{def name|}}}
        | Stat Maximum      = {{{max value|}}}
+
| Label = {{{label|}}}
        | Default Base Value = {{{default base value|}}}
+
| Stat Maximum = {{{max value|}}}<!-- Default = 9999999f -->
        | To String Style   = {{{to string style|}}}
+
| Stat Minimum = {{{min value|}}}<!-- Default = -9999999f -->
        | Health Type       = Stat
+
| Default Base Value = {{{default base value|1}}}<!-- Default = 1f -->
        | Effective Minimum = {{#expr: {{{effective minimum|}}} }}
+
| To String Style = {{{to string style|}}}
        | Effective Maximum = {{#expr: {{{effective maximum|}}} }}
+
| Health Type = Stat
 +
| Effective Minimum = {{#expr: {{{effective minimum|}}} }}
 +
| Effective Maximum = {{#expr: {{{effective maximum|}}} }}
 +
<!-- Strings -->
 +
| Offset Label = {{{offset label|}}}
 +
| Format String = {{{format string|}}}
 +
| Format String Unfinalized = {{{format string unfinalized|}}}
 +
| Stat Factors Explanation Header = {{{stat factors explanation header|}}}
 +
| Label For Full Stat List = {{{label for full stat list|}}}
 +
<!-- Booleans -->
 +
| Always Hide = {{{always hide|}}}
 +
| Apply Factors If Negative = {{{apply factors if negative|true}}}<!-- Default = true -->
 +
| Cacheable = {{{cacheable|}}}
 +
| Display Max When Above Or Equal = {{{display max when above or equal|}}}
 +
| Finalize Equipped Stat Offset = {{{finalize equipped stat offset|true}}}<!-- Default = true -->
 +
| For Information Only = {{{for information only|}}}
 +
| Hide In Classic Mode = {{{hide in classic mode|}}}
 +
| Minified Thing Inherits = {{{minified thing inherits|}}}
 +
| Never Disabled = {{{never disabled|}}}
 +
| Overrides Hide Stats = {{{overrides hide stats|}}}
 +
| Round Value = {{{round value|}}}
 +
| Scenario Randomizable = {{{scenario randomizable|}}}
 +
| Show If Undefined = {{{show if undefined|true}}}<!-- Default = true -->
 +
| Show Non Abstract = {{{show non abstract|true}}}<!-- Default = true -->
 +
| Show On Animals = {{{show on animals|true}}}<!-- Default = true -->
 +
| Show On Default Value = {{{show on default value|true}}}<!-- Default = true -->
 +
| Show On Entities = {{{show on entities|true}}}<!-- Default = true -->
 +
| Show On Humanlikes = {{{show on humanlikes|true}}}<!-- Default = true -->
 +
| Show On Mechanoids = {{{show on mechanoids|true}}}<!-- Default = true -->
 +
| Show On Non Power Plants = {{{show on non power plants|true}}}<!-- Default = true -->
 +
| Show On Non Wild Man Humanlikes = {{{show on non wild man humanlikes|true}}}<!-- Default = true -->
 +
| Show On Non Work Tables = {{{show on non work tables|true}}}<!-- Default = true -->
 +
| Show On Pawns = {{{show on pawns|true}}}<!-- Default = true -->
 +
| Show On Player Mechanoids = {{{show on player mechanoids|}}}
 +
| Show On Slaves Only = {{{show on slaves only|}}}
 +
| Show On Unhaulables = {{{show on unhaulables|true}}}<!-- Default = true -->
 +
| Show On Untradeables = {{{show on untradeables|true}}}<!-- Default = true -->
 +
| Show Zero Base Value = {{{show zero base value|}}}
 +
| Suppress Disabled Error = {{{suppress disabled error|}}}<!-- written in code as: supressDisabledError -->
 +
| Immutable = {{{immutable|}}}
 +
<!-- Floats -->
 +
<!--| Default Base Value = {{{default base value|1}}}--><!-- Default = 1f -->
 +
| Hide At Value = {{{hide at value|}}}<!-- Default = -2.14748365E+09f -->
 +
<!--| Max Value = {{{max value|9999999}}}--><!-- Default = 9999999f -->
 +
<!--| Min Value = {{{min value|-9999999}}}--><!-- Default = -9999999f -->
 +
| No Skill Factor = {{{no skill factor|1}}}<!-- Default = 1f -->
 +
| No Skill Offset = {{{no skill offset|}}}
 +
| Round To Five Over = {{{round to five over|{{#if:{{P|Stat Maximum}}|{{P|Stat Maximum}} }} }}}<!-- Default = float.MaxValue -->
 +
| Value If Missing = {{{value if missing|}}}
 +
<!-- Lists -->
 +
| Show If Hediffs Present = {{{show if hediffs present|}}}<!--List<HediffDef>-->
 +
| Capacity Factors = {{{capacity factors|}}}<!--List<PawnCapacityFactor>-->
 +
| Capacity Offsets = {{{capacity offsets|}}}<!--List<PawnCapacityOffset>-->
 +
| Show On Pawn Kind = {{{show on pawn kind|}}}<!--List<PawnKindDef>-->
 +
| Skill Need Factors = {{{skill need factors|}}}<!--List<SkillNeed>-->
 +
| Skill Need Offsets = {{{skill need offsets|}}}<!--List<SkillNeed>-->
 +
| Post Process Stat Factors = {{{post process stat factors|}}}<!--List<StatDef>-->
 +
| Stat Factors = {{{stat factors|}}}<!--List<StatDef>-->
 +
| Parts = {{{parts|}}}<!--List<StatPart>-->
 +
| Show If Mods Loaded = {{{show if mods loaded|}}}<!--List<String>-->
 +
| Show If Mods Loaded Any = {{{show if mods loaded any|}}}<!--List<String>-->
 +
<!-- Integer -->
 +
| Display Priority In Category = {{{display priority in category|}}}
 +
<!-- Other -->
 +
| Worker Int = {{{worker int|}}}<!--StatWorker-->
 +
| To String Style Unfinalized = {{{to string style unfinalized|}}}<!--ToStringStyle?-->
 +
| 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-->
 +
| Post Process Curve = {{{post process curve|}}}<!--SimpleCurve-->
 +
| Disable If Skill Disabled = {{{disable if skill disabled|}}}<!--SkillDef-->
 +
<!--| Category = {{{category|}}}--><!--StatCategoryDef-->
 +
| To String Number Sense = {{{to string number sense|Absolute}}}<!-- Default = ToStringNumberSense.Absolute --><!--ToStringNumberSense-->
 +
<!--| To String Style = {{{to string style|}}}--><!--ToStringStyle-->
 +
| Worker Class = {{{worker class|}}}<!-- Default = typeof(StatWorker) --><!--Type-->
 
   }}
 
   }}
 
   [[Category:{{#switch: {{{category|}}}
 
   [[Category:{{#switch: {{{category|}}}
    | BasicsImportant       = Stats - Important
+
| Important
    | BasicsPawnImportant   = Stats - Pawn Important
+
| Basics Important
    | BasicsNonPawnImportant = Stats - Non Pawn Important
+
| BasicsImportant = Stats - Important
    | Basics           = Stats - Basics
+
| Pawn Important
    | Pawn
+
| Basics Pawn Important
    | BasicsPawn       = Stats - Pawn
+
| BasicsPawnImportant = Stats - Pawn Important
    | Non Pawn
+
| NonPawnImportant
    | NonPawn
+
| Basics Non Pawn Important
    | BasicsNonPawn   = Stats - Non Pawn
+
| BasicsNonPawnImportant = Stats - Non Pawn Important
    | Terrain         = Stats - Terrain
+
| Basics = Stats - Basics
    | Meditation       = Stats - Meditation
+
| Pawn
    | Mechanoid       = Stats - Mechanoid
+
| BasicsPawn = Stats - Pawn
    | Apparel         = Stats - Apparel
+
| Non Pawn
    | Buildings
+
| NonPawn
    | Building         = Stats - Building
+
| BasicsNonPawn = Stats - Non Pawn
    | Ranged Weapon
+
| Terrain = Stats - Terrain
    | Ranged
+
| Meditation = Stats - Meditation
    | Weapon_Ranged   = Stats - Weapon (Ranged)
+
| Mechanoid = Stats - Mechanoid
    | Melee
+
| Apparel = Stats - Apparel
    | Melee Weapon
+
| Buildings
    | Weapon_Melee     = Stats - Weapon (Melee)
+
| Building = Stats - Building
    | Ability         = Stats - Ability
+
| Ranged Weapon
    | Stuff Stat Factors
+
| Ranged
    | StuffStatFactors = Stats - Stuff Stat Factors
+
| Weapon_Ranged = Stats - Weapon (Ranged)
    | Mechanitor       = Stats - Mechanitor
+
| Melee
    | Pawn Combat
+
| Melee Weapon
    | PawnCombat       = Stats - Pawn Combat
+
| Weapon_Melee = Stats - Weapon (Melee)
    | Social
+
| Ability = Stats - Ability
    | Pawn Social
+
| Stuff Stat Factors
    | PawnSocial       = Stats - Pawn Social
+
| StuffStatFactors = Stats - Stuff Stat Factors
    | Misc
+
| Mechanitor = Stats - Mechanitor
    | Pawn Misc
+
| Pawn Combat
    | PawnMisc         = Stats - Pawn Misc
+
| PawnCombat = Stats - Pawn Combat
    | Work
+
| Social
    | Pawn Work
+
| Pawn Social
    | PawnWork         = Stats - Pawn Work
+
| PawnSocial = Stats - Pawn Social
    | Psychic Ritual
+
| Misc
    | PsychicRituals   = Stats - Psychic Ritual
+
| Pawn Misc
    | Containment     = Stats - Containment
+
| PawnMisc = Stats - Pawn Misc
    | Obsolete         = Stats - Obsolete
+
| Work
    | #default         = Stat}}]]
+
| Pawn Work
 +
| PawnWork = Stats - Pawn Work
 +
| Psychic Ritual
 +
| PsychicRituals = Stats - Psychic Ritual
 +
| Containment = Stats - Containment
 +
| Obsolete = Stats - Obsolete
 +
| #default = Stat}}]]
 
}}<!--
 
}}<!--
  
 
DISPLAY TEXT
 
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: {{{default base value|}}} | Its default value is {{Format Number|{{{default base value|}}}|{{{to string style|}}} }}.}}</includeonly><noinclude>{{Documentation}}</noinclude>
+
-->'''{{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: {{{default base value|}}} | Its default value is {{Format Number|{{{default base value|}}}|{{{to string style|}}} }}.}}</includeonly><noinclude>{{Documentation}}</noinclude>

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

No Table (Default)

Stat is a stat: Speed of movement in cells per second. Its minimum allowed value is 0.15. Its default value is 3.

Table

Stat is a stat: Speed of movement in cells per second. Its minimum allowed value is 0.15. Its default value is 3.