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 .
×

How can I automatically post tokenmarker images in chat?

1618397825

Edited 1618397886
They are custom tokens and on this page ( <a href="https://wiki.roll20.net/API:Token_Markers" rel="nofollow">https://wiki.roll20.net/API:Token_Markers</a> )&nbsp;I have found how to post names of them through !gettokenmarkers but I only want to have (larger) images show of tokenmakers currently active on a selected object. Any idea how to do this?
1618404254

Edited 1618404273
The Aaron
Roll20 Production Team
API Scripter
You want them shown in a public chat message, or whispered? What's your use case? That will make it easier to make recommendations.
1618404838

Edited 1618406697
I am looking for them to be whispered, currently I am using this: sendChat('Stats', '/w '+ display + ' ' + info + ' &lt;br&gt; &lt;img src='+img+' width="200" height="200" &gt;'); It sends some 'info' (that is stored in gmnotes) about the selected token to whoever uses the macro. The images part is suppose to be all the tokenmarkers currently active on the token that should also be sent as part of this same macro but I haven't been able to make it work unfortunately. Basically the macro is a sort of information button that players can use to see details of a selected unit. Also, is there perhaps a way to remove the sender part of sendChat? So that in the whisper message there is no sender at all, the whisper message just appearing in chat without the "From ..." line? Edit: I just realized, instead of the actual token image, it would be even better if I could somehow send some text box based on whatever the tokenmarker is. So if I am using something as a custom token marker, when I use my info macro, it would then show for example the description of that token marker in the whisper message. This is what I am using and it seems fine, but ideally looking to have just 1 whisper instead of 3 or 4 seperate ones when there are multiple token marker on a unit. if (markers.includes("Parmula") == true) { sendChat('Equipment', '/w '+ display + ' &lt;br&gt;&lt;b&gt;Permula:&lt;/b&gt; This unit now has Save: If unit is eliminated, discard Permula and remain at 1 health.'); }; So I am now wondering how can I merge my info from gmnotes with the info from whatever tokenmarkers give into 1 whole message so it's displayed more nicely instead of multiple whispers?