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

[DnD 4e] Using "Bloodied" as a Trigger / Condition for Macros

Hello! Basically, I'm looking for an assist with implementing the suggestions found in the Dungeons & Dragons 4th Edition Wiki Guide, here .  Now, as far as I can tell, you're supposed to add a GM Global Macro that looks like so (quotes for what I inputted, exactly as, including spacing): Name (Don't include the # or spaces in the name) "Is-Bloodied" Actions (One command/roll per line) "{{@{selected|HP|max} - (2 * @{selected|HP}) , 0}k1, 0d1+1}kl1." Following, set it  so that, Visible to Players (Optional) was "All Players" Cool deal.  Now, I than go to the Creatures sheet (in this case, a Gnoll Fang of Yeenoghu), and look to set up the Macro.  The basic idea is ("'s start where the paste begins...): Attack line: " /roll d20 + 3 + [[ (#Is_bloodied * 2) ]][bloodied] vs AC: @{target|target1|AC} " Damage line: " /roll d20 + 3 + [[ (#Is_bloodied * 2) ]][bloodied] vs AC: @{target|target1|AC} " The above did not work.  I get a little message of, "SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but "#" found." If I remove the spaces at the front and end of the macros, I get, "SyntaxError: Expected "d", "k", "x", [0-9] or [>|<|=] but "." found." Does anyone have any suggestions or thoughts on where I'm going wrong with this?  I've also tried making a substitution of this into an /emas attack set (with the @{selected|token_name} and @{selected|atk} and the target variations, but I keep getting the same results.
1455998767

Edited 1455998774
I see a period at the end of "{{@{selected|HP|max} - (2 * @{selected|HP}) , 0}k1, 0d1+1}kl1 . " which should be deleted.
1456062662

Edited 1456062736
Silvyre said: I see a period at the end of "{{@{selected|HP|max} - (2 * @{selected|HP}) , 0}k1, 0d1+1}kl1 . " which should be deleted. @Silvyre - You know, I honestly thought I was being trolled when you first replied so I decided to give it 12 hours.  Now, I'd been awake for WAAAAY too long, and so I eventually crashed and woke up about 4 hours ago.  I've been playing around with the macros in design, and you know what?  I finally got it working.  I have no idea (!) if in fact, that was exactly what I needed to change, just remove the period.  Dear unholy gawd, that was frustrating!  Thanks very much for your reply, it's so strange for me - not having any coding experience or experience with macros prior to Roll20 - to try and interpret where the failing is in a string of characters, a command line, what have you.  Just because  it took me what felt like far to long to figure work this out, I'm going to post the macros as written here. Thanks again! Name: Was named " Is-Bloodied " where I'd just hit space and Roll20 auto-filled in a hyphen.  Now changed to be " Is_bloodied " to exactly match the wiki Actions: Not sure what I changed here, but currently reads, "{{ @{selected|HP|max} - ( 2 * @{selected|HP}) , 0}k1, 0d1+1}kl1" It may have actually had the period at the end previously, or not, I honestly can't recall.  I did once again remove spaces at the front and end of the line, though I'm going to check to see if that actually matters (I've been told it shouldn't).  Still not showing it in my macro bar or listing as a token action, but is Visible To Players ( Optional ) " All Players " The first confirmed macro with "/emas" in place: Macro Name: " Cudgel_of_Bloody_Teeth " Macro Description / Actions: " /emas @{selected|token_name} bashes for [[d20+@{selected|Atk}]] + [[ (#Is_bloodied * 2) ]][bloodied] to hit vs @{target|token_name}'s AC @{target|ac} and deals [[@{selected|Dmg}]] + [[ (#Is_bloodied * 2) ]] damage "
Just a note /emas can only be used by the DM, so if you wanted players to be able to use the macro, you would need to change that to /em which is not as pretty in the output, I know.
Ed S. said: Just a note /emas can only be used by the DM, so if you wanted players to be able to use the macro, you would need to change that to /em which is not as pretty in the output, I know. Oh no, I got that.  The hardest part for me was realizing what exactly "emas" meant (I do a lot of roll20 stuff when I'm exhausted, :P)
1456078711
Pat S.
Forum Champion
Sheet Author
"/emas" just is shorthand for emote as. "/em" or "/me" is the emote command for players.
Pat S. said: "/emas" just is shorthand for emote as. "/em" or "/me" is the emote command for players. Yeah, I know now, but a week or three ago, it was one of those things I'd look at and try to remember the meaning / reasoning behind it.  Apparently you have to read between the lines occasionally, heh.  :)