Template:M to ft: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
(Created page with "<includeonly>{{#expr: ({{{1|0}}} * 10 / 3) round 0 }}</includeonly><noinclude> Converts a value in meters to feet. What this actually does, '''in line with the game's logic,''' is multiply by <code>10/3</code> and then round the result to an integer. Here is some evidence that this is what the game seems to be doing: * 1.5m (melee range) becomes 5ft * 9m (standard movement speed) becomes 30ft * 10.5m (wood-elf movement speed) becomes 35ft * 36m (9m base speed + dash th...")
 
(Improve explanation.)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<includeonly>{{#expr: ({{{1|0}}} * 10 / 3) round 0 }}</includeonly><noinclude>
<includeonly>{{#expr: ({{{1|0}}} * 10 / 3) round 0 }}</includeonly><noinclude>
Converts a value in meters to feet. What this actually does, '''in line with the game's logic,''' is multiply by <code>10/3</code> and then round the result to an integer.
Converts a value in meters to feet. What this actually does, '''in line with the game's logic,''' is multiply by <code>10/3</code> and then round the result to an integer.
It would have been more accurate to use a factor of <code>3.28</code>, or at least <code>3.3</code>, whereas <code>10/3</code> equals <code>3.333...</code> which seems like a strange value to choose. However, as seen from the examples below, this factor actually results in very nice round results for some of the most common distance values, which may be why it was chosen.


Here is some evidence that this is what the game seems to be doing:
Here is some evidence that this is what the game seems to be doing:


* 1.5m (melee range) becomes 5ft
* 1.5m (melee range) becomes 5ft
* 7.5m (shorty movement speed) becomes 25ft
* 9m (standard movement speed) becomes 30ft
* 9m (standard movement speed) becomes 30ft
* 10.5m (wood-elf movement speed) becomes 35ft
* 10.5m (wood-elf movement speed) becomes 35ft
* 36m (9m base speed + dash three times with thief) becomes 120ft
* 12.5m (9m base speed + [[Wild Shape: Sabre-Toothed Tiger|sabre-tooth]] wild shape) becomes 41.666... rounded to 42ft
* 14m (wood-elf + sabre-tooth) becomes 46.666... rounded to 47ft


Note: The game probably doesn't round the value internally when calculating distance, but rather only for display purposes. Otherwise, switching units would lead to actually different distances. E.g. switching to imperial would slightly increase the sabre-tooth wild shape movement speed due to rounding up.
One could mistakenly assume that the game is rounding feet values to steps of 5, but the [[Wild Shape: Sabre-Toothed Tiger|sabre-tooth wild shape]] (+3.5m movement speed) proves this not to be the case, as it leads to movement speed values that aren't multiples of 5 in feet:
 
* 11m (7.5m base + 3.5m sabre-tooth) becomes 36.666... rounded to 37ft
* 12.5m (9m base + 3.5m sabre-tooth) becomes 41.666... rounded to 42ft
* 14m (10.5m base + 3.5m sabre-tooth) becomes 46.666... rounded to 47ft
 
Note: Internally, the game doesn't round the value at all. Rather, the rounding only applies to the value displayed on screen. Otherwise, switching units would lead to actually different distances. E.g. switching to imperial would slightly increase the sabre-tooth wild shape movement speed due to rounding up. When it comes to movement speed, the real distance can be found out by pointing the mouse as far away from the character as possible (in turn based mode) before the "Not enough movement speed" text starts to appear next to the distance.


Example:
Example:

Latest revision as of 02:00, 8 April 2024

Converts a value in meters to feet. What this actually does, in line with the game's logic, is multiply by 10/3 and then round the result to an integer.

It would have been more accurate to use a factor of 3.28, or at least 3.3, whereas 10/3 equals 3.333... which seems like a strange value to choose. However, as seen from the examples below, this factor actually results in very nice round results for some of the most common distance values, which may be why it was chosen.

Here is some evidence that this is what the game seems to be doing:

  • 1.5m (melee range) becomes 5ft
  • 7.5m (shorty movement speed) becomes 25ft
  • 9m (standard movement speed) becomes 30ft
  • 10.5m (wood-elf movement speed) becomes 35ft

One could mistakenly assume that the game is rounding feet values to steps of 5, but the sabre-tooth wild shape (+3.5m movement speed) proves this not to be the case, as it leads to movement speed values that aren't multiples of 5 in feet:

  • 11m (7.5m base + 3.5m sabre-tooth) becomes 36.666... rounded to 37ft
  • 12.5m (9m base + 3.5m sabre-tooth) becomes 41.666... rounded to 42ft
  • 14m (10.5m base + 3.5m sabre-tooth) becomes 46.666... rounded to 47ft

Note: Internally, the game doesn't round the value at all. Rather, the rounding only applies to the value displayed on screen. Otherwise, switching units would lead to actually different distances. E.g. switching to imperial would slightly increase the sabre-tooth wild shape movement speed due to rounding up. When it comes to movement speed, the real distance can be found out by pointing the mouse as far away from the character as possible (in turn based mode) before the "Not enough movement speed" text starts to appear next to the distance.

Example:

The sabre-tooth wild shape increases your movement speed by 3.5 meters ({{m to ft | 3.5}} feet).

Result:

The sabre-tooth wild shape increases your movement speed by 3.5 meters (12 feet).