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

Change template on working macro

1556887384

Edited 1556918216
I'm using the community sheet for D&D 5e and have created some macros in the ability section of the sheet. (when I say "made", I mean copied others' macros and put them together. I barely know any macro programing) I've got this to work: /w gm &{template:default} {{name=@{rangedweaponname6}}}{{Attack = [[ 1d20cs>@{rangedweaponcritrange6} + [[@{rangedtohit6}]] + [[@{global_ranged_attack_bonus}]] ]] | [[1d20cs>@{rangedweaponcritrange6} + [[@{rangedtohit6}]] + [[@{global_ranged_attack_bonus}]] ]]}}{{Damage = [[@{rangeddmg6} + [[@{rangeddmgbonus6}]] + [[(@{global_ranged_damage_bonus})]] ]] @{rangeddmgtype6} }}{{Crit=Additional [[@{rangedcritdmg6}]] damage}} } But then, I wanted more! I want it to look like and do the same as the built in macro in the sheet (I'm using it for my monsters manual) After several hours searching and looking at other macros and guides, this is where I'm at now /w gm &{template:5eDefault} {{weapon=1}} {{title=@{rangedweaponname6} }} {{subheader=@{selected|character_name} • Ranged attack}}{{rollname=Attack}}{{roll=[[1d20cs>@{rangedweaponcritrange6} + [[@{rangedtohit6}]] + [[@{global_ranged_attack_bonus}]] ]] | [[1d20cs>@{rangedweaponcritrange6} + [[@{rangedtohit6}]] + [[@{global_ranged_attack_bonus}]] ]]}}{{damage=[[@{rangeddmg6} + [[@{rangeddmgbonus6}]] + [[(@{global_ranged_damage_bonus})]] ]] @{rangeddmgtype6} }}{{attackcancrit=1}}{{critdamage=Additional [[@{rangedcritdmg6}]] damage}} The two things I'm missing is that I want it to roll critical damage, and only when it's a crit. The other is that i want the same order of the rolls as the first macro.
I would look at the wiki page for the sheet you are using, and see which pre-defined classes there are to use - obviously damage is one, but you are using a 'custom' entry for your attack roll, and these templates tend to have an internal order that stuff comes out, with custom stuff comming at the end.
1556918481

Edited 1556918514
Aranador said: I would look at the wiki page for the sheet you are using, and see which pre-defined classes there are to use - obviously damage is one, but you are using a 'custom' entry for your attack roll, and these templates tend to have an internal order that stuff comes out, with custom stuff comming at the end. Thank you, I have tried. But I can't figure this out. As I said, I have used several hours searching and looking at other macros and guides. The problem is that I don't know much programing (added that to the post now), so it's hard for me to get help from lists of codes.
You are very close. The best way to unravel a macro is to click the button on the character sheet and then go into the chat and hit the up arrow. That will show you the code fro the roll that just took place. The Community sheet has roll buttons for attacks on the PC's so start with that. Looking at your macro the once thing I see missing that will fix most of your problems is the attack roll. Remove roll name and replace roll with attack and you should be golden.  Try this. /w gm &{template:5eDefault} {{weapon=1}} {{title=@{rangedweaponname6} }} {{subheader=@{selected|character_name} }} {{subheaderright=Ranged attack}} {{attack=[[1d20cs>@{rangedweaponcritrange6} + [[@{rangedtohit6}]] + [[@{global_ranged_attack_bonus}]] ]] | [[1d20cs>@{rangedweaponcritrange6} + [[@{rangedtohit6}]] + [[@{global_ranged_attack_bonus}]] ]]}}{{damage=[[@{rangeddmg6} + [[@{rangeddmgbonus6}]] + [[(@{global_ranged_damage_bonus})]] ]] @{rangeddmgtype6} }}{{attackcancrit=1}}{{critdamage=Additional [[@{rangedcritdmg6}]] damage}}
Ed S. said: You are very close. The best way to unravel a macro is to click the button on the character sheet and then go into the chat and hit the up arrow. That will show you the code fro the roll that just took place. The Community sheet has roll buttons for attacks on the PC's so start with that. Looking at your macro the once thing I see missing that will fix most of your problems is the attack roll. Remove roll name and replace roll with attack and you should be golden.  Try this. /w gm &{template:5eDefault} {{weapon=1}} {{title=@{rangedweaponname6} }} {{subheader=@{selected|character_name} }} {{subheaderright=Ranged attack}} {{attack=[[1d20cs>@{rangedweaponcritrange6} + [[@{rangedtohit6}]] + [[@{global_ranged_attack_bonus}]] ]] | [[1d20cs>@{rangedweaponcritrange6} + [[@{rangedtohit6}]] + [[@{global_ranged_attack_bonus}]] ]]}}{{damage=[[@{rangeddmg6} + [[@{rangeddmgbonus6}]] + [[(@{global_ranged_damage_bonus})]] ]] @{rangeddmgtype6} }}{{attackcancrit=1}}{{critdamage=Additional [[@{rangedcritdmg6}]] damage}} IT WORKED! And it fixed all the problems I had! Thank you so much Ed! :D