PDA

View Full Version : Nested story templates and tables



yarnevk
April 24th, 2017, 20:46
I am working on a mod that does random decision making for PC generation using story templates, similar to what was done for 5e DMG and Volos guide. It was inspired by a prior mod found in the archives that used tables before story templates became available.

The problem I am having is I want to do something like

[foo]
[<foo>bar]

which means I can roll on a table called 'foo', get 'foo1' from that table so that the second table rolled on is '[foo1bar]'

I could not even get the prior result '<>' syntax to work as documented for text chat bubbles, so not sure if prior results used to select tables even is supposed to work.

If I do this with nested tables I can do it like this

foo1 [foo1bar]
foo2 [foo2bar]

but then I lose the story template feature of ordered dice rolls, it comes back to the template as an messily formatted unordered list of results since that is how nested tables work.

Or I can make 'foo1' a story template containing '[foo1bar]' and 'foo2' a story template that calls out '[foo2bar]' and have a master story template that calls out the 'foo' table that rolls to choose the 'foo1' or 'foo2' story template. That becomes a mess of generator and generated result windows, hard to keep the story straight! More than once I found I was editing the generated result when I intended to edit the generator.

I currently use the latter method with a PC story template, that rolls for a random class story template, a random race story template, and a random background template. The random class template will contain all the generated details for the class, such as inventory, skills and archtype tables. But since the archtype themselves contain more options, I used nested tables for those and that gets messy.

Already with what I have it is fun to use, it overcomes the problem of metagaming that every elf is a ranger with a bear, and every warlock is a tiefling blaster, whatever the PHB suggests as the quickbuild. It creates very interesting story concepts - such as a goliath gladiator bard that uses a trident and a net, rather than the conventional greataxe fighter.

I just don't see how I can release it given how messy the output is!

Zacchaeus
April 24th, 2017, 21:13
Calling tables which have child tables isn't going to work as you expected, because of the asynchronous way that dice get rolled in FG. Have a look at this video (https://www.fantasygrounds.com/forums/showthread.php?37400-Video-on-Story-Templates) which might help you get a better understanding.

Also the angled brackets should not be enclosed in square brackets. They should be on a different part of the template if you want a chat entry to be produced.

yarnevk
April 24th, 2017, 23:53
Calling tables which have child tables isn't going to work as you expected, because of the asynchronous way that dice get rolled in FG. Have a look at this video (https://www.fantasygrounds.com/forums/showthread.php?37400-Video-on-Story-Templates) which might help you get a better understanding.

Also the angled brackets should not be enclosed in square brackets. They should be on a different part of the template if you want a chat entry to be produced.

Yes I understand the nature of child tables, it is why I switched to nested templates but amount of generators/generated windows it produces is not any better story than the messy nested tables.

So I was asking if the angle brackets in square brackets could work, as I said I could not get any angle brackets working at all even as documented. Are there limits on where angle brackets can be used and what they can contain? I have noticed that different books tables sometimes return strings that can go in a chat box, and sometimes return links to text objects

Is there any other way to do what I want, or is story nesting limited functionality right now?

Zacchaeus
April 25th, 2017, 00:44
The angle brackets are used to output information which has been stored from a roll on a table from square brackets. So if you call a table [a table] then you can recall the result from that roll using <a table>. The angled brackets can be anywhere but they will do nothing unless you have a corresponding table roll somewhere in the template.

To get the best out of templates you need to think of ways of getting what you want without nesting tables. If you watched that video I linked it shows you why nesting doesn't work, and I'm not at all sure what nesting stories would look like.

Edit: one other thing angled brackets will only return strings, so if you table returns a link then the angled brackets will get confused.

yarnevk
April 25th, 2017, 03:40
That maybe why <> did not work, PHB backgrounds are text links, SC backgrounds are text strings as is Volos guide. What I did was square bracketed the table name, then formatted that in a chat box and it shows up as either a text link or chat string but both can be dragged onto the sheet, whereas the text string can only be copy/paste.

Anyways this is my top story template, which I push generate on.

Race: [Race]
Background: [Background]
Class: [Class]

The tables are generator selectors for each race, background and class so I get back a story containing generator links.

Race: Random Human
Background: Random Courtier
Class: Random Bard

What I was expecting is the sub story would be flattened into the top story so it is all on one story page, but I don't see how to do this.

Race:
every thing about this human
Background:
everything about this courtier
Class:
everything about this bard

Instead I get windows for the top story generator, the top generated story, the race generator, the generated race, the background generator, the generated background, the class generator, the generated class. Then either I lived with messed up formatting of an archtype table within the background story, or have yet again an archtype generator and generated archtype windows.

Zacchaeus
April 25th, 2017, 10:31
Indeed, this is why nested tables don't work. All I can suggest is that you try to wrok things so that your first table calls the Template. So if you want a choice between dwarf, human and elf then the first table rolled is just an ordinary table which calls a dwarf template, a human template or an elf template. You can then safely call names and race related things from that template using single tables (ie without child tables). Thta doesn't help if you then want to do something similar for backgrounds. Having said that you could have the tables point at story entries.

LordEntrails
April 25th, 2017, 17:36
Remember, this is really just the first version of templates in FG. I believe the wishlist has a couple of enhancement ideas for templates and for tables around this, so you should probably check them out and add more as appropriate.

yarnevk
April 25th, 2017, 17:45
I worked around the problem of nested table formatting by flattening my story template. Instead of Cleric containing a domain table that rolls on a different armor and weapons table depending on domain; I made a story template for each of the cleric domains, then roll on a table of those instead of linking to the cleric story template. A lot of cut/paste duplication to do just because only some domains can use a warhammer and/or chainmail!

A good example of the longer nested stories I want to do is in the 5e DMG random dungeon generator. At the bottom of the template it includes a link to the next passage story template, the problem is as you traverse the dungeon you get a lot of passage stories with no connection between them! Another example would be a choose your own adventure book, making a choice takes you to a different page in the story - it is important to preserve the choices made to connect the story.

You lose track of the story because the generated parent story includes a link to the child story template rather than the generated child story. You have to open that child story template window, click generate which opens a new window containing the generated child story, and paste that link back into the original story so that the story chain is not broken.

The same thing is true of tables that generate parcels that are linked to stories. The generated story from the template contains a link to the table, rather than rolling on the table and storing a link to the resulting parcel.

There needs to be options for tables and template linked by story templates to link to their results. Since it is possible for story templates to link to themselves for infinite recursion, replace the story generator link with the result link only when it is clicked on. If the DM wants to stop the story they can just delete the link instead of clicking on it.

yarnevk
April 25th, 2017, 17:46
Remember, this is really just the first version of templates in FG. I believe the wishlist has a couple of enhancement ideas for templates and for tables around this, so you should probably check them out and add more as appropriate.

I prefer to discuss things first, better for ideas to have consensus of how to do it and why it is needed rather than wishlist ideas that are not properly discussed. Avoids the wishlist being contaminated by ideas that will never get worked on because they will be considered half-baked ideas by people that did not know how best to use systems or work around them.

LordEntrails
April 28th, 2017, 13:37
I prefer to discuss things first, better for ideas to have consensus of how to do it and why it is needed rather than wishlist ideas that are not properly discussed. Avoids the wishlist being contaminated by ideas that will never get worked on because they will be considered half-baked ideas by people that did not know how best to use systems or work around them.
Sure, I just did not know if you knew about the wishlist or if the idea was already there.

yarnevk
April 30th, 2017, 02:08
added to wishlist

https://fg2app.idea.informer.com/proj/fg2app?ia=111180