I'm a first time DM for a group of new D&D players. I wanted to present them a more life like experience, so I bought Tabletop Simulator to use as VTT and then the natural choice for character management was DDB.
I didn't want to publish it on the web store, but they were all using Chrome which has disabled the support for installing offline extensions (.crx), so I had to go through the time consuming review process. I had also tried giving them the source and have them install it with developer mode enabled, but it proved difficult for the less tech savvy. (especially since my code is crude and required frequent updates to keep up with breaking changes on the site)
All that to say that I'd like to have a way to inject scripts to my players' character sheet page. I'm thinking of making sheets update without needing to refresh the whole page all the time, but I'm not sure I want to go through all that trouble again. Setting a script on the campaign that everyone gets simplifies things a lot. I could then provide updates on the spot and freely hard code stuff all willy-nilly, since it's only for our group.
It might seem like a terrible idea for security at first, but if you think about it, it's not like the DM can't find another way to do something malicious. My players were happy to login with their google account to dndbeyond.com which they had never heard of before, install Tabletop Simulator, paste code to browser console, or load random source in developer mode.
tl;dr: On the campaign edit page, along with the description/notes fields, add one more field (`Character sheet script`) and inject the provided code when a character of that campaign loads their sheet. You could also ask for confirmation on first load, making sure the player trusts the DM (resetting each time the field is updated), or maybe just add it as a toggle in character preferences.
Extra: I'm not familiar with Homebrew content, but maybe it could be another type of content (Script) that could also be shared with the community for everyone to use, or Shared Content with Script as its Type and then you'll be able to enable it per campaign. That way anyone could use niche features that couldn't align with your roadmap.
Furthermore, provided the user had included an appropriate license in their script, you could also use their code to develop a public version of the feature that benefits everyone! I'm here to play, not to make money. Everything I code is for my own benefit, but if others find it useful, enjoy!
Exposing the character sheet methods to the script would help tremendously to avoid custom DOM manipulation bugs and allow for code reuse. It would also be nice to be able to access them globally for easier development. (here I'm waiting for a Mystra-sent developer to tell me it's already there and I'm just blind)
For example, for dice rolls I'm just observing for the result popup and scrapping the information from that. When a class changed recently, I had to update and resubmit for review the extension. It'd be nice to be able to get the result via an exposed method, idealy before rendering, so everyone sees the roll at the same time. Maybe even get the exact parameters used for the roll to repeat it exactly in TTS, and/or display it into the other player sheets without having to capture and transmit the whole canvas. I understand it's client side to avoid the server load of all the dice rolls of everyone ever, but for my own campaign it'd be easy to host a backend for just 6 players.
Similarly, the live sheet updates would work well with a pubsub implementation on the campaign level. Again, it might be heavy to implement site wide, but with my own server for my campaign, it could even lighten the load for you by reducing the amount of refreshes ;)
PS: I've also noticed you disabled the /json endpoint. I was using it primarily to get the campaign id of the character, which I was unable to find in the DOM unless the campaign panel was open. I found another way, but still it's kinda junky, so here is another request to be able to access the character data globally (from within the sheet page).
As far as I'm aware, there are not any current plans to allow users to upload and integrate scripts into their character sheets. That's not to say the possibility won't exist, but it's not on our current roadmap. However, there are active plans to make and maintain a public API (which sounds to be closer to what you're looking for). There's been a flurry of discussion regarding that in this thread: https://www.dndbeyond.com/forums/d-d-beyond-general/d-d-beyond-feedback/71065-removed-undocumented-api-endpoints-regarding
You can always submit a request to allow script uploads for character sheets here: ddb.ac/feature-requests.
I'm a first time DM for a group of new D&D players. I wanted to present them a more life like experience, so I bought Tabletop Simulator to use as VTT and then the natural choice for character management was DDB.
After the recent release of Digital Dice to all users, I got excited and created a browser extension for my players to use and still be able to see the dice rolls in TTS. (https://chrome.google.com/webstore/detail/dice-roll-broadcaster/mhfpklhbmhjhibiejibkbbgeacfkjkop/)
I didn't want to publish it on the web store, but they were all using Chrome which has disabled the support for installing offline extensions (.crx), so I had to go through the time consuming review process. I had also tried giving them the source and have them install it with developer mode enabled, but it proved difficult for the less tech savvy. (especially since my code is crude and required frequent updates to keep up with breaking changes on the site)
All that to say that I'd like to have a way to inject scripts to my players' character sheet page. I'm thinking of making sheets update without needing to refresh the whole page all the time, but I'm not sure I want to go through all that trouble again. Setting a script on the campaign that everyone gets simplifies things a lot. I could then provide updates on the spot and freely hard code stuff all willy-nilly, since it's only for our group.
It might seem like a terrible idea for security at first, but if you think about it, it's not like the DM can't find another way to do something malicious. My players were happy to login with their google account to dndbeyond.com which they had never heard of before, install Tabletop Simulator, paste code to browser console, or load random source in developer mode.
tl;dr:
On the campaign edit page, along with the description/notes fields, add one more field (`Character sheet script`) and inject the provided code when a character of that campaign loads their sheet. You could also ask for confirmation on first load, making sure the player trusts the DM (resetting each time the field is updated), or maybe just add it as a toggle in character preferences.
Extra:
I'm not familiar with Homebrew content, but maybe it could be another type of content (Script) that could also be shared with the community for everyone to use, or Shared Content with Script as its Type and then you'll be able to enable it per campaign. That way anyone could use niche features that couldn't align with your roadmap.
Furthermore, provided the user had included an appropriate license in their script, you could also use their code to develop a public version of the feature that benefits everyone! I'm here to play, not to make money. Everything I code is for my own benefit, but if others find it useful, enjoy!
Exposing the character sheet methods to the script would help tremendously to avoid custom DOM manipulation bugs and allow for code reuse. It would also be nice to be able to access them globally for easier development. (here I'm waiting for a Mystra-sent developer to tell me it's already there and I'm just blind)
For example, for dice rolls I'm just observing for the result popup and scrapping the information from that. When a class changed recently, I had to update and resubmit for review the extension. It'd be nice to be able to get the result via an exposed method, idealy before rendering, so everyone sees the roll at the same time. Maybe even get the exact parameters used for the roll to repeat it exactly in TTS, and/or display it into the other player sheets without having to capture and transmit the whole canvas. I understand it's client side to avoid the server load of all the dice rolls of everyone ever, but for my own campaign it'd be easy to host a backend for just 6 players.
Similarly, the live sheet updates would work well with a pubsub implementation on the campaign level. Again, it might be heavy to implement site wide, but with my own server for my campaign, it could even lighten the load for you by reducing the amount of refreshes ;)
PS:
I've also noticed you disabled the /json endpoint. I was using it primarily to get the campaign id of the character, which I was unable to find in the DOM unless the campaign panel was open. I found another way, but still it's kinda junky, so here is another request to be able to access the character data globally (from within the sheet page).
As far as I'm aware, there are not any current plans to allow users to upload and integrate scripts into their character sheets. That's not to say the possibility won't exist, but it's not on our current roadmap. However, there are active plans to make and maintain a public API (which sounds to be closer to what you're looking for). There's been a flurry of discussion regarding that in this thread: https://www.dndbeyond.com/forums/d-d-beyond-general/d-d-beyond-feedback/71065-removed-undocumented-api-endpoints-regarding
You can always submit a request to allow script uploads for character sheets here: ddb.ac/feature-requests.
A public API would be cool, but I doubt it would be useful in my situation, since digital dice for example seem to be client side.
I'll submit a request. Thanks!