TokenNameNumber adds a number onto a token's name by replacing the special string %%NUMBERED%% with a number.
Update v0.5.14 -- Rewritten numbering logic to fix the hanging %%NUMBERED%% problem. Added !tnn --renumber command to reset the numbers on the page (and fix any hanging %%NUMBERED%% cases). (Thanks 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 Chris W., 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. Note that you do not need to change the Character name. 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. 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.
If you don't want your players dealing with numbers, you can instead have a sequence of Token Markers applied. 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. Dots also respect the Random Space setting:
If you want to get really creative, you can upload Token Markers that are digits. 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. 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. 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. One change you might notice is that it no longer makes use of the User Config options on the 1-Click install page. 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: https://app.roll20.net/forum/post/1273423/script-tokennamenumber-automatic-numbering-of-qualifying-tokens/?pagenum=1