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

Tracking OneDnD Exhaustion

I can't figure out an effective way to track Exhaustion on the "DnD 5e by Roll20" sheets using the OneDnD method of subtracting it from every d20 roll. I tried changing Core Dice Roll to use "1d20-@{exhaustion_level}" which seemed fine at first, until I realized that adding any calculations beyond a basic dice causes it to not add any additional modifiers to any d20 rolls. Like if I have +6 Stealth and 4 Exhaustion, it should be rolling 1d20+6-4. Instead it just rolls 1d20-4. The other solution I've found is to just create a separate Global Modifier for every type of roll, but that's incredibly tedious to manage. Does anyone know a good way to handle this?
1700695445

Edited 1700695519
Gauss
Forum Champion
Global Modifier is the best method, you only need to make three of them (saves, attacks, and skills). Set it up as a query that asks the exhaustion level. 
From my memory, the Core Dice Roll is used with a couple other calculations (such as Advantage/Disadvantage), so you can't modify the roll at the end.  You should be able to use this: -@{exhaustion_level}[Exhaustion]+1d20 However, one problem with using the @{exhaustion_level} attribute is that it only goes up to a maximum of 6.  Instead, you could use an 'other resource'. If you do, I would suggest setting it up to be the first 'other resource' on each player's character's sheet: Then you'd reference it in the Core Dice Roll like so: -@{repeating_resource_$0_resource_left}[Exhaustion]+1d20
1700699587

Edited 1700700480
Ah, you're right about it working when I put the -Exhaustion first on the Core Dice Roll. I'm not running into an issue with it capping out at 6 though. It seems to work fine at higher levels. -Edit- Nope, okay. It works , but the character sheet starts throwing out complaints about it being over 6. So you were right about that being the limit I think. I did have to use one of the resource boxes in the end.
1700702921

Edited 1704684469
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I have a newer version here that works with the exhaustion level on the sheet, rather than a token marker. It can be found here . I've got a script somewhere that reads the number on a token marker to track exhaustion. and modifies the base roll. I dropped it when I realized it had two issues: 1) it couldn't account for multiple tokens assigned to one character (mooks) 2) You had to make sure the token marker was correct whenever you pulled out a fresh token. Here's the code if anyone wants to fiddle with it. on('ready', () => {     const exhaustionMarker = "Exhaustion::5992372";     const exhaustionRx = new RegExp(`(?<=${exhaustionMarker}@)\\d`);     function setExhaustion(obj) {         const tokenStatus = obj.get("statusmarkers");         let rollString = {             core_die: "1d20"         };         if (tokenStatus.includes("Exhaustion")) {             let exhaustionLevel = exhaustionRx.exec(tokenStatus);             if (exhaustionLevel === null) {                 exhaustionLevel = 0;             } else {                 rollString = {                     core_die: "-" + exhaustionLevel + "[Exhaustion]+1d20"                 };             }         }         if (obj.get("represents")) {             setAttrs(obj.get(("represents")), rollString);         }     }   const onChangeGraphic = function(obj,prev) {     if(obj.get('statusmarkers') !== prev.statusmarkers) {       setExhaustion(obj);     }   };   on("change:graphic:statusmarkers", onChangeGraphic);   if('undefined' !== typeof TokenMod && TokenMod.ObserveTokenChange){     TokenMod.ObserveTokenChange(onChangeGraphic);   } });
keithcurtis said: I've got a script somewhere that reads the number on a token marker to track exhaustion. and modifies the base roll. I dropped it when I realized it had two issues: I don’t see a Pro subscriber tag next to Zack’s name, so I’m assuming he doesn’t have access to scripts  :) Still might be helpful for anyone who does!
1700707186
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
True, I hadn't checked. But maybe it will have some value to someone. :)