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

Marvel and APIs

How do I get the token ID for games using Marvel? For a normal 5e game I would run @{selected|token_id} to get the token ID which opens the door to use several APIs that need specific token references. For some reason when I run this on a marvel game, I get "undefined". Any help would be appreciated.
So I had not really looked at the Marvel game before and there is quite a bit different. I thought the @{selected|token_id} stuff was Roll20 specific and not game type dependent but the Marvel game seems to have shown me that's not the case. I was also surprised not to see an Attributes & Abilities section for the character. Not being able to add Abilities to characters seems quite limiting. As for your current need of getting token ids, I was able to use ScriptCards for this. This will display all the token id's on the page that has the current player ribbon: !script {{ --~tCount|array;pagetokens;TokenArr;[*C:playerpageid] --%tid|foreach;TokenArr --+[*[&tid]:t-name]|[&tid] --%| }} With example output like so: I am guessing there are other ways. I haven't tried any of the MetaScript Toolbox stuff but guessing SelectManager, Fetch, and ZeroFrame might also be able to do this as well.
1705075333

Edited 1705075658
THANK YOU!!!!! Yes, the lack of the Attributes & Abilities sheet has made things difficult. Adding Token macros, getting specific attributes for things like Initiative, etc.  Not sure if there are any other Marvel players out there working with APIs but it is not easy translating APIs that normally work fine into something usable on Marvel.