safety-orange/Imports-for-MPMB-s-Character-Sheet

all_WotC_published.js - Can't Set Sources

Closed this issue · 4 comments

If you try and select sources (via function button or bookmark) with the all_WotC_published.js file, nothing happens and the console prints the following:

TypeError: subObj is undefined
342:Document-Level:FunctionsResources

(This also happens with all_WotC_published.min.js, but that's not really surprising). I'm using MPMB version 13.0.5 in Adobe Acrobat Reader version 2020.013.20075. This bug is affecting all variations of the Character Record Sheet.

From poking around in MPMB's GitHub, it looks like the error is actually arising from FunctionsResources.js, in the function for source exclusions. So maybe it is on MPMB's side, rather than the script? Either that, or there's something wrong with the way the script is written vs how the sheet expects it to be.

Might've found it? When I copy/paste the script into the "Add Material Manually" version, it maxes out the dialog box and cuts out part way through the Avenging Angel feature from the Oath of the Vengeance, leaving an impartial function call at the end. If I delete everything up through the start of the Oath of Vengeance, everything works fine. The file may need to be split up in order to work properly?

As the Add Material Manually dialog says, see image below, you can only enter 65642 characters in the dialog. If you want to add a file, you are better off using the file import method. The manual (copy-paste) method is intended for smaller scripts and for testing stuff.
image

I missed that note somehow. Read the whole box above and somehow skimmed over that. Regardless, the issue was happening when I did the file import as well.

EDIT: Was user error. Sheet works great!