PDA

View Full Version : Multiple rolls on a Rollable Table?



Three of Swords
February 15th, 2018, 17:25
I have a Table of gems. I want to roll exactly 6 times on it 'all at once' so the output goes to the same Parcel. How would I do this?

Seems simple, yet my google-fu has failed to find an answer.

Thanks for any input!

Trenloe
February 15th, 2018, 17:31
See the Random treasure table example in "Tables" in the Wiki User Guide here: https://www.fantasygrounds.com/wiki/index.php/Tables

Three of Swords
February 15th, 2018, 18:03
So using a table to roll on another table is the only way to do it?

Odd, but serviceable. Thank you for the prompt response.

Bidmaron
February 16th, 2018, 02:52
Watch for the Generators extension. When it releases, you will be able to control from the table the iteration count and from the /rollon command

Three of Swords
February 16th, 2018, 03:05
Watch for the Generators extension. When it releases, you will be able to control from the table the iteration count and from the /rollon command

Intriguing... Is there a thread that discusses the forthcoming extension and what functionality it will provide?

Bidmaron
February 16th, 2018, 03:28
I have hesitated to do so because I am a crappy programmer, and it takes me a long time to test my crappy code. I will get to my computer in a little while and post what is coming in the first release. All the code is done. I am debugging and working the documentation. I have a roadmap for seven releases

Three of Swords
February 16th, 2018, 03:46
I have to laugh, because I know that exact feeling. I wrote a number of minor scripts for Roll20, but only shared a few of them because of my crappy programming skills.

My code was ugly, didn't have proper error handling (I'd just restart the API on a crash), and wasn't very robust, only handling very specific things.

Bidmaron
February 16th, 2018, 04:11
As requested:

I am producing the Generators extension because the built-in Tables features of Fantasy Grounds lacks some important capabilities to handle the needs of sophisticated table users. Additionally, the implementation could not properly handle multiple nested tables because of its asynchronous design. Generators implements a fully synchronous design that handles nested tables of arbitrary complexity, and it extends the feature set of FG’s built-in Tables in several important ways. A list of the most significant features implemented in version 0.1 of Generators includes:
* 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).

The extension is CoreRPG and should work with any ruleset based upon CoreRPG.

Three of Swords
February 16th, 2018, 13:54
Wow, that's going to be an impressive tool. I'm looking forward to it!

Moon Wizard
February 16th, 2018, 18:18
But, what if I like your version better? ;)

JPG

Bidmaron
February 16th, 2018, 19:57
MW, if that is directed at me then you are free to use it as you see fit. I can ensure my code works with trenloe’s (I haven’t looked at what he is overriding so I am not sure if there will be conflicts).

All I would ask if you roll my stuff into core is that you let me keep refining it until I get the full scripting version running that imports TableSmith and Inpiration Pad Pro

Moon Wizard
February 16th, 2018, 20:18
Yeah. The original table code was built by someone else, and has evolved slowly. Having something more robust is on my long term list. I’ll also need to make sure it can read existing table records, since many modules use the existing structure.

Cheers,
JPG

Bidmaron
February 16th, 2018, 20:51
It absolutely can. The only reason I kept it separate is so Trenloe’s extension would continue to work.

I did not want to subvert his work. I will test his extension with my code because I don’t think my future mods will break his code any worse than my current work might.

If you decide to do this, it will be my honor to have done some small part to contribute to the greatness that is Fantasy Grounds.

Nylanfs
February 16th, 2018, 21:39
So you need a 8th step to your roadmap with just Profit! on it. :)

Bidmaron
February 16th, 2018, 23:01
Well, my next project would probably be ley Jammer. I might do that on DTRPG. Think SpellJammer using Pathfinder rules

yeknom
February 18th, 2018, 11:58
As requested:

I am producing the Generators extension because the built-in Tables features of Fantasy Grounds lacks some important capabilities to handle the needs of sophisticated table users. Additionally, the implementation could not properly handle multiple nested tables because of its asynchronous design. Generators implements a fully synchronous design that handles nested tables of arbitrary complexity, and it extends the feature set of FG’s built-in Tables in several important ways. A list of the most significant features implemented in version 0.1 of Generators includes:
* 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).

The extension is CoreRPG and should work with any ruleset based upon CoreRPG.

This looks great.

Bidmaron
February 18th, 2018, 21:56
Thanks. Now to finish my testing....

Erin Righ
February 19th, 2018, 03:23
Good luck, mate, break a code!