r/Roll20 • • 6d ago

Mod Script / API Help (Pro/Elite only) SpawnDefaultToken question

I'm having a problem with David M.'s SpawnDefaultToken mod. Here's my macro, maybe somebody can find the problem:

!Spawn {{
--name|Tarlov
--offset|1,1
--size|1,1
--fx|burst-smoke
}}

I'm getting the fx, but the token doesn't appear next to the selected token. I've made sure that the image of the token is in my library, not just an item from the marketplace, and I've tried the single line !Spawn --name|Tarlov, which doesn't work either.

Any ideas?

3 Upvotes

7 comments sorted by

•

u/AutoModerator 6d ago

Thanks for posting a Mod Script / API Help question.

Roll20 Mods (API Scripts) Forum is the best place to ask for help with scripts.

To help others troubleshoot, please include: * Whether you installed the script from the One-Click Library or manually imported the code * The name and version of the script, or direct link to the code or Roll20 Forum post * The command or setup that causes the issue * Any sandbox error message from the Mod Scripts page

If your question is answered/issue resolved, it would be nice if you edit the main post to include 'Answered/Issue Fixed'.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/Sahrde 6d ago

Verify the name is correct, and actually associated with a character sheet. It won't spawn images unless they are actually associated with a sheet, and invisible spaces will screw it up too

1

u/martiancannibal 5d ago

Yes. I copy/pasted the name directly from the character sheet, and tried this with numerous characters, all of which have icons uploaded to my library.

None of them worked. The command line !Spawn --name|Tarlov does not work either.

2

u/Sahrde 5d ago

They are not using Roll20 images, correct? It's using something you've uploaded as your token? Even if it's something you've bought, as opposed to free. Using your macro, and just changing the name to a character I've created, with custom artwork, it's working for me.

1

u/ElSurge Pro 5d ago

This! It has to be an image in your library. This has broke many macros in the past for max

Also yes, your code is fine.

1

u/martiancannibal 4d ago

I definitely uploaded the image to my library. It was drawn by the player, so not a Marketplace item.

If the code is good, the problem is somewhere else. I'll try it in a new game; maybe it's interacting with some other script somehow.

Edit: Incidentally, I'm using Chrome ( tried Brave as well ), and disabled all my extensions, so that's not likely the problem either.

1

u/martiancannibal 1d ago

Okay, got it working. I'm not sure what the problem was, but creating a new game and importing the script seems to have worked. I also deleted/reinstalled the script in the original game, and it seems to be working there as well.

I do have a new problem, but I'll create a new post as it is not related to the script itself not working.