You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When a sight type that has a multiplier as part of its definition interacts with a light source that is defined to be grid shaped, the resulting light radius is not multiplied correctly.
To Reproduce
Steps to reproduce the behavior:
Create a new map with a square grid.
Set "Distance per cell" to 5.
Set the map's vision to "Night"
In "Campaign Properties", define a light source to be grid shaped with a radius of 5.
Define a sight type to be either circle or grid shaped with a x10 multiplier.
Place a token on the map.
Make the token Medium size.
Give the token the vision type defined in Step 5 above.
Give the token the light source defined in Step 4 above.
Expected behavior
The light source would have an adjusted radius of 52.5 units, covering to the far edge of the 10th square away from the token.
Actual behavior
The light source has an adjusted radius of 75 units, covering to the middle of the 15th square away from the token.
Screenshots
MapTool Info
Version: 1.8.4
Install: Upgrade from 1.8.3 (same behavior observed in 1.8.3)
Desktop (please complete the following information):
OS: Windows
Version: 10 Pro, 20H2
Additional context
It appears that to make the grid shaped light source conform to the grid, its radius (5 in the above example) is increased by half the distance per cell (5/2 = 2.5). (The adjusted radius becomes 5 + 2.5 = 7.5). When a vision with a multiplier is applied, the adjusted radius is multiplied by the vision's multiplier (10 * 7.5 = 75). Instead, the original radius should be multiplied, and then the adjustment reapplied ( (10 * 5) + 2.5 = 52.5).
The text was updated successfully, but these errors were encountered:
Still present in 1.12.2. Upon further observation, the shape of the expanded light is also incorrect after the vision multiplier is applied. In the above example, the area covered by the light remains square shaped when the vision multiplier is applied, although it should actually be a different shape at the expanded size. It appears to me (total guess here without looking at any of the actual code) that the algorithm that adapts the light source to the shape of the grid is applied before the algorithm that increases the radius of the light for the vision multiplier, and that the order of these two operations needs to be swapped.
Another idea that has occurred to me - what if adapting the light to the grid were handled differently than making "grid" a shape option in the light definition? Then it could be combined with other shapes as well. For example, a cone shape light could become grid shaped as well.
Describe the bug
When a sight type that has a multiplier as part of its definition interacts with a light source that is defined to be grid shaped, the resulting light radius is not multiplied correctly.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The light source would have an adjusted radius of 52.5 units, covering to the far edge of the 10th square away from the token.
Actual behavior
The light source has an adjusted radius of 75 units, covering to the middle of the 15th square away from the token.
Screenshots
MapTool Info
Desktop (please complete the following information):
Additional context
It appears that to make the grid shaped light source conform to the grid, its radius (5 in the above example) is increased by half the distance per cell (5/2 = 2.5). (The adjusted radius becomes 5 + 2.5 = 7.5). When a vision with a multiplier is applied, the adjusted radius is multiplied by the vision's multiplier (10 * 7.5 = 75). Instead, the original radius should be multiplied, and then the adjustment reapplied ( (10 * 5) + 2.5 = 52.5).
The text was updated successfully, but these errors were encountered: