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

[Script, Update] TokenNameNumber -- Now with Custom Token Marker Support!

1623215460

Edited 1623804414
The Aaron
Roll20 Production Team
API Scripter
TokenNameNumber adds a number onto a token's name by replacing the special string %%NUMBERED%% with a number.&nbsp; Update v0.5.14 &nbsp;-- Rewritten numbering logic to fix the hanging %%NUMBERED%% problem.&nbsp; Added !tnn --renumber command to reset the numbers on the page (and fix any hanging %%NUMBERED%% cases).&nbsp; (Thanks&nbsp; Chris W. ) To Renumber all tokens on the page that were numbered by TokenNameNumber (or match it's naming rules), execute: !tnn --renumber Numbering of tokens should be super reliable now so there shouldn't be any more %%NUMBERED%% tokens persisting despite lag in the system. Update v0.5.13 -- Custom Token Marker Support! (Thanks&nbsp; Chris W. ,&nbsp; Nym's Adventures ). Access the Help/Config with the following command: !tnn To make use of TokenNameNumber, place the string %%NUMBERED%% in the token's name somewhere, and it will get replaced with a number when you drag in that creature. Be sure to set it as the default token when you have the name updated.&nbsp; Note that you do not need to change the Character name.&nbsp; Also, once you have tokens for a character being numbered, you can copy and paste them to get more with different numbers. By default, the number is monotonically increasing, starting from the number 1.&nbsp; Number sequences are counted separately for each page, and each creature type (by character they represent). If you want your players to keep guessing how many creatures of a given type there are, you can enabled Random Space. Random Space will add a random number between 1 and the specified space number to the token number for each subsequent token. &nbsp; If you don't want your players dealing with numbers, you can instead have a sequence of Token Markers applied.&nbsp; To do that, turn on Use Dots: When you create tokens, they will now have a sequence of dots. Dots are used in the order they are listed in the help/config: You can add and remove statuses by clicking them to move them between active and inactive.&nbsp; Dots also respect the Random Space setting: If you want to get really creative, you can upload Token Markers that are digits.&nbsp; If you want to do that, be sure to set your Zero digit first. You'll also want to turn off Zero Bias in the menu.&nbsp; If you don't, your Token Marker numbers will be one less than your creature's name number (and will start numbering at Zero): This also works with Random Space: And of course, it looks especially nice with the names and bars off: For my numbers, I used the Marketplace Set 5e Token Markers: Conditions, Damage Types, and Buffs by PandaAssassin . Notes This script depends on libTokenMarkers, which is available in the 1-click, or in my repo.&nbsp; If you don't have it, TokenNameNumber will complain loudly and tell you how to get it. =D If you used this script in the past, it should continue to work for you as it always has.&nbsp; One change you might notice is that it no longer makes use of the User Config options on the 1-Click install page.&nbsp; This is for two reasons: 1) Those won't work with the dynamic options you have with Custom Token Markers, and 2) that system is horrible to work with and provides very little benefit over in game configuration. Previous Thread:&nbsp; <a href="https://app.roll20.net/forum/post/1273423/script-tokennamenumber-automatic-numbering-of-qualifying-tokens/?pagenum=1" rel="nofollow">https://app.roll20.net/forum/post/1273423/script-tokennamenumber-automatic-numbering-of-qualifying-tokens/?pagenum=1</a> Support my work on If you use my scripts, want to contribute, and have the spare bucks to do so , go right ahead. However, please don't feel like you must contribute just to use them! I'd much rather have happy Roll20 users armed with my scripts than people not using them out of some sense of shame. Use them and be happy, completely guilt-free! Disclaimer: This Patreon campaign is not affiliated with Roll20; as such, contributions are voluntary and Roll20 cannot provide support or refunds for contributions.
1623244227
The Aaron
Roll20 Production Team
API Scripter
I forgot to mention that v0.5.13 should be in the 1-click next Tuesday.
1623244394
The Aaron
Roll20 Production Team
API Scripter
Scaling after 3 digits is still pretty legible&nbsp; (and if you have that many creatures, probably scaling is the least of your worries!)
1623804459
The Aaron
Roll20 Production Team
API Scripter
Update v0.5.14 &nbsp;-- Rewritten numbering logic to fix the hanging %%NUMBERED%% problem.&nbsp; Added !tnn --renumber command to reset the numbers on the page (and fix any hanging %%NUMBERED%% cases).&nbsp; (Thanks&nbsp; Chris W. ) To Renumber all tokens on the page that were numbered by TokenNameNumber (or match it's naming rules), execute: !tnn --renumber Numbering of tokens should be super reliable now so there shouldn't be any more %%NUMBERED%% tokens persisting despite lag in the system. Update is live in my git repo:&nbsp;&nbsp; <a href="https://github.com/shdwjk/Roll20API/blob/master/TokenNameNumber/TokenNameNumber.js" rel="nofollow">https://github.com/shdwjk/Roll20API/blob/master/TokenNameNumber/TokenNameNumber.js</a> It should be in the 1-click next week.
1624378826
The Aaron
Roll20 Production Team
API Scripter
TokenNameNumber v0.5.14 is now live in the 1-click!