Mod File Generation and Packing Tool
Sadly I cannot edit the title but maybe I'll create a new post once I consolidate it the packages below.
FantasyGrounded
New Project(2/13)
https://i.imgur.com/VDGAmfk.png
FantasyGrounded (PhantasY) is a project that helps utilize and explore data from the Fantasy Grounds application. Currently campaign data is supported including data available from previous sessions. As a DM and as a player I prefer to backup my character sheet after each session -- the first goal of this project is to automate character backups after each session.
Search through existing campaigns:
Code:
from phantasy import datahelper
data = datahelper.DataHelper()
for campaign in x.campaigns:
print(campaign)
Get metadata and data from a specific campaign:
Code:
campaign = data.getCampaign('Basic Campaign')
print(campaign.metadata, campaign.getData())
Other Data Files
The other forms of data in the root folder, some of which are listed here(FG Wiki), will be implemented similarly.
Searching & Reading Campaign Data
- Pull data using the datahelper.pymethods, or by directly accessing it through campaign.py.
- Use the included utils to convert the data from XML→Dict→
- Render the data usable for FGModGen or readable by other processes.
Installation
- Download Python 3.x
- Clone or download FGModGen(Github)
- Setup run.py to either search or read campaigns as below.
TODO
- Rulesets/Lua
- FGModGen is currently ruleset agnostic although it can generate modules for specific rulesets. It is necessary to allow a larger scripting platform for the Lua implementation that SmiteWork's provides.
- Extensions
- Extensions (and most other FG files) are compressed files with scripting resources. The first order of FantasyGrounded's extension capabilities is to allow UI modifications. Think FG Gap and BigFonts' XML font and graphics wrapping capabilities.
- Distribution
- Simple integration into the forum for posting and updating.
https://github.com/zacharyhooker/fantasygrounded
FGModGen
I've updated this project! (2/13)
An FG .mod files generally consist of two files:
- definition.xml - Includes the name, author, and ruleset of the mod.
- db.xml - A list of all of the data, including file locations, and their references.
But it may also consist of image, text, or other files.
FGModGen is a module generator and packer: you specify a folder, author, and mod name and the script finds images in the folder you specify and compiles a valid definition and db XML file. Then you can call mod.zip(location) to zip and install the mod to your Fantasy Ground's data folder.
Code:
newMod = ModuleGen('ModuleName', author='You', xmlout='ModuleNameOUt')
newMod.genXML()
newMod.zip('S:\Fantasy Grounds\Data\modules\')
FGModGen is written in Python 3 and currently supports image and map packing. The source is here(github).
Installation
- Download Python 3.x
- Clone or download FGModGen
- Edit or create a new main execution and zip the file out to your FG Data/Modules folder.
(Check the bottom of MapModuleGen.py or create a new file and import ModuleGen) - Run the script.
- Load Fantasy Grounds and enable the new module in-game.
FAQ
- How is this useful for the average player?
It makes organizing maps so much nicer -- you can group them all at once and add or remove them based on what you load in the module tab. You can include larger maps in your campaigns and allow preloading over HTTP or FTP. Simply pack all of your images and maps, host the mod file somewhere and have others download and install it at their leisure.
- Is there a guide for editing the XML?
I found that
this(FG forums) guide is the most descriptive. If you're interested in any editing or modding the wiki can also help. I find that reverse engineering other's work is the best way to learn.
- It's not working!
Please copy a few lines of the error you're seeing and Google them before PMing or posting please
TODO
- Merge with FantasyGrounded
- Implement encounters.
- Unify XML reading and production with FGrounded.
https://github.com/zacharyhooker/fantasygrounded
If any of you have any ideas or feedback, please let me know.