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 .
×
Create a free account

Syntax issue (repost)

May 27 (5 years ago)

Reposting(Accidentally placed in Sheets and compendium forum)

Timothy T. said:

Trying to use token-mod for a heal spell. I've got the spell working pretty well, where the character can select a target selects the amount of mana they want to use, which depending on the mana used heals for a specific d6 amount, and then sends an emote to chat that the heal has occurred, but does not output the inline roll value to the chat. Just the emote, if the emote is gone, it inputs a blank message. Is there a way to get the value of the d6 to be stated in chat?

 

!token-mod --set bar3_value|-?{How much mana?|1|2|3},@{Mage|character_id|bar3} --ids @{Mage|character_id}

!token-mod --set bar1_value|[[@{target|Target|bar1}+ ?{Mana used|1|2|3}d6, @{target|Target|bar1|Max}d1}kl1}]] --ids @{target|Target|token_id}

/em Heals @{target|Target|token_name} 


Kraynic said:

I've never used token-mod, so this might be off.  Just from a macro standpoint, is the healing amount working at all?  It seems to me there might be a problem with the macro itself.

[[@{target|Target|bar1}+ ?{Mana used|1|2|3}d6, @{target|Target|bar1|Max}d1}kl1}]]

The curly closing bracket before kl1 doesn't seem to have a matching opening one, but I assume it is supposed to be before the first @{target. And that might be an extra closing curly bracket at the end.

[[{@{target|Target|bar1}+ ?{Mana used|1|2|3}d6, @{target|Target|bar1|Max}d1}kl1]]


Timothy T. said:

Yes, replacing mine with yours and it looks like the actual mechanic works with either way, but neither way shows an actual numerical value in the chat window, it only shows the emote. 





May 27 (5 years ago)
The Aaron
Roll20 Production Team
API Scripter

Not in the released version.  I have a reporting feature in the next version that just needs some cleaning up.  If you'd like to give it a try and give feedback, I'll PM you the details.

May 27 (5 years ago)
The Aaron
Roll20 Production Team
API Scripter

Details sent via PM.

May 28 (5 years ago)

Awesome, Thanks so much, gonna go check it out while I prepare for my game. 

May 28 (5 years ago)
The Aaron
Roll20 Production Team
API Scripter

No problem!