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

[Earthdawn] Tracker and GM only rolls with nested Macro

1483116283
Dougansf
Pro
Sheet Author
I've put together a great macro for Earthdawn 4E and it's complicated Step System. I'm now trying to add Turn Tracker and GM Only functionality to the options.  I've tried merging it with a few API scripts, but they don't seem to work well together.
1483116457
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
In order for any of us to give suggestions, we'll need the macro that you are using in both it's functioning form and what you've tried to do to add the functionality you need. In regards to the API scripts, which scripts have you tried, and what functionality are you hoping the API can provide?
1483117264

Edited 1483117884
Dougansf
Pro
Sheet Author
Sure thing. I stared with this  Step Array script that Aaron put together.  It has a GM only function to it, but didn't allow me to play with templates or add the Karma function. I recently tried the  Blind Roll API script.   Nested Macro (Prompts for Talent Name, Step Number, Number of Karma used, and Strain spent.  Using the Ammo API to deduct Karma used and Strain damage taken) &{template:default} {{name=?{Talent Used}}} {{Step [[ ?{Step|9} ]] + [[ ?{Karma #|0} ]] Karma }} {{#TalentX-MultiKarma }} !ammo @{character_id} Karma -?{Karma #} !ammo @{character_id} Uncon ?{Strain #|0} TalentX-MultiKarma (macro nested above) Result [[ [[ {?{Step}+d0}>14 + {?{Step}+d0}>36 ]]d20! + [[ {?{Step}+d0}=7 + {?{Step}+d0}=13 + {?{Step}+d0}=18 + {?{Step}+d0}=24 + {?{Step}+d0}=29 + {?{Step}+d0}=35 + {?{Step}+d0}=40 ]]d12! + [[ {?{Step}+d0}=6 + {?{Step}+d0}=10 + {?{Step}+d0}=11 + {?{Step}+d0,?{Step}+d0}=12 + {?{Step}+d0}=13 + {?{Step}+d0}=17 + {?{Step}+d0}>21 + {?{Step}+d0}=23 + {?{Step}+d0}=28 + {?{Step}+d0}=32 + {?{Step}+d0}=33 + {?{Step}+d0,?{Step}+d0}=34 + {?{Step}+d0}=35 + {?{Step}+d0}=39 ]]d10! + [[ {?{Step}+d0}=5 + {?{Step}+d0}=9 + {?{Step}+d0}=11 + {?{Step}+d0}=16 + {?{Step}+d0}=20 + {?{Step}+d0}=22 + {?{Step}+d0}>25 + {?{Step}+d0}=27 + {?{Step}+d0}=31 + {?{Step}+d0}=33 + {?{Step}+d0}=38 ]]d8! + [[ {?{Step}+d0}=4 + {?{Step}+d0,?{Step}+d0}=8 + {?{Step}+d0}=9 + {?{Step}+d0}=10 + {?{Step}+d0}=15 + {?{Step}+d0,?{Step}+d0}=19 + {?{Step}+d0}=20 + {?{Step}+d0}=21 + {?{Step}+d0}=26 + {?{Step}+d0,?{Step}+d0}=30 + {?{Step}+d0}=31 + {?{Step}+d0}=32 + {?{Step}+d0}=37 ]]d6! + [[ {?{Step}+d0}<3 + {?{Step}+d0}=14 + {?{Step}+d0}=25 + {?{Step}+d0}=36 ]]d4! - [[ {?{Step}+d0}<2 * (3 - ?{Step}) ]] + ?{Karma #}d6!]]
Dougansf said: Result [[ [[ {?{Step}+d0}>14 + {?{Step}+d0}>36 ]]d20! + [[ {?{Step}+d0}=7 + {?{Step}+d0}=13 + {?{Step}+d0}=18 + {?{Step}+d0}=24 + {?{Step}+d0}=29 + {?{Step}+d0}=35 + {?{Step}+d0}=40 ]]d12! + [[ {?{Step}+d0}=6 + {?{Step}+d0}=10 + {?{Step}+d0}=11 + {?{Step}+d0,?{Step}+d0}=12 + {?{Step}+d0}=13 + {?{Step}+d0}=17 + {?{Step}+d0}>21 + {?{Step}+d0}=23 + {?{Step}+d0}=28 + {?{Step}+d0}=32 + {?{Step}+d0}=33 + {?{Step}+d0,?{Step}+d0}=34 + {?{Step}+d0}=35 + {?{Step}+d0}=39 ]]d10! + [[ {?{Step}+d0}=5 + {?{Step}+d0}=9 + {?{Step}+d0}=11 + {?{Step}+d0}=16 + {?{Step}+d0}=20 + {?{Step}+d0}=22 + {?{Step}+d0}>25 + {?{Step}+d0}=27 + {?{Step}+d0}=31 + {?{Step}+d0}=33 + {?{Step}+d0}=38 ]]d8! + [[ {?{Step}+d0}=4 + {?{Step}+d0,?{Step}+d0}=8 + {?{Step}+d0}=9 + {?{Step}+d0}=10 + {?{Step}+d0}=15 + {?{Step}+d0,?{Step}+d0}=19 + {?{Step}+d0}=20 + {?{Step}+d0}=21 + {?{Step}+d0}=26 + {?{Step}+d0,?{Step}+d0}=30 + {?{Step}+d0}=31 + {?{Step}+d0}=32 + {?{Step}+d0}=37 ]]d6! + [[ {?{Step}+d0}<3 + {?{Step}+d0}=14 + {?{Step}+d0}=25 + {?{Step}+d0}=36 ]]d4! - [[ {?{Step}+d0}<2 * (3 - ?{Step}) ]] + ?{Karma #}d6!]] Ah, I updated that macro to support more than 40 steps! Result [[ [[{1e3, 14}<[[(?{Step}) % 22]] + floor((?{Step}) / 22)]]d20! + [[{0, 1, 1, 2, 6, 10}=[[(?{Step}) % 11]] - {-1, 1}>[[?{Step}]] + floor((?{Step} - 3) / 22)]]d10! + [[{0, 5, 9}=[[(?{Step}) % 11]] + {-1, 2}>[[?{Step}]] + floor((?{Step} - 3) / 22)]]d8! + [[{-1, 8}=[[(?{Step}) % 11]] - {0, 1, 5, 6}=[[(?{Step}) % 11]] + {0, 1}=[[?{Step}]] + 1]]d[[4 + 2 * {4, 8, 9, 10}=[[(?{Step}) % 11]] + 8 * ({2, 7}=[[(?{Step}) % 11]] * (1 - {-1, 2}=[[?{Step}]]))]]! - [[{-1, 2}>[[?{Step}]] * (3 - (?{Step}))]] + ?{Karma #}d6! ]]
1483120772

Edited 1483120995
Dougansf
Pro
Sheet Author
Thanks for both versions.  It will take a while for my PC's to get that high, but it looks like you streamlined the process as well. Edit: Actually, there was one time when enough successes were rolled that the damage Step got pretty high...
1483121066

Edited 1483121383
PowerCards can perform "blind rolls" via --whisper|gm and uses its own [TRKR] functionality in place of &{tracker} .
1483122860
Dougansf
Pro
Sheet Author
Wow... That looks... complex. It also looks like it's designed for D&D 4E.  Is it modifiable for other systems?
1483123254

Edited 1483123812
Dougansf said: It also looks like it's designed for D&D 4E.  Is it modifiable for other systems? I believe Roll20 was also initially designed for D&D 4E. Like Roll20, PowerCards is system-agnostic. !power {{ --whisper|GM --charid|@{character_id} --name|?{Talent Used} --Step|[[ ?{Step|9} ]] + [[ ?{Karma #|0} ]] Karma --Result|[[ [TRKR] [[{1e3, 14}<[[(?{Step}) % 22]] + floor((?{Step}) / 22)]]d20! + [[{0, 1, 1, 2, 6, 10}=[[(?{Step}) % 11]] - {-1, 1}>[[?{Step}]] + floor((?{Step} - 3) / 22)]]d10! + [[{0, 5, 9}=[[(?{Step}) % 11]] + {-1, 2}>[[?{Step}]] + floor((?{Step} - 3) / 22)]]d8! + [[{-1, 8}=[[(?{Step}) % 11]] - {0, 1, 5, 6}=[[(?{Step}) % 11]] + {0, 1}=[[?{Step}]] + 1]]d[[4 + 2 * {4, 8, 9, 10}=[[(?{Step}) % 11]] + 8 * ({2, 7}=[[(?{Step}) % 11]] * (1 - {-1, 2}=[[?{Step}]]))]]! - [[{-1, 2}>[[?{Step}]] * (3 - (?{Step}))]] + ?{Karma #}d6! ]] }} !ammo @{character_id} Karma -?{Karma #} !ammo @{character_id} Uncon ?{Strain #|0}
1483124738
Dougansf
Pro
Sheet Author
Ah, that helped a lot.  Thanks. Now to see how to manipulate the visuals to get a look that I like.
Good luck!
1483131259
Lithl
Pro
Sheet Author
API Scripter
The initial version of PowerCards was designed for D&D 4e, yes, but it has since been expanded to be usable by any system.
1483132284
Dougansf
Pro
Sheet Author
I forgot one segment of my macro, which was being handled by my HTML sheet. Nested Macro &{template:default} {{name=?{Talent Used}}} {{Step [[ ?{Step|9 -@{Wounds} } ]] + [[ ?{Karma #|0} ]] Karma, [[ ?{Strain #|0} ]] Strain }} {{#TalentX-MultiKarma }} Power Card Version --Step|[[ ?{Step|@{DexStep} -@{Wounds} } ]] + [[ ?{Karma #|0} ]] Karma, [[ ?{Strain #|0} ]] Strain
That should work.
1483472234
Dougansf
Pro
Sheet Author
For my next trick, I'd like to set up a macro to compare the result of the dice against a Target Number and then figure out how many extra successes are generated for every 5 above the TN.  So with a TN of 10, a 10 = 1 success, 15 = 2, 20=3, etc. I've put together this so far, (an attack against a targets PD stat) but it's not doing the end result properly.  I'd like to see the result number and the number of successes. &{template:default} {{name=Attack}} {{Step [[ ?{Step|9} ]] + [[ ?{Karma #|0} ]] Karma }} {{(#TalentX-MultiKarma - @{target|PD} ) /5}}
1483507505

Edited 1483507594
Dougansf said: I'd like to see the result number and the number of successes. Short of using an API Script (e.g. PowerCards ), it is not possible to reference the result of dice rolls (e.g. such that the result could be used to calculate the degrees of success). After using your attack macro, you could then use a second macro, like this one , to calculate the degrees of success. e.g. &{template:default} {{name=Attack Result }} {{Rolled=[[ ?{Roll|10} ]] vs. [[ @{target|PD} ]] }} {{Successes=[[ ceil((?{Roll} - @{target|PD} + 0.01) / 5) ]] }}
1483536576
Dougansf
Pro
Sheet Author
You've already sold me on Power Cards.  :) What would I have to add there to make this happen?
1483545117

Edited 1483545417
Ah, right... :) Give this a try: !power {{ --name|Attack --Step|[[ ?{Step|9} ]] + [[ ?{Karma #|0} ]] Karma --Rolled|[! [^Roll] !] vs. [[ @{target|PD} ]] --Successes|[[ ceil(([$Roll] { #TalentX-MultiKarma } - @{target|PD} + 0.01) / 5) ]] }}
1483547686
Dougansf
Pro
Sheet Author
Silvyre said: Ah, right... :) Give this a try: !power {{ --name|Attack --Step|[[ ?{Step|9} ]] + [[ ?{Karma #|0} ]] Karma --Rolled|[! [^Roll] !] vs. [[ @{target|PD} ]] --Successes|[[ ceil(([$Roll] { #TalentX-MultiKarma } - @{target|PD} + 0.01) / 5) ]] }} Pasting that in as is, I'm getting no response from the system.   I'm not quite understanding how the Roll ID stuff works yet, but I suspect that might be the culprit.
1483548473

Edited 1483548795
You'll then need to either replace the #TalentX-MultiKarma call with [[{1e3, 14}<[[(?{Step}) % 22]] + floor((?{Step}) / 22)]]d20! + [[{0, 1, 1, 2, 6, 10}=[[(?{Step}) % 11]] - {-1, 1}>[[?{Step}]] + floor((?{Step} - 3) / 22)]]d10! + [[{0, 5, 9}=[[(?{Step}) % 11]] + {-1, 2}>[[?{Step}]] + floor((?{Step} - 3) / 22)]]d8! + [[{-1, 8}=[[(?{Step}) % 11]] - {0, 1, 5, 6}=[[(?{Step}) % 11]] + {0, 1}=[[?{Step}]] + 1]]d[[4 + 2 * {4, 8, 9, 10}=[[(?{Step}) % 11]] + 8 * ({2, 7}=[[(?{Step}) % 11]] * (1 - {-1, 2}=[[?{Step}]]))]]! - [[{-1, 2}>[[?{Step}]] * (3 - (?{Step}))]] + ?{Karma #}d6! or make TalentX-MultiKarma precisely this. Likely, the issue is that you have a pair of [[inline roll brackets]] around the above code within TalentX-MultiKarma. If this is the case, you would need to—after making the aforementioned adjustment to #TalentX-MultiKarma—replace all instances of #TalentX-MultiKarma with [[ #TalentX-MultiKarma ]] within all of your other macros.
1483548760
Dougansf
Pro
Sheet Author
That fixed it. Thanks again!
Great!
1483553028
Dougansf
Pro
Sheet Author
I don't suppose Power Cards can do adjustments to attributes?   That way I could get rid of Ammo and have one API to rule them all.  ;)
Dougansf said: I don't suppose Power Cards can do adjustments to attributes?  It cannot, unfortunately. I might suggest switching out Ammo for ChatSetAttr , which has a lot more functionality.