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

Character Sheet macro help

Cheers, humbly I ask for help. I have been tinkering with this for an hour or so an I can't find the error. I am trying to make a macro for a character sheet button that has a query inside a query with a complex roll in it. I am absolutely clueless as of now and would appreciate the help. ?{Type of Attack|Melee,?{Dice Pool|1d20,[[{{ceil(((@{Agility}+@{Melee_Expertise})-d20cf>20cs<@{Melee_Focus}+1e-2)/((@{Agility}+@{Melee_Expertise})-@{Melee_Focus})),{2}}kl1,{0}}kh1]]|2d20,[[{{ceil(((@{Agility}+@{Melee_Expertise})-d20cf>20cs<@{Melee_Focus}+1e-2)/((@{Agility}+@{Melee_Expertise})-@{Melee_Focus})),{2}}kl1,{0}}kh1]][[{{ceil(((@{Agility}+@{Melee_Expertise})-d20cf>20cs<@{Melee_Focus}+1e-2)/((@{Agility}+@{Melee_Expertise})-@{Melee_Focus})),{2}}kl1,{0}}kh1]]|3d20,[[{{ceil(((@{Agility}+@{Melee_Expertise})-d20cf>20cs<@{Melee_Focus}+1e-2)/((@{Agility}+@{Melee_Expertise})-@{Melee_Focus})),{2}}kl1,{0}}kh1]][[{{ceil(((@{Agility}+@{Melee_Expertise})-d20cf>20cs<@{Melee_Focus}+1e-2)/((@{Agility}+@{Melee_Expertise})-@{Melee_Focus})),{2}}kl1,{0}}kh1]][[{{ceil(((@{Agility}+@{Melee_Expertise})-d20cf>20cs<@{Melee_Focus}+1e-2)/((@{Agility}+@{Melee_Expertise})-@{Melee_Focus})),{2}}kl1,{0}}kh1]]|4d20,[[{{ceil(((@{Agility}+@{Melee_Expertise})-d20cf>20cs<@{Melee_Focus}+1e-2)/((@{Agility}+@{Melee_Expertise})-@{Melee_Focus})),{2}}kl1,{0}}kh1]][[{{ceil(((@{Agility}+@{Melee_Expertise})-d20cf>20cs<@{Melee_Focus}+1e-2)/((@{Agility}+@{Melee_Expertise})-@{Melee_Focus})),{2}}kl1,{0}}kh1]][[{{ceil(((@{Agility}+@{Melee_Expertise})-d20cf>20cs<@{Melee_Focus}+1e-2)/((@{Agility}+@{Melee_Expertise})-@{Melee_Focus})),{2}}kl1,{0}}kh1]][[{{ceil(((@{Agility}+@{Melee_Expertise})-d20cf>20cs<@{Melee_Focus}+1e-2)/((@{Agility}+@{Melee_Expertise})-@{Melee_Focus})),{2}}kl1,{0}}kh1]][[{{ceil(((@{Agility}+@{Melee_Expertise})-d20cf>20cs<@{Melee_Focus}+1e-2)/((@{Agility}+@{Melee_Expertise})-@{Melee_Focus})),{2}}kl1,{0}}kh1]]}|Ranged,0} It is supposed to first query what kind of attack (meele/ranged) it should be and the second query should select the dice pool (1d20-5d20). The inline roll is repeated for each dice to give a result for each dice. The Formula isn't my own and I don't claim credit for it. Help would be appreciated.
1522277166

Edited 1522277180
GiGs
Pro
Sheet Author
API Scripter
This looks like (in part) a  html replacement issue , which will be very tricky to fix. Some symbols dont work too well in queries and need to be replaced by other symbols. Honestly though, as it is the macro wouldnt do whatever you want it to do, it's not built correctly even without the html issue.  Can you describe what the macro is supposed to do, the exact roll you are making, and maybe we can suggest a simpler method.
1522277947

Edited 1522326783
Appreciate the answer. The simple structure without the formula is: ?{Type of Attack|Melee,?{Dice Pool|1d20,[[1d20]]|1d20,[[1d20]]|1d20,[[1d20]]|1d20,[[1d20]]|1d20,[[1d20]]}|Ranged,?{Dice Pool|1d20,[[1d20]]|1d20,[[1d20]]|1d20,[[1d20]]|1d20,[[1d20]]|1d20,[[1d20]]}} And works for what I want it to do. What do I want the code to do: Select the Type of Attack and within that query for the dice pool. Within the second selection I am using the roll formula as inline roll. The formula does a check for critical success and critical failure and checks if the roll hit a target number. If it is a crit it ups the success to two successes. I have to formula working without the second query for Type of Attack.  And I did the replacement as is explained on the wiki.  Edit: It does not show the original formatting I did with the replacements unfortunately. Edit2: Solved it. It was a matter of douple amp replacements inside the inline roll with single amp replacements inside the queries.