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

[Script] [Beta] BeyondImporter - Import DNDBeyond Character Sheets.

Gentlepeople, this level of cooperation brings tears to my eyes. :) A couple of questions: 1) Should issues be reported in Robin's repo instead of within this thread? 2) This is more of a philosophical point overall for the purpose of the script. I speak for most, but not all, members of our group when I say we would like only one place to manage our characters, and that is D&D Beyond. The reason we wish to import our characters to roll20, which we use for our games for the die rolls, is to leverage the character sheet variables to have stable macros which do not need to be updated at each level up (initiative, skill checks, attacks, and so on). However, in trying to faithfully replicate the calculations that D&D Beyond performs, I think you are perhaps making the import more complicated than it needs to be. Would it not be simpler to import the already calculated values from D&D Beyond and store them as Key-Value pairs that could be accessed using macros? Initiative that already has Alert factored in, saves that already are adjusted by the attuned items, AC already calculated, calculated attack bonuses and damage that appear as on the D&D Beyond sheet. Must every calculation be replicated in the character sheet, or can this just be a placeholder? Or can it be both, what you are doing now and in addition a key-value dump in the character's Attributes that could be consulted by macros? I haven't looked at the D&D Beyond JSON closely, so I don't know if you have a choice to replicate the calculations or not.
1) I can't volunteer Robin :) but I certainly stand ready to work on any bugs that are filed there.   I love these bite-sized coding jobs I can do while my toddler naps.  2) I have so many things to say about these thoughts, but will wait for the boss man to respond first...
1539274853

