PDA

View Full Version : Stability of FG XML format for D&D 5e monsters



davout
April 6th, 2020, 12:53
Hello,

A while back I created my own MySql db to store monsters for D&D 5e. I'd like to import that data into FG. My question is how stable has the format/structure for FG XML format for D&D 5e monsters been over time? If it's been pretty consistent I'll write a script to produce that xml format. Alternatively I could export to a format for a utility like Engineer Suite - provided that format doesn't change often.

Basically I'm looking to find the method of least volatility.

Note regarding Engineer Suite I realize I could create text and then manually import that into Engineer Suite but if possible I'd prefer to avoid as much manual as possible and just create from what I can tell right now npcs.json file.

Thanks.

Trenloe
April 6th, 2020, 13:35
Welcome to the FG forums!


Basically I'm looking to find the method of least volatility.
Don't rely on a middle tier app to do your conversion for you. You can't guarantee that will be updated to take into account any future changes in FG. So go direct to FG.

I can't comment on what plans the FG devs may have for NPC data format in future. But, whatever they do, they usually write an upgrade process into the FG code - in the scripts\manager_version2.lua file. Having a quick look at this file shows that there haven't been any changes to the FG NPC data that required an update/migration of previous data - suggesting that the NPC data has been pretty stable to this point.

davout
April 6th, 2020, 14:31
Thanks.

Next question, is there documentation for the required format/structure? So far the closest thing I've found is this https://www.fantasygrounds.com/wiki/index.php/Campaign_and_Module_Data_File_Overview which is general not specifically for 5e NPCs/monsters.

Trenloe
April 6th, 2020, 14:39
There's no documentation to that level.

The best thing to do is create a few NPCs, or copy some from the MM, in a campaign and then look at the XML format in the campaign db.xml file.

superteddy57
April 6th, 2020, 16:14
To expand on Trenloe's excellent suggestion, I would suggest placing a recognizable word into each field so on the export you know what is being placed there. Some tags might not make sense while in the text editor and you placing what it is will help. Also show where something is placed in the xml when doing it by hand. Starting with a template npc with all the tags filled will be a great road map to finding that tag for other NPCs you will need to enter.

davout
April 6th, 2020, 16:51
Thanks for tips.