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

How to auto apply TokenNameNumber to All?

First time API user. Does anyone know offhand a way to auto apply the TokenNameNumber (%%NUMBERED%%) to a lot of tokens? If not, is there a way to keep changes to a compendium token across all games.  Having to do the %%NUMBERED%% for a Hobgoblin for each game I run seems silly.  
1585933589
The Aaron
Roll20 Production Team
API Scripter
There isn't really a good way to do that.  I could write a script that would do it for every character with a token placed on a page, but I need a token to set as the Default Token from the API.  Compendium Characters are particularly challenging as the API can't create the tokens for them (can't create tokens with marketplace images).
Thats great insight! I feel honored to have gotten an immediate response from The Aaron right out the gate. 
1585934260
The Aaron
Roll20 Production Team
API Scripter
Hahahahaha!  Well... I probably spend too much time on the forums...  (and I probably have the window open and an extension refreshing it every 5 minutes with custom highlighting of new messages...)  =D
So I have a question that goes along with this. Can I just name the token I install to the default token with the    (%%NUMBERED%%) name. now a better understanding do I make its name 1. (%%NUMBERED%%)  2.    (%%KoboldNUMBERED%%) 3.    (%%Kobold%%)
1585958447
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
You can use token mod to renumber a selected token to name+%%NUMBERED%%. Then copy and paste that token wherever you wish. It will number without needing to mess with default tokens if you wish to skip that step. Tip for faster placement: Roll20 pastes tokens centered on your last mouse click. So click-paste, click-paste, click-paste... will set them up very quickly. 
I’m trying to get them to number as separate monsters as I bring them onto the map 
I’m building a monster manual so I won’t need to go back and edit many monsters I just want to know now how to do it.
1585962294
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Joey V. said: I’m trying to get them to number as separate monsters as I bring them onto the map  The you will need to rename the monster and then re-save the default token.
Will that funky extra part show as there name in the saved file in my “monster manual”?
1585970394
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Only on the name of the token. If you ever see it, it would be very briefly while placing. The name in your journals tab is the character name, not the token name.
Hmmm well what ever I did I gave it to the monster not the token so maybe I can change it in the journal again cause it was working 
Ok next problem it starts my monsters out at number 2 not one how do I fix that 
1585979789
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Check to make sure you don't have another monster somewhere in the board. It may even have moveed off the edge. To get a good test, start with a fresh map page.
Yeah I redid it and I got it working after checking another thread about the API. So my next question is their any way to space the number away from the name? Right now it’s right up against the name. 
1586016305
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Put a space between the name and %%NUMBERED%%
1586016868
Dumbhuman
Pro
Marketplace Creator
If the name field looks like this: Kobold%%NUMBERED%% Then your tokens will have names like: Kobold1 Kobold2 Kobold999 If the name field looks like this: Kobold %%NUMBERED%% Then your tokens will have names like: Kobold 1 Kobold 2 Kobold 999 If the name field looks like this: Ko%%NUMBERED%%bold Then your tokens will have names like: Ko1bold Ko2bold Ko999bold