Hello everyone, I'm trying to make a dropdown menu for my druid so that he can shapeshift and have his token, health, and AC change automatically on his token display. I've done a couple of other simple things using TokenMod (I gave my players with lanterns a button to turn their lantern on and off and one to let my players cast the Light spell from DnD 5e on other tokens), but now when I try this I run into several problems. The first problem I ran into was that the modified NPC sheets that my druid is using aren't found when doing @{'NPC Name'|character_id}. In my original two macros, I used this format to target a specific character with --ids. I was able to extract the IDs of the NPCs using @{target|character_id} and since character IDs appear to be persistent across play sessions, I hardcoded those IDs into the macro. Furthermore, I discovered that I can't use '|' in the TokenMod syntax when it's inside a dropdown list, so I'm using '#' instead per a forum post I read. The error I'm getting now is: " TypeError: Cannot read property 'substring' of undefined " Which looks to be a somewhat generic error when working with the API. Here is my code in full: ?{Choose Shape|
Human,
!token-mod {{
--ids '-M_s0zEsYFVv5ha87pZH' '-M_sAO_yaDUoU4M_ZOuU'
--off
night_vision
--set
represents#@{Marcelyn#character_id}
currentside#1 }} |
Bear,
!token-mod {{
--ids @{Marcelyn#character_id} '-M_sAO_yaDUoU4M_ZOuU'
--off
night_vision
--set
represents#'-M_s0zEsYFVv5ha87pZH'
currentside#2
}} |
Tiger,
!token-mod {{
--ids '-M_s0zEsYFVv5ha87pZH' @{Marcelyn#character_id}
--on
night_vision
--set
represents#'-M_sAO_yaDUoU4M_ZOuU'
currentside#3
night_distance#60
}}
} Any help would be appreciated, thank you!