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

Help creating defaulttoken

1588915817
Mik Holmes
Pro
Marketplace Creator
Hey, I'm trying to get a list of all characters in my game, and output their default token onto the playerpageid, with all of the token's attributes, preferably without needing to define every attribute = default.attribute. I am missing something very simple, but I can't seem to find anything about this on the wiki! Any help would be appreciated! var charList = findObjs({_type:"character"}); _.each(charList, function(obj){ obj.get("defaulttoken", function(defaulttoken) { //This is as far as I've gotten... }) })
1588922321
Mik Holmes
Pro
Marketplace Creator
With more research, I've found&nbsp; <a href="https://app.roll20.net/forum/post/5335223/slug%7D" rel="nofollow">https://app.roll20.net/forum/post/5335223/slug%7D</a> &nbsp;which details it fairly well, but unfortunately since compendium creatures seem to be considered marketplace images, you can't create a token from a character that was dragged from the compendium.&nbsp;
1588951335
The Aaron
Roll20 Production Team
API Scripter
Yeah, would be great if they could make a way for the API to create marketplace images.