STAR TREK 2d20
  1. #1

    For tables, is there a way to loop over a list and roll on each item?

    I have a table which represents an Herbalist with Herbs on each row. I am generating random herbs that the herbalist has in stock. THe herbs have predefined difficulty of finding (i.e., medium, hard, absurd etc). For each herb in the list, I want to roll to see if it is in stock, so I will have to create table for each Herb I suppose, which two rows for each herb, one with the result of "None" and one with "Found x doses". So for example, an Herb that is "medium" would be 1-25 "None" and 26-100 "[1d10] doses found". Is there a way to loop over every single Herb in the list and roll on it's table?

  2. #2
    LordEntrails's Avatar
    Join Date
    May 2015
    Location
    -7 UTC
    Posts
    17,349
    Blog Entries
    9
    I don't think so, but look here for examples: Content generator 2020! (fantasygrounds.com)

    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.

  3. #3
    Zacchaeus's Avatar
    Join Date
    Dec 2014
    Location
    Scotland
    Posts
    20,902
    I think your best bet here would be to have a master table which rolls an intermediary table which is set up with the % chances of each herb appearing. And that table then rolls a random number of times on each herb table. So you'd have three tables one each for each of the herb rarities with a random number of herbs being rolled on each line. Link these tables to a three row table which has (say) 1-50 Common 51-85 Rare and 86 to 100 very rare. Then link that table to a master table which rolls a random number of times on the rarity table. (Note; this would be a lot of rolls so you might want to make sure that your tables have an odd number of rolls so that the dice animation doesn't appear - so for example each of the herb tables might have 21 rows rather than 20; that way the random number generator takes over to determine the result rather than a dice roll).

    In answer to your question; no you can't cycle through every row in a table.
    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 https://www.fantasygrounds.com/featu...rerequests.php

  4. #4
    I see what you are saying, but the chances are really on a herb by herb basis, the overall percentage for the herb appearing doesn't quite work when you have a mixture of all different kinds of rarities.

  5. #5

    Join Date
    Mar 2006
    Location
    Arkansas
    Posts
    7,411
    I'd segregate the herbs by rarity, ie for the med herb if you had 40 of them roll 10 times on the medium table. For the rares if they have like a 5% chance of each and you have 10 of them then have a 50% chance of one roll on the rare table.

  6. #6
    Quote Originally Posted by LordEntrails View Post
    I don't think so, but look here for examples: Content generator 2020! (fantasygrounds.com)
    Hey that's pretty cool. Most of it seems to be templated stuff, however the town/city/village images are very well done!

  7. #7
    Quote Originally Posted by Griogre View Post
    I'd segregate the herbs by rarity, ie for the med herb if you had 40 of them roll 10 times on the medium table. For the rares if they have like a 5% chance of each and you have 10 of them then have a 50% chance of one roll on the rare table.
    Ok I will try that.

    As a seperate question, is there a way to roll on a table and pass a customer mod to the roll? So similar to addind [3x] if you want it to roll 3 times is there a way to do something like "[+30] if you want it add 30 to the roll? Sort of like using the tables as functions.

  8. #8

  9. #9
    Zacchaeus's Avatar
    Join Date
    Dec 2014
    Location
    Scotland
    Posts
    20,902
    Quote Originally Posted by alloowishus View Post
    Ok I will try that.

    As a seperate question, is there a way to roll on a table and pass a customer mod to the roll? So similar to addind [3x] if you want it to roll 3 times is there a way to do something like "[+30] if you want it add 30 to the roll? Sort of like using the tables as functions.
    No you can't add a custom modifier to a roll. You can manually enter a modifier into the table (or use the modifier box at the bottom left). You can also drag and drop dice onto a table. So you could set things up so that results 1-12 gives something; then 13-20 does something else and then 21-100 does another thing. You can then drop a 12, 20 or percentage dice onto the table to roll either 1-12; 1-20 or 1-100.
    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 https://www.fantasygrounds.com/featu...rerequests.php

  10. #10

    Join Date
    Mar 2006
    Location
    Arkansas
    Posts
    7,411
    So to follow up on Zacchaeus, that means you can have modifiers for the top level table easily but its more difficult on the nested ones.

    Also I don't know if you know you can import table data. Since how you order and call tables can make a difference when I make complex interrelated tables I will do the data in Excel and then just import it because its a lot easier to modify Excel than the tables in FG. Once you make your modification you just then delete the old table and import it again.

    Obviously you can use Google sheets if you don't have Excel.

Thread Information

Users Browsing this Thread

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

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
  •  
DICE PACKS BUNDLE

Log in

Log in