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

Difficulties with Macros

I'm clearly missing something but for the life of me I don't know what. I've been trying to get the custom power cards macros to work. I took the example macro from here , added the requested attributes of STR, Half Level Mod, and Weapon Prof to the character I wanted to give the macro to and set it as a token action. When I click the button for the macro literally nothing happens. Any guesses as to what I'm doing wrong?
The custom power cards requires the API which is a mentor level feature.
You have to be a Mentor and add the power card script to the API section of the campaign.
Thank you both very much. Just upgraded my account and installed the script. When I take the example from here and copy and paste it directly into a character with the defined values here is the output I get: It doesn't quite look right. I reread the code and as far as I can tell it should be running, but I'm no computer programmer. Any guesses what I did wrong this time?
There's been a few changes and the wiki isn't updated. Here's the most current info about that script: <a href="https://app.roll20.net/forum/post/673780/script-cu" rel="nofollow">https://app.roll20.net/forum/post/673780/script-cu</a>... In short, I added a --format|dnd4e tag that adds the --defense| tag after the attack roll. Without --format|dnd4e it will just do the attack roll and whatever you put after it. So you can either use the format tag or use --attack|[[1d20]] vs AC --damage|[[1d6]] slashing damage The dmgtype| tag is not used at all anymore, just fyi.
Hi Honeybadger, Thanks for the info. I've been working on figuring out the macros today and I'm making progress but I did have a question about one of the monster powers I'm trying to program. The monster in question is a Kobold Slinger and one of his powers is "Special Shot". Here's the description from DDI: Special Shot (weapon) At-Will (3/encounter) Attack: Ranged 20 (one creature); +8 vs. AC Hit: 1d6 + 5 damage plus one of the following effects (roll a d6): 1-2 Stinkpot: The target takes a -2 penalty to attack rolls (save ends). 3-4 Firepot (fire): The target takes ongoing 2 fire damage (save ends). 5-6 Gluepot: The target is immobilized (save ends). So I managed to get this far with the macro: !power --name|Special Shot --usage|At-Will (3/encounterl) --action|Standard Action --Keywords|Weapon --Target|Ranged 20 (one creature) --attack|[[1d20+8]] vs. AC --Hit|[[1d6+5]] damage plus one of the following effects [[1d6]] --^ 1-2 Stinkpot|The target takes a -2 penalty to attack rolls (save ends). --3-4 Firepot (fire)|The target takes ongoing 2 fire damage (save ends). --5-6 Gluepot|The target is immobilized (save ends). Would there be a better way to display the ammo than the way I've done? I don't know if its possible to have the macro return a result from a range like if 1d6=1-2 then display Stinkpot: The target takes a -2 penalty to attack rolls (save ends), if 1d6=3-4 then display Firepot...etc.
You could make a table for the pots and reference that instead.
Hi HoneyBadger, Thanks, that makes sense and I think it would work. Problem, I can't figure out how to call a roll table from within an ability macro. I've watched two videos, read wikis, and several forum posts but no luck. This is starting to make me feel really dense. :(
/r 1t[nameoftable]
Hi Al, Thanks for the info. This is what I have entered into the ability right now: !power --name|Special Shot --usage|At-Will (3/encounterl) --action|Standard Action --Keywords|Weapon --Target|Ranged 20 (one creature) --attack|[[1d20+8]] vs. AC --Hit|[[1d6+5]] damage plus the following effect... /r 1t[Kobold-Special-Shot] And this is the result I see when I run the ability: I guess this kind of works, but not really. I was hoping to have the results of the table roll displayed as part of the hit text. Is that possible?
1401202842

Edited 1401202866
Use [[1t[Kobold-Special-Shot] ]] in the power card. Or something like that. I don't use tables much.
Hey HoneyBadger, Tried that and this is the result I got: I'm starting to think that what I'd like to do isn't possible. Rerolling does not hcange the 0 next to effect.
It should be possible....I use rollable table text on my character sheet. Unfortunately I don't have mentors and powercards to figure out what not working for you. But don't lose hope as it should be doable. Have you tested your table outside of the powercard to make sure it outputs correctly there?
Hi Tinker, If you look at my next to last post that is the result I get when rolling the table. It does display the result but it's not formatted nicely. It works, but would be better if I could generate the result inside the power card.
1401249575

Edited 1401249979
Lithl
Pro
Sheet Author
API Scripter
Testing with a table intended to produce numbers, the output is correct. Testing with a table intended to produce text, I encounter the problem you're experiencing. The buildInline function wasn't even designed with tables in mind, so I'm half surprised it works for numeric tables. However, it's definitely the source of the problem. I can't tell you at a glance exactly where the problem is occurring, but it's certainly that the string is being coerced into being a number, most likely by an arithmetic operation. (+'foo' == NaN, parseInt('foo') == NaN, but 'foo'|0 == 0) EDIT: If the strings in the table begin with a number, the output will be that number, so this is definitely the result of converting strings to integers.
I've noticed what seems to be a bug in the power cards, maybe? Sometimes the roll results from the abilities does not display in the chat bar on the right. Neither does it display the card itself. When I check the API console I have the following error: Your scripts are currently disabled due to an error that was detected. Please make appropriate changes to your scripts and click the "Save Script" button and we'll attempt to start running them again. More info... For reference, the error message generated was: Infinite loop or long running process detected. I've tried disabling and reenabling the script but that doesn't seem to help. Has anyone some advice to offer?
I may have found the source of the error. A power I created for the skeleton warriors seems to be the culprit. Here's the code: !power --name|Speed of the Dead --usage|At-Will --action|Opportunity Action --Description|When making an opportunity attack, the skeleton warrior gains a +2 bonus to the attack roll and deals an extra 1d6 damage. --attack|[[1d20+12]] vs AC --Hit|[[1d8+2+1d6]] damage. Can someone tell me what I did wrong?