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

hl-import script crashing

The Script crashed has anyone seen this...really love this thing when it works its awesome! saves soo much time.  really need the help. not sure how to provide the xml...anybody got any thoughts on that too.
1470842851
The Aaron
Pro
API Scripter
I dropped a PM to the author of the script to checkout this thread.  I've never worked with this script so I can't say what the issue is.  Can you post the command you executed that resulted in this error?  That might help the community at large track down the issue.
Thanks Aaron...it's !hl-ipmort
1470851494
The Aaron
Pro
API Scripter
ok. &nbsp;I don't really know how this import works, but I suspect you place a block of xml in the gm notes of a token and then execute the command with that token selected to create the character. &nbsp;You can upload your xml to <a href="http://gist.github.com" rel="nofollow">http://gist.github.com</a> to get a sharable location for the data.
here is the &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; XML &nbsp; the xml needs to be converted to JSON...here is a link to the script Wiki&nbsp; <a href="https://wiki.roll20.net/Script:HL-Import" rel="nofollow">https://wiki.roll20.net/Script:HL-Import</a> and here are the instructions from there I'm no XML wizard but files created in an older version seem to work but new ones I have created don't...Wolflair has done some updates lately that may have created code that the script doesn't no how to deal with. I wish I knew coding beter..I do a lot of VB and VBA coding at work but don't know java or xml very well. Usage Export the character (or characters) as an XML file in Hero Lab (File -&gt; Save Custom Output, choose "Generate XML File"). Open the XML file in your favorite text editor that isn't WordPad, MS Word, or any other word processor (I recommend Notepad++ ) and copy the entire contents (Ctrl-A, then Ctrl-C, for the shortcut-impaired). Go to CodeBeautify.org's XML to JSON converter , and convert the XML to JSON (paste the XML into the field on the left, set the result mode to "text", click "XML to JSON", then copy the text from the text field on the right). Paste the JSON text into the GM Notes on a token you intend to use for the FIRST character in the XML file (if you're importing more than one). Repeat steps 1-4 on new tokens, if you want to import multiple files at once. Select the token (or tokens), type "!hl-import" into the chat window, and press enter.
1470920897
The Aaron
Pro
API Scripter
Hopefully someone that uses this script can chime in. &nbsp;You're suspicions are probably correct. &nbsp;From the few functions in the script I looked at, it seems like the inputs are causing it to try and set up spells for a class that normally doesn't have them and the script makes the assumption that they can't have them, so when it goes looking for them it fails to find them in a crashy-crashy way. &nbsp;I'll try to give this a test later tonight (but I hope someone comes along and solves it sooner!).
I was able to get this to work by commenting out all the lines that dealt with adding spells. &nbsp;Not the most elegant solution, but my scripting skills are pretty awful. &nbsp;I think a couple of other bits may be broken, as well, but the script does finish and populates the character sheet. &nbsp;I'm just not sure if all the calculated values are correct. &nbsp;I'll keep poking at it and see if I can get anywhere. Gist of the HL-Import script with Adding Spells commented out.
Thank you so much!