PDA

View Full Version : Generators Extension



Bidmaron
July 8th, 2018, 02:04
Generators Extension

Overview
This Extension expands upon the Fantasy Grounds built-in Tables capabilities, including advanced formatting, limited natural-language constructors, and synchronous subtable rolls.


Documentation
The current version of the documentation is at this post (https://www.fantasygrounds.com/forums/showthread.php?44643-Generators-Extension&p=396439&viewfull=1#post396439) of this thread.


Version
See this post (https://www.fantasygrounds.com/forums/showthread.php?44643-Generators-Extension&p=396442&viewfull=1#post396442) for a record of version features
0.1 - Initial Creation
The current version offers these features:
Solves the asynchronous roll problem where multiple nested subtables would cause unpredictable results.
* Tables can now do everything that story templates can do, including formatting of text within the constraints of FG text handling capabilities.
* Includes the first version of natural language engine that can (semi)intelligently add an 'a' or 'an' article before a random item (e.g. 'a blue horse' vs. 'an orange horse') and pluralize multiple instances of an item (e.g. "4 horses" "1 horse" "2 swords" "1 sword")
* You can control whether to cardinalize numerals (e.g. "4 horses" or "four horses") that the generator randomly rolls.
* Adds the ability to invoke a random table or even chain table invocations (e.g. "The character is [a] [race] [<race>-sex]" will roll the sex on a customized race table, so if the xenomorph race has a third sex (or female dwarf adventurers are very rare, e.g.), it can handle that.
* You can add common processing necessary before a table row in a 'foreword' to your table.
* You can add common processing after a roll in an 'afterword' to your table.
* You can use serial lists with commas (or any other punctuation) intelligently separating a variable number of items (and even include or omit the 'oxford' comma before the conjunction)
* You can pack out blank space before or after a subtable roll, which is useful for name generators.
* You can control the number of times a table rolls and even make the iterations random (e.g. a bolt case can hold d6 bolts randomly rolled on a bolt table)
* The /rollon command now supports options to return a specific table row or to use a test mode that will return every row of the table as if they had been rolled.
* You can import and/or export a generator (or table) or your entire library of generators/tables without the complexity of making a module.
* Original tables feature is completely intact and separate, so the extension won't break anything you may have (like Trenloe's card extension).


Known Issues and Bug Listing
See this post (https://www.fantasygrounds.com/forums/showthread.php?44643-Generators-Extension&p=396440&viewfull=1#post396440) for a record of known issues and reported bugs


Feature Requests
See this post (https://www.fantasygrounds.com/forums/showthread.php?44643-Generators-Extension&p=396441&viewfull=1#post396441) for a list of planned features in the next revision, as well as requested features and my intentions regarding those requests.


Rulesets
This Extension works with:
CoreRPG Rulset v3.3.5+ and rulesets derived therefrom.


Dependencies
This Extension has no dependencies.


Downloading The Extension
Download at the end of this post.


Loading The Extension
This extension is loaded exactly like all other Fantasy Grounds Extensions - by first copying the .ext file to the Extensions under the Fantasy Grounds folder and then re-starting Fantasy Grounds. If the extension is compatible with the currently installed version of a given ruleset it will be displayed in the extensions list for that ruleset and can be loaded by clicking on the checkbox next to the extensions name.

If the Extension has large red 'X' next to its name in the extension list then the extension or an extension that this one is dependent upon is not compatible with the chosen Ruleset. Make sure that you have downloaded and installed the latest copy of this extension.


When Fantasy Grounds Updates
After a Fantasy Grounds version update you should verify that all extensions (not just this one) have been either updated themselves or verified by the Extension author that they work with the new version of Fantasy Grounds. If you have any issues with Fantasy Grounds after an update then it is best to disable all Extensions and then re-enable them one by one until the issue re-appears.

Thanks to Dulux-Oz for the general format of this extension posting.

Bidmaron
July 8th, 2018, 02:04
Generators Extension Documentation

Purpose
This post provides the current documentation for the Generators extension.


Versions
0.1 - Initial Version


Known Issues with Documentation
This version only covers the synchronous roll problem and the list of new features. I will update the docs as I have time.


Documentation Requests
Post to this thread if you would like a correction or addition to the documentation. Below is a list of current requests and my intents:
TBD


Downloading The Documentation
I hope this works:
The documentation is in my dropbox here (https://www.dropbox.com/s/61m5pwdltzluwvr/Generators%20Documentation.pdf?dl=0).

Bidmaron
July 8th, 2018, 02:05
Generators Known Issues and Bugs

Purpose
This post provides the known issues and bug reports for the Generators extension.


Known Issues
The export icon used when marking tables for export is actually an import icon.
When applying synchronous behavior to legacy tables, the chat and story output is not formatted in the same manner as the built-in Tables features.


Bugs
TBD

Bidmaron
July 8th, 2018, 02:06
Generators Extension Feature Requests

Purpose
This post lists Generators Extension features that I plan for the next version. It also includes features that users have requested and my intent for implementation (or not).


Features for Version 0.2


Is/are, was/were processing
Generator code can include {is/are} and {was/were} and the extension will intelligently select which of the two verb forms to use based on the subject


Improved handling of singulars and plurals
Recognition of forms such as goose/geese


Improved a/an processing
Increased sophistication of the selection of article form based on improved recognition of singular/plural forms


New cardinalization option for non-textual output
Numbers can be preserved in forms such as parcels


New Notes output option
Could be important if players were to have access to generators???


CSV import option
Will require external helper program I will provide


Generator call parameters
Ability to pass parameters to a generator


Result frequencies
Can create one or more lists of frequencies to use rather than numbers (e.g. 'Common' or 'Rare' instead of 1-3)




Requested Features
TBD

Bidmaron
July 8th, 2018, 02:07
Generators Version History

Purpose
This post provides a history of version features.


Versions
0.1 Initial Beta Release - see first post for features

Bug Fixes
TBD

Bidmaron
July 8th, 2018, 02:59
OK, my 3 month work project finally got finished, and I have some spare time again. I got back to my Generators extension, and I think it is ready for a Beta release. The documentation is very preliminary and only explains a small part of the functionality in the extension. Right now, I have to figure out how to place it in dropbox or something because it is too large to post here because of the screenshots within it.

Please post any bugs, feature requests, and documentation improvements to this thread.

I am sorry it took so long to complete this first version, but my job goes exponential every so often, as it has for the last 3 months.

Bidmaron
July 8th, 2018, 04:06
I think I have the documentation now available in my dropbox linked in the documentation post #2 above. I would appreciate it if someone could confirm that it worked to download the docs.

madman
July 8th, 2018, 04:06
Yes the dropbox link works!

Madman..

Bidmaron
July 8th, 2018, 04:07
Thanks, Madman!

Bidmaron
July 8th, 2018, 04:14
I should add that this extension will be under active development for some time and, as such, there are a lot of bypassed debugging statements and a good deal of comments that make the extension larger than strictly necessary.

madman
July 8th, 2018, 04:24
However images seem to be missing from I/Export page 8

Madman..

Bidmaron
July 8th, 2018, 04:33
Oops, I meant to add an "Under Construction" note on the Import and Export section. It will take me some time to get all the docs done. Unfortunately, many of the features are not something you will figure out on your own without the docs.

madman
August 12th, 2018, 16:19
Any chance you have made some progress on the documentation?

Madman..

Bidmaron
August 12th, 2018, 17:01
Sadly, I am working on the Dialogs Manager I need for v 0.2. What would you like to know about, and I can post some simple stuff right here.

EX0stasis
July 2nd, 2019, 02:00
I was looking for documentation as well.

I was just wondering what it meant when the help text inside the empty "generator foreword" says "use it to declare variables?"

Could you give an example of what that might look like? You can assume I know how to program (if that's necessary)

Bidmaron
July 2nd, 2019, 05:01
Hey, with the last update much of why I wrote this (synchronous rolls) was added to the ruleset, so I haven’t updated it for 3.7.7 yet and it is not compatible. When my job calms down I will update it and get variables and other benefits working but I don’t have time right now.

donpaulo
July 8th, 2019, 05:51
Looking forward to seeing it when you have the time

MTS
September 28th, 2019, 03:26
... I haven’t updated it for 3.7.7 yet and it is not compatible. When my job calms down I will update it and get variables and other benefits working but I don’t have time right now.

Bummer - I'm looking forward to seeing this in action! And, Bidmaron, thank you for your contributions!

Bidmaron
September 28th, 2019, 04:10
Well my work schedule has gone crazy again for a couple months so it will be a while.

JimSocks
March 9th, 2020, 01:15
Documentation link appears to be down :(

Kelevraa
April 17th, 2020, 15:34
Is this extension still valid? I am sure after a long enough trial and error period I might figure out the basics, but I was wondering if there is a video or document out there that describes how to use this effectively? How do I better use this for multi-table rolls? How do you use the foreword and afterword properly? How does it "intelligently" word things for singular/plural? Do you have to type it in exactly like they did in the description? Am I missing some obvious documentation somewhere? I really want the ability to better roll tables within tables for more complex results (which is what I think this claims to do), but I don't really understand how to use it.

JimSocks
April 17th, 2020, 21:48
I couldn’t figure it out... and I couldn’t get it to work alongside story templates either, which ruined my use-case so I set it back up on the shelf.

JimSocks
September 12th, 2020, 05:19
Can someone revive this idea? I want it to work SO badly, but story templates don't seem to know tables made via this extension even exist.

Bidmaron
September 12th, 2020, 19:16
Jim, sorry but RL has overcome me for the next couple months. I put a lot of work into this, but it is currently broken by most recent FGC and FGU upgrades.

Kelrugem
September 12th, 2020, 20:44
Jim, sorry but RL has overcome me for the next couple months. I put a lot of work into this, but it is currently broken by most recent FGC and FGU upgrades.

No worries :) I hope you can have more rest soon :)

NickT
February 1st, 2021, 22:11
Just found Generators and it looks as if it could be really useful, are you still working on it, or has it been permanantly shelved?

NickT
February 1st, 2021, 22:14
Hi, just found Generator and it looks as if it could be really useful, are you still working on it or has it been permanantly shelved?

wiolomatic
April 28th, 2021, 09:21
Hi all. I got error:
Script Error: [string "Tables Plus.lua"]:2658: attempt to index field '?' (a nil value)

Can you tell me what to do with that? I use 3.5e with updated FG. I unchecked everything else except for decals and image layers extension but I think they should not interfere with this.

jkeller
January 22nd, 2023, 20:21
I believe this extension (Generators - v0.1 for FG V3.3.5 CoreRPG ruleset by Bidmaron) is breaking rolling on Tables with specified dice (you can still roll on them if the dice are not specified).

With this extension enabled, I get this error: Warning = [Generator has no roll lines and no other scripting: Weather - Temperature]Weather - Temperature