Log in

View Full Version : Random Item Generator as an extension?



bnason
June 14th, 2012, 18:18
I've been building out some linked tables in the 3.5e/Pathfinder system to generate random items. It works great for some very limited functionality - for example:


Table 1: Random Items, Minor

01-20 [Random Potions, Minor]

02-60 [Random Scrolls, Minor]

Table 2: [Random Potions, Minor]

01-20 [Random Potions, - 1st Level]

02-60 [Random Potions, - 2nd Level]

Table 3: [Random Potions, 1st Level]

01-23 Potion of Cure Wounds

24-49 Potion of Bless


However - when you start getting into magical items / armor, the trees start becoming very complex, to the point that I've more or less given up on the attempt. Armors alone, for example, are requiring 100+ linked tables, 8-9 level/links deep, to generate the required options out of the GM guide. At some point, I'm worried about breaking the tables functionality!

My goal - despite becoming complicated - started simple. I wanted an integrated item generator in FG2 that I could quickly on to roll up some random items as needed. I also wanted control over it (otherwise I'd have used https://www.dxcontent.com/). I'm not looking for it to link to actual items, but just spit out a set of results in the chat window (hidden to GM), or in a separate frame, that I could then use to manually build out item parcels.

So - My question is...
How hard would it be to do this as an extension? I have working knowledge of CSS/HTML/XML, but almost NONE in LUA. What would be the best way to get started? I've looked at the LUA files in the 3.5 ruleset and other extensions, but it's easy to get lost. Anyone have any suggestions for what I'd need to do, to help me focus on what I need to learn - and not all 29 chapters at https://www.lua.org/pil/index.html? :confused:

OR - Anyone interested in helping (doing?) this project? I'm so eager to have this kind of functionality that I'd even consider paying someone for programming hours, if it's a short project. I can help to supply the LUA data tables with the appropriate probabilities and data from the core rulebook, GM guide, etc. (they, at least, seem easy to create!)

Cheers,
Ben

Zeus
June 15th, 2012, 21:54
Ah random generators .. takes me back to the days of vt100 terminals and late nights in the university computer centre hacking random dungeon generator codes and playing NetHack :)

When I wrote the original 4E Tables extension I only coded in linking support for 3 levels (if I recall correctly). JPG may have enhanced the code to support a greater number of levels (not sure, haven't checked) but essentially the greater the number of levels results in greater processor intensive parsing. Eventually processing would take too long for to be practical.

It might be simpler to leverage the items data already present in any rulebook modules (in XML) format and write an extension that perhaps adds a new slash handler command to randomly select items based upon specified criteria.

You could also automate the creation of a parcel, directly linking to the items in said modules, once the report is generated and items identified.

bnason
June 16th, 2012, 01:34
Yeah - I was thinking along those lines, but it's way over my (meager) head. Looked around on the 'net after I posted and found a few interesting sites that are doing what I wanted anyway (https://pathfinder.zonegamma.com/laptop/, and https://www.dunknet.net/pathfinder.aspx).

As I want more control over it - I kept looking, and found TableSmith. Old, not really updated Win. program that automates table rolling. Working on some scripts for it now that should suffice for what I want :) It's *NOT* integrated into FG2, obviously, but, I can't get everything I want! (Or so people tell me).