Edited 1539274880
Robin
API Scripter
Dejan said: 1) Should issues be reported in Robin's repo instead of within this thread? Well, I think most people here don't have a Github account (I could be wrong), so either way is fine by me. Reporting in Github is easier for keeping track of bugs tho. So for the people with a Github account, please do it there :) Dejan said: 2) This is more of a philosophical point overall for the purpose of the script. I speak for most, but not all, members of our group when I say we would like only one place to manage our characters, and that is D&D Beyond. The reason we wish to import our characters to roll20, which we use for our games for the die rolls, is to leverage the character sheet variables to have stable macros which do not need to be updated at each level up (initiative, skill checks, attacks, and so on). However, in trying to faithfully replicate the calculations that D&D Beyond performs, I think you are perhaps making the import more complicated than it needs to be. Would it not be simpler to import the already calculated values from D&D Beyond and store them as Key-Value pairs that could be accessed using macros? Initiative that already has Alert factored in, saves that already are adjusted by the attuned items, AC already calculated, calculated attack bonuses and damage that appear as on the D&D Beyond sheet. Must every calculation be replicated in the character sheet, or can this just be a placeholder? Or can it be both, what you are doing now and in addition a key-value dump in the character's Attributes that could be consulted by macros? I haven't looked at the D&D Beyond JSON closely, so I don't know if you have a choice to replicate the calculations or not. I already was thinking about a complete overhaul of the script, there are multiple quirks in there that can be improved a lot. Maybe Sillvva, me and Ammo can think together how to improve it a lot. Ammo said: 2) I have so many things to say about these thoughts, but will wait for the boss man to respond first.. Please do share :) --- @Sillvva: I have made you a collaborator.
Dejan:  The JSON from Beyond is more like the raw data about your skills, feats, weapons, and stats.   So we can't take the already calculated rolls from it.  It's nothing like taking the PDF or HTML version of the sheet and scraping the rolls from that.   Think of it more like importing the character from Beyond into the Roll20 "engine" and then doing everything the Roll20 way.   You can tell that's what happened, because you can actually edit your characters in Roll20 afterwards :) Robin:  I typed out my thoughts and then realized they weren't appropriate for a forum post.  I will message you on another platform.  So let's just talk about the script we have for now :) I think the next experiment I would try is to use the setAttrs() optional "silent" mode to load up all the stuff we calculate now, and see if it defeats the OGL sheet's event listeners (it is supposed to.)  If so, we should be able to rapidly load up all the stuff and then artificially trigger updates by setting all the root values (presumably just all the primary attributes?) to trigger recalc on everything ONCE. The staged load that I contributed in PR #18 was supposed to minimize the amount of updating/recalculating and make things more stable, but I did not know about silent mode at that time.    I propose we do an experimental version that uses the current code and then a giant silent load with single recalculate and then compares all the attacks and other rolls to see if the results are the same?   If it works we could get back to something very simple and clean.
PS: I think we will have enough volunteers to create Github issues if someone doesn't want to create a Github account?
Has anyone determined if DM rights or a Pro account are required? I can’t seem to get the import tool to work on my end, but my DM pulled it in for me without issue. 
You need a pro account to add the API to the game, but any player should be able to import. It was an update I made.
Ammo said: Dejan: &nbsp;The JSON from Beyond is more like the raw data about your skills, feats, weapons, and stats. &nbsp; So we can't take the already calculated rolls from it. &nbsp;It's nothing like taking the PDF or HTML version of the sheet and scraping the rolls from that. &nbsp; Think of it more like importing the character from Beyond into the Roll20 "engine" and then doing everything the Roll20 way. &nbsp; You can tell that's what happened, because you can actually edit your characters in Roll20 afterwards :) I was afraid of that, it would make things much simpler if you didn't have to replicate the calculations. Scraping could still be an option, for example I toyed with the idea of converting the D&amp;D Beyond character sheet HTML into JSON (lots of js scripts out there for this, for testing I used&nbsp;<a href="https://toolslick.com/conversion/data/html-to-json" rel="nofollow">https://toolslick.com/conversion/data/html-to-json</a>) and then making a straight mapping to the 5e OGL sheet, but then I ran out of time. :) It was promising though, since with the revamp a lot of the on screen values are already semi-structured.
1539329651

Edited 1539330137
Robin
API Scripter
Ammo said: I propose we do an experimental version that uses the current code and then a giant silent load with single recalculate and then compares all the attacks and other rolls to see if the results are the same? &nbsp; If it works we could get back to something very simple and clean. That's probably a good thing to try indeed. Also, I will respond to your wall of text on Discord when I get home xD Ammo said: PS: I think we will have enough volunteers to create Github issues if someone doesn't want to create a Github account? Yeh, good point. We can just create the issues ourselves on Github if needed. Chuck said: Has anyone determined if DM rights or a Pro account are required? I can’t seem to get the import tool to work on my end, but my DM pulled it in for me without issue.&nbsp; Did you get any errors? Or just nothing? If your GM added the (newest version) script then it should be possible for you to import. Please try another import and let your gm check the API log. Edit: Also Ammo, I've gone ahead and put your name in the README, wanna add more info there?
Bugs are melting fast under the combined attack of multiple coders. &nbsp; We could use some more bugs filed if there are outstanding issues people are having. Thanks for the credit.
1539477179

Edited 1539477484
Ammo said: Bugs are melting fast under the combined attack of multiple coders. &nbsp; We could use some more bugs filed if there are outstanding issues people are having. Thanks for the credit. I looked at the issues posted here and I'm not sure if they are on github. I know Silvva was working on some of the monk stuff I posted, should I have my group test the version merged in by Robin and see what's what? EDIT: These are the ones I reported: - Monk AC is incorrect, it does not consider the WIS bonus from Unarmored Defense - Monk using a simple weapon like a quarterstaff and shortswords should apply Dex or Str, whichever is greater, from this rule: "You can use Dexterity instead of Strength for the attack and damage rolls of your unarmed strikes and monk weapons." - Versatile weapons on characters with no shields should calculate damage based on two handed use (e.g. monk with quarterstaff) - The saving throws are off for the Monk, the proficiency bonuses do not seem to be applied - Alert is not considered in the Initiative
1539541118

Edited 1539541853
Ammo
Pro
Dejan said: I looked at the issues posted here and I'm not sure if they are on github. I know Silvva was working on some of the monk stuff I posted, should I have my group test the version merged in by Robin and see what's what? EDIT: These are the ones I reported: - Monk AC is incorrect, it does not consider the WIS bonus from Unarmored Defense - Monk using a simple weapon like a quarterstaff and shortswords should apply Dex or Str, whichever is greater, from this rule: "You can use Dexterity instead of Strength for the attack and damage rolls of your unarmed strikes and monk weapons." - Versatile weapons on characters with no shields should calculate damage based on two handed use (e.g. monk with quarterstaff) - The saving throws are off for the Monk, the proficiency bonuses do not seem to be applied - Alert is not considered in the Initiative These were already fixed by Sillvva (?) I guess: 1) Monk AC was fixed.&nbsp; In your inventory, you will find an item called "Unarmored Defense" that you can wear instead of armor.&nbsp; If your WIS goes up later, you have to update the AC of this item yourself, if you don't re-import the monk.&nbsp; It is a fixed value and set to what your attribute was when you imported. 2) Monk weapons using Dex vs Str was implemented. 3) Shouldn't versatile weapons just roll both one-handed and two-handed damage as Damage1 and Damage2? &nbsp; There is no way for the sheet to know where your hands are and whether you are holding something else (other than a shield.) ---------------- The following are broken, and you should make issues on GitHub: 4) Alert is not considered in the Initiative NOTE to implementer:&nbsp; Roll20 applies "Ability Checks" bonus to initiative, which is why we don't have to import the "initiative" bonus modifier for "Luck Stone" for example.&nbsp; We need to be careful when adding support for initiative bonus to avoid double incrementing for items that have both ability checks and initiative bonus in Beyond. 5) the monk damage die for a level 14 monk is calculated as 5 1/2 (5.5) :) --------------- I have the following in a pull request: 6) Diamond Soul now confers proficiency in all saves
1539578288

