Difference between revisions of "User:Kingerman88/Sandbox"
Jump to navigation
Jump to search
Kingerman88 (talk | contribs) |
Kingerman88 (talk | contribs) |
||
Line 62: | Line 62: | ||
--> | --> | ||
{{#vardefine:temp| User:Kingerman88/Sandbox/AnimalTemplate}} | {{#vardefine:temp| User:Kingerman88/Sandbox/AnimalTemplate}} | ||
− | [[User:Kingerman88/Sandbox/AnimalTemplate]] | + | [[User:Kingerman88/Sandbox/AnimalTemplate]] <br> |
[[User:Kingerman88/Sandbox/Building Material Table Row Copy]] | [[User:Kingerman88/Sandbox/Building Material Table Row Copy]] | ||
Revision as of 14:52, 14 August 2021
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 | ||||
Cow | 0.43 | ||||
Pig | 0.4 | ||||
Bison | 0.43 | ||||
Caribou | 0.22 |
─────────────
If statement (Alpaca find Wool Amount)