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

A Basic Catchall Attack Macro (With Template)

1596884701

Edited 1596885317
I've been having a lot of troubles, ladies and gentlemen for some time. Effectively, I've been seeking a way to make a macro which can roll damage for most NPCs (and perhaps initiative). Fortunately I'm using Open Legend so it appears to be pretty easy. While I'm able to make a macro to do just this, it's doing it *without* the template. Which while it works, I think we all can agree it just doesn't look nearly as cool. <a href="http://prntscr.com/tw6m1k" rel="nofollow">http://prntscr.com/tw6m1k</a> It's as simple as a macro can get, but works functionally. (/roll @{selected|agility_dice_roll}) I can select any token on the board and simply click on the macro up at the top left corner of my screen. But aesthetically it isn't nearly as pleasing as the following: <a href="http://prntscr.com/tw6lri" rel="nofollow">http://prntscr.com/tw6lri</a> I wish the merge the two, but haven't been able to despite how much research I've done. I feel like I've gotten close several times, but no luck. I've searched the internet and have found subjects *similar* but not quite on the nose.
1596889048
The Aaron
Roll20 Production Team
API Scripter
The easiest way to get the template format is to do a roll from the sheet with the format you want, then click in the chat box and push the up arrow key. That will load the precious message's contents into the chat box. You can then copy it out and make modifications for the output you want and paste it in a macro.&nbsp;
1596914918

Edited 1596914984
I'm aware, but every time I edit it I receive errors of some variety, I believe I just simply don't have the in depth understanding of how it all functions, even after extensively looking up the wiki and reading posts regarding it. What I could potentially do without a doubt is do as you said and make an ability limited only to that token. But I want a single macro which applies to all tokens. Modifying it in such a way only makes a macro for that one specific token. I could make one for each token, but I'd prefer to have something easier for future reference. I'll keep messing around with it to see if I can make it work, but after hours of trying things aren't looking up.
1596917804
GiGs
Pro
Sheet Author
API Scripter
The solution here is simple: post the code you have tried that isnt working, and we can help you fix it. We cant help without code.
1596919425

Edited 1596919617
It's adapted, evolved, scrapped, redone and retried. But from what I'm seeing it's just simply because I don't understand how it works on a basic level. I'm no coder, no designer. I understand some of what it's telling me, but there's a clear hole in my knowledge to get to the job done (assuming it's even possible.) Starting all over again, this is what I'm dealing with: @{???|tab_chat}&amp;{template:openLegend@{???|template_border}} {{title= Agility Roll}} {{subTitle= @{???|character_name}}} {{roll= @{???|agility_dice_roll}}} It works, but *only* for ??? and no one else. I've tried replacing it with the character call tag (whatever you call the thing which takes the name) and it just brings up an error. I clearly don't have the experience or knowledge to be able to edit it properly to make it work for any token. Honestly, I'm just about to call it quits. It'd almost be easier at this point just to make a macro for every single NPC. I've spent most of my waking hours on this for the past few days. T-T
1596920256

Edited 1596920302
GiGs
Pro
Sheet Author
API Scripter
Don't worry - your frustration is understandable, we've all been there. When you start getting frustrated, come to the forums and post your code. We'll get you sorted. Do you have a character that is called ??? , or are you using that as some kind of placeholder? Try this: create a token for a different character, and make sure in the token settings, that token is set to represent a character (there is a Represents dropdown). Then try this code: @{selected|tab_chat}&amp;{template:openLegend@{selected|template_border}} {{title= Agility Roll}} {{subTitle= @{selected|character_name}}} {{roll= @{selected|agility_dice_roll}}} I'm not familiar with the openLegend sheet, but if your code is the actual code from a working sheet, the above should work. If it doesnt, take a screenshot of whatever errors pop up and post them here.
I'll try it here soon, and to answer your question I have a character named ??? for testing purposes. I decked him out like a real character, and I have several NPCs to test with as well.
I've tested it, and it seems to be functional even without the character having a default token. Which is good as I intend to mostly use it with various different NPCs. Most attack methods utilize strength or agility in Open Legend, so this will effectively reduce the amount of time I have to go through to make macros for each individual character, or worse, have to resort to going into the character sheet each time. I've yet to witness any bugs thus far. I've tested it on mooks, characters, notable NPCs, all seems well! I knew there just had to be a way to do it, and your code looks so simple. I'll have to study coding more so I can figure things out myself. Thank you so much for this diamond! I can edit it to utilize other commonly used statistics as well! Absolutely wonderful! I'll be sure to post again if any other problems arise.
1596925459
GiGs
Pro
Sheet Author
API Scripter
Yay :) We'll be here if you have new problems.