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 .
×
D&D 2024 has arrived! Pre-Order the new core rulebooks now.
Create a free account

Call roll template from API

1434990541

Edited 1434990826
DXWarlock
Sheet Author
API Scripter
Wasnt sure if to post this is Character Sheet or API forum, if it needs moved feel free to put it in the correct place. Does anyone know a way to call a rolltemplate from the API and send it to chat? We are using the 5e Shaped sheet, and Im creating a few scripts for the GM to speed up a few things but would like to format the output to match the 5e shaped button output format. I've tried a simple test with just basic info and title like: sendChat('', "&{template:5eDefault} {{ability=1}} {{character_name="+msg.who+"}} @{show_character_name} {{title=XP}} {{subheader=Gained}}"); But that didnt seem to like it
1434996052

Edited 1434996089
DXWarlock
Sheet Author
API Scripter
Ignore my post, was a EBKAC error on my part I got it working, was a matter of syntax of what he calls the rolltemplate objects and not an API issue. I had to 'hardcode' some of the variables like {{show_character_name=1}} and such that it was looking for as attributes of the player sending it. sendChat('', "&{template:5eDefault} {{show_character_name=1}} {{character_name="+msg.who+"}} {{emote="+Pic+"}} {{title=Shared a pic}}");