This Foundry Virtual Tabletop module is designed to work with Unofficial Fabula Ultima System. It add buttons for importing data from:
- an english pdf, watermarked by DriveThruRPG, of Fabula Ultima by Need Games
- Fultimator!
- Open the Foundry Setup screen and navigate to the "Add-on Modules" tab.
- Click the "Install Module" button on the bottom left.
- Paste
https://github.com/xeqi/fu-parser/releases/latest/download/module.json
into the "Manifest URL:" field on the bottom. - Click "Install".
- Launch a game world and go to Game Settings > Manage Modules and enable the module.
It will currently import and create Items and Actors for:
- Armor, Accessories, Shields, Weapons
- Consumable Items
- Bestiary
- Install the module and confirm it shows up in "Add-on Modules" on the setup page.
- Launch a game world and go to Game Settings > Manage Modules and enable the module.
- Once enabled go to the Game Settings menu and there will be a "FU Importer" heading with an "Import PDF" button.
- Provide the pdf and determine the directory you would like to save extracted images.
- Review the parse information provided.
- Click on "Import Data"
This project is still in its early days. Chances are your pdf will not work. Bad parses should provide a list of failed parses in the preview output. That information could be useful to compare against the parsers and determine what fix needs to occur.
Fultimator provides a json export file for npcs. This file can be used to import data into your world.
NPCs with equipment require that an item with the same name exists in your foundry world. The built in ones should be available if the pdf import was used.
Currently the following are unsupported:
- Phases
- Multipart
- Notes
- Go to the Game Settings menu and there will be a "FU Importer" heading with an "Import Fultimator" button.
- Paste the contents of the json export file from Fultimator
- Review any error information provided.
- Click on "Import Data"
Future additions will include:
- Better parsing of Bestiary skills/spells descriptions to pull out damage information
- Import Classes + Skills/Spells from PDF
This module mainly consists of two Foundry Application
s that convert data from an import string to a Foundry Item
or Actor
based on the template definitions of Unofficial Fabula Ultima System.
For PDF parsing this module uses PDF.js to read the pdf and act like a lexer to create a Token[]
. This Token[]
is read by parsers built using applicative parser combinators. The resulting datastructure is used to import the information.
- Clone the repo to a local machine.
- Run
npm install
to install the local dependencies - Run
npm run build
to create adist
folder containing packed js files - Install the contents of
dist
into amodules/fu-parser
directory in your Foundry instance.- For local linux distribution run
ln -sr dist/ ~/.local/share/FoundryVTT/Data/modules/fu-parser
- For windows users run
mklink /D "C:\Users\<YourUsername>\AppData\Local\FoundryVTT\Data\modules\fu-parser" "C:\path\to\dist"
- For local linux distribution run
- Place a copy of your Fabula Ultima pdf at
data/Fabula_Ultima_-_Core_Rulebook.pdf
. npm install
if not previously ran for an installation.npm run test
The tests are a combination of property based generated tests for individual parsers, and functional tests against the pdf to confirm each pages parses into a single result. All Foundry VTT based functionality is untested.
This module builds using ESNext modules so the Jest extension needs to be told to enable the correct options in node. To do so add to .vscode/settings.json
:
"jest.nodeEnv": {
"NODE_OPTIONS": "--experimental-vm-modules"
}