Macro Function Changes for 1.5.4 - RPTools/maptool GitHub Wiki

Summary of the changes/additions to macros for MapTool 1.5.4

One of the most significant changes, which isn't visible, is that macro functions which modify tokens no longer cause the entire token to be sent out to all clients (and in some cases twice!) but instead just send the relevant changes. This can give a significant performance improvement to frameworks that frequently change states or other token properties during combat or other high activity periods.

New Macro Functions

  • getFrameProperties(frameName) - Returns the current properties of the named frame.
  • getDialogProperties(dialogName) - Returns the current properties of the named dialog.
  • getTableEntry(tablename, entry) - Returns the raw table entry info: {"min":3, "max":5, "value": "duck", "assetid":""}
  • getViewCenter(pixels, delim) - Returns the center of the current view in either pixels or cell coords.

Functions With New Parameters/Capabilities

  • frame/dialog - New parameters value & tabtitle
  • exposeFOW - Now takes an optional array/list of tokens
  • getInfo("server") - Returns state of Auto Reveal on Movement and Individual FoW
  • restoreFOW - Documented optional map name parameter

Added Optional Token ID/Name & Map Name Parameters

  • canSeeToken
  • clearLights
  • getLights
  • getSightType
  • hasLightSource
  • hasSight
  • setHasSight
  • setLight
  • setSightType

Added Optional Map Name Parameter

  • bringToFront
  • getGMNotes
  • getLayer
  • getMatchingProperties
  • getName
  • getNotes
  • getOwners
  • getProperty
  • getPropertyNames
  • getPropertyNamesRaw
  • getPropertyType
  • getRawProperty
  • getSize
  • getState
  • getTokenFacing
  • getTokenHandout
  • getTokenHeight
  • getTokenImage
  • getTokenNativeHeight
  • getTokenNativeWidth
  • getTokenOpacity
  • getTokenPortrait
  • getTokenRotation
  • getTokenShape
  • getTokenWidth
  • hasProperty
  • isNPC
  • isOwnedByAll
  • isOwner
  • isPC
  • isPropertyEmpty
  • isSnapToGrid
  • removeTokenFacing
  • resetProperty
  • resetSize
  • sendToBack
  • setAllStates
  • setGMNotes
  • setLayer
  • setName
  • setNotes
  • setNPC
  • setOwnedByAll
  • setOwner
  • setPC
  • setProperty
  • setPropertyType
  • setSize
  • setState
  • setTokenFacing
  • setTokenHandout
  • setTokenHeight
  • setTokenImage
  • setTokenOpacity
  • setTokenPortrait
  • setTokenShape
  • setTokenSnapToGrid
  • setTokenWidth

Functions That Weren't Updating Clients

  • resetSize
  • setGMNotes
  • setNotes
  • setTokenHeight
  • setTokenShape
  • setTokenSnapToGrid
  • setTokenWidth