Edited 1539578426
Ammo said: These were already fixed by Sillvva (?) I guess: 1) Monk AC was fixed.&nbsp; In your inventory, you will find an item called "Unarmored Defense" that you can wear instead of armor.&nbsp; If your WIS goes up later, you have to update the AC of this item yourself, if you don't re-import the monk.&nbsp; It is a fixed value and set to what your attribute was when you imported. 2) Monk weapons using Dex vs Str was implemented. 3) Shouldn't versatile weapons just roll both one-handed and two-handed damage as Damage1 and Damage2? &nbsp; There is no way for the sheet to know where your hands are and whether you are holding something else (other than a shield.) Thanks for the progress, some issues posted. As for the Monk AC, and as I've indicated, our wish is to really be hands off since we only want to manage D&amp;D Beyond, so importing and then adjusting settings is undesirable. We're using the roll20 character sheet minimally or not at all (e.g. my tablet is too small for it). We are scripting around things currently, so it's not a biggie. As long as our macros are stable we are happy :)
Dejan said: Thanks for the progress, some issues posted. As for the Monk AC, and as I've indicated, our wish is to really be hands off since we only want to manage D&amp;D Beyond, so importing and then adjusting settings is undesirable. We're using the roll20 character sheet minimally or not at all (e.g. my tablet is too small for it). We are scripting around things currently, so it's not a biggie. As long as our macros are stable we are happy :) I understand. &nbsp; The "Unarmored Defense" item is equipped by default if there are no other armor items in inventory (equipped or not!), so it will just work for you. &nbsp; Just to clarify again, this isn't my code, I am just reading it to try to answer your questions.
1541230319

Edited 1541230348
Im getting this too, on v0.3.10.&nbsp; Tried changing a few things on the DnDbeyond character sheet, but so far without success.&nbsp; SeveredNed said: SyntaxError: Unexpected token h in JSON at position 0 SyntaxError: Unexpected token h in JSON at position 0 at JSON.parse (&lt;anonymous&gt;) at on (apiscript.js:122:38) at eval (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:151:1), &lt;anonymous&gt;:65:16) at Object.publish (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:151:1), &lt;anonymous&gt;:70:8) at /home/node/d20-api-server/api.js:1634:12 at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560 at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147) at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546) at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489) at Zd.Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425) I had api script library open in a seperate tab fom the game, and using the "!beyond --import dndbeyond.characterurl/json" command would show this while seemingly nothing happened within the game. I'm using version 0.3.9 I had api script library open in a seperate tab fom the game, and using the "!beyond --import dndbeyond.characterurl/json" command would show this while seemingly nothing happened within the game. I'm using version 0.3.9
1541261630

