Template:Distance: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{SmallIcon|Range Icon.png}} {{#switch:{{{1|}}} | melee | touch = 1.5{{nbts}}m / 5{{nbts}}ft | reach = 2.5{{nbts}}m / 8{{nbts}}ft | ranged = 18{{nbts}}m / 60{{nbts}}ft | short ranged = 15{{nbts}}m / 50{{nbts}}ft | self | Self = Self | #default = {{{m}}}{{nbts}}m / {{{ft}}}{{nbts}}ft }}") |
(Cleanup.) |
||
(7 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{SmallIcon|Range Icon.png}} {{#switch:{{{1|}}} | <includeonly>{{SmallIcon|Range Icon.png}} {{#switch: {{{1|}}} | ||
| melee | touch = 1.5{{ | | melee | touch = 1.5 m / 5 ft | ||
| | | reach = 2.5 m / 8 ft | ||
| | | ranged = 18 m / 60 ft | ||
| | | short ranged = 15 m / 50 ft | ||
| | | #default = {{#if: {{{m|}}} | ||
| | | {{{m}}} m / {{m to ft | {{{m}}} }} ft | ||
| {{#expr: {{{ft|0}}} * 3 / 10 }} m / {{{ft|0}}} ft {{color|red|(ERROR: Distance not in metric!)}} {{Main namespace only|[[Category:Articles with incorrect usage of the Distance template]][[Category:Articles with errors]]}} | |||
}} | |||
}}</includeonly><noinclude> | |||
Usage: {{code|<nowiki>{{Distance|melee}}</nowiki>}} | |||
Result: {{Distance|melee}} | |||
Usage: {{code|<nowiki>{{Distance|reach}}</nowiki>}} | |||
Result: {{Distance|reach}} | |||
Usage: {{code|<nowiki>{{Distance|ranged}}</nowiki>}} | |||
Result: {{Distance|ranged}} | |||
Usage: {{code|<nowiki>{{Distance|short ranged}}</nowiki>}} | |||
Result: {{Distance|short ranged}} | |||
Usage: {{code|<nowiki>{{Distance|m=1.5}}</nowiki>}} | |||
Result: {{Distance|m=1.5}} | |||
Usage: {{code|<nowiki>{{Distance|ft=50}}</nowiki>}} | |||
Result: {{Distance|ft=50}} | |||
Game files use metric, and apply the calculation mentioned in [[Template:M to ft]] when the options are set to imperial. This is why the template expects a value in metric and refuses to apply the reverse transform, which may lead to unexpected results due to rounding. | |||
</noinclude> |
Latest revision as of 04:22, 8 April 2024
Usage: {{Distance|melee}}
Result: 1.5 m / 5 ft
Usage: {{Distance|reach}}
Result: 2.5 m / 8 ft
Usage: {{Distance|ranged}}
Result: 18 m / 60 ft
Usage: {{Distance|short ranged}}
Result: 15 m / 50 ft
Usage: {{Distance|m=1.5}}
Result: 1.5 m / 5 ft
Usage: {{Distance|ft=50}}
Result: 15 m / 50 ft (ERROR: Distance not in metric!)
Game files use metric, and apply the calculation mentioned in Template:M to ft when the options are set to imperial. This is why the template expects a value in metric and refuses to apply the reverse transform, which may lead to unexpected results due to rounding.