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

Dice game macro help D&D5e

1552240176

Edited 1552250400
NiC0
Plus
Hi all I did some quick searching but I did not find what I was looking for. What I am trying to do is write a macro or PC ability macro that is a dice game. In this game a player bets, rolls 3d6 and gets the results. Then I would like to ask the PC if they want to cheat using slight-of-hand then if they want to increase the wager. So here is what I have working which is essentially the initial bet and the roll of the 3d6. What I am having trouble with is then asking a new question at the end of this that says something like "would you like to cheat" which would send a "/w to the GM saying player uses slight-of-hand to re-roll" and if the slight-of-hand check is successful the player is prompted to type a new dice value of choice and that entry gets submitted as a whisper to the GM. Then the PC is asked if they want to increase the bet. /w GM &{template:default} {{name=PC rolls his dice}}{{Gambling=?{Bet GP|} GP}} {{Results=[[1d6cs>1cf>1]] • [[1d6cs>1cf>1]] • [[1d6cs>1cf>1]]}} EDIT I have been working on this all day and decided to do a macro with nested macros. However, now I have a different issue. See below for the 4 different macros I'm using. First the main macro which prompts the user to play the game or cheat (My-Game). Then a macro for the game itself which consists of the code above (game). A macro that runs a skill check which first asks you if the roll is normal, advantage or disadvantage (soh). Lastly, the rules of the game (Rules) The problem here is when I run the macro "My-Game" and then click on one of the two options I get the question prompt or the normal/advantage/disadvantage prompt, but then nothing is input into the chat window.... (My-Game) %!#Rules &{template:npcaction} {{rname=Dice Game}} } {{description=Roll 3d6: [Play Game](!#game) [Do you want to cheat?](!#soh)}} (game) {{name=Corin rolls his dice}}{{Gambling=?{Bet|1} GP}} {{Results=[[1d6cs>1cf>1]] • [[1d6cs>1cf>1]] • [[1d6cs>1cf>1]]}} (soh) /w GM @{Corin|wtype}&{template:simple}{{?{Roll Type?|Normal,normal|Advantage,advantage|Disadvantage,disadvantage}=1}} {{rname=Slight of hand}}{{mod=@{Corin|sleight_of_hand_bonus}}} {{r1=[[@{Corin|d20}+@{Corin|sleight_of_hand_bonus}[Pro]@{Corin|pbd_safe}]]}} {{r2=[[@{Corin|d20}+@{Corin|sleight_of_hand_bonus}[Pro]@{Corin|pbd_safe}]]}} {{global=@{Corin|global_skill_mod}}} @{Corin|charname_output} (Rules) @{Corin|wtype}&{template:spell} {{name=Corins Card Game}} {{description=**1.)** The game will start with 2 players who place a wager. **2.)** Each player will roll 3d6. **3.)** After the roll there is an opportunity to increase the current wager. **How to win:** High straight Low straight 3 of a kind 2 pair All 3 Evens All 3 Ods Higher dice}}  0 {{innate=}} {{concentration=1}} @{Corin|charname_output}
1552266722

Edited 1552266984
GiGs
Pro
Sheet Author
API Scripter
Shawn F. said: EDIT The problem here is when I run the macro "My-Game" and then click on one of the two options I get the question prompt or the normal/advantage/disadvantage prompt, but then nothing is input into the chat window.... (My-Game) %!#Rules Why does that start with %!# ? My guess is that's your problem. Remove the %! and try with just  #Rules . Also there's an error below, though that might just be the forum stripping the html &{template:npcaction} {{rname=Dice Game}} } {{description=Roll 3d6:  [Play Game](!#game) [Do you want to cheat?](!#soh)}} It should probably be &{template:npcaction} {{rname=Dice Game}} } {{description=Roll 3d6:  [Play Game]( !
#game) [Do you want to cheat?](!
#soh)}} If you are putting these in macros, be careful - everytime you open the macro, the html entities will be replaced, and you'll need to re-add them.
GiGs said: It should probably be &{template:npcaction} {{rname=Dice Game}} } {{description=Roll 3d6:  [Play Game]( !
#game) [Do you want to cheat?](!
#soh)}} If you are putting these in macros, be careful - everytime you open the macro, the html entities will be replaced, and you'll need to re-add them. You sir are spot on..... Simply changing from !# to what you provided did the trick. If anyone wants all 4 macros corrected let me know.