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

Aaron Twins but actually Quintuplets questions about how to modify the api

So i recently found the Twins api from the incredible Aaron and wanted to know if any one knew how to remove the limit for only 2 twins and either make it unlimited or make it so you can at least link 5 tokens together because my 5 players are gonna be on different maps seeing different things.
1675199405
The Aaron
Roll20 Production Team
API Scripter
Hmm. I'll have to look back at the code, but basically you'd need to change the storage structure to support a collection of ids, rather than a pairing. Then you'd need to expand the command system to support linking more tokens. And of course, update the update logic to manage all tokens. 
I dont know what to say other than thank you for at least looking into it i tried for like an hour but because i dont actually know how to code that well i had no idea what i was doing so it was not working at all
1675217519

Edited 1675217617
The Aaron
Roll20 Production Team
API Scripter
Ok, if you were to do the updates, it would look like this:&nbsp; <a href="https://gist.github.com/shdwjk/cdbcc2a9c677654d172d0b6e37b97601" rel="nofollow">https://gist.github.com/shdwjk/cdbcc2a9c677654d172d0b6e37b97601</a> Use: !clones ID1 ID2 ID3 ... for adding clones.&nbsp; You can split this across multiple calls: !clones ID1 ID2 !clones ID1 ID3 !clones ID1 ... As long as there are at least two, and the subsequent calls contain an ID that is already known, it will link them up. You can remove clones with: !not-clones ID which will take that one out of the collection.&nbsp; When there's just one left, it will remove the collection. Note 1: I've lightly tested this with adding and removing clones, I've not thoroughly tested edge cases like non-existing tokens, etc. Note 2: You can change the tokens with TokenMod and it will duplicate the changes across the other tokens. Note 3: You might find this a useful command: !clones ID1 @{selected|token_id} Just collect something for ID1 with @{selected|token_id} on another page first.
You are freaking incredible Aaron thank you so freaking much this seems to work perfectly cant wait for my players to notice that they are not seeing the same things
1675271303
The Aaron
Roll20 Production Team
API Scripter
Lol!&nbsp; No problem. =D
did a little more testing with it and something weird happened I had 4 (a1,a2,a3,a4) tokens linked together and noticed one(b1) of them wasn't linked so I use the id of a1 one of the already linked tokens, and the one of the missing token b1 it then send me two messages two chat&nbsp; (From Clones): &nbsp;Removing a clone. (From Clones): &nbsp;Added Clones. And the one that had this made it so b1 and a1 where linked together but a1 wasn't linked to a2, a3, and a4 any longer so I got two groups of linked tokens now the command I use was&nbsp;!clones -NNCqZHdM0MZ_V8bMtGg @{selected|token_id} the id was for a1 and the selected was for b1.
1675449015

Edited 1675449056
The Aaron
Roll20 Production Team
API Scripter
Did you perhaps recopy the map after having linked the tokens?&nbsp; I'll see about adding a command that shows the relationships. The two messages means that one of the tokens was already in a group, was removed from it, then added to a new group.&nbsp; I'll see about making those more explicit.
I did not i made the 5 maps that I needed and then on each map put a token that I dragged from the players character sheet I am not sure why only 4 where linked though I believed I tried to link all 5 from the beginning but only 4 where working and then when I noticed that I tried what ended with me telling you about this