They really don't document it because it wasn't something they expected for people to find.
As for what it does, its used in combination with their charactersheet.bundle.min.js. To build the entire character sheet you see.
That is why you get that black box with their logo inside of it saying loading.
I have spent a great deal time trying to reverse engineer their character json file because I have been trying to figure out how to read information from it.
I spent a while on it as well soon after launch, but it's limited in what you can get. When I started digging into how to get AC, I realized it wasn't really worth it. (At least when I looked into it back then, it calculated AC on the fly client-side with several nested function calls for things like the rules for monk AC, etc., and which also uses that single-letter-naming-convention for variables that might be handy to auto-generate but absolutely sucks to reverse engineer.) Besides, every time they add a new feature to the site, there's a very good chance it will change. For many stats, it's not too bad, but the JSON is pretty much raw data that needs to have the final values calculated.
I actually had better luck just exporting to PDF and then using Cold Fusion to parse the form fields. CF isn't my language of choice, but it has some handy PDF functions baked in, and I wanted to make dashboard-like tools of PC basics to save me time DMing. Spending weeks digging through nested, undocumented JavaScript wasn't saving a lot of time. :) (I also got distracted parsing Paizo messageboard RSS feeds for my PbP dashboard.)
But with enough time and interest, you should be able to dig through. Unfortunately, there's no documentation and it's likely to change without notice. *shrug* Someday, I'm sure they will build a public API but their time is probably better spent at the moment ramping up core functionality.
The problem with the exported PDF is that it is only updated once the players hit export. Basically meaning you wont see any updated until the player hits export again.
EDIT: at least that was my problem when I was trying to work with the character info.
Definitely! But for a quick dashboard reminder of Name, Class, Level, AC, HP, Passive perception, and Personality/Ideal/Bond/Flaw it works well enough for me. I don't need exact up the minute information, just a quick, general, at-a-glance summary.
But I don't want to dissuade either of you from digging through that JavaScript to re-purpose their functions, of course! Just warning thisboyiscrazy that it's quite a bit of a slog to reverse engineering that. Or, for most info, just parsing the JSON with your own logic can likely handle 90% of stuff without much difficulty (which was the angle I originally pursued). Just that last 10% gets rough pretty quick. :)
I will go ahead and warn y'all, the JSON object is going to drastically change with the impending revamp of the character sheet.
I'm seriously chomping at the bit for that revamp. My group is really struggling with using the character sheet at the table because of how much manual input is required, especially in regards to weight and money and mounts and companions.
@Heatless, as much as it may annoy me not having deadlines as a developer I completely understand your reasonings.
There really is no win with giving them. For example, if you gave them out and had to push the deadline for any reason people would backlash. I think it is better to give a list of priorities, then the community can see what you are focused on and you guys don't have to worry about strict deadlines that people would be expecting you to meet.
Keep up the great work, you guys are making an amazing product.
I seems like it would be a good idea to publish the API.
Because then places like Roll20 or FantasyGrounds could create converters to their own VTT.
You can make the API open source, like a "No Warranty" thing. Also, you can use an auto api generator as well like Swagger.
That way, your team doesn't have to build the converters.
Sounds good in theory, but unfortunately, in business reality, the DDB developers would then be constrained to make everything backwards compatible as well as answer a stream of questions about what everything is. Sure, it might technically be "No Warranty" as you say, but when a DDB update breaks functionality at Roll20, for example, people will be angry that it suddenly stopped working, and Roll20 (or FG or whomever) would point to DDB and say they changed their API, and overall no one will be happy. Sure, Curse could say it's not their fault since it's No Warranty, but that's just really bad PR and makes them the baddies that broke everyone's stuff. It's a lose-lose all around.
Besides, right now, all of your characters' data is viewable as JSON and completely open to any developer to program against. There is nothing stopping them from it other than time. Roll20 and FG or any programmer out there could have already built a ("No Warranty") character importer if they wanted to without anything else from the DDB team. But they haven't. If I were them, I wouldn't have done it either because it's not designed for outside consumption and the "No Warranty" part is a really big risk.
So, sure, some sort of public API would be cool, but for most of us, other planned features would be nicer because there is no practical way for DDB to offer a public API without devoting time and resources to it which means time and resources not devoted to something else.
I seems like it would be a good idea to publish the API.
Because then places like Roll20 or FantasyGrounds could create converters to their own VTT.
You can make the API open source, like a "No Warranty" thing. Also, you can use an auto api generator as well like Swagger.
That way, your team doesn't have to build the converters.
Unless I seriously misread Hartless's posts, it seems like they WILL publish the API, or rather an API, which may or may not be the one that their website uses. And when they do, it will be documented. That's just something that's not ready yet, hence no public API, and (correctly, IMO) no documentation for a private API not meant for third party consumption.
Is there any documentation for the character json file e.g. https://www.dndbeyond.com/profile/thisboyiscrazy/characters/builder/1172706/json
I am trying to make a character sheets that layouts better when printed.
They really don't document it because it wasn't something they expected for people to find.
As for what it does, its used in combination with their charactersheet.bundle.min.js. To build the entire character sheet you see.
That is why you get that black box with their logo inside of it saying loading.
I have spent a great deal time trying to reverse engineer their character json file because I have been trying to figure out how to read information from it.
I spent a while on it as well soon after launch, but it's limited in what you can get. When I started digging into how to get AC, I realized it wasn't really worth it. (At least when I looked into it back then, it calculated AC on the fly client-side with several nested function calls for things like the rules for monk AC, etc., and which also uses that single-letter-naming-convention for variables that might be handy to auto-generate but absolutely sucks to reverse engineer.) Besides, every time they add a new feature to the site, there's a very good chance it will change. For many stats, it's not too bad, but the JSON is pretty much raw data that needs to have the final values calculated.
I actually had better luck just exporting to PDF and then using Cold Fusion to parse the form fields. CF isn't my language of choice, but it has some handy PDF functions baked in, and I wanted to make dashboard-like tools of PC basics to save me time DMing. Spending weeks digging through nested, undocumented JavaScript wasn't saving a lot of time. :) (I also got distracted parsing Paizo messageboard RSS feeds for my PbP dashboard.)
But with enough time and interest, you should be able to dig through. Unfortunately, there's no documentation and it's likely to change without notice. *shrug* Someday, I'm sure they will build a public API but their time is probably better spent at the moment ramping up core functionality.
Good luck!
The problem with the exported PDF is that it is only updated once the players hit export. Basically meaning you wont see any updated until the player hits export again.
EDIT: at least that was my problem when I was trying to work with the character info.
Definitely! But for a quick dashboard reminder of Name, Class, Level, AC, HP, Passive perception, and Personality/Ideal/Bond/Flaw it works well enough for me. I don't need exact up the minute information, just a quick, general, at-a-glance summary.
But I don't want to dissuade either of you from digging through that JavaScript to re-purpose their functions, of course! Just warning thisboyiscrazy that it's quite a bit of a slog to reverse engineering that. Or, for most info, just parsing the JSON with your own logic can likely handle 90% of stuff without much difficulty (which was the angle I originally pursued). Just that last 10% gets rough pretty quick. :)
I actually have a lot of it reverse engineered. Maybe I should create a google doc for what i have found?
Spells seem to be strange in when they appear in "Known / Prepaired". I have almost everything else doing for the classes i have tested.
Can you document what you have so far? Maybe create a google doc?
I will go ahead and warn y'all, the JSON object is going to drastically change with the impending revamp of the character sheet.
I am the Inquisitor Imperitus. I am judge, jury, and executioner. Draw your last breath now, as I send you to the Nine Hells.
Thanks for the heads up, can you provide documentation for it then?
Since those objects are not meant to be publicly consumed, probably not (meaning we will never adhere to public contracts and versioning for those).
However, once we do provide official APIs, those would definitely have documentation and versioned contracts.
I am the Inquisitor Imperitus. I am judge, jury, and executioner. Draw your last breath now, as I send you to the Nine Hells.
I am guessing no timeline the an API?
Yeah, as a policy, we don't explicitly state deadlines for development features as we're always re-evaluating priorities.
I am the Inquisitor Imperitus. I am judge, jury, and executioner. Draw your last breath now, as I send you to the Nine Hells.
@Heatless, as much as it may annoy me not having deadlines as a developer I completely understand your reasonings.
There really is no win with giving them. For example, if you gave them out and had to push the deadline for any reason people would backlash. I think it is better to give a list of priorities, then the community can see what you are focused on and you guys don't have to worry about strict deadlines that people would be expecting you to meet.
Keep up the great work, you guys are making an amazing product.
I am so impressed with this community! Good work everyone
I seems like it would be a good idea to publish the API.
Because then places like Roll20 or FantasyGrounds could create converters to their own VTT.
You can make the API open source, like a "No Warranty" thing. Also, you can use an auto api generator as well like Swagger.
That way, your team doesn't have to build the converters.
That's also how I understand it will work.
The plan is to finish adding functionality before looking at how 3rd parties can interface.
Pun-loving nerd | She/Her/Hers | Profile art by Becca Golins
If you need help with homebrew, please post on the homebrew forums, where multiple staff and moderators can read your post and help you!
"We got this, no problem! I'll take the twenty on the left - you guys handle the one on the right!"🔊