User:Kingerman88/Sandbox

From RimWorld Wiki
Jump to navigation Jump to search

Info Sheet

Variables: {{#vardefine:variableName| thing here }}

Can be used via {{#var:name}}

─────────────

Arguments:

They can be DEFINED in TEMPLATES

defined by three curly brackets and closed by three "{{{" argument "}}}"

{{{ 1 }}} (first argument)

{{{ 1| }}} (First argument or substitute argument "")

{{{ 1| default argument value}}} (First argument or substitute "default argument value")

Arguments can be defined as names {{{ argName| defaultValue}}}

You can call them like this {{template| argName=something | argName2=something}}

Keywords

Surround by {{ }}

Name Description Arguments Example Result
formatnum: Formats the number 1: number to be formatted {{formatnum: 134512.5}} 134,512.5
#expr Represents an expression to do math on 1: Expression to do {{#expr:1.125*5 round 2}} 5.63
#ifexpr Simple if, else structure 1: Condition | 2: True | 3: False {{#ifexpr: {{#expr: 105 / 1}} > 100 | 100 | {{#expr: 105 / 1}} }} 100
#switch: Switch statement {{#switch: {{{x}}} |1=one |2=two |3|4|5=range 3–5 |other}} (replace x with "2") two

Template Mess

User:Kingerman88/Sandbox/AnimalTemplate User:Kingerman88/Sandbox/Building Material Table Row Copy

Animal Nutrition Consumed (RHR / 2) Produces Eggs Produces Milk Produces Wool Pack Animal
Boomalope 0.43 Ex.png Check.png Ex.png Ex.png
Cow 0.43 Ex.png Check.png Ex.png Ex.png
Pig 0.4 Ex.png Ex.png Ex.png Ex.png
Bison 0.43 Ex.png Ex.png Check.png Check.png
Caribou 0.22 Ex.png Check.png Ex.png Ex.png

─────────────

Special:Browse/:Goose

If statement (Alpaca find Wool Amount) Check.png