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
This post has been closed. You can still view previous posts, but you can't post any new replies.

Script specific ability to create drag-able tokens from chat

1390530641

Edited 1390532201
Greetings, as anyone knows it is nice that you cannot cheat rolls in Roll20 as you can in Maptools. What I am proposing is the ability to make capable of adding a Token into the chat message that can be dragged from the chat message to the table (Like the normal /roll and roll-able tables allows you to do) How it could work: In the sendChat command do it like you do inline rolls with an easy identifier like this for example: {{ <a href="http://TokenImageLink.yeah/ExampleToken.png" rel="nofollow">http://TokenImageLink.yeah/ExampleToken.png</a>} }. The Chat parser will check if the chat message originated from the scripts or from the ingame chat system (Macro or player typed) Then it will do either one of two things, depending on how the developers would like to implement it (If they find it useful) Option 1) If it is send by a script it parses the message identifier into a token, akin to /roll and roll-able tables, if it is player written or directly from a macro, it will treat it as normal text. Option 2) If it was send by a script, all the tokens have a red border outline (As a box around the token) and if it was player sent or directly from a macro, it would have a Yellow or Black border. (This will allow the GM to identify whether the token came from his custom scripts, or if he attempted to cheat by creating a message himself.) This would be a nice feature (At least for me), as I am helping some friends of mine, creating scripts to roll in a very weird system, where they have to be able to save rolls for later, but they also need to be sorted, and the most important is the amount of each individual roll, and the result does not matter. To save their rolls they will drag the dice to the table. Examples of use: GM's that wish to reformat their roll window so that they take up less space (or nicer formatting, or system appropriate formatting) than the current normal /roll command, but still retain the ability to drag the tokens. GM's that wish (like WoD or other systems where successes matters, and not the individual rolls) the ability to be able to drag the result as a token. GM's that would like to have a script to easily fetch AoE temporary template tokens, instead of drawing on the map. Players who play summoners could have an easy to access chat command (Or even a macro command, as macros can call scripts) to get the specific token he needs for a summon. GM's who have specific tokens he uses often, so he does not need to copy and paste them and/or search through the library for them every time. And I'm sure there are lots more uses for it. Please leave your constructive feedback and criticism :)
1390536732
Lithl
Pro
Sheet Author
API Scripter
This may already be doable. Checking a die roll and a rollable table roll, they're just several DIV tags, text nodes, some CSS classes, and in the case of a rollable table with an image, an IMG; all of those are things you can use with the /direct chat command (which can be sent from sendChat and only from sendChat). That said, you could do it without a script by simply making a rollable table with a single entry in it (though the non-API solution wouldn't work inline) ~_^
1390537926

Edited 1390576931
I thought about that as well, making a rollable table, but that fills and clutters even more than just a /roll ^_^ So defeats the purpose. Well, the good question is if anyone knows which DIV tags they are using for allowing it to be dragged, if it is indeed how they do it. And for that matter, allow the token to be a Roll-able table token xD Edit: I have now found the specific &lt;div&gt; tags they use, and even copy/pasting a full dice roll message does not give a drag-able dice. It makes the correct image and all, but it is not draggable in any way shape or form.