Edited 1541261694
Ammo
Pro
This message says the letter h is not JSON. &nbsp;This is because you put the web address of your sheet instead of the actual JSON text. Essentially, follow these steps (apologies for over simplifying, but you never know who is gonna end up reading this later) - use browser to go to beyond and to your character - add ".json" to the end of the address you are viewing, hit enter - now you will see a page of JSON text, which is your character data - use &lt;select all&gt; or just select the whole thing with the mouse - copy - go to roll20 chat window, and put !beyond --import - leave one space at the end - now paste the giant JSON text you copied - it will take a while - when the prompt finally comes back, hit enter to start the import
1541330057

Edited 1541330386
Anyone willing to help with what's going on here? I've been importing characters from DnD Beyond fine all day, but now I'm getting this error &amp; the script disables itself after each attempt. It'll generate a character sheet, but it just prompts for how you want to create the character eg. Chractermancer, NPC, manual etc instead of building / importing it. Any help appreciated. Thanks. TypeError: Cannot read property 'featureName' of null TypeError: Cannot read property 'featureName' of null at on (apiscript.js:350:91) at eval (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:151:1), &lt;anonymous&gt;:65:16) at Object.publish (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:151:1), &lt;anonymous&gt;:70:8) at /home/node/d20-api-server/api.js:1634:12 at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560 at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147) at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546) at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489) at Zd.Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425) at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:111:400
1541330455

Edited 1541331459
The script seems to be working with a quick build test sheet I made. Maybe it's something to do with Wild Shape creatures of custom background? Iv'e tried stripping out everything else that isn't standard. Thoughts? Development / resolution... the problem appears to have been selecting a custom background. I removed the custom BG from the DnDBeyond character sheet, seems to be working fine now.
Heath G. said: The script seems to be working with a quick build test sheet I made. Maybe it's something to do with Wild Shape creatures of custom background? Iv'e tried stripping out everything else that isn't standard. Thoughts? Development / resolution... the problem appears to have been selecting a custom background. I removed the custom BG from the DnDBeyond character sheet, seems to be working fine now. Nice debugging! &nbsp; Yes, custom backgrounds are currently broken. &nbsp; Could you please check the repo to make sure this bug was filed already so nobody else spends their time debugging it? &nbsp; It's also helpful for the devs to know which bugs really affect people :)
1541341151

Edited 1541341202
I have imported characters with custom backgrounds, so they shouldn't be broken. The error appears to happen if you have not selected a Background Feature. The featureName property is being looked for in "featuresBackground.featureName". Is it possible you're using a homebrew background that doesn't have a background feature? I haven't thought of that possibility.
If you look at the code, the guard condition is wrong &nbsp; It uses featureName but guards another variable. &nbsp;TeoDaTank reported this in the script chat channel, but I guess it didn't get filed.
I filed the issue on Github and posted a commit to the development branch . @Heath G. if you would like to give that a try, let me know if it resolves your issue.
Sillvva said: I filed the issue on Github and posted a commit to the development branch . @Heath G. if you would like to give that a try, let me know if it resolves your issue. Nice work! I noticed that Robin's version at&nbsp; <a href="https://github.com/RobinKuiper/Roll20APIScripts/tree/master/BeyondImporter_5eOGL" rel="nofollow">https://github.com/RobinKuiper/Roll20APIScripts/tree/master/BeyondImporter_5eOGL</a> &nbsp;still has version 0.3.9 and hasn't been updated in about 3 weeks. Is that the version with the fixes or should I use your development branch?
it's totally ok to test with the development branch. &nbsp;We are still working out the process :). &nbsp; Currently Sillvva is doing most of the fixes and we are checking if Robin is going to do the release versions. &nbsp; Multiple contributors is a new thing here...
My personal view is that it would actually be awesome if technical people like you test with the development branch and then we do a review/release every so often (hint hint @Robin).
Shaped import not working for me currently.&nbsp; [quote] Your scripts are currently disabled due to an error that was detected. Please make appropriate changes to your scripts and click the "Save Script" button and we'll attempt to start running them again.&nbsp; More info... For reference, the error message generated was:&nbsp; TypeError: Cannot read property 'forEach' of undefined TypeError: Cannot read property 'forEach' of undefined at runImport (apiscript.js:4309:20) at apiscript.js:4279:21 at eval (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:151:1), &lt;anonymous&gt;:65:16) at Object.publish (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:151:1), &lt;anonymous&gt;:70:8) at /home/node/d20-api-server/api.js:1634:12 at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560 at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147) at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546) at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489) at Zd.Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425) at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:111:400 [/quote]
Shaped sheet script has not been updated since the changes to D&amp;D Beyond's JSON structure.
I discovered that an insufficiently defined custom background can crash the script.&nbsp; In DnDBeyond you can create a custom background but NOT specify the Background Feature or Background Characteristics.&nbsp; If you do so, the script crashes here (line 359), because the customBackground.featuresBackground is null: Happy to submit a PR to fix.&nbsp; Haven't followed all the discussion, but is this the right repo?&nbsp; <a href="https://github.com/RobinKuiper/Roll20APIScripts" rel="nofollow">https://github.com/RobinKuiper/Roll20APIScripts</a> Branch from develop? Thanks.
First of all, great error reporting and thank you for offering to PR. &nbsp;You're awesome. If you want to make a PR, yes we work from development. &nbsp; We merge to master on release. &nbsp; There was a crash around there that was JUST fixed (code is in the development branch) so make sure you aren't wasting your time fixing something that is already fixed.
1541918032

