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

Pathfinder Sheet Help! A single entry won't accept math and I can't figure out why

Hello everyone,  I use the Official Roll20 Pathfinder sheet, and I'm quite satisfied with it, for the most part. But there are some small tweaks I'd like to make to personalize it, so I tried my hand at creating a custom sheet using the HTML / CSS / JS source code.  Now I'm not a programer, and I'm way out of my element. The specific issue I wanted to do was on the NPC sheet: under the simple attacks, the attack value is a static number (like "13", so that when I click it, it rolls 1d20+13). But what I wanted was to make it a formula, like [[@{bab}+@{strength_mod}]], which would call those values on the sheet instead of a static number.  By doing it this way, it would make it easier for me to buff my NPCs / monsters, alter their ability scores or whatever, and know that all their attacks, saves or whatever would update automatically.  AND I SUCCEEDED! Yay!... Except for Spell save DCs.  For some awful reason, I cannot do the same trick for spell save DCs (i.e. a spell-like ability has a saving throw (Reflex negates or whatever), and an entry to put a save DC, which is a static number). I modify the sheet to change from "input type=number" to "input type=text" (which worked for all the other entries I modified), and at first it seems to work: it lets me write the formula I want in the assigned space. But when I press the button to cast a spell, the chat window it won't calculate the formula I put in. It's like the value gets defaulted to "0" unless I put a number, and then it only pastes that number in the chat.  Any help would be appreciated! Thanks everyone.
1616786719
vÍnce
Pro
Sheet Author
Just guessing, but the spell dc may be handled by a sheetworker script.  You might have to dig into the sheetworker code to see how the DC is being calculated.