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 .
×

D&D Community Character sheet - weapon attack macro

1597510433

Edited 1597510531
Hi, I am fairly new to roll20 but I'm starting to get the hang of things with macros. I'm trying to set up a macro for my players, we're playing D&D using the community character sheet (I've seen several threads on this topic for OGL sheets). Essentially, I'm trying to set up a single token macro button, so that instead of going into the character sheet, the players click it, a box pops up asking for the input (i.e. weapon name), then macro then executes the selected attack roll.  Is this possible? From what I've seen, 'repeating' doesn't work in this sheet, so the only way I can think of doing this is setting up individual abilities for each weapon, and referencing those in yet another ability (and binding that as a token action) - but this seems very time-consuming. Any help would be much appreciated! Thanks.  
1597540978

Edited 1597543000
Oosh
Sheet Author
API Scripter
I'm not familiar with that sheet, but I would very strongly recommend you use Chat Menus instead of drop-down Queries. You will be entering a world of nested insanity that should only be navigated once you are extremely familiar with all the macros & formulae you're attempting to nest. After a quick look, weapons should be fine from a Chat Menu. The sheet buttons output something like this, example is the second melee weapon slot: &{template:5eDefault} {{character_name=@{selected|character_name}}} {{title=@{selected|meleeweaponname2}}} {{subheader=@{selected|character_name}}} {{subheaderright=Melee attack}} {{weapon=2}} {{simple=2}} {{rollname=Attack}} {{roll1=[[ 1d20cs>@{selected|meleeweaponcritrange2} + [[@{selected|meleetohit2}]] + [[@{selected|global_melee_attack_bonus}]] ]]}} {{weapondamage=[[@{selected|meleedmg2} + [[@{selected|meleedmgbonus2}]] + [[(@{selected|global_melee_damage_bonus})]] ]] @{selected|meleedmgtype2}}} {{weaponcritdamage=Additional [[@{selected|meleecritdmg2}]] damage}} @{selected|classactionmeleeweapon}} @{selected|ro_melee2} @{selected|classactionmeleeweapon} So, the way I would suggest is: 1) Create a macro character sheet , called Macros 2) Save the above as an Ability macro called MeleeAttack2, on Macros 3) Create another Ability called WeaponMenu, again on Macros 4) enter this into it and save: /w gm &{template:default}{{name=Weapon Menu}}{{1=Attack 1}}{{2=[@{selected|meleeweaponname2}](~Macros|MeleeAttack2)}}{{3=Attack 3}} This is a quick example, with just one working button, of how to put one of these menus together. See if it looks like something you can use, anyway - you need a token linked to a character sheet selected to run it. It currently whispers to the GM because it's just a test, you'd want an actual menu to be whispered only to the person using it. Spells seem to be repeating items, which is a bit easier. You should be able to create a button with this syntax: [@{selected|repeating_spellbookcantrip_$0-roll_spellname}](~selected|repeating_spellbookcantrip_$0-roll_SpellCast) This will create a button for the first Cantrip in the selected token's spellbook. The $1 is the second entry, and so on. Level 1 spells then look like this, starting at the first entry: [@{selected|repeating_spellbooklevel1_$0-roll_spellname}](~selected|repeating_spellbooklevel1_$0-roll_SpellCast) Then $1, $2, $3.... then on to level 2 etc. etc.
Hi Oosh, thanks for the reply! Much appreciated - this seems to work. I suspected I would need to set up individual macros per weapon, but the Macro sheet is a great shout, it means I only have to do it once! Thank you. 
1597588416

