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 .
×

Scaling Max HP Issues

Hi all, Working on a 4e game that I plan to reuse for future groups, and rather than remake all the monsters for every level I was hoping to make each monster as a sort of "template", and then have their Level stand in as a global variable to calculate all their stats. This has worked great up to maximum hit points. I've got a character sheet standing in as the "Master Sheet" that I've been using to calculate stats and everything, and that's worked fine. I can calculate Defenses, Attack Modifiers, and even a semi-complicated damage code I deduced all by using @{Master|Level} to stand in for the monsters' level. This works great since that means I can change my entire bestiary and scale them up by just changing the Level attribute on the Master Sheet. Where this fell apart is calculating maximum HP. I had it working when the Level call was on each monster's individual sheet: [[<Base HP> + @{Level}*<Scaling Amount>]], that would calculate just fine. But as soon as I switched it to [[<Base HP> + @{Master|Level}*<Scaling Amount>]] it's like the entire Level attribute just disappears and the sheet doesn't recognize it as a valid input. Any attempt to drag a monster token out with that code in place just shows <Current HP>/[[<Base HP>+*<Scaling Amount>]] in the HP bar. Any ideas on how to make this work? I've tried creating another attribute ( @{Max HP} ) and running the calculation in that, then having it be treated as a basic number value by putting it into quadruple roll brackets ( [[[[<formula>]]]]), then trying to call it in the actual maximum HP field with @{Max HP}, but this just doubles up the brackets in the maximum HP display on the token and still doesn't show the @{Master|Level} value.
1796037638
Gauss
Forum Champion
Hi Solana,  In short, you can only put values into the bars reliably. The way most sheets get around it is to perform some sheetworkers behind the scenes that then push a value into an attribute and the attribute is then called by the token.  Alternately you can use a Mod Script (a Pro feature) to push the value from a calculation into an attribute that the token calls. 
What are "sheetworkers"? I'm unfamiliar with the term. If it's having another sheet do the calculation and then pushing the final value into the attribute bar, I did try that. I put an attribute on the Master Sheet just as a test with the hard-coded formula in the Master Sheet's @{HP Test}. Then I tried to pull that into the actual monster's HP bar via @{Master Sheet|HP Test}. This resulted in no max HP showing at all. Unless I'm misunderstanding what you mean?
1796073097

Edited 1796073475
Gauss
Forum Champion
When a sheet does a calculation and then pushes the result of that calculation to a box that is a sheetworkers script doing things behind the scenes. It is not something the user has access to, it is how the sheet was built.  What you are trying to do is something that a script does. Either Sheetworker as part of a sheet or a Mod, which is an API Script that requires a Pro account.  Generally speaking, Token boxes cannot handle calculations.