PDA

View Full Version : Pathfinder/3.5 - Automatic Town Item Generation -> FG2 using TableSmith



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!

bnason
July 28th, 2012, 20:46
A few notes about the actual item generation:


Armor has a minor chance of being small. Weapons do not.
Weapons and armor are by default always magic, as the existing tables are magic item / town tables. However, in the actual PRG_Arsenal and PRG_Armory tables, you can press F11 and change parameters to generate masterwork / mundane instead.
Weapons and armor will randomly (according to the Pathfinder GM Guide / PF CRB) generate special abilities from the CRB and APG. At some point, I'll add a toggle to only use the Core Rulebook, but that's a wish-list item atm. Specific items are also in there.
Weapons and armor that are not specific will run through a "Condition" script that modifies their value based on randomly assigned materials (gold, folded steel, etc.), or special materials per the rulebooks (adamantine, etc.) Masterwork conditions are applied correctly and listed in item properties. Same with weapon damage types and double-bladed weapons.
All armor and weapons automatically pull in the correct values for things like damage, range, etc. from the underlying XML TSD data files. This is true for specific items as well, which are tagged with the correct base enhancement.
Wands, scrolls, and potions pull from only CRB and APG spell lists.
Intelligent item rules and calculations are rolled (1-100 chance for rods, rings, wondrous items, and staves) and noted in item descriptions.
Every item has a random appearance generated. The random appearance is tagged in the <notes> FG2 XML, so that it appears as the Non-ID'd text. Dittos with "Alt Name" - ie., while a "Staff of Rigor" has that as the name once ID'd, "Unidentified Staff" will appear in the Alt Name field.
All items are tagged with the correct cost, weight, aura, and caster level according to PFR Item Generation rules (ie., weapons with only base enhancements are evocation * 3 CL, and so on).
Item sources for everything (items, special abilities, spells on scrolls, etc.) are listed at the end of the description.
To minimize errors - all of the descriptive text is NOT FORMATTED, except for some basic line breaks. The PF20 SRD has formatted text for spells, etc., and at some point I will switch that over for cleaner descriptions.
Item appearance can be changed in the PRG_Town_Items table
Note the "Rewrite Appearance" link - click it, enter the item index displayed in the table, and type in the new appearance. You can obviously do this in FG2 as well (just edit the "Notes" field, if something doesn't make sense (it is random, after all!)
"Golarion" specific stuff will show up from time to time (races, dieties, etc.) in the appearance data / Notes field.
Wands will have random charges - usually between 10-50, with a bell-curve probability putting most wands at 30-40 charges.
Weapons and armor are by default always magic, as the existing tables are magic

Oberoten
July 29th, 2012, 09:22
Interesting... Would you mind if I dissected this a bit and made something similar for my Ars Magica ruleset? I allready have TS scripts to generate entire covenants and strongholds with npcs...

- Obe

bnason
July 29th, 2012, 19:30
Feel free - let me know what you come up with! :)

Oberoten
July 30th, 2012, 14:50
Awesome. :) Going for it.

- Obe

Whaley
October 1st, 2012, 22:30
I was wondering if you could put another link to your files for us to download. Thanks

Emrak
February 5th, 2013, 00:03
I was wondering if you could put another link to your files for us to download. Thanks

Yep, the dropbox file is missing. :-/

bnason
February 5th, 2013, 02:14
Hi all - I've been out of the gaming loop for awhile. Updated link is here:

https://www.dropbox.com/s/05zto0ivv7s0ncn/tablesmith.zip

Kapkomm1
July 24th, 2013, 16:33
I know this is old stuff, but the dropbox file is missing/empty. Is there a new location?

Trenloe
July 29th, 2013, 18:23
I know this is old stuff, but the dropbox file is missing/empty. Is there a new location?
Bnason was last online here 11 days ago - hopefully when he comes back online he can post the latest version here...

Bidmaron
February 15th, 2014, 15:24
It is sad that this great-sounding tool is no more.... Oberoten, do you have a version of it lying around?

Zeus
February 16th, 2014, 19:50
If there's enough interest I could look at embedding a tablesmith parser into FantasyGrounds. You could then (in theory) add your existing TS scripts into FG (cut n paste) and execute in FG. Or we could look to leverage the rollable tables object from CoreRPG to generate rollable table versions of your TS scripts.

Bidmaron
February 17th, 2014, 00:05
Well, Zeus, I'd certainly appreciate it. I doubt whether I'm the only one. The thing I'd like to get around to doing is working a table generator where you could just drag one or more items to it. If the item's source had a frequency, it would be copied into the item list. If not, the frequency would default to common. The frequencies could either be numbers, or a code like the old AD&D monster frequency (unique, very rare, rare, uncommon, common, and I'd add a + or a - optionally to each; so vr-=2,vr=4,vr+=6,r-=9,r=11,r+=14,u-=17,u=20,u+=35,c-=50,c=65,c+=80). Then the table generator would assign the roll range for each item according to these relative weights. I'd really like to do that.

Zeus
February 17th, 2014, 19:05
Give me a little time to finishing up helping with 5E and completing PAR5E and I'll take a look to see if we can incorporate some Tablesmith goodness into FG and CoreRPG.

Bidmaron
February 18th, 2014, 01:57
You are the man!