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 .
×
May your rolls be merry + bright! 🎄
Create a free account

PTU Pokeball Capture Macro Question

Hey all! Ive been working on this Macro for my PTU campaign. It involves capturing pokemon with particular Pokeballs. I have the Stats of the balls mapped on a roll table so players select the kind of ball they are using and they get the appropriate reduction to the capture rate. However, in my campaign I have it set up to where Gym leader badges also give a reduction to the capture check(of particular types of pokemon). I am having trouble adding the gym bagdes to the code below. For some reason, it only lets me do one or the other. Below is the original macro &{template:default} {{name=Pokeball}} {{Throw Attempt= [[ 1t[[[1d20>7]]] ]] }} {{?{Ball|Standard|Great|Ultra|Master|Net Ball|Level|Lure|Nest|Dive|Friend|Moon} = [[1d100 - 5 - 1t[?{Ball}]  ]] }}  Can anyone tell me how to add bages to it where particularly this part: [[1d100 - 5 - 1t[?{Ball}]  ]] }} So that the badge reduction is included into the calculations.  Im trying to set it up to be pretty simple and binary so if players hit "yes" for badge the calculation would decrease by 10. Thanks for the help
1610922443

Edited 1610922777
Ziechael
Forum Champion
Sheet Author
API Scripter
Depending on how you've got your badges set up there are a number of ways you could do it, do you have them recorded on character sheets in some fashion or are they just floating or free text 'known' entities: !?{Gym Badge Reduction|0} &{template:default} {{name=Pokeball}} {{Throw Attempt= [[ 1t[[[1d20>7]]] ]] }} {{?{Ball|Standard|Great|Ultra|Master|Net Ball|Level|Lure|Nest|Dive|Friend|Moon} = [[1d100 - 5 - 1t[?{Ball}] - ?{Gym Badge Reduction} ]] }} Or if you have them as a value on a character sheet: &{template:default} {{name=Pokeball}} {{Throw Attempt= [[ 1t[[[1d20>7]]] ]] }} {{?{Ball|Standard|Great|Ultra|Master|Net Ball|Level|Lure|Nest|Dive|Friend|Moon} = [[1d100 - 5 - 1t[?{Ball}] - @{selected|gymbadges} ]] }} ^^assumes that the attribute is 'gymbadges' so you'd need to change that as needed [edit] just looking at your example macro again I suppose you've set up tables for the types like you have for the balls? You won't be able to resolve a single query into two distinct results without a lot of messing about... you might end up needing two queries :/ The macro below has split out the original ball types from the newer ones but I don't know the system so it might be exactly as you need it: &{template:default} {{name=Pokeball}} {{Throw Attempt= [[ 1t[[[1d20>7]]] ]] }} {{?{Ball|Standard|Great|Ultra|Master} = [[1d100 - 5 - 1t[?{Ball}] - 1t[?{Gym Badge| Net Ball|Level|Lure|Nest|Dive|Friend|Moon }] ]] }}