DICE PACKS BUNDLE
Page 1 of 2 12 Last
  1. #1

    Story Template Cross Template Referencing Bug

    I cannot pull links from Cross-Template referencing by column, only the results of the entire table or text. How do I do this?

    I am trying to create story templates for randomizing encounter distribution amongst different rooms in a dungeon. An initial story template rolls on an Encounter table which determines the configuration of which encounters will be in which rooms. An example of this table would be:

    Room 1 Room 2 Room 3 Room 4
    Row 1 Encounter Link None Encounter Link No Encounter
    Row 2 None None Encounter Link Encounter Link


    So the first template rolls this table and let's say returns Row 1 using the method below.

    {:Encounter Table:ENC}

    In the next template for Room 1, I want to to pull the first column of the saved table to see if there's an encounter in that room or not. First to verify that it's working I run the following and it returns all text and all links in Row 1 in order.

    {ENC}

    Results:
    None No Encounter
    Room 1 Encounter Link
    Room 3 Encounter Link

    But now for Room 1 I just want the first column so I run:

    {#ENC|1#}

    Results:
    None

    It skips the link in column 1 and returns column 2. Weirder:

    {#ENC|2#}

    Results:
    No Encounter

    It acts like the links aren't even there. If I run:

    {#ENC|3#}

    Results:
    No data stored

    But again, if I return the whole table, everything pulls. What's more frustrating is that if I remove the text from the table, it still refuses to function.

    Room 1 Room 2 Room 3 Room 4
    Row 1 Encounter Link Encounter Link

    If I pull the results I get the links.

    {ENC}

    Results:
    Room 1 Encounter Link
    Room 3 Encounter Link

    But again, the column references don't work. Referencing columns 1 and 2 returns nothing at all.

    {#ENC|1#}

    Results:


    {#ENC|2#}

    Results:


    But referencing further columns return "No stored data".

    {ENC|3#}

    Results:
    No stored data


    Can someone please help me understand why the links aren't working in column referencing? This seems like basic functionality that should work and if it can't currently, then it should. Otherwise I'm going to have to figure out some funky workaround.

  2. #2
    The simple answer is: the code doesn’t support links in column references yet.

    The longer answer: it’s not super simple to do. It’s definitely possible, but I didn’t crack the code on how to get it working.

    Additionally, I haven’t personally had a use case for this functionality, so it didn’t even make it on the radar or the list of “things to get working”. Obviously, if any feature exists someone will undoubtedly find it useful, so now that you’ve brought it up I can toss it on the list to take another swing at. But I’ve fiddled with it before and already know it’s no small ask, so it’s not something I’ll be able to do this week.

  3. #3
    Thanks so much for taking another look at this, Jim! I don't know what goes into developing that feature, but I understand the time requirement.

    To reiterate, this is an incredibly important feature for me. I'm a professional GM and am designing my adventures with random variables for map layout, enemy type, and encounters, so the ability to randomly generate these values within Fantasy Grounds and then reference them as my players navigate through their adventure is critical. It's a big part of my value statement for creating custom content and allowing for re-playability should players create multiple characters.

    Please let me know if I can provide any further information to help your efforts. Thanks again!

  4. #4
    So, I have good news! ...and some "just ok" news too I am afraid...

    The good news- I figured this out in like 5 minutes flat this time around! (you know how sometimes if you set a problem aside and then look at it later with fresh eyes the answer pops right out at you?) So this means it is not only possible- it's already working like a champ on my test build.

    The interesting thing is, it causes some unique behavior with how they display and roll. You see, links can perform a few differing functions in a table:
    1. If the link is directly TO another table which contains no other links that don't lead directly to tables, then FG tries to just roll on that table and not display any links
    2. If the link is to a table containing links to records, then FG tries to roll on the linked table and only display record links from the rolled results with any accompanying text from the same column, but not display the parent table's link
    3. If the link is to a record, FG wants to display the record link along with any text in the column with it

    Now for the "just OK" news: Where this gets confusing is when FG stores the records, it does something different with the retrieved results on the other side depending on the original link type that was stored. In addition, if the NAME of the link actually contains tables itself, then it gets a little comical.

    So here is the bottom line: I have it totally working. It is 100% storing links for use with column referencing and cross-template column referencing as well. BUT, depending on the type of link you try to store/retrieve, the outcome isn't always predictable- and when it comes to adding something into FG, I like predictability. Otherwise I will be doomed to answer a billion questions on the forums like "Why is my crazy table not working like I think it should?" The silver lining though is that even when it doesn't do exactly what I expect it to do- it still basically works and doesn't mess anything else up. So it's perfectly stable, but sometimes perplexing. Call it Chaotic Good

    What this means is- if I am to send this off to Smiteworks, I have a LOT of testing and tinkering to do first. I need to really get down to the bedrock of predictability- something that can be written in the wiki to articulate what a user's expectations should be from this feature. Admittedly, since I am an ultra-poweruser of story templates, I am testing this feature with probably the most insane links that can be dreamt up (links pointing to tables of links that have cross-template references in the very name of the links that have been pre-rolled using a cross-template reference pre-loader template, for example) - but that is my litmus test. If I can find predictability under extreme use-cases like mine, then I will be ready to send it over to the Smiteworks badasses for review.

    Please be patient, and know I am working to make it happen.
    Last edited by JimSocks; June 14th, 2021 at 05:16.

  5. #5
    UPDATE!

    Dude, I am on a roll this week. I solved the unpredictability of links that have callouts as part of their name. Completely fixed- predictability bedrock has been FOUND!

    This means I am starting rounds of extensive testing to make sure nothing pops up unexpectedly. If the rounds of testing go well, I will send the updates to the Smiteworks badasses for review and inclusion into the game.

    As I have already started testing, I would like to say that you spurring me to look into this is going to bear some RIGHTEOUS FRUIT. Encounters are just the tip of the iceberg with cross-template column-referenced links thrown into the fold. Images, Notes, other Story Templates, NPCs, and Items ALL become unlocked to share cross-template and column referencing anywhere it is found. That's a big deal, and until I started testing this code I didn't even realize the ramifications of what it could make possible. It's safe to say I am excited!

  6. #6
    Update 2:

    Testing has went amazingly. I can say unequivocally that column-referencing links works like a champ on my test bed.

    I WOULD be sending this to Smiteworks right now, except that I have identified an opportunity to add another useful ability to how we can manipulate rolled links. I want to give the user the option to show the text next to a link in the final result or not. Now that I have dreamed it, I can't undream it, so for the past few days I have been running through 30 more versions of code to make it a reality. Hiding all link text, and hiding text downstream of the command, were both easy. Knocked those out in version 1. It's the third option I want to provide a user: hiding text UPSTREAM of the command, that has been a tough nut to crack. I realize these terms may be confusing, but don't worry about the specifics (just know it'll be great once I nail it)

    I'm getting very close. Then more testing is required to verify the new powers are still completely stable and predictable.

  7. #7
    LordEntrails's Avatar
    Join Date
    May 2015
    Location
    -7 UTC
    Posts
    17,520
    Blog Entries
    9
    I'm getting fireworks ready to celebrate... How I about I set them off a week from Sunday?

    Problems? See; How to Report Issues, Bugs & Problems
    On Licensing & Distributing Community Content
    Community Contributions: Gemstones, 5E Quick Ref Decal, Adventure Module Creation, Dungeon Trinkets, Balance Disturbed, Dungeon Room Descriptions
    Note, I am not a SmiteWorks employee or representative, I'm just a user like you.

  8. #8

  9. #9
    Jim, this is amazing! Thank you so much for your efforts! Are there any further updates?

  10. #10
    Quote Originally Posted by Chinzi View Post
    Are there any further updates?
    First of all- thanks so much!

    Secondly, YES! As of today more went live! Now we can use any link record in cross-template referencing (which is HUGE!), auto capitalizations should work even better, and the indefinite article processing got a big boost.

    I’ll be making an all-new tutorial video here soon, to encapsulate everything under one roof again.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Dungeons & Dragons 2024 Core Rulebooks Pre-Order

Log in

Log in