Fantasy Grounds Fridays Pre
Page 1 of 2 12 Last
  1. #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?

  2. #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

  3. #3
    celestian's Avatar
    Join Date
    Jan 2017
    Location
    DFW, Texas
    Posts
    3,152
    Quote Originally Posted by Frodie View Post
    Hero Labs Online now has the export of the character JSON file. So how do we get that into FGU?
    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 Content Bundle (All The AD&D Content)
    Coding the Official AD&D Ruleset
    Documentation for AD&D 2E ruleset.
    My Twitch Channel for AD&D and FG related streams (See schedule for live days)
    My YouTube for FG related Tutorials and AD&D Actual Plays
    Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)

  4. #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?

  5. #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)

  6. #6
    I wonder if someone would write something and sell it on drivethrurpg, or is there copywrite issues?

  7. #7
    I found an open-source LUA JSON library, I'll see if I can hack something together.

  8. #8
    Oh wow, that would be very cool, thank you!

  9. #9
    celestian's Avatar
    Join Date
    Jan 2017
    Location
    DFW, Texas
    Posts
    3,152
    Quote Originally Posted by darrenan View Post
    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)
    Feel free to look in the 2E ruleset (if you're looking for a in-FG solution). manager_json.lua. It's not as flexible as something like the Unity API version would be but it works for my needs and might for whomever is working on this particular project.
    ---
    Fantasy Grounds AD&D Content Bundle (All The AD&D Content)
    Coding the Official AD&D Ruleset
    Documentation for AD&D 2E ruleset.
    My Twitch Channel for AD&D and FG related streams (See schedule for live days)
    My YouTube for FG related Tutorials and AD&D Actual Plays
    Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)

  10. #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)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
FG Spreadshirt Swag

Log in

Log in