I've just uploaded v1.2.2 of the converter, enjoy! Let me know if you run into any bugs. Thanks so much for your patience and understanding.
Appreciate the update! I downloaded and tried to use it with my current MPMB character that uses a Obojima Paladin class, "Oath of the River", I added the Obojima JS files from MPMB into the Custom_JS_Classes folder but I get the error "Couldn't load information about Oath of the River" followed by the below error.
XFDF Text: https://pastebin.com/xG2rP0yJ
Custom JS File: https://pastebin.com/Gfhz1QrZ
Something went wrong while trying to convert the XFDF data:
Sequence contains no matching element
at System.Linq.ThrowHelper.ThrowNoMatchException()
at System.Linq.Enumerable.First[TSource](IEnumerable`1 source, Func`2 predicate)
at Five.FiveBackgroundDataLoader.GetBackgroundData(String backgroundName) in U:\Godot\Projects\2022\MPMB_PDF_to_FoundryVTT\CSharp\5eTools\FiveBackgroundDataLoader.cs:line 36
at MPMB_PDF_to_FoundryVTT.CSharp.Converters.MpmbToFoundryConverter.ConvertCharacterBackground() in U:\Godot\Projects\2022\MPMB_PDF_to_FoundryVTT\CSharp\Converters\MpmbToFoundryConverter.cs:line 577
at MPMB_PDF_to_FoundryVTT.CSharp.Converters.MpmbToFoundryConverter.Convert(MPMBCHaracterData mpmbCharacterData, FoundryCharacterData foundryTemplateData, MainWindow mainWindow) in U:\Godot\Projects\2022\MPMB_PDF_to_FoundryVTT\CSharp\Converters\MpmbToFoundryConverter.cs:line 48
at MainWindow.LoadXFDFFromTextAsync() in U:\Godot\Projects\2022\MPMB_PDF_to_FoundryVTT\CSharp\MainWindow.cs:line 342
Attached my current XFDF + the JS file used for the class in MPMB.
Any suggestions? Sorry for being annoying haha.
Update: I took a look at your custom JS issue. There are a few things I noticed:
- A lot of the spells have P4 as a source, while being PHB spells, those won't be imported without the correct source. Can you tell me what the P4 means? Is it the 2024 PHB?
- You're using a custom background, which isn't supported yet, only classes for now.
- The JS has a different format from the examples I used to build the parsing logic. This causes the custom class loader to fail. The class you're trying to load is a Paladin subclass, but it won't load due to the format.
I'm going to try to implement custom background and subclass loading from JS files, this will take me a while as it's complex. The main reason why the converter crashes though is because of the custom background. The converter can handle missing subclasses, they just won't have a description.
I just confirmed, the P4 spells are from the 2024 Player's Handbook. Specifically the script recommended by MPMB's patreon: https://github.com/thepokesimmer/2024-PHB/tree/main