Edited 1541918083
I keep getting this message when I try to use can anyone help Your scripts are currently disabled due to an error that was detected. Please make appropriate changes to your scripts and click the "Save Script" button and we'll attempt to start running them again.&nbsp; More info... For reference, the error message generated was:&nbsp; SyntaxError: Unexpected end of JSON input SyntaxError: Unexpected end of JSON input at JSON.parse (&lt;anonymous&gt;) at on (apiscript.js:104:50) at eval (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:151:1), &lt;anonymous&gt;:65:16) at Object.publish (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:151:1), &lt;anonymous&gt;:70:8) at /home/node/d20-api-server/api.js:1634:12 at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560 at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147) at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546) at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489) at Zd.Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425)
Translating to English, this is saying "you did not paste the complete JSON from your Beyond character." It could also be that you did not paste the JSON at all. &nbsp; Could you please confirm that you followed these steps: use browser to go to beyond and to your character add ".json" to the end of the address you are viewing, hit enter now you will see a page of JSON text, which is your character data use &lt;select all&gt; or just select the whole thing with the mouse copy go to roll20 chat window, and put !beyond --import leave one space at the end now paste the giant JSON text you copied it will take a while when the prompt finally comes back, hit enter to start the import Bob said: I keep getting this message when I try to use can anyone help Your scripts are currently disabled due to an error that was detected. Please make appropriate changes to your scripts and click the "Save Script" button and we'll attempt to start running them again.&nbsp; More info... For reference, the error message generated was:&nbsp; SyntaxError: Unexpected end of JSON input SyntaxError: Unexpected end of JSON input at JSON.parse (&lt;anonymous&gt;) at on (apiscript.js:104:50) at eval (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:151:1), &lt;anonymous&gt;:65:16) at Object.publish (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:151:1), &lt;anonymous&gt;:70:8) at /home/node/d20-api-server/api.js:1634:12 at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560 at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147) at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546) at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489) at Zd.Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425)
Yes I did
Unexpected end of JSON input This means that the JSON is not complete. For example: {"key": "value"} // complete {"key": "val // not complete If you're sure the JSON is complete, then I'm not sure what else could cause it. If you could pass the JSON to us in a Gist here , that would allow us to take a closer look.
1542222299

