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

Create macro rolls from D&D 5E character sheet, without selected token

August 02 (5 years ago)

Edited August 02 (5 years ago)

I've only got one character sheet. Is it possible to create a macro in which I can select the ability check, and it rolls the skill with the correct bonuses (as filled out in the character sheet), without selecting the token itself?


The character sheet name is Abyzou, and the character has proficiency in the deception & perception skills, jack of all trades is active and has expertise on deception (in which a roll lower than 10 is always counted as a 10). Dragging the skill-check to the macro list doesn't work. I can't re-add the character sheet atm as I'm not the GM in this game.


I've tried to start simple, so with insight (only jack of all trades), perception (only PB) and deception (PB, expertise, no rolls lower than 10):

/roll [[1d20 + @{Abyzou|insight} ]]

/roll [[1d20 + @{Abyzou|deception} ]] /roll [[1d20 + @{Abyzou|perception} ]]


But this gave the error "No attribute was found for @{Abyzou|deception}" after which only a 1d20 was rolled. No bonuses.

This works:

[[1d20+[[@{Abyzou|PB}]]+[[@{Abyzou|charisma_mod}]]]]

But I'd have to manually add all the bonuses etc., and changing 'charisma_mod' to 'persuasion_mod' or 'persuasion' doesn't work.


Ideally I would have a macro which first asks if I've got advantage/disadvantage/normal, then asks for the skill I want to check (persuasion or perception for example) after which it rolls with the correct bonuses; in the chat some kind of text is visible besides the result of the roll as well, for example: 'Abyzou is looking around and rolled [20]'. I'd like a second macro with attack + damage with the filled-in weapons and a third where I can select a spell as well. But getting the ability checks working is a great start haha.


Is such a thing possible? Thanks in advance :)


August 02 (5 years ago)

Edited August 02 (5 years ago)
Oosh
Sheet Author
API Scripter

You can do this in a drop-down menu, but it gets complicated pretty quickly due to nesting & HTML replacement. Here's a skill check menu:

&{template:simple} @{rtype} ?{Skill|
Acrobatics,+@{acrobatics_bonus}@{pbd_safe}]]}} {{rname=^{acrobatics-u}}} {{mod=[[@{acrobatics_bonus}@{pbd_safe}[ACRO]]]}} {{r1=[[@{d20}+@{acrobatics_bonus}@{pbd_safe}[ACRO]]]|
Animal Handling,+@{animal_handling_bonus}@{pbd_safe}]]}} {{rname=^{animal_handling-u}}} {{mod=[[@{animal_handling_bonus}@{pbd_safe}[ANIM]]]}} {{r1=[[@{d20}+@{animal_handling_bonus}@{pbd_safe}[ANIM]]]|
Arcana,+@{arcana_bonus}@{pbd_safe}]]}} {{rname=^{arcana-u}}} {{mod=[[@{arcana_bonus}@{pbd_safe}[ARC]]]}} {{r1=[[@{d20}+@{arcana_bonus}@{pbd_safe}[ARC]]]|
Athletics,+@{athletics_bonus}@{pbd_safe}]]}} {{rname=^{athletics-u}}} {{mod=[[@{athletics_bonus}@{pbd_safe}[ATH]]]}} {{r1=[[@{d20}+@{athletics_bonus}@{pbd_safe}[ATH]]]|
Deception,+@{deception_bonus}@{pbd_safe}]]}} {{rname=^{deception-u}}} {{mod=[[@{deception_bonus}@{pbd_safe}[DEC]]]}} {{r1=[[@{d20}+@{deception_bonus}@{pbd_safe}[DEC]]]|
History,+@{history_bonus}@{pbd_safe}]]}} {{rname=^{history-u}}} {{mod=[[@{history_bonus}@{pbd_safe}[HIS]]]}} {{r1=[[@{d20}+@{history_bonus}@{pbd_safe}[HIS]]]|
Insight,+@{insight_bonus}@{pbd_safe}]]}} {{rname=^{insight-u}}} {{mod=[[@{insight_bonus}@{pbd_safe}[INS]]]}} {{r1=[[@{d20}+@{insight_bonus}@{pbd_safe}[INS]]]|
Intimidation,+@{intimidation_bonus}@{pbd_safe}]]}} {{rname=^{intimidation-u}}} {{mod=[[@{intimidation_bonus}@{pbd_safe}[INT]]]}} {{r1=[[@{d20}+@{intimidation_bonus}@{pbd_safe}[INT]]]|
Investigation,+@{investigation_bonus}@{pbd_safe}]]}} {{rname=^{investigation-u}}} {{mod=[[@{investigation_bonus}@{pbd_safe}[INV]]]}} {{r1=[[@{d20}+@{investigation_bonus}@{pbd_safe}[INV]]]|
Medicine,+@{medicine_bonus}@{pbd_safe}]]}} {{rname=^{medicine-u}}} {{mod=[[@{medicine_bonus}@{pbd_safe}[MED]]]}} {{r1=[[@{d20}+@{medicine_bonus}@{pbd_safe}[MED]]]|
Nature,+@{nature_bonus}@{pbd_safe}]]}} {{rname=^{nature-u}}} {{mod=[[@{nature_bonus}@{pbd_safe}[NAT]]]}} {{r1=[[@{d20}+@{nature_bonus}@{pbd_safe}[NAT]]]|
Perception,+@{perception_bonus}@{pbd_safe}]]}} {{rname=^{perception-u}}} {{mod=[[@{perception_bonus}@{pbd_safe}[PERC]]]}} {{r1=[[@{d20}+@{perception_bonus}@{pbd_safe}[PERC]]]|
Performance,+@{performance_bonus}@{pbd_safe}]]}} {{rname=^{performance-u}}} {{mod=[[@{performance_bonus}@{pbd_safe}[PERF]]]}} {{r1=[[@{d20}+@{performance_bonus}@{pbd_safe}[PERF]]]|
Persuasion,+@{persuasion_bonus}@{pbd_safe}]]}} {{rname=^{persuasion-u}}} {{mod=[[@{persuasion_bonus}@{pbd_safe}[PERS]]]}} {{r1=[[@{d20}+@{persuasion_bonus}@{pbd_safe}[PERS]]]|
Religion,+@{religion_bonus}@{pbd_safe}]]}} {{rname=^{religion-u}}} {{mod=[[@{religion_bonus}@{pbd_safe}[REL]]]}} {{r1=[[@{d20}+@{religion_bonus}@{pbd_safe}[REL]]]|
Sleight of Hand,+@{sleight_of_hand_bonus}@{pbd_safe}]]}} {{rname=^{sleight_of_hand-u}}} {{mod=[[@{sleight_of_hand_bonus}@{pbd_safe}[SLEIGHT]]]}} {{r1=[[@{d20}+@{sleight_of_hand_bonus}@{pbd_safe}[SLEIGHT]]]|
Stealth,+@{stealth_bonus}@{pbd_safe}]]}} {{rname=^{stealth-u}}} {{mod=[[@{stealth_bonus}@{pbd_safe}[STLTH]]]}} {{r1=[[@{d20}+@{stealth_bonus}@{pbd_safe}[STLTH]]]|
Survival,+@{survival_bonus}@{pbd_safe}]]}} {{rname=^{survival-u}}} {{mod=[[@{survival_bonus}@{pbd_safe}[SRV]]]}} {{r1=[[@{d20}+@{survival_bonus}@{pbd_safe}[SRV]]]} }} {{global=@{global_skill_mod}}} @{charname_output}


As you can see, it's an awful lot of code. Trying to add spells & repeating weapon attacks to this kind of menu is pretty difficult - you have to create a bunch of macros which won't function by themselves, for every single spell and attack.

If you want to use the above, it needs to be added as an Ability macro on the Character Sheet, not in Collections. Even adding an emote to the above is a considerable amount of work.


It's generally easier to use a player chat menu:

