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 .
×
Our team is currently investigating rolling service outages. For more information, visit our most recent Forum Announcements post.
Create a free account

Is there a way to keep a multi-sided token the same across multiple maps?

I'm currently working on setting up for a game where I need to have a pool of dice that the players can spend. My thinking is to represent the pool with a multi-sided token, with the token changing to a different facing each time the players spend or gain a die for the pool. Is there some trick to linking the facing of a multi-sided token to an adjustable value, or something to that effect? I'm specifically looking for something I can adjust on the fly to ensure the dice pool token is updated on every map it appears on with as little fuss as possible. Can anyone advise?
1698909842
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi Ryan! You might want to look at the Twins script, by the Aaron: Forum Post.&nbsp;&nbsp; <a href="https://app.roll20.net/forum/permalink/1634979/" rel="nofollow">https://app.roll20.net/forum/permalink/1634979/</a> Script:&nbsp; <a href="https://github.com/shdwjk/Roll20API/blob/master/Twins/Twins.js" rel="nofollow">https://github.com/shdwjk/Roll20API/blob/master/Twins/Twins.js</a> I don't know if token faces are mirrored, but it might not be to hard to add. I'll ping the Scriptomancer.
1698934262
The Aaron
Roll20 Production Team
API Scripter
Twins doesn't support that.&nbsp; However, you can do that by making the dice represent a character (one for each die) and then using TokenMod: !token-mod --set currentSide|3 --ids @{MyDieOne|character_id} --ignore-selected That will set the side to 3 for every token that represents the character MyDieOne.
Sorry, not quite sure I understand how that would work. Can you elaborate?
1699059422

Edited 1699059486
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Token mod is a script that can change token attributes with text commands in chat. You could make a macro in your Collections Tab that would send the text Aaron posted above. You install the Token-mod script on your game's Mod page:&nbsp; How to Install Roll20 API Scripts I am assuming from your initial post that you know how to set up a multisided token and assign it to a character. You would have a copy of that token on any page where you needed it. Here's what the parts of the command are doing: !token-mod Tells the Script Moderator that a token-mod command is starting --set currentSide|3 Tells Token-mod to set the side of the referenced token to side number 3. --ids @{MyDieOne|character_id} Tells token mod that the token you want to work with is all tokens represneting a particular character ID. In this case, the character ID of the character "MyDieOne". You can name the character whatever you would like of course. --ignore-selected Tells token-mod to act on all tokens in the game meeting that criteria, and that it doesn't need to worry if you have it selected or not. You could set this up with a query, so you don't have to have a separate macro for every side of your token. !token-mod --set currentSide|?{Which side?|1} --ids @{MyDieOne|character_id} --ignore-selected When you run the macro, Roll20 will prompt you, asking you to input a side number when the macro is run. It will then change every token in the game representing the character MyDieOne to the side you specified. Let me know if this is the sort of elaboration you were looking for. I can go into parts of it if you need more info.