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
Most macro functions are case-insensitive, and it seems to be the goal for all of them to be. But there are several functions related to finding tokens that are only recognized with correct case, such as getSelected(). Here's the complete list:
getSelected
getSelectedNames
getImpersonated
getImpersonatedNames
getPC
getPCNames
getNPC
getNPCNames
getTokens
getTokenNames
getExposedTokens
getExposedTokenNames
getWithState
getWithStateNames
getOwned
getOwnedNames
getVisibleTokens
getVisibleTokenNames
getTokenName (strict about getToken part)
In all of these, the case sensitivity only applies to the prefix that is common between the *Names and non-*Names variants. Changing the case after that common prefix will result in the function name being recognized, but the behaviour is forced to that of the non-name variant. So, for example:
getTokens gets matching token IDs
getTokenNames gets matching token names
getTokenNameS acts like getTokens instead of getTokenNames
getTokenS acts like getTokens
gettokens is rejected.
There is one tag-along case that I don't know what to do with: getTokenName. The name suggests and wiki documents it as behaving much like getName, but in reality it will behave as getTokenNames if correctly capitalized and getTokens if not.
To Reproduce
Select a token.
Type this into chat to see the token ID printed: [r: getSelected()]
Type this into chat to see an error: [r: getselected()]
Type this into chat to see the token name printed: [r: getSelectedNames()]
Type this into chat to see an error: [r: getselectedNames()]
Type this into chat to see the token ID printed: [r: getSelectedNameS()]
Expected Behaviour
All of these functions can be recognized regardless of case, and their behaviour is the same regardless of case. The *Names variants should always return token names, and the other variants should return token IDs.
Screenshots
No response
MapTool Info
1.15.2
Desktop
Linux Mint 22
Additional Context
No response
The text was updated successfully, but these errors were encountered:
Describe the Bug
Most macro functions are case-insensitive, and it seems to be the goal for all of them to be. But there are several functions related to finding tokens that are only recognized with correct case, such as
getSelected()
. Here's the complete list:getSelected
getSelectedNames
getImpersonated
getImpersonatedNames
getPC
getPCNames
getNPC
getNPCNames
getTokens
getTokenNames
getExposedTokens
getExposedTokenNames
getWithState
getWithStateNames
getOwned
getOwnedNames
getVisibleTokens
getVisibleTokenNames
getTokenName
(strict aboutgetToken
part)In all of these, the case sensitivity only applies to the prefix that is common between the
*Names
and non-*Names
variants. Changing the case after that common prefix will result in the function name being recognized, but the behaviour is forced to that of the non-name variant. So, for example:getTokens
gets matching token IDsgetTokenNames
gets matching token namesgetTokenNameS
acts likegetTokens
instead ofgetTokenNames
getTokenS
acts likegetTokens
gettokens
is rejected.There is one tag-along case that I don't know what to do with:
getTokenName
. The name suggests and wiki documents it as behaving much likegetName
, but in reality it will behave asgetTokenNames
if correctly capitalized andgetTokens
if not.To Reproduce
[r: getSelected()]
[r: getselected()]
[r: getSelectedNames()]
[r: getselectedNames()]
[r: getSelectedNameS()]
Expected Behaviour
All of these functions can be recognized regardless of case, and their behaviour is the same regardless of case. The
*Names
variants should always return token names, and the other variants should return token IDs.Screenshots
No response
MapTool Info
1.15.2
Desktop
Linux Mint 22
Additional Context
No response
The text was updated successfully, but these errors were encountered: