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

D&D 5E - Using the "Attacks & Spellcasting" section to roll a non-attack, non-damage description.

Heyo all. I was setting up somethings for my players, by using some macros and APIs and all, and I had an idea to insert Lucky in a player's "Attacks & Spellcasting" section. This is mostly for API use; I wanted this so that I could make it track ammo, I put the Lucky charges in Ammo, and I am using an API for resting. But that doesn't matter. The point is that by creating a new entry in the Attacks & Spellcasting section, and by unchecking Attack, Damages and Saving Throw entries, but filling the Description part, I was able to make it so that whenever I click on it, it just rolls the description in the chat, like this. But when I went on to try replicating this on another sheet, I couldn't get it to work. It always prints a blank damage. And, by comparing the entries, I don't see a difference. It's also refusing to spend the Rage charge, but, that's a different issue, that's API related. In regards just to making an Attacks & Spellcasting entry print only its description, is there anything I am missing? Thank you guys
1619520601
Oosh
Sheet Author
API Scripter
I'm not sure how you got that first result, honestly. Are you able to put the cursor in the chat bar and push the up arrow on the keyboard after rolling it, and post the code back here? The second result with the damage box is the normal result - when all checkboxes are unticked, the sheet uses the dmg template. If you type &{template:dmg} into chat, you'll see that the one thing it always produces is that bottom box. I'm not sure how you got rid of it on the first one - unless there's some wacky HTML in that ammunition link that somehow didn't get sanitised? You can get that description box by itself by using the desc template, though it won't show up in the Attacks & Spellcasting section: &{template:desc}{{desc=Stuff}}
1619522654

Edited 1619522741
If you want to manage repeating resource boxes just use resting in style and chatsetattr.  If your players are campaign players and not rando oneshotters just setup api buttons in their attacks for using things or give them a token action.  For instance, if they want to rage, have the command !modattr modify that players rage box value down one, if it goes negative they know they don't have any left.  I do it with inspirations and superiority dice in my campaigns.  The catch is you need to make sure the players do not move around the repeating boxes at all.  Pretty easy to lock in with a set of campaign players.  The top two boxes are not repeating boxes, they are other resource and class resource and are the only boxes that can be modded by bar links to a token fyi.  
Oosh said: I'm not sure how you got that first result, honestly. Are you able to put the cursor in the chat bar and push the up arrow on the keyboard after rolling it, and post the code back here? The second result with the damage box is the normal result - when all checkboxes are unticked, the sheet uses the dmg template. If you type &{template:dmg} into chat, you'll see that the one thing it always produces is that bottom box. I'm not sure how you got rid of it on the first one - unless there's some wacky HTML in that ammunition link that somehow didn't get sanitised? You can get that description box by itself by using the desc template, though it won't show up in the Attacks & Spellcasting section: &{template:desc}{{desc=Stuff}} You mean doing this, right? (The character's name is Manon) This is the full text: @{Manon|wtype}&{template:atkdmg} {{mod=-}} {{rname=Lucky}} {{r1=[[0d20cs>20]]}} {{r2=[[0d20cs>20]]}} 0 {{range=}} 0 {{dmg1=[[0]]}} {{dmg1type=}} 0 {{dmg2=[[0]]}} {{dmg2type=}} {{crit1=[[0[CRIT]]]}} {{crit2=[[0[CRIT]]]}} 0 {{desc=Lucky's Description.}}   {{spelllevel=}} {{innate=}} {{globalattack=@{Manon|global_attack_mod}}} {{globaldamage=[[0]]}} {{globaldamagecrit=[[0]]}} {{globaldamagetype=@{Manon|global_damage_mod_type}}} ammo=Lucky [l]|-MXlh3fAzN1Cs4QGkUvN @{Manon|charname_output} And yeah, in the meantime, I am creating a macro by hand using description Template. I mean, that does solve the issue. I was just more baffled that I WAS able to generate a description in Attacks & Spellcasting once and couldn't do it again. If I can't repeat that, then I'll just use hand-written macros, and that's fine. But I do appreciate any insight into what happened. Thank you very much :)
DM Eddie said: If you want to manage repeating resource boxes just use resting in style and chatsetattr.  If your players are campaign players and not rando oneshotters just setup api buttons in their attacks for using things or give them a token action.  For instance, if they want to rage, have the command !modattr modify that players rage box value down one, if it goes negative they know they don't have any left.  I do it with inspirations and superiority dice in my campaigns.  The catch is you need to make sure the players do not move around the repeating boxes at all.  Pretty easy to lock in with a set of campaign players.  The top two boxes are not repeating boxes, they are other resource and class resource and are the only boxes that can be modded by bar links to a token fyi.   I use the OGL companion for ammo tracking, and it has been working perfectly fine, this is the first time it's failing. I can change to chatsetattr if needed, I'm analyzing the situation. I didn't focus on this part of the issue because I didn't want to bring API discussion to this forum, but I'll keep chatsetattr in mind if needed. Thank you very much :)
Kiresaur said: Heyo all. I was setting up somethings for my players, by using some macros and APIs and all, and I had an idea to insert Lucky in a player's "Attacks & Spellcasting" section. This is mostly for API use; I wanted this so that I could make it track ammo, I put the Lucky charges in Ammo, and I am using an API for resting. But that doesn't matter. The point is that by creating a new entry in the Attacks & Spellcasting section, and by unchecking Attack, Damages and Saving Throw entries, but filling the Description part, I was able to make it so that whenever I click on it, it just rolls the description in the chat, like this. But when I went on to try replicating this on another sheet, I couldn't get it to work. It always prints a blank damage. And, by comparing the entries, I don't see a difference. It's also refusing to spend the Rage charge, but, that's a different issue, that's API related. In regards just to making an Attacks & Spellcasting entry print only its description, is there anything I am missing? Thank you guys What are the actual macros you entered into the ammunition field for Lucky versus Rage? I have a feeling that's where the difference is, if there is any at all. It could also be a rogue sheetworker doing something behind the scene that we can't see.
The rolls that I printed in the Chat were not prompted by a macro. They happened by clicking on the Rage and Lucky entries in Attacks & Spellcasting. They are, supposedly, both being handled by the same standards. In the ammunition field specifically, in both cases I just named the resource ("Lucky [l]"). Everything other than that is automatically added by the companion, and the API instructs us to not mess with that. The Rage one doesn't have that, because it only adds that once it works for the first time, according to the 5E OGL companion description. However, I just created a new sheet with the same info and it did work for ammo. The main difference here is that the barabarian sheet used to be an NPC sheet. Maybe that affects the effectiveness of the ammo tracking.
Kiresaur said: The rolls that I printed in the Chat were not prompted by a macro. They happened by clicking on the Rage and Lucky entries in Attacks & Spellcasting. They are, supposedly, both being handled by the same standards. In the ammunition field specifically, in both cases I just named the resource ("Lucky [l]"). Everything other than that is automatically added by the companion, and the API instructs us to not mess with that. The Rage one doesn't have that, because it only adds that once it works for the first time, according to the 5E OGL companion description. However, I just created a new sheet with the same info and it did work for ammo. The main difference here is that the barabarian sheet used to be an NPC sheet. Maybe that affects the effectiveness of the ammo tracking. Ah gotcha.  By 'macro' I meant that I noticed that there was an ID of some kind after the "Lucky [l]", but nothing after "Rage" in the ammunition fields.  I didn't realize that was automatically added by the API script. The D&D 5E by Roll20 sheet has a lot of sheetworkers and things going on in the background also, so sometimes it's not clear whether the API is doing something or the sheet itself. Good luck!