Template:Distance: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
(Use metric as basis.)
m (Use nbsp.)
Line 5: Line 5:
| short ranged = 15
| short ranged = 15
| #default = {{{m|}}}
| #default = {{{m|}}}
}} }}{{SmallIcon|Range Icon.png}} {{#if: {{#lvar:m}}
}} }}{{SmallIcon|Range Icon.png}} {{#if: {{#lvar:m}}
| {{#lvar:m}} m / {{m to ft | {{#lvar:m}} }} ft
| {{#lvar:m}} m / {{m to ft | {{#lvar:m}} }} ft
| ? m / {{{ft|?}}} ft {{color|red|(Distance not provided in metric!)}} {{Main namespace only|[[Category:Articles with incorrect usage of the Distance template]][[Category:Articles with errors]]}}
| ? m / {{{ft|?}}} ft {{color|red|(Distance not provided in metric!)}} {{Main namespace only|[[Category:Articles with incorrect usage of the Distance template]][[Category:Articles with errors]]}}

Revision as of 04:07, 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:  ? m / 50 ft (Distance not provided 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.