Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×

Problems with players using @{target|...} syntax

1777040425

Edited 1777043961
Richard @ Damery
Pro
API Scripter
I have been using advanced macros for many years now, with lots of @{target|...} statements in them, for my players to use on their character sheet ability tabs.  They have worked very well, until today.  I now find that if a player uses @{target|token_id} in the chat window and selects a token to get the id of that token, all works fine.  However, any other attribute request results in nothing being returned.  When a @{target|any_attribute_name} is embedded in a macro, the macro fails with the error message No character was found for 'target'.   However, if the GM uses the macro, everything is fine. Even if the player controls the target token, it still does not work for a non-GM player. Is anyone else experiencing this?  Here is an example macro that gets the issue: &{template:RPGMattack}{{title=Guerk attacks @{Target|Select Target|Token_name} with their Axe of Hurling+1 }}{{subtitle=Ranged Attack * **Ammo Left: 1**}}{{AC Hit=[[([[14]][Thac0])-(([[0]][Weapon+]) + ([[1]][Ammo+]) + ([[0]][Style+]) + ([[ 1*[[0]]]][Dexterity+] )+([[[[0]]*[[1]]]][Strength+])+([[0]][Race mod])+([[0]][Prof penalty])+([[0]][Magic Hit+])+([[0]][2-weap penalty])+([[0]][Encumbrance])+([[-2]][Range mod]))-([[1d20cs>20cf<1]][Dice roll]) ]] }}{{Attk Type=S}}{{Target AC=[[(0+(@{Target|Select Target|StandardAC|max}&{noerror}))+((0+(@{Target|Select Target|bar1}&{noerror}))-(0+(@{Target|Select Target|StandardAC}&{noerror})))]]}}{{Target SAC=[[(0+(@{Target|Select Target|SlashAC|max}&{noerror}))+((0+(@{Target|Select Target|bar1}&{noerror}))-(0+(@{Target|Select Target|StandardAC}&{noerror})))]]}}{{Target PAC=}}{{Target BAC=}}{{Dmg S=[[ floor( ([[2d6]][Dice roll]) * ([[(0*0.5)+(0*(1+0))+(1*1)]][Range mult])) + ([[0*0*2]][Range mod]) + (([[1]][Ammo+])+([[0+0]][Style+])+([[0]][Magic dmg+]) +([[1*1]][Strength+])) ]]}}{{Dmg L=[[ floor( ([[2d6]][Dice roll]) * ([[(0*0.5)+(0*(1+0))+(1*1)]][Range mult])) + ([[0*0*2]][Range mod]) + (([[1]][Ammo+])+([[0+0]][Style+])+([[0]][Magic dmg+]) +([[1*1]][Strength+])) ]]}}{{Target HP=[[0+(@{Target|Select Target|bar3})]]}}{{Target MaxHP=[[0+(@{Target|Select Target|bar3|max}&{noerror})]]}}{{Target Heart=[[0+(@{Target|Select Target|bar3})]]/[[0+(@{Target|Select Target|bar3|max}&{noerror})]]}}{{Crit Roll=20}}{{Fumble Roll=1}}{{Result=AC Hit<=Target AC}} FYI, the RPGMattack  template is supported by the RPGMaster API suite, and interprets elements of the Roll Template, such as the {{Result=...}} equasion and other aspects.  It is not the issue - I've placed debug code in the APIs and Roll20 is trapping the @{target|...} field interpretations before passing the Roll Template to the APIs, and the error stops the APIs ever getting it.  Also, this macro has worked absolutely fine for many years now, and nothing has changed in the APIs (which are mine - I am the coder, so I know what's not changed!). Last weekend, this was working well!  Now I get lots of chat window errors!
1777053259

Edited 1777053386
Gauss
Forum Champion
Hi Richard @ Damery,  I am wondering if it is the @{Target|Select Target|attributename} structure. There may be a problem with the "1 click for multiple target calls on the same target".  Off to test.  Edit: Hrm, could not reproduce that.  Mind if you PM me an invite so I can come play with your setup? 
1777055500

Edited 1777055532
Richard @ Damery
Pro
API Scripter
Gauss said: Hi Richard @ Damery,  I am wondering if it is the @{Target|Select Target|attributename} structure. There may be a problem with the "1 click for multiple target calls on the same target".  Off to test.  Edit: Hrm, could not reproduce that.  Mind if you PM me an invite so I can come play with your setup?  Thanks for reaching out.  PM sent.  I can promote you to GM if you need it