Edited 1542222548
Justin M.
KS Backer
I just received this error importing a character: docker: Error response from daemon: open /var/lib/docker/containers/26473e1e4f65a26fca3fe1d93934be090c2c4bdbcba2a2511a5fdd58a6545b24/hash359212178: no space left on device. From what I can tell, however, this appears to be wholly unrelated to the script and something to do with Roll20.
yes, Roll20 API servers are down.
For someone who isn't 'tech savvy' I'm not sure where to go.&nbsp; I only know how to install things by running the .exe.&nbsp; How do I 'install' this script so that the steps in the readme actually work?&nbsp; Where on the computer do I save this script, and first of all, how do I even download it?&nbsp; The github link doesn't seem to have a download button. Thanks!
Will said: For someone who isn't 'tech savvy' I'm not sure where to go.&nbsp; I only know how to install things by running the .exe.&nbsp; How do I 'install' this script so that the steps in the readme actually work?&nbsp; Where on the computer do I save this script, and first of all, how do I even download it?&nbsp; The github link doesn't seem to have a download button. Thanks! Ok, here are a couple of points in the right direction: 1) BeyondImporter is not a program you can run on your computer. &nbsp;It is a script that you install inside the Script API on Roll20. &nbsp;You need to have a Pro account on Roll20 and know how to install a script there.&nbsp; 2) The easiest way to get this working for you is to have your DM use the script in their Roll20 game and you just give them your character JSON that you copy from the Beyond website, following the instructions we gave above. &nbsp; &nbsp; 3) You are correct that there is no download button. &nbsp; The assumption is that people who use these scripts will navigate the directory structure there and grab the files that they need. &nbsp;Again, this assumes a certain amount of technical comfort. 4) Messing around with API Scripts if you are not into technical things is probably not the best idea. &nbsp; If you can have your DM or someone else with a Pro subscription handle this for you, that would likely be best? &nbsp; Once your character has been imported in Roll20, they can transfer ownership to you and you can use the Character Vault to save it just like you do with other Roll20 characters. Cheers, Ammo
Will said: For someone who isn't 'tech savvy' I'm not sure where to go.&nbsp; I only know how to install things by running the .exe.&nbsp; How do I 'install' this script so that the steps in the readme actually work?&nbsp; Where on the computer do I save this script, and first of all, how do I even download it?&nbsp; The github link doesn't seem to have a download button. Thanks! Will, I will try to give you instructions.&nbsp; First thing, is you need to have a pro account. If you do not, then you cannot use the script. Assuming you do, follow the instructions here: Click the link to open the BeyondImporter script you need. Click either BeyondImporter.js or BeyondImporter.shaped.js to bring up the code. In a new tab, open Roll20 and click on Games&gt;My Games. Click the name of the game you want to use the API script in to get to the campaign page. On that page, click the Settings drop down and select API Scripts. Click New Script. In the name, type the name of the file (BeyondImporter.js or BeyondImporter.shaped.js) you are using.&nbsp; Return to GitHub on the page with the code on it. Click "Raw" to ensure you only get the information the script needs. Select all of the script text (Ctrl/Cmd+A) and copy (Ctrl/Cmd+C) it. Go to the Roll20 tab. Paste (Ctrl/Cmd+V) the script into the black area. Click save script. Return to your script library. Click "Restart API Sandbox" to ensure that the script is properly loaded. Load your campaign Go to D&amp;D Beyond and go to one of your characters. At the end of the address bar type "/json" without the quotes to load up the raw information Select all of the text (Ctrl/Cmd+A) and copy (Ctrl/Cmd+C) it. Return to the campaign. In the chat window, type "!Beyond --import " and paste (Ctrl/Cmd+V) in the text from D&amp;D Beyond. It will likely take a bit to load all of it. Press enter. It should load. When the API is fixed, anyway.
Keep getting an error importing the same character (others work) Character is:&nbsp; <a href="https://www.dndbeyond.com/profile/GarboPattymelt/characters/4884765/json" rel="nofollow">https://www.dndbeyond.com/profile/GarboPattymelt/characters/4884765/json</a> TypeError: Cannot read property 'toLowerCase' of null at /home/node/d20-api-server/api.js:3550:25 at Function._.each._.forEach (/home/node/d20-api-server/node_modules/underscore/underscore.js:186:9) at Worker.onmessage (/home/node/d20-api-server/api.js:3544:13) at ChildProcess.&lt;anonymous&gt; (/home/node/d20-api-server/node_modules/tiny-worker/lib/index.js:90:21) at emitTwo (events.js:106:13) at ChildProcess.emit (events.js:194:7) at process.nextTick (internal/child_process.js:766:12) at _combinedTickCallback (internal/process/next_tick.js:73:7) at process._tickCallback (internal/process/next_tick.js:104:9)
Hi Everyone, Just used the script for the first time.&nbsp; Just wow!&nbsp; Very cool.&nbsp; I was wondering, as DM I have created custom monsters in DnDBeyond and Magic Items.&nbsp; Can those be brought in as well into Roll20? Thanks, Envaris
1543761011

