Thread: JSON file from Hero Labs Online
-
November 23rd, 2020, 23:46 #1
JSON file from Hero Labs Online
Hero Labs Online now has the export of the character JSON file. So how do we get that into FGU?
-
November 23rd, 2020, 23:53 #2
Someone will need to write a converter app. Unless they published a full JSON Schema it will be dicey getting the conversion right from single example characters. Looks like they did publish some documentation:
https://docs.herolab.online/HLO-Expo...umentation.pdf
-
November 24th, 2020, 00:26 #3
This would be a trivial thing (well, a lot less work) if we could get access to the Unity JSON tools in the FGU API. There is a Unity JsonUtility that lets you copy/move data around to/from JSON.
The only JSON work I know performed in FG is within the 2E ruleset. I put together a rudimentary global script that lets me copy a variable into a JSON string and pass it off to the OOB function to maintain the entire structure of it data.... but it's not nearly as complete at the Unity tool would be.---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
-
November 28th, 2020, 13:58 #4
I would like to help out to write something, but I have zero skills in this. Is there some kind of template I can follow and edit?
-
November 28th, 2020, 15:39 #5
No, as I explained above, this will require writing an application outside of Fantasy Grounds. The simple version would just convert the JSON into the corresponding character XML. A more involved version could also include pulling the character from HL and all the authentication and networking code that would involve.
It's possible you could also do this as an extension that lets you paste in the JSON and create the character from that, but that would involve writing a bunch of JSON parsing code (or as Celestian explained, use some existing JSON parsing library)
-
November 28th, 2020, 15:50 #6
I wonder if someone would write something and sell it on drivethrurpg, or is there copywrite issues?
-
November 28th, 2020, 17:01 #7
I found an open-source LUA JSON library, I'll see if I can hack something together.
-
November 28th, 2020, 17:13 #8
-
November 29th, 2020, 20:31 #9---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
-
November 29th, 2020, 23:44 #10
I grabbed this one and modified it to work inside FG: https://github.com/rxi/json.lua
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks