bnason
July 28th, 2012, 19:41
Hi All,
I've been using TableSmith to automatically create town inventories, and compiled all of my scripts into a set of tools that allows you to generate town items and export them into an XML format ready for use in FG2. Using these tools, you can create magic items for any size town in minutes, and import them into FG2 Libraries. Best of all, while I've used the standard rules for item creation from the GameMastery Guide and Core Rulebook, TableSmith allows you to edit my scripts easily once you grasp it's very simple scripting language.
LINK TO FILES: https://www.dropbox.com/s/05zto0ivv7s0ncn/tablesmith.zip
A few notes:
You need TableSmith for this to work. It's a fantastic random generator tool that's available here (https://www.mythosa.net/Main/TableSmith?from=Utils.Html). It's free (shareware).
You're going to want a basic working knowledge of how modules work with FG2. This isn't a pretty, easy, clean tool at the moment (requires a little work), but I'm trying to learn Python to build a loading script.
So, here's the basics. You download the attached file and import the files into your TableSmith folders. There are several tools to run random Pathfinder Item Generation in the following folders:
Itemz.zzz: Contains tables to run single items. Only outputs into the TableSmith HTML window. No XML / FG2 tools, but fun to tinker with.
Generators: This is where the magic happens. There are two tables - PRG_Town_Items and PRG_Town_Items_XML. You use the main table to create town inventories of magic items, and the XML file to create FG2-friendly XML from them.
The basic directions:
Load PRG_Town_Items
Click "Create Town"
There will be additional links to modify the town inventory created, and to see a list of items.
Once satisfied, save the town and press "CTRL-R" (refreshes the TableSmith table). You'll now see your town saved. Create additional towns as desired.
When done, switch to the PRG_Town_Items_XML table. It will load instructions by default. Press F-11 to change the table parameters. Select your desired options. Exporting to campaign will load items directly into the shop/items tabs. Exporting to the library will do just that - and is the preferred option. That way, you can load the module, drag & drop the towns you want, and then close the module (clean way of doing it).
After choosing your options in the parameters window, click "Finish". Then press CTRL-R to reload the table with your parameters.
TableSmith will now create FG2-valid XML. From the "File" menu, choose "Export" and save the XML to "db.xml" (no quotes).
Now, all you have to do is manually drag & drop / replace the db.xml file into the appropriate attached .mod, and put the .mod file into your FG2 appdata module directory (ie.,
C:\Users\<your user name>\AppData\Roaming\Fantasy Grounds II\modules.
Sounds like a lot, but it's pretty simple once you walk through it. A few additional notes:
Under the hood, this program is pretty straightforward. .TAB files in the /table folder are scripts. .TSD files in the /data folder are XML files with item data and probability tags (<min>, <med>, <maj> for example) that are used for item generation and FG2 XML output.
Saved towns are stored in the /data folder as z.tiown_items_(TOWN NAME).tsd (town name being what you name it in the table prompts). The index to all town names, variables, and .TSD files is stored as MASTER_INDEX_TOWN_ITEMS.tsd in the /data folder.
ERRORS WILL OCCUR! I've tried to catch as many errors as possible from poorly formed XML output or errors in the .TSD data files, but they pop-up occassionally. If you run into an error, let me know.
SOURCES: I've used https://www.d20pfsrd.com/ data for almost all of the TSD data. As such, for items, you're going to get a lot more than just Core Rulebook / APG data. For other areas - for example, scrolls, potions, and wands, which all rely on spell data - I've stuck to PFR Core and APG data. NOTE: I will be updating all of the data files when the Ultimate Equipment guide comes out in August.
This set of tools is compatible with the excellent Shop/Town extension available from bradmcadam (https://www.fantasygrounds.com/forums/showthread.php?t=16568).
LASTLY - I'm planning (as time permits) to expand this set of tools to also do NPC generation, Town generation, Encounter Parcels, and a lot more. However, I'm taking it one step at a time. My other concern is that given the amount of manual labor in creating XML output, manually adding to .MOD files, etc., I have to wonder if there's a better way to go about this. TableSmith is AWESOME at what it does, but I'd love a way to be able to save output in a separate program that can manually create/edit/add to FG2 .MOD files. However, I have ZERO programming experience outside of intermediate CSS and HTML design. So, I'm trying to pickup Python, maybe VB Express - but if any programmers out there have better ideas on how to make these tools more useable, programming options I should pursue, etc. (or if anyone wants to volunteer to help!), please let me know!
I've been using TableSmith to automatically create town inventories, and compiled all of my scripts into a set of tools that allows you to generate town items and export them into an XML format ready for use in FG2. Using these tools, you can create magic items for any size town in minutes, and import them into FG2 Libraries. Best of all, while I've used the standard rules for item creation from the GameMastery Guide and Core Rulebook, TableSmith allows you to edit my scripts easily once you grasp it's very simple scripting language.
LINK TO FILES: https://www.dropbox.com/s/05zto0ivv7s0ncn/tablesmith.zip
A few notes:
You need TableSmith for this to work. It's a fantastic random generator tool that's available here (https://www.mythosa.net/Main/TableSmith?from=Utils.Html). It's free (shareware).
You're going to want a basic working knowledge of how modules work with FG2. This isn't a pretty, easy, clean tool at the moment (requires a little work), but I'm trying to learn Python to build a loading script.
So, here's the basics. You download the attached file and import the files into your TableSmith folders. There are several tools to run random Pathfinder Item Generation in the following folders:
Itemz.zzz: Contains tables to run single items. Only outputs into the TableSmith HTML window. No XML / FG2 tools, but fun to tinker with.
Generators: This is where the magic happens. There are two tables - PRG_Town_Items and PRG_Town_Items_XML. You use the main table to create town inventories of magic items, and the XML file to create FG2-friendly XML from them.
The basic directions:
Load PRG_Town_Items
Click "Create Town"
There will be additional links to modify the town inventory created, and to see a list of items.
Once satisfied, save the town and press "CTRL-R" (refreshes the TableSmith table). You'll now see your town saved. Create additional towns as desired.
When done, switch to the PRG_Town_Items_XML table. It will load instructions by default. Press F-11 to change the table parameters. Select your desired options. Exporting to campaign will load items directly into the shop/items tabs. Exporting to the library will do just that - and is the preferred option. That way, you can load the module, drag & drop the towns you want, and then close the module (clean way of doing it).
After choosing your options in the parameters window, click "Finish". Then press CTRL-R to reload the table with your parameters.
TableSmith will now create FG2-valid XML. From the "File" menu, choose "Export" and save the XML to "db.xml" (no quotes).
Now, all you have to do is manually drag & drop / replace the db.xml file into the appropriate attached .mod, and put the .mod file into your FG2 appdata module directory (ie.,
C:\Users\<your user name>\AppData\Roaming\Fantasy Grounds II\modules.
Sounds like a lot, but it's pretty simple once you walk through it. A few additional notes:
Under the hood, this program is pretty straightforward. .TAB files in the /table folder are scripts. .TSD files in the /data folder are XML files with item data and probability tags (<min>, <med>, <maj> for example) that are used for item generation and FG2 XML output.
Saved towns are stored in the /data folder as z.tiown_items_(TOWN NAME).tsd (town name being what you name it in the table prompts). The index to all town names, variables, and .TSD files is stored as MASTER_INDEX_TOWN_ITEMS.tsd in the /data folder.
ERRORS WILL OCCUR! I've tried to catch as many errors as possible from poorly formed XML output or errors in the .TSD data files, but they pop-up occassionally. If you run into an error, let me know.
SOURCES: I've used https://www.d20pfsrd.com/ data for almost all of the TSD data. As such, for items, you're going to get a lot more than just Core Rulebook / APG data. For other areas - for example, scrolls, potions, and wands, which all rely on spell data - I've stuck to PFR Core and APG data. NOTE: I will be updating all of the data files when the Ultimate Equipment guide comes out in August.
This set of tools is compatible with the excellent Shop/Town extension available from bradmcadam (https://www.fantasygrounds.com/forums/showthread.php?t=16568).
LASTLY - I'm planning (as time permits) to expand this set of tools to also do NPC generation, Town generation, Encounter Parcels, and a lot more. However, I'm taking it one step at a time. My other concern is that given the amount of manual labor in creating XML output, manually adding to .MOD files, etc., I have to wonder if there's a better way to go about this. TableSmith is AWESOME at what it does, but I'd love a way to be able to save output in a separate program that can manually create/edit/add to FG2 .MOD files. However, I have ZERO programming experience outside of intermediate CSS and HTML design. So, I'm trying to pickup Python, maybe VB Express - but if any programmers out there have better ideas on how to make these tools more useable, programming options I should pursue, etc. (or if anyone wants to volunteer to help!), please let me know!