Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Help with MACRO

I'm setting up a lot of macros for my Tomb of Annihilation game.  I've got most of them to work using the inline rolling API and having waaaay too many tables, but I've run into a bit of an issue.


for foraging, I'm using the following macro

&{template:npcaction}{{rname=**Foraging Roll**}}{{name=}}{{description= @{selected|character_name} found 



[[ {{ [[?{Advantage? | Normal,1d20 | Advantage,2d20kh1 | Disadvantage,2d20dh1}+@{selected|survival_bonus}]],0 }>12 }*({[[1d4+@{selected|wisdom_mod}]],1}kh1)]] lbs of food and [[ {{ [[?{Advantage? | Normal,1d20 | Advantage,2d20kh1 | Disadvantage,2d20dh1}+@{selected|survival_bonus}]],0 }>12 }*({[[1d4+@{selected|wisdom_mod}]],1}kh1)]] gallongs of potable water!}}


but it doesn't actually show the d20 roll.  I want to be able to have the players roll on a separate table for some special foraging results (in addition to the food and water they get) when they roll a 20, but I don't know how to edit the macro to display the result of the d20.  This macro only displays the results of the food and water.  

this is what the macro currently displays.  I'd like it to also display the result of the d20 so I can have them roll a separate chart as well

March 16 (2 years ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter

Hi luneknight42!

You can hover over the die result to get the raw dice results, along with modifiers.

You can also re-display (but not use in a formula) dice that were rolled. More info here.

Finally, since you are a Pro user, you can look at the Recursive Tables script, which allows you to use one roll to determine a subsequent table to roll on.

Thank you for the help!  I'm still not sure it's going to do exactly what I want, so I'm going with a different template

March 17 (2 years ago)
Gauss
Forum Champion


luneknight42 said:

Thank you for the help!  I'm still not sure it's going to do exactly what I want, so I'm going with a different template


It isn't the template that is the issue. You need to add in a line for reusing the roll. 

Where in the image above do you want your d20 to show up?

March 17 (2 years ago)

Edited March 17 (2 years ago)

There were some other issues I noticed with the macro:


it looks like it's rolling a survival check for each foraged resource.  as in, it's rolling survival roll and if it's above 12, then it'll give the output for food, then a separate survival roll and give the output for water.  


Ideally, it'd be one survival roll, then if that roll is above 12, it would roll both food AND water.  I've played around with a few different ways of doing it, but I settled on the most simple solution.


&{template:npcaction} {{rname=**Foraging Roll**}}{{name=standard resources available}} {{description= @{selected|character_name} rolled a [[1d20+@{selected|survival_bonus} ]]!


 if 10 or greater, then they found:


[[1d6+@{selected|survival_bonus} ]] lbs of food and [[1d6+@{selected|survival_bonus} ]] gallons of non-potable water!}}


It will roll the water and the food either way regardless of the threshold, but this way, there's only one survival check and I can see it so if it's green, I know to go ahead and roll for stuff like dancing monkey fruit, or ryath root or other chultan-specific flora.


I just couldn't figure out where to place the ">20" to where it would factor in.  All examples I've seen had the second rolls immediately after the ">20" with no text in between, so whenever I tested the macro, it just added the ">20" to the description.

March 17 (2 years ago)

Edited March 17 (2 years ago)
Gauss
Forum Champion

Luneknight, 

Let me verify if I understand correctly: 
You need to see what the result of the d20 check is. 
If the result is higher than a certain number the result of the d20 check produces both food and water. 

Do you need the macro to do anything else?


Side-question: why are they rolling survival for water they cannot drink (non-potable water)? 
Second side-question: are you using a house rule for rolling food and water? Normally it is 1d6+wisdom bonus rather than 1d6+survival bonus. 

Gauss,


Tomb of Annihilation rules that (mechanically) any water foraged is non-potable and must be boiled before it's potable.  Thematically, that can mean any number of things from collecting rain water, to finding puddles, or water collected in leaves, etc.  so  they'd still need to forage for water, then boil it (unless I missed the mark on understanding that - there's a LOT to keep track of in ToA which is why I'm building so many macros to simplify things)


I instituted a house rule to restrict resources further.  I have 3 tiers: normal resource availability, light resourses, and scarce resources.  So it's 1d6+wisdom (I made a mistake in the format and used the survival) for normal resources, 1d5+wis for light resources, and 1d4+wis for scarce resources.


That's all I need the Macro to do.  There was no further function I needed.


March 17 (2 years ago)
Gauss
Forum Champion

Ok, then your current setup is probably your best option without a Mod (API script). 

While a macro can be built to automatically roll the resources if the initial check was a success the macro cannot reuse the initial roll twice without a script (or an extremely difficult and arcane trick that only a couple people on Roll20 understand). 

I would replace your 1d6 resource check with a query to roll 1d6, 1d5, or 1d4 as needed but that is up to you. 

I appreciate the support and advice!

the way I actually have it set up is that there are two separate macros.  I have a macro that I use which prompts me to select resource availability.  When I make that selection, it creates a button in the chat for the players to click - which then activates the macro we've been discussing (referencing their modifiers).


This is the first Macro that I use:

?{Forage Conditions|

Normal Conditions,[Normal Foraging Conditions](!
#Forage-Amounts) |

Limited Resources,[Foraging Resources are Limited](!
#Limited-Forage-Amounts) |

Scarce Resources,[Foraging Resources are Scarce](!
#Scarce-Forage-Amounts)}


I select whatever conditions are appropriate for the situation, the button pops up in chat for each player to click and roll.  Then I can quickly add all those amounts up in an excel I'm maintaining to keep track of their resources.  It was convoluted to set up, but its better than what was happening - the players were all asking what to roll and then me waiting for each to roll and tell me their roll - most were just rolling a d20 then adding their modifier in their head.  It was taking a lot of game time so I did my best to simplify the process as much as possible.  

March 18 (2 years ago)
Gauss
Forum Champion

Ahhh yeah, that works.