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 .
×
If you opened a D&D 2024 character on July 17 between 2:20 PM ET and 4:40 PM ET, and now see that your character data is missing/blank, please make a copy of your game and perform a rollback. Rollbacks have been enabled for all users during this period.
Create a free account

DupeCharToken creating characters but not token

1574280679
SᵃᵛᵃǤᵉ
Sheet Author
API Scripter
DupeCharToken creating characters but not tokens. Ever have this issue? Is there a fix or workaround?
1574583408
Chris D.
Pro
Sheet Author
API Scripter
Compendium Curator
It is working for me. Can you provide more detail? Note that all the new tokens are stacked in the same place as the old token, so you will have to move tokens to see more than one. 
1574641808
The Aaron
Roll20 Production Team
API Scripter
Also, if the source token's img is in the marketplace, the API won't be able to create it. 
1574641922
SᵃᵛᵃǤᵉ
Sheet Author
API Scripter
Yep, I found out...that makes it a bit of a pain sine I have to download the upload images from marketplace.
1574642600
Chris D.
Pro
Sheet Author
API Scripter
Compendium Curator
Roll20 purposely decided to not let the API set images to marketplace art, so there is nothing to be done about that pain other than to lobby roll20. But even if the image is in the marketplace, the token itself should still be created with the default pawn looking image. To be honest I don't think I ever tested that myself, since I don't have access to any marketplace only images.  So are you saying that if the if the original token has a marketplace image the duplicate token is not created at all?
1574645165
SᵃᵛᵃǤᵉ
Sheet Author
API Scripter
I drag one from the marketplace library to my map and it still fails...so I'm not sure what's up
1574645785
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Dragging an image from Marketplace to map doesn't make it cease to be a marketplace image. You need to copy it into your user library and then use that  image.
1574653079
Chris D.
Pro
Sheet Author
API Scripter
Compendium Curator
Keithcurtis: I am not really familiar with marketplace images, though I know the API can't assign them to tokens. I thought that people who wanted to use this script had to find free images to use. Could you tell us how to copy marketplace images into your own user library? SavaGe, what do you mean by you "drag one from the marketplace library to my map, and it still fails"? Could you provide more details? I mean nobody can help you unless you tell us what is actually happening. So what should be happening is that you have a character sheet. Lets say for sake of an example that the character is named "Orc". You drag an "Orc" character to the map, and you get a token with a picture of an Orc on the map. Then you select the Orc Token. Then you type "!DupCharToken 3" in order to create 3 more Orcs. What should happen is that a chat message should appear that says "Duplicated Orc 3 times". If you look in the character journal you should see that there is now "Orc1", "Orc 2", and "Orc 3".  There should now be a stack of 4 tokens, obscuring each other. Move the top one to see the ones underneath. So that is what should happen. Can you tell us what is actually happening?
1574665343
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
You can: A) download an image and then upload it manually, either by downloading the set, or placing a copy on the VTT, pressing "z" and right clicking the preview. or B) Right click the image in your marketplace collection (in the art library) and choosing "Copy to Library" or "Copy to Folder" B is probably faster, unless you are working with a whole set.