Template:Chance to: Difference between revisions

From Space Station 14 Wiki
No edit summary
(desc)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{#ifeq:{{{prob}}}|1|{{{1}}}|{{#expr:{{{prob}}}*100}}% chance to {{{1}}}}}
<includeonly>{{#ifeq:{{{prob}}}|1|{{{1}}}|{{#expr:{{{prob}}}*100}}% chance to {{{1}}}}}</includeonly><noinclude>
{{documentation}}
 
 
[[Category:Templates without specific category]]
<templatedata>
{
"params": {
"1": {
"label": "What will happen?",
"description": "A chance to what?",
"example": "blow up",
"type": "string",
"required": true
},
"prob": {
"label": "Probability",
"description": "A chance of something to happen, from 0 to 1.",
"example": "0.3",
"type": "number",
"required": true
}
},
"description": "Describes a chance of something to happen using percentages.",
"paramOrder": [
"1",
"prob"
]
}
</templatedata>
</noinclude>

Latest revision as of 14:35, 24 June 2024

Template documentation
view or edit this documentation about template documentation

  • {{Chance to|prob=.3|blow up}} → 30% chance to blow up
  • {{Chance to|prob=1|blow up}} → blow up

Describes a chance of something to happen using percentages.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
What will happen?1

A chance to what?

Example
blow up
Stringrequired
Probabilityprob

A chance of something to happen, from 0 to 1.

Example
0.3
Numberrequired