maptool icon indicating copy to clipboard operation
maptool copied to clipboard

Scaled grid auras on square grids are aligned with the grid rather than the token

Open kwvanderlinde opened this issue 3 years ago • 3 comments

Describe the bug When on a map with a square grid, if a token is given an aura with the scale and grid keywords, the aura will always be aligned to the grid. This is inconsistent with non-scale grid auras, as well as hex grids and iso grids, as in all these cases the auras will be centered on the token.

To Reproduce Steps to reproduce the behavior:

  1. Under Edit > Campaign Properties > Light, add these auras:
    Scaled Aura: aura scale GM grid 7.5#ff0000
    Not Scaled Aura: aura GM grid 7.5#0000ff
    
  2. Set the map grid to square.
  3. Drag two tokens onto the map and disable Snap to grid for both. Move both tokens to make sure they aren't sitting perfectly in a grid cell.
  4. Assign "Scaled Aura" to one token, and "Not Scaled Aura" to the other token.
  5. Observe that the red "Scaled Aura" is aligned to the grid and not centered on the token, while the blue "Not Scaled Aura" is not aligned to the grid but is instead centered on the token.

Expected behavior Grids auras should always be centered on the token.

Screenshots The provided auras as they appear on square grid when the tokens are placed on grid intersections: image

The same auras on a hex map: image

MapTool Info

  • Version: 1.9.3
  • Install: New

Desktop (please complete the following information):

  • OS: Linux Mint
  • Version 20

Additional context The same auras on hex grids and iso grids will be aligned with the token center. It's only square grids with scale auras that stand out.

kwvanderlinde avatar Sep 08 '21 05:09 kwvanderlinde

I probably did something wrong, but I edited the candle light source in blank campaign to hex instead of circle and it works, but if I try and open the campaign properties again I get this error

java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because "lastShape" is null
	at net.rptools.maptool.client.ui.campaignproperties.CampaignPropertiesDialog.updateLightPanel(CampaignPropertiesDialog.java:378)
	at net.rptools.maptool.client.ui.campaignproperties.CampaignPropertiesDialog.copyCampaignToUI(CampaignPropertiesDialog.java:225)
	at net.rptools.maptool.client.ui.campaignproperties.CampaignPropertiesDialog.setCampaign(CampaignPropertiesDialog.java:212)
	at net.rptools.maptool.client.AppActions$72.executeAction(AppActions.java:2909)
	at net.rptools.maptool.client.AppActions$ClientAction.execute(AppActions.java:3263)
	at net.rptools.maptool.client.AppActions$ClientAction.actionPerformed(AppActions.java:3295)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at java.desktop/javax.swing.AbstractButton.doClick(Unknown Source)
	at de.muntjak.tinylookandfeel.TinyMenuItemUI.doClick(Unknown Source)
	at de.muntjak.tinylookandfeel.TinyMenuItemUI$MouseInputHandler.mouseReleased(Unknown Source)
	at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
	at java.desktop/java.awt.Component.processMouseEvent(Unknown Source)
	at java.desktop/javax.swing.JComponent.processMouseEvent(Unknown Source)
	at java.desktop/java.awt.Component.processEvent(Unknown Source)
	at java.desktop/java.awt.Container.processEvent(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	at net.rptools.maptool.client.swing.MapToolEventQueue.dispatchEvent(MapToolEventQueue.java:54)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

aliasmask avatar Sep 12 '21 17:09 aliasmask

@aliasmask I reproduced that and open it's own issue for it: #2970

kwvanderlinde avatar Sep 12 '21 18:09 kwvanderlinde

#4347

bubblobill avatar Dec 31 '23 05:12 bubblobill