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

Rusty coding skills

So I been a bit confused, (although that might be because its nearing 2:00AM). and I been trying to figure out how I can get a drop down marco to either do A.) Use other created marcos when selected or B.) Just have a drop down list of what I want to do and then it does said thing.  For example dodwn below for Opinion A.  ?{Command | Initiative, #Initiative | Attack, #Attack | Damage, #Damage|} For example down below for Opinion B.  ?{Spell| Cure Light Wounds, **Cure Light Wounds** Target Regains [[1d8+5]] HP. | Cure Moderate Wounds, **Cure Moderate Wounds** Target Regains [[2d8+8]] HP. | Cure Serious Wounds, **Cure Serious Wounds** Target Regains [[3d8+8]] HP. } This is what I would like to do for Initiative,Attack,and Damage which I will be placing the marcos I made below.  Initiative Marco   /roll 1d20 + ?{Modifier|0}&{tracker} for initiative. --------- Attack Marco /roll 1d20>?{AC|0} --------- Damage Marco /roll ?{Number of Dice}d?{What type of Die}+ ?{Modifier|0}+ ?{Bonus|0}
1518246695

Edited 1518247974
The trick with calling macros from within a drop-down query, is that the called macros have to be written with HTML replacements for }}  | and ,  or they won't work.  Also, Macros that use HTML replacements can NOT be edited without re-doing the HTML codes again.  You're far far far better off making these as a Character Ability, and calling them via %{charactername|ability name} even if you have to make a dummy character sheet for them . HTML replacements:
So I just start replacing bits of the code with HTML. (Again sorry if I am bugging with simple question I am just really tired and want to make my friends pokemon game go a lot faster with all the rolling.)
1518247872

Edited 1518250135
Sorry, I ended up editing a fair bit of my initial reply to test what I was saying actually made sense :) /roll ?{What to roll | Initiative, %{CharacterSheetName|init} | Attack, %{CharacterSheetName|attack} | Damage, %{CharacterSheetName|damage} } Where: initiative = 1d20 + ?{Init Mod?|0} &{tracker} for initiative. attack = 1d20>?{AC|0} damage = ?{Number of Dice}d?{What type of Die}+ ?{Modifier|0}+ ?{Bonus|0}
Again, these really should be done as abilities on a character sheet.  Using HTML replacements on a Macro will work the first time, but if you ever open the macro again to edit it or even view it, the replacements get reset.
Ah I get what your saying now and its alright coding is always about testing XD But I did try them as character abilities and the marco just stated their was an error. 
Creating four separate abilities on any character sheet like the above example should work if copy/pasted as-is. one ability for the query, one for initiative, one for attack, one for damage
Figiured I show you see what i am doing wrong here.
1518249446

Edited 1518249585
heh, leave off the attack = bit.  That's me describing that the attack ability should equal "...." The abilities start with the first bit after the = sign. And the "CharacterSheetName" should be whatever the name of the character sheet is. (In my defense, it's 3am and a cold is keeping me up)
1518249760

Edited 1518249888
The same error again I feel like i am coping them wrong or something. 
1518249799

Edited 1518249935
I am right their with you on being kept up by the cold. Also I did change the it to match the character name. The character being named Master.
1518249985

Edited 1518250046
FINALLY WE GOT IT TO WORK KINDA i JUST REMOVED ONE TINY DOT
Are you clicking the little checkbox above each ability to close them after you're done? I can't see it in your screen shot for some reason. In the main ability that calls the others, it looks like you're still using the base example of "CharacterSheetName". The main ability should look like: /roll ?{What to roll | Initiative, %{Paphet Bic|init} | Attack, %{Paphet Bic|attack} | Damage, %{Paphet Bic|damage} }
So the only command that doesn't work is the initiative Its not recogizing the code
1518250212

Edited 1518250256
Make sure the macro call in the main ability matches the name of the specific ability. ie:  | Initiative, %{Paphet Bic|init}          calls the ability named "init"  (And I thoroughly apologize for the poor examples.  I'm making a hash of explaining this and I'm usually a lot better about it)
Don't worry friend because after me doing the best way to code, which is just deleting and replacing stuff I got it work. It was for some reason looping into it-self by going their is Initiative command then when clicking on it it would go init ?. click on that mgs no there is no int.  Well I fixed it. by making both words the same in the code.  I will test this futher in the morning before I like sleep on my keyboard thank you ffor your assistant ! :D