Edited 1543772708
Ammo
Pro
Envaris said: Hi Everyone, Just used the script for the first time.&nbsp; Just wow!&nbsp; Very cool.&nbsp; I was wondering, as DM I have created custom monsters in DnDBeyond and Magic Items.&nbsp; Can those be brought in as well into Roll20? Thanks, Envaris No, you cannot import these. &nbsp;The JSON interface that BeyondImporter relies on is just for the characters. &nbsp;I don't expect this to ever change, either. &nbsp;The licensed content used in most of the homebrew items (when they are based on existing items) makes the whole thing messy. &nbsp;You will just have to recreate your creations in Roll20. &nbsp;&nbsp;
Tom: &nbsp;Note that others cannot see your JSON, even if your character is public. &nbsp;Could you please create a gist with your character JSON and PM me the link? &nbsp; <a href="https://gist.github.com" rel="nofollow">https://gist.github.com</a> &nbsp; That would make it much easier to confirm why it broke and fix it. Cheers, Ammo
<a href="https://gist.github.com/tfp1/092c0fb3ac17dfac5c9f8a34e9972b96" rel="nofollow">https://gist.github.com/tfp1/092c0fb3ac17dfac5c9f8a34e9972b96</a> Ammo said: Tom: &nbsp;Note that others cannot see your JSON, even if your character is public. &nbsp;Could you please create a gist with your character JSON and PM me the link? &nbsp; <a href="https://gist.github.com" rel="nofollow">https://gist.github.com</a> &nbsp; That would make it much easier to confirm why it broke and fix it. Cheers, Ammo
Tom P. said: <a href="https://gist.github.com/tfp1/092c0fb3ac17dfac5c9f8a34e9972b96" rel="nofollow">https://gist.github.com/tfp1/092c0fb3ac17dfac5c9f8a34e9972b96</a> I did two things: 1) imported this character with the currently released version of BeyondImporter (Version 0.3.9) this was successful and did not throw any errors 2) inspected the JSON your provided for anything that would cause toLowerCase be run on something undefined, which in the current code would either be a broken multi-class definition or a spell, neither of which are present So could you please let me know what version of BeyondImporter is crashing and whether the current one works for you? Cheers, Ammo
Great tool.&nbsp; Monk Kensei weps should use higher of dex or strength I think no?&nbsp; So Kensei Longsword if Monk's dex is higher (which is normally would be) should be used upon import. Thanks, Envaris
Custom attacks should be ignored by the override toggle which they sorta are.&nbsp; I found what happened is that the details are correct.&nbsp; However, when clicked it does nothing.&nbsp; I had to into the custom attack in Roll20 edit something small, then re-edit back and it worked. I would suggest Unarmored Defense should be "auto-equipped" on Monks.99% of the time I imagine they are Unarmored.&nbsp; If they have more AC than DnDBeyond says they'll figure it out :).
Great comments. &nbsp; Responses inline. Envaris said: Custom attacks should be ignored by the override toggle which they sorta are.&nbsp; I found what happened is that the details are correct.&nbsp; However, when clicked it does nothing.&nbsp; I had to into the custom attack in Roll20 edit something small, then re-edit back and it worked. I would suggest Unarmored Defense should be "auto-equipped" on Monks.99% of the time I imagine they are Unarmored.&nbsp; If they have more AC than DnDBeyond says they'll figure it out :). Could you file a bug for the custom attacks getting broken? &nbsp; I believe this is going to be a major thing. If I remember correctly, Unarmored Defense gets auto-equipped if you have no items that have the 'Armor' tag. &nbsp; Is this not what is happening with your character? Envaris said: Great tool.&nbsp; Monk Kensei weps should use higher of dex or strength I think no?&nbsp; So Kensei Longsword if Monk's dex is higher (which is normally would be) should be used upon import. Thanks, Envaris What rule is it that makes Kensei weapons count as finesse regardless of type? &nbsp;I can't find any such rule. &nbsp;Do you have a reference please? Again, thanks for your detailed comments. Cheers, Ammo one of Santa Robin's Helpers
1545241927

