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 .
×
Why do rogues wear leather armor? Because it’s made of hide. 🥷

I have no idea what to do anymore, help

New-ish to Roll20. New to Macros. New to API. I've always been a pen & paper player, so learning Roll20 with a homebrew system was an  awful idea. I've set up some macros that call on the players attributes and checks it against the target's AC, and rolls damage. That's the most successful I've been. I tried to use APIs like Tokenmod to change a token bar value, but they only work when typing them directly in chat, one line at time. APIs in macros don't do anything besides making a small blue bar in chat. I'd post examples, but it's literally just other examples I've seen & tinkered with on forms. Any tutorials are mostly about custom APIs, and I can't even guess how to use standard ones correctly. Is there any good "Macros & API for complete idiots" guide? How do you use API lines like " !token-mod --set bar2_vaule|-2  " and include rolls in the same button press?
1601849533
GiGs
Pro
Sheet Author
API Scripter
I understand your frustration. I can be pretty hard to get to grips with. That said, you're not going to get very good help unless you do post the code you've tried, even if its the same as others have used. We cant know what is going wrong for you specifically without seeing what you've tried. You absolutely must post one of the your macros where this doesnt work: I tried to use APIs like Tokenmod to change a token bar value, but they only work when typing them directly in chat, one line at time. APIs in macros don't do anything besides making a small blue bar in chat. I'd post examples,  This should work fine, so we need to see your macro. Note that all a macro does is paste its contents into chat exactly  as if you'd typed them. They is no difference between typing something into chat, and using a macro to print it into chat. Except the latter saves some typing. So please post one of your macros that is making a small blue bar in chat, and we can help you get it working. How do you use API lines like " !token-mod --set bar2_vaule|-2  " and include rolls in the same button press? What roll do you want to use with it, and how do you want to apply it? Note that there is a typo in the above code. bar2_vaule should be bar2_value.
I've deleted and rewritten a few macros about 10 times, but like I said it's literally what other users post with minor changes. On an old post, The Aaron put this code that should work for checking to see if attack rolls hit: !roll attack: [[1d20+@{Melee Tab} --ge @{target|AC} !roll-if attack [[1d10+@{Melee Dam}]] I made a few adjustments for calling my player's attributes: !roll attack: [[1d20+@{selected|STR} --ge @{target|AC} !roll-if attack [[1d10+@{selected|STR}]] And nothing happens.
1601851910
GiGs
Pro
Sheet Author
API Scripter
I'm not familiar with that script, so I cant test it. Can you link it? In the meantime, lets focus on getting token mod working the way you want for now. You said you couldnt get it working from a macro - what was the macro text?
Honestly: No idea what script it's from, no specific one was mention in that post anywhere. But on to another one: A wizard casts a firebolt at you. The first line works in this macro removes your Magicka (a TES homebrew system) for casting the spell, while the second line rolls to hit and lists your AC. Together, only the second line functions. !token-mod --set bar2_value|-2 /roll 1d20+@{selected|INT} vs @{Target|AC}
1601853184
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Two things: The second line is not a valid roll expression, containing more than just a die roll. The first line requires that the token-mod API script be installed in the campaign. If you have verified token-mod, try this: !token-mod --set bar2_value|-2 [[1d20+@{selected|INT}]] vs @{Target|AC}
Token-mod has been installed already, and the only change is that the total is shown rather than the roll+the wizards bonus (no biggie). The value of bar2 is still unchanged
1602971868
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hmm. It is definitely working on a test token for me. Is that a) the entirety of the macro, and b) performed while the token to be changed is selected? And also, have you verified that other API scripts are functioning? I have seen reports of silent API sandbox crashes.
I gave up on Tokenmod, ChatSetAttr works for what I need, like this Firebolt spell: !modbattr --name Hannibal Aaventus --mp|-2 /roll [[1d20+@{INT}+1]] vs @{target|AC} /roll [[1d6+@{INT}+1]] and this Cure Wounds: !modbattr --name Hannibal Aaventus --mp|-5 !modbattr --sel --HP|+[[1d6+@{Hannibal Aaventus|INT}]] I'm not sure if there is a "target" function for ChatSetAttr, but this works for what my players & I need