Template:Chance to: Difference between revisions

From Space Station 14 Wiki
No edit summary
(docs)
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": "1",
"paramOrder": [
"1",
"prob"
]
}
</templatedata>
</noinclude>

Revision as of 14:32, 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

1

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