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

Is there a way to strip [[ ]] off of an attribute?

1678568591

Edited 1678568742
I'm playing a game of D&D 5e. On my character sheet, I've set up global attack modifiers for things like Bless. When I have none checked, the value of  @{Character Name | global_attack_mod}  is the empty string. When I check Bless, it becomes  [[1d4[Bless]]] . For one of my attacks, I get to add 1d4 to the roll. I'm trying to write a macro that will use the same result of the 1d4 for both rolls when I attack with advantage/disadvantage. Here's what I've got so far: @{Character Name | wtype}&{ template :atkdmg} {{mod =+ @{Character Name | spell_attack_bonus} }} {{rname = Warhammer}} {{r1 = [[@{Character Name | d 20} cs> 20 + @{Character Name | charisma_mod}[ CHA ] + @{Character Name | pb}[ PROF ] ]]}} @{Character Name | rtype} cs> 20 + @{Character Name | charisma_mod}[ CHA ] + @{Character Name | pb}[ PROF ] ]]}} {{attack = 1}} {{damage = 1}} {{dmg1flag = 1}} {{dmg1 = [[1 d 8 + @{Character Name | charisma_mod}[ CHA ] ]]}} {{dmg1type = Bludgeoning}} {{crit1 = [[8[ CRIT ] ]]}} {{globalattack = [[1 d 4[ Weird Thing ] + @{Character Name | global_attack_mod}]]}} {{globaldamage = [[0]]}} {{globaldamagecrit = [[0]]}} {{globaldamagetype = @{Character Name | global_damage_mod_type} }} @{Character Name | charname_output} Since it looks like the ways of reusing rolls without paying for API access are unintended and might be patched, I put the extra 1d4 into  globalattack . However, this hides the description for Bless. When I mouse over the bonus, I see this text: Rolling 1d4[Weird Thing] + 2 = (1)+2 This is because  globalattack  expands to [[1d4[Weird Thing] + [[1d4[Bless]]]]] And the extra  [[   ]]  around  1d4[Bless]  means that I only see the result. Is there a way to remove those brackets, so that I can see the descriptions of both things? Since this bonus always applies to this attack and never applies to any other attacks, I don't want to add it as a global attack modifier that I have to keep checking/unchecking. If there are other ways to use the same result of the 1d4 that are intended behaviour, I'd also appreciate hearing about those options.
Side note: It also slightly bothers me that, when no global modifiers are selected, I wind up with Rolling 1d4[Weird Thing] + = (1) which has an extra + just sitting there. But since I think there's no free way to do an if/else, and even if there were, I think I'd need my conditional to be based on whether  @{Character Name | global_attack_mod}  is the empty string? So if there's a way to do this without using  globalattack , that's probably best.
1678570804

Edited 1678571269
Gauss
Forum Champion
No, you cannot strip them out.  As for doing them without using the Global Attack Modifier, you could include Weird Thing in the attack roll itself (section labelled "r1"). Or put it in the description section. Also, where are you getting the information that reusing rolls is going to be patched? 
Putting Weird Thing into r1 and r2 causes it to reroll the d4 for the two attack rolls, which is wrong here. The description is a reasonable place for this to go. The wiki page on reusing rolls says something like "this is event behavior that might not be intended, so it might get patched". Certainly not a guarantee, but I feel iffy using a feature that isn't explicitly intended.
1678583887

Edited 1678584086
Gauss
Forum Champion
That statement was made a couple years ago. And the wiki is written by users, not Devs. My guess is that yes, it could be eliminated at some point in the future, but that is unlikely now considering how often people are reusing rolls. I (re)use them all the time.  If the Devs patched that it would break MANY macros. There are many aspects to Roll20 that are "not explicitly intended" and yet people use them without issues.