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

[API] Provide the identifier for the selected character sheet on the Campaign() object or as the result of a free function.

Score + 43
1577225962
The Aaron
Roll20 Production Team
API Scripter
It would be really great for we Scriptomancers if there was a way to identify which character sheet is installed on a Game.  Being able to access that data would allow scripts to self configure for known sheets (think GroupInitiative) or determine if they should be active (think Character Sheet Companion scripts).
1578302026
Laurent
Pro
Sheet Author
API Scripter
For that purpose, I use a dedicated attribute that is set by the sheet worker (for the sheets I develop). But a global id would be more efficient, indeed. In addition to the id, maybe some version number could be useful, too?
1578305866
Andreas J.
Forum Champion
Sheet Author
Translator
Laurent said: In addition to the id, maybe some version number could be useful, too? For the sheet? Yeah, that could be useful addition, but should be implemented as optional in some way, as many sheets doesn't really do much of a version tracking, but if there where a global variable for this, it would make things easier and encourage more sheet author to use it to some degree.
1578310878
The Aaron
Roll20 Production Team
API Scripter
Yeah, a version number would be great, but that information is not as readily available. However, if the API can know which sheet it is dealing with, it can easily special case looking up the version number for sheets that support it.