/w "abyzou" &{noerror}&{template:npcaction}{{rname=**@{abyzou|character_name} Ability Check**}}{{description=**Saving Throws**:
[Strength](~abyzou|strength_save) / [Dexterity](~abyzou|dexterity_save) / [Constitution](~abyzou|constitution_save)
[Intelligence](~abyzou|intelligence_save) / [Wisdom](~abyzou|wisdom_save) / [Charisma](~abyzou|charisma_save)
[Concentration Check](~abyzou|ConcentrationCheck)
**Ability Checks**:
[Strength](~abyzou|strength) / [Dexterity](~abyzou|dexterity) / [Constitution](~abyzou|constitution)
[Intelligence](~abyzou|intelligence) / [Wisdom](~abyzou|wisdom) / [Charisma](~abyzou|charisma)
**Physical Skills**:
[Acrobatics](~abyzou|acrobatics) / [Athletics](~abyzou|athletics)
[Stealth](~abyzou|stealth) / [Sleight of Hand](~abyzou|sleight_of_hand)
**Social Skills**:
[Persuade](~abyzou|persuasion) / [Deception](~abyzou|deception) / [Insight](~abyzou|insight)
[Intimidation](~abyzou|intimidation) / [Performance](~abyzou|performance)
**Other**:
[Perception](~abyzou|perception) / [Investigation](~abyzou|investigation) / [Medicine](~abyzou|medicine)
[Arcana](~abyzou|arcana) / [History](~abyzou|history) / [Nature](~abyzou|nature)
[Religion](~abyzou|religion) / [Survival](~abyzou|survival) / [Animals](~abyzou|animal_handling)}}

It's much easier to add & rearrange buttons, the macro can be run from Collections or from Abilities, and there's nothing hard-coded.


There's a bunch of tips on chat menus in this thread - the NPC repeating action & spellbook menus can be adapted for player abilities easily enough.



August 02 (5 years ago)

Edited August 02 (5 years ago)

Thanks! The first one is what I'm looking for. Is there a way to make sure some abilities won't roll lower than, for example, a 10? I don't mind to spend some time learning to code this, and I don't mind if in the end I have to put the spells/weapons in a different way, if the skill-checks work that's already very nice. The macro's that won't work that you're talking about: is that because you have to code the macro's in HTML code?


As for the second one, don't you constantly have to re-paste/click it to have it in the chat, when other players use the chat as well? My DM doesn't like over-using the whisperfunction, so if I constantly have to whisper all these skill-check buttons (or just chatting them for all to see all the time) will become annoying I'm afraid.


Additionally, is there a way to reference the spell ability modifier from the 5E sheet in a macro? Something like @{modifier|spell_attack_modifier} ?

August 02 (5 years ago)

Edited August 02 (5 years ago)
Oosh
Sheet Author
API Scripter

You can make sure abilitites won't roll lower than a number, but that's getting pretty complicated:

&{template:simple} {{query=1}} ?{Advantage?|Normal Roll,&#123&#123normal=1&#125&#125 &#123&#123r2=[[0d20|Advantage,&#123&#123advantage=1&#125&#125 &#123&#123r2=[[{1d20,{10}}kh1|Disadvantage,&#123&#123disadvantage=1&#125&#125 &#123&#123r2=[[{1d20,{10}}kh1} ?{Skill|
Acrobatics,+@{acrobatics_bonus}@{pbd_safe}]]}} {{rname=^{acrobatics-u}}} {{mod=[[@{acrobatics_bonus}@{pbd_safe}[ACRO]]]}} {{r1=[[{1d20,{10}}kh1+@{acrobatics_bonus}@{pbd_safe}[ACRO]]]|
Animal Handling,+@{animal_handling_bonus}@{pbd_safe}]]}} {{rname=^{animal_handling-u}}} {{mod=[[@{animal_handling_bonus}@{pbd_safe}[ANIM]]]}} {{r1=[[{1d20,{10}}kh1+@{animal_handling_bonus}@{pbd_safe}[ANIM]]]}}}

Essentially the {{r1=[[{1d20,{10}}kh1 part is what you need to copy into every skill section where it had @{d20}. Again - Queries are a really messy way to do this, and make it impossible to understand what you're coding if you're not already familiar with those HTML entities & the roll syntax.

The second roll {{r2}} is covered by the Advantage Query at the top - this is essentially the contents of the @{rtype} Attribute in the original macro, modified to roll a d20 and a flat 10, and keep the highest.


You can find most of the Attributes on the Attributes & Abilities tab of the character sheet - spell attack bonus is @{spell_attack_bonus} if you reference it from an Ability macro, or @{abyzou|spell_attack_bonus} from anywhere else.

August 02 (5 years ago)

Thanks! Adding the part you named works.