Edited 1545242082
Ammo said: Great comments. &nbsp; Responses inline. Envaris said: Custom attacks should be ignored by the override toggle which they sorta are.&nbsp; I found what happened is that the details are correct.&nbsp; However, when clicked it does nothing.&nbsp; I had to into the custom attack in Roll20 edit something small, then re-edit back and it worked. I would suggest Unarmored Defense should be "auto-equipped" on Monks.99% of the time I imagine they are Unarmored.&nbsp; If they have more AC than DnDBeyond says they'll figure it out :). Could you file a bug for the custom attacks getting broken? &nbsp; I believe this is going to be a major thing. If I remember correctly, Unarmored Defense gets auto-equipped if you have no items that have the 'Armor' tag. &nbsp; Is this not what is happening with your character? Envaris said: Great tool.&nbsp; Monk Kensei weps should use higher of dex or strength I think no?&nbsp; So Kensei Longsword if Monk's dex is higher (which is normally would be) should be used upon import. Thanks, Envaris What rule is it that makes Kensei weapons count as finesse regardless of type? &nbsp;I can't find any such rule. &nbsp;Do you have a reference please? Again, thanks for your detailed comments. Cheers, Ammo one of Santa Robin's Helpers In original UA version I think it called this out: Whenever you wield a kensei weapon, you choose whether to use Dexterity or Strength for the attack and damage rolls of the weapon, and you choose whether to use your Martial Arts damage die in place of the weapon’s damage die. <a href="https://media.wizards.com/2016/dnd/downloads/M_2016_UAMonk1_12_12WKWT.pdf" rel="nofollow">https://media.wizards.com/2016/dnd/downloads/M_2016_UAMonk1_12_12WKWT.pdf</a> the revised XGtE version retconned that and changed it to: Kensei Weapons. &nbsp;Choose two types of weapons to be your kensei weapons: one melee weapon and one ranged weapon. Each of these weapons can be any simple or martial weapon that lacks the heavy and special properties. The longbow is also a valid choice. You gain proficiency with these weapons if you don’t already have it. Weapons of the chosen types are monk weapons for you. Many of this tradition’s features work only with your kensei weapons. When you reach 6th, 11th, and 17th level in this class, you can choose another type of weapon — either melee or ranged — to be a kensei weapon for you, following the criteria above. in the section on Martial Arts it says: Martial Arts At 1st level, your practice of martial arts gives you mastery of combat styles that use unarmed strikes and monk weapons , which are shortswords and any simple melee weapons that don’t have the two-handed or he avy property. You gain the following benefits while you are unarmed or wielding only monk weapons and you aren’t wearing armor or wielding a shield: You can use Dexterity instead of Strength for the attack and damage rolls of your unarmed strikes and monk weapons. You can roll a d4 in place of the normal damage of your unarmed strike or monk weapon. This die changes as you gain monk levels, as shown in the Martial Arts column of the Monk table. When you use the&nbsp; Attack &nbsp;action with an unarmed strike or a monk weapon on your turn, you can make one unarmed strike as a bonus action. For example, if you take the&nbsp; Attack &nbsp;action and attack with a quarterstaff, you can also make an unarmed strike as a bonus action, assuming you haven’t already taken a bonus action this turn. Certain monasteries use specialized forms of the monk weapons. For example, you might use a club that is two lengths of wood connected by a short chain (called a nunchaku) or a sickle with a shorter, straighter blade (called a kama). Whatever name you use for a monk weapon, you can use the game statistics provided for the weapon in the&nbsp; Weapons section. (emphasis mine) So although the weapons themselves are not considered finesse weapons, kensei monks do gain the choice of using Strength or Dexterity for these weapons (attacks and damage).