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

Upgrading from the current macro format I use, allows commas?

I've been using the following format for just about any macro that involves multiple options from one feature: Battlemaster Maneuvers, Channel Divinity, etc. Here's what it looks like for the Sea Sorcerer. ?{Curse of the Sea| Curse, **Cursed!** After hitting the enemy with a cantrip’s attack or when a creature fails a saving throw against your cantrip you can curse the target until the end of your next turn or until you curse a different creature with this feature. | Cold Damage, **Blood runs cold...** If the affected target takes cold damage from your spell the target’s speed is also reduced by 15 feet until the end of your next turn. If the spell already reduces the target’s speed use whichever reduction is greater. | Lightning Damage, **In for a shock** If the affected target takes lightning damage from your spell the target takes additional lightning damage equal to your Charisma modifier ([[@{charisma_mod}]]) | Forced Movement, **To move mountains** If the target is moved by your spell increase the distance it is moved by 15 feet. } One problem I've had with it for a long time is that I can't use commas (since it just terminates the text at that point), so I have to rewrite all text so that there aren't any commas. This isn't a huge deal, but I was wondering if there's a way to use this format without this limitation, or if there's another format I can use instead that's better.
If you use , for each comma, the query will not break and can be used how you want. But it makes it less appealing to the eyes when setting up the macro. Also if this is a global macro as opposed to a character ability, you will not be able to re-open the macro without the editor eating all of these encoded values. If this is something you fear may happen, I highly recommend maintaining the macro outside of Roll20 like in a text editor such as Notepad++
Kyle G. said: Also if this is a global macro as opposed to a character ability, you will not be able to re-open the macro without the editor eating all of these encoded values. Sorry, I don't know exactly what this means.
A macro (#MACRO) is created in the Collection tab (the tab right next to the cog wheel in the top-right corner inside the VTT). A character ability, on the other hand is specific to an individual character and is created in the Attributes & Abilities tab for the character. Because of the way the text editor of roll20 works, html encoded values (such as ,) will be converted to their equivalent values (,) as soon as you close the editor. This is expected, but as soon as you re-open the text editor for the macro this value will now show as the equivalent value (,) instead of the encoded value (,)
Oh I think I get it. So if I use the encoded value on a macro in the collection tab, they'll all convert to commas, but if I do it as a character ability they'll be fine?
Exactly
1512444070

Edited 1512445146
If it helps I needed to make a macro for this exact thing already which you can use if you want to save yourself the hassle of converting the HTML. It has the curse if cantrip and the extra effects of spell types built in as well. It's made for the 5e OGL sheet but it'd be pretty easy to convert it to a different one if you don't use that sheet. @{wtype} &{template:desc} {{desc=CotS: ?{Spell Type|Cantrip, <NAME> can apply Curse of the Sea to @{target|character_name}?{Damage Type|Cold, ***and*** @{target|character_name} has -15 ft speed until the end of <NAME>'s next turn if they were already cursed|Lightning, ***and*** @{target|character_name}'s damage is increased by <NAME>'s Charisma modifier if they were already cursed|Movement, ***and*** @{target|character_name} is moved an additional 15ft if they were already cursed|Other,. }|Spell, ?{Damage Type|Cold, @{target|character_name} has -15 ft speed until the end of <NAME>'s next turn if they were cursed|Lightning, @{target|character_name}'s damage is increased by <NAME>'s Charisma modifier if they were cursed|Movement, @{target|character_name} is moved an additional 15ft if they were cursed}} }} See the properly done code below.
Kyle make sure you put amp; between the & and # so that the forum doesn't eat the HTML encoding.
Kyle G. said: Kyle make sure you put amp; between the & and # so that the forum doesn't eat the HTML encoding. I always forget this bit haha @{wtype} &{template:desc} {{desc=CotS: ?{Spell Type|Cantrip, <NAME> can apply Curse of the Sea to @{target|character_name}?{Damage Type|Cold, ***and*** @{target|character_name} has -15 ft speed until the end of <NAME>'s next turn if they were already cursed|Lightning, ***and*** @{target|character_name}'s damage is increased by <NAME>'s Charisma modifier if they were already cursed|Movement, ***and*** @{target|character_name} is moved an additional 15ft if they were already cursed|Other,.  }|Spell, ?{Damage Type|Cold, @{target|character_name} has -15 ft speed until the end of <NAME>'s next turn if they were cursed|Lightning, @{target|character_name}'s damage is increased by <NAME>'s Charisma modifier if they were cursed|Movement, @{target|character_name} is moved an additional 15ft if they were cursed}} }} That should  be right.
1512460173

Edited 1512460195
Wow, that's actually really cool. Is there anywhere that breaks down macro stuff like this, because I want to add this "select a token" thing into more of my macros.
1512476393
Ziechael
Forum Champion
Sheet Author
API Scripter
The basics of it are covered in the  wiki , specifically  here . With those fundamentals you can really begin to explore the rabbit hole of macro building! Good luck!