FG Spreadshirt Swag
Page 8 of 8 First ... 678
  1. #71
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    25,036
    Blog Entries
    1
    Hi JimSocks

    Raw Data: [:Organization Leadership:ORG]

    Outputs (example) Large Centralised, 6, 2

    #ORG|1# gives me Large centralised
    #ORG|2# gives me 6
    #ORG|3# gives me 2

    How do I take #ORG|3# and use it to roll twice (because its value is 2) on another table
    (example)
    [2x][Countries]

  2. #72
    So, that’s a tricky one that the code wasn’t designed to accommodate, BUT that doesn’t mean it won’t! I’ve found that by being sneaky we can eek more horsepower out of the system, so give this a shot:

    Knowing the “order of operations” helps with a trick like this. What I mean by that is, which callouts are resolved first, second, and so on.

    Cross template callouts and references are handled before normal table callouts with square brackets.

    Soooo...

    Try making the original callout a cross-template callout {:Organization Name:ORG} then do the regular callouts like this:
    [{#ORG|3#}x][Countries]

    This MIGHT work (I can’t test it for you right now)

    What should happen here is that the cross template callout will get stored, then the cross template reference gets replaced, then the regular callouts get checked, and if done right- when they are checked they’ll be holding [2x][Countries] !

    Let me know if that works! (If it doesn’t, there’s another trick we can try
    (Edited because I put the "x" in the wrong location)
    Last edited by JimSocks; January 29th, 2022 at 14:56.

  3. #73
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    25,036
    Blog Entries
    1
    Close.

    This works

    Code:
    Raw Data: {:Organization Leadership:ORG}
    
    {#ORG|1#}
    {#ORG|2#}
    {#ORG|3#}
    
    This one?  [{#ORG|3#}x][Country]
    But what the heck is a cross-template callout!

  4. #74
    Zacchaeus's Avatar
    Join Date
    Dec 2014
    Location
    Scotland
    Posts
    18,330
    We really, really need more documentation on this.
    If you need to contact customer support or if there is something that you would like to see in Fantasy Grounds that isn't currently part of the software or if there is something you think would improve a ruleset then add your idea here http://fgapp.idea.informer.com/

  5. #75
    Quote Originally Posted by damned View Post
    Close.

    ...

    But what the heck is a cross-template callout!
    Ah yes, I put the “x” on the wrong side there didn’t I!? Glad it worked!

    As for a cross-template callout, it’s already explained in detail on the videos I’ve posted (that are also on the wiki) as well as in the wiki text and to a lesser extent, in the top post of this thread (it at least explains the concept there)

    ... need more documentation
    I think the documentation is adequate, but folks either don’t know where to find it or don’t bother to read/watch it. I’m open to ideas though- I can explain it better perhaps if the existing documentation doesn’t cut it?

  6. #76
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    25,036
    Blog Entries
    1
    Ive read the doco and watched the videos.
    Im lost....

    These things are quite complex and following along with the video leaves me impressed but still lacking in understanding.

    I would love to see more details/detailed/examples on the written documentation.
    I know doco is painful to write... I have plenty of things that could do with better doco...

  7. #77
    Hey JimSocks, I asked this question but was directed to this thread. I'm just going to paste what I asked.

    My question is I'm creating a random tables for my campaign an it's been okay because I never had to go to deep into the story template commands. The problem I'm stuck on is having a table roll up a random number ex. 1d20 merchants in a caravan. What I need is the results of the 1d20 merchants to be multiplied by 2 for the total number of carts in the caravan. How would I multiply the sums of the 2 separate tables or columns?
    Fantasy Grounds Ultimate
    Time Zone: U.S. Central (UTC -6)

  8. #78
    Hi there!

    So, table math operations are actually from the base functionality. I’ll be honest, I always screw this up when I try to do it from memory and I’m in the car today with crappy reception or I’d look it up myself. It’s in the wiki though!

    Multiplication works via an asterisk. As I said, I always get the order wrong when I guess but here’s my guess anyways- something like this:

    [merchants][*2]

    Gosh that’s likely to be entirely wrong syntax… the wiki could probably straighten that out with the right syntax.

    Or… now that I think of it… MAYBE this would work but no promises:

    [:[merchants]*2:MerchantNumber]

    This assumes the table [merchants] only contains numerical values. But then again, if it does, you could probably just use [1d20*2] instead?

    There’s another way perhaps: do the math work inside the merchants table instead of outside of it? So give the merchants table another column which contains the doubled values of the first column, then column-reference it when you need it.

    So say we roll a 5 on the merchants table, and in that row column 1 contains “5” and column 2 contains “10”. When we want the doubled value from column two, just call it with #merchants|2#

    Hopefully one of these suggestions works for you! (Just make sure to check the wiki about the math syntax because like I said, I always mess it up when attempting from memory)

  9. #79
    Thanks JimSocks, I'll try this today an let you know. Life has been a little hectic at the moment.
    Thanks again

    So I am going to post a few different ways that did work. I'm not sure if these were the way, but I can see I'm running down this rabbit hole.
    Requires 2 Tables:

    Table 1: [1d20]
    Table 2: [2]

    [:?MC01|1eople]
    [:?MC02:carts]

    Merchants: <people>
    Carts: [<people>*<carts>]
    or
    Carts: [<people>+<people>]

    The way I prefer since I can easily reference the columns elsewhere which is really nice.
    1 Table with multiple columns
    column 1: 1d20 column 2: [2]

    {:?MC01|1:a}
    {:?MC01|2:b}

    Merchants: {a}
    Carts: [{a}*{b}]

    Thanks again.
    Last edited by Arkaerial; February 16th, 2022 at 18:43. Reason: additional information
    Fantasy Grounds Ultimate
    Time Zone: U.S. Central (UTC -6)

Thread Information

Users Browsing this Thread

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

  1. Thurman Davis

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
FG Forge

Log in

Log in