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

Changing spell save DC and spell attack bonus modifiers by referencing repeating resources [D&D 5e 2014]

My character has features that modifies many bonuses (spell attack bonus, spell save DC, etc.) depending on stacks of a custom resource. For the most part, I was able to use the global save/skill/attack modifier fields and reference the resources using @{repeating_resource_$0_resource_left} style expansion.  For the initiative, I was even able to get away with changing the initiative_style attribute to add the bonuses I needed (speaking of which, why doesn't it add the global skill modifier by default?). However, for the  spell save DC and spell attack bonus, referencing the resources doesn't work, through the sheet or directly changing attributes.  spell_attack_mod can seemingly only be changed by using item mods. Item mods apparently can't refer to resources either. Is it possible to achieve what I'm trying to do without using the API?
1749187488
Gauss
Forum Champion
Hi CrimsonCrow,  Can you provide an example of where you are trying to make these modifications? A macro? The spell itself?  Screenshots or copy of the macro code would help. 
Here is a concrete example, My DM uses a version of exhaustion where each level is -1 to all d20 rolls and the spell save DC of your spells. For the most part, I've been able to tie a resource (as seen below, right side), to many global modifier fields on the sheet  (as seen below, left side) using  -@{repeating_resource_-OQB22WqZ3a9kZ3c2zqb_resource_left}. However, for the spell save DC part, there is no global modifier for that, just a single field. As seen below, the "spell save DC mod" (attribute name: spell_dc_mod) doesn't actually work with anything but a constant number. My guess is they are interpreted in a different way internally. Working within the confines of the character sheet and no API access, I'm not sure if I'm missing something. One convoluted way I've found is to create an attack macro with a flat DC set to  @{spell_save_dc}-@{repeating_resource_-OQB22WqZ3a9kZ3c2zqb_resource_left} as following, but it's not the best.
1749199692

Edited 1749199768
Gauss
Forum Champion
You don't need to go the Global route for attacks, saves, and skills. You can add it directly to any D20 roll via the settings.  Click settings next to spells, then in the third column near the top change "Core Die Roll" to "-@{other_resource}+1d20" (without the quotes) Note: I use Other Resource for the Exhaustion, you can switch the name to whichever resource you use.  Regarding spell DC. There are multiple sections of the sheet that only accept numeric inputs, they won't accept attributes.  For spells without attacks I would use a description based approach.  Example, for Faerie Fire I would use (see bolded section):  "Each object in a 20-foot cube within range is outlined in blue, green, or violet light (your choice). Any creature in the area when the spell is cast is also outlined in light if it fails a DC [[[[8+@{pb}+@{charisma_mod}]]]] Dexterity saving throw. For the duration, objects and affected creatures shed dim light in a 10-foot radius. Any attack roll against an affected creature or object has advantage if the attacker can see it, and the affected creature or object can’t benefit from being invisible." That can be modified by adding the resource as a penalty.  For attacks I would also use the Attack's description rather than the Saving Throw section. Use the same type of solution as what I have above.  For spells with an attack output I'd divorce the attack from the spell (ie: switch the spell to spellcard, then manually create an attack). You can use a Chat Menu button in the spell description to call the attack if you'd like.