-
January 18th, 2023, 15:07 #1
- Join Date
- Feb 2021
- Posts
- 376
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?
-
January 18th, 2023, 15:51 #2
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.
-
January 18th, 2023, 16:16 #3
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
-
January 18th, 2023, 16:40 #4
- Join Date
- Feb 2021
- Posts
- 376
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.
-
January 18th, 2023, 16:48 #5
Lesser Deity
- 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.
-
January 18th, 2023, 18:04 #6
- Join Date
- Feb 2021
- Posts
- 376
-
January 18th, 2023, 18:24 #7
- Join Date
- Feb 2021
- Posts
- 376
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.
-
January 18th, 2023, 18:30 #8
Squareware might have what you want also. https://www.fantasygrounds.com/store/?search=SQUAREWARE
Paul Grosse
PCGen BoD
PR Silverback
Autobackup Batch file, Always ALWAYS backup your data. Remember to follow the 3-2-1 rule!
-
January 18th, 2023, 19:11 #9
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
-
January 18th, 2023, 21:01 #10
Lesser Deity
- 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