Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Pathfinder Magic Item Tables

July 14 (8 years ago)

Edited July 15 (8 years ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hi all, I had been looking for some magic item tables for pathfinder to import using TableExport for use with RecursiveTablesSilvyre pointed me to a database of 3.5 magic item table import commands that Ziechael had put together. Since I'm not sure what needed to be changed between 3.5 and Pathfinder for magic items, beyond that I needed greater/lesser lists for minor/medium/major items and I'm running Iron Gods right now and needed to add a whole bunch of tech tables, I went ahead and made my own. I've uploaded the commands to github (new table imports here)if anyone is interested. If you aren't running with technological items, just ignore the Minor/Medium/Major Item table and make all your calls straight to Minor/Medium/MajorMagicItems. I'll be updating this in a bit with better html calls to d20pfsrd.com for details on specific weapon/armor types similar to how the spell table for the wands and scrolls works (I figured out how to extract web addresses from cells towards the end of setting this up). I also plan to add a generic gear set of tables.

The google sheet I used for parsing the TableExport data into human readable tables and my edited tables into !import-table commands is here(public version). For extracting the web addresses I used an excel VBA script, I'll see if there's a way to transition that into the google sheet as well, but in the mean time this is the script:
Function GetURL(rng As Range) As String
    On Error Resume Next
    GetURL = rng.Hyperlinks(1).Address
End Function
Which I found in this Q&A forum.

Let me know what you guys think of the tables.

EDIT: This is the macro I use with this set of tables:
!rt /w gm &{template:pf_generic} {{name=Settlement}} {{subtitle=Inventory}} {{Minor Items=[[[[?{Settlement Minor Items|Thorp,1d4|Hamlet,1d6|Village,2d4|Small Town,3d4|Large Town,3d4|Small City,4d4|Large City,4d4|Metropolis (Nearly All Minor Items Available),4d10}]]t[MinorItem] ]]}} {{Medium Items=[[[[?{Settlement Medium Items|Thorp,0d0|Hamlet,0d0|Village,1d4|Small Town,1d6|Large Town,2d4|Small City,3d4|Large City,3d4|Metropolis, 4d4}]]t[MediumItem] ]]}} {{Major Items=[[[[?{Settlement Major Items|Thorp,0|Hamlet,0|Village,0|Small Town,0|Large Town,1d4|Small City,1d6|Large City,2d4|Metropolis,3d4}]]t[MajorItem] ]]}}
Output for a Large Town:

Added better granulation for random Ioun Stone result as well as direct hyperlinks to most item results. Did not add direct hyperlinking to specific weapon types on d20pfsrd.com as the specific pages don't actually have that much useful information.
July 14 (8 years ago)
The Aaron
Pro
API Scripter
Nice!
July 15 (8 years ago)

Edited July 15 (8 years ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hrmmm, ok, I don't know if it's something in the new changes, or something that just didn't get triggered in the old set of tables, but I'm now getting a syntax error occassionally when running the table set through recursive tables.

Error:
SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but "S" found.
undefined

See the OP for details on the tables.

Note for Aaron (should he take a look at this): This occurs in both my modified version of RecursiveTables as well as your published version.

Thanks,

Scott
July 15 (8 years ago)
The Aaron
Pro
API Scripter
It's probably a question of spaces, re this bug: https://app.roll20.net/forum/post/2217884/api-regr...
July 15 (8 years ago)

Edited July 15 (8 years ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
hmmm, so maybe formatting my table calls as : [[1t[TableName] ]] is breaking it? I don't think I have any other inline rolls in the table set.

or perhaps having spaces in the html formatting [Here's some descriptive text ](html.test.com) could have been causing it?
July 15 (8 years ago)
The Aaron
Pro
API Scripter
I'd log the raw message going to sendChat() and look for an 'S' in it inside an inline roll.  Or look for an inline roll with an attribute that expands to contain an 'S'.
July 15 (8 years ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Huh, I can't figure out what is throwing it for a loop. Sometimes it runs perfectly, other times it throws the error, and occassionally it throws a "can't find id of undefined (for that one, I'm guessing I missed creating a table). It is always that it finds an "S" instead of the mathematical operators that it is looking for. I've put some log entries in, and it doesn't occur right after the message is sent, it is actually occurring some where in parseMessage (although I have no idea where). There are plenty of "S"s present in the message, and a couple in the inline table rolls, although based on logs, most of these go through just fine (and I haven't seen one that never goes through. I'm wondering if it might not be a problem with the roll20 formatted hyperlinks. I'll probably make up a group of tables sans hyperlink formatting and see if I can get the error to generate on that.
July 17 (8 years ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Ha!! Got it. Had an entry that was [1t[MinorWands]]] instead of [[1t[MinorWands]]]. This apparently threw the API into a tizzy. The updated import commands are in the updated gist.
July 18 (8 years ago)
The Aaron
Pro
API Scripter
Sweet!  Congrats!  It feels good to track down a bug like that.  Sorry I couldn't be more help, stripping wallpaper and painting is eating all my free time. =(
July 18 (8 years ago)

Edited July 18 (8 years ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Np, your suggestion gave me the lead on what to look at to find the error. Then it was just realizing that every time it threw the error, there was a reference to minor wands and every time it was error free, there was no minor wand result. Interestingly the type of error seems to have been dependent on where in the order of calls it was. If it was first, it threw an undefined I'd, if it was anything else, it gave the "found S" error.

Now I just need to refine the rolling for tech items as it doesn't really respect minor/medium/major atm, but that's just a matter of adding a couple more tables and changing some weights.
July 18 (8 years ago)
The Aaron
Pro
API Scripter
I think I've delved into that 2nd order error before.  I think if the nested roll has the error, it gets replaced by the error message (after a fashion) and so the text of the error is evaluated as a roll by the parent.  I think it's more obvious if you can put those rolls in chat and look at the javascript console.