Edited 1597588653
Oosh
Sheet Author
API Scripter
No problem! Yep, it seems like those melee & ranged attacks reference everything by @{attribute} calls - once you have it set up it should work universally. Oh - there's also a thread here which might be handy. It's specifically about NPC and Spell menus for 5e with the official sheet, so the Attribute & Ability names are different, but still some handy info in there for building chat menus.
Mate V. I was trying to do something similar with skill checks, for 5e.  I found a drop down code in the forums for ability checks and then altered it.  I created a new  ability on each characters sheet I called "Skill-Checks", pasted the code below and then enabled in the show as a token action.  Not sure if you wanted something like that next.  Likely there is already something out there that is cleaner but I could not find it and those I could I did not like.  @{selected|wtype}&{template:simple} @{selected|rtype}?{Skill|Acrobatics,+[[(@{selected|acrobatics_bonus})]] ]]}} {{rname=^{acrobatics-u}}} {{mod=[[ [[(@{selected|acrobatics_bonus})]] ]]}} {{r1=[[@{selected|d20}+[[(@{selected|acrobatics_bonus})]] ]] |Animal Handling,+[[(@{selected|animal_handling_bonus})]] ]]}} {{rname=^{animal_handling-u}}} {{mod=[[ [[(@{selected|animal_handling_bonus})]] ]]}} {{r1=[[@{selected|d20}+[[(@{selected|animal_handling_bonus})]] ]] |Athletics,+[[(@{selected|athletics_bonus})]] ]]}} {{rname=^{athletics-u}}} {{mod=[[ [[(@{selected|athletics_bonus})]] ]]}} {{r1=[[@{selected|d20}+[[(@{selected|athletics_bonus})]] ]] |Deception,+[[(@{selected|deception_bonus})]] ]]}} {{rname=^{deception-u}}} {{mod=[[ [[(@{selected|deception_bonus})]] ]]}} {{r1=[[@{selected|d20}+[[(@{selected|deception_bonus})]] ]] |History,+[[(@{selected|history_bonus})]] ]]}} {{rname=^{history-u}}} {{mod=[[ [[(@{selected|history_bonus})]] ]]}} {{r1=[[@{selected|d20}+[[(@{selected|history_bonus})]] ]] |Insight,+[[(@{selected|insight_bonus})]] ]]}} {{rname=^{insight-u}}} {{mod=[[ [[(@{selected|insight_bonus})]] ]]}} {{r1=[[@{selected|d20}+[[(@{selected|insight_bonus})]] ]]|Intimidation,+[[(@{selected|intimidation_bonus})]] ]]}} {{rname=^{intimidation-u}}} {{mod=[[ [[(@{selected|intimidation_bonus})]] ]]}} {{r1=[[@{selected|d20}+[[(@{selected|intimidation_bonus})]] ]] |Investigation,+[[(@{selected|investigation_bonus})]] ]]}} {{rname=^{investigation-u}}} {{mod=[[ [[(@{selected|investigation_bonus})]] ]]}} {{r1=[[@{selected|d20}+[[(@{selected|investigation_bonus})]] ]] |Medicine,+[[(@{selected|medicine_bonus})]] ]]}} {{rname=^{medicine-u}}} {{mod=[[ [[(@{selected|medicine_bonus})]] ]]}} {{r1=[[@{selected|d20}+[[(@{selected|medicine_bonus})]] ]] |Nature,+[[(@{selected|nature_bonus})]] ]]}} {{rname=^{nature-u}}} {{mod=[[ [[(@{selected|nature_bonus})]] ]]}} {{r1=[[@{selected|d20}+[[(@{selected|nature_bonus})]] ]] |Perception,+[[(@{selected|perception_bonus})]] ]]}} {{rname=^{perception-u}}} {{mod=[[ [[(@{selected|perception_bonus})]] ]]}} {{r1=[[@{selected|d20}+[[(@{selected|perception_bonus})]] ]] |Performance,+[[(@{selected|performance_bonus})]] ]]}} {{rname=^{performance-u}}} {{mod=[[ [[(@{selected|performance_bonus})]] ]]}} {{r1=[[@{selected|d20}+[[(@{selected|performance_bonus})]] ]] |Persuasion,+[[(@{selected|persuasion_bonus})]] ]]}} {{rname=^{persuasion-u}}} {{mod=[[ [[(@{selected|persuasion_bonus})]] ]]}} {{r1=[[@{selected|d20}+[[(@{selected|persuasion_bonus})]] ]] |Religion,+[[(@{selected|religion_bonus})]] ]]}} {{rname=^{religion-u}}} {{mod=[[ [[(@{selected|religion_bonus})]] ]]}} {{r1=[[@{selected|d20}+[[(@{selected|religion_bonus})]] ]] |Sleight of Hand,+[[(@{selected|sleight_of_hand_bonus})]] ]]}} {{rname=^{sleight_of_hand-u}}} {{mod=[[ [[(@{selected|sleight_of_hand_bonus})]] ]]}} {{r1=[[@{selected|d20}+[[(@{selected|sleight_of_hand_bonus})]] ]] |Stealth,+[[(@{selected|stealth_bonus})]] ]]}} {{rname=^{stealth-u}}} {{mod=[[ [[(@{selected|stealth_bonus})]] ]]}} {{r1=[[@{selected|d20}+[[(@{selected|stealth_bonus})]] ]] |Survival,+[[(@{selected|survival_bonus})]] ]]}} {{rname=^{survival-u}}} {{mod=[[ [[(@{selected|survival_bonus})]] ]]}} {{r1=[[@{selected|d20}+[[(@{selected|survival_bonus})]] ]] }}} {{global=@{selected|global_save_mod}}} @{selected|charname_output} This made a real simple drop down of all the skill checks for the new players I have.  I did not try to make this in the macro but from what I read with the ability check code I borrowed from if you do that you cannot reopen it otherwise the code changes. Good luck, Tyler