PDA

View Full Version : FG to GCS Skill and Spell Import Script



Xeonen
March 21st, 2020, 11:01
Hello,

I've coded an import script that parses information from GCS to FG. It is developed for purely personal use. However, I'd like to share it for those who would like to use. I probably would not update or do anything with these scripts so feel free to use it whatever the way you wish. In order to use scripts, you would need Python 3.x (I've used 3.7). It is an easy to install programming language. However, you can also use a web based interpreter such as Google Colab.

The steps to use scripts as follows.


Install Python 3.x and GCS
Export the Skills or Spells -NOT both- from GCS using save as command.
tree = ET.parse("name.ext") change name.ext o reflect the GCS save file.
Change linex 148, 146, and 159 to reflect the content or up to your heart's content.
Place both script and the file in the same directory.
Run the script.
You will get db.xml (if you like to beautify the output use the site codebeautify).
Edit definitions.xml to reflect the changes you did in line 146.
Create a folder in Fantasy Grounds/Modules folder and place these two files into that folder.
Run FG, and load the module.


I know that procedure could be done much more eloquently. I would love to do it that way as well yet I'm very new to FG and I wanted to produce a quick solution.

I hope this will help somebody.

Jaxilon
March 22nd, 2020, 04:12
Very nice. I was going to do this in the Mod Maker and maybe I still will but it just went to the bottom of the list. :square:

Xeonen
March 22nd, 2020, 05:30
Very nice. I was going to do this in the Mod Maker and maybe I still will but it just went to the bottom of the list. :square:

I'm so happy to hear that from the maker of Mod Maker! I've used Mod Maker to import items into the game. Having ability to import traits, spells, and skills in Mod Maker would be plain awesome!

SceiccoNero
March 27th, 2020, 01:12
Hi, and thanks for the amazing work!

I followed your instructions.

FGU Unity, however, does not see my newly created modules.
I even tried to compress the folders in a .mod files, but still FGU does not see them. I have no idea what I am doing wrong.

Thanks!

Xeonen
March 27th, 2020, 01:43
Hi, and thanks for the amazing work!

I followed your instructions.

FGU Unity, however, does not see my newly created modules.
I even tried to compress the folders in a .mod files, but still FGU does not see them. I have no idea what I am doing wrong.

Thanks!

I do not have unity so I can not check it myself. However, I can check out the codes you generated and an in-app generated mod file to see if I can do something.

Could you create a random item/spell in app then export it as mod file? I would require;


The files you generated.
The mod export you have done in FGU.


Regards,

Moon Wizard
March 27th, 2020, 01:45
There was a problem with one of the module generators (not sure if it was this one or not) where the zip file was being created with extra control characters in the file names inside the file. If you unzipped and rezipped the file, then it fixed the issue for FGU.

Regards,
JPG

SceiccoNero
March 27th, 2020, 16:36
I do not have unity so I can not check it myself. However, I can check out the codes you generated and an in-app generated mod file to see if I can do something.



Thanks, but I did solve the problem, with the method described here above.

I am sorry to have bothered you, and thanks again for this great work!