I tried setting a strength by itself(setAttrs({'strength':8})) in "sheet:opened" and that still doesn't trigger a cascade. I'm probably going to set them to defaults manually but I'll post a small bit of two sections that should interact. Maybe, the way I've written the events has isolated them from one another. // Check if our sheet is opened for the first time
on("sheet:opened", function(){
SheetWorkerFunctions.setDefaults();
});
// Strength Calculations
on("change:strength change:strength_percentile", function () {
getAttrs(["strength", "strength_percentile"], function (values) {
// Parse our variables into number format
var stat_str = parseValues(values, "strength");
var stat_str_per = parseValues(values, "strength_percentile");
// Special check for perfect strength
if (parseValues(values, "strength_percentile", "str") == "00")
stat_str_per = 100;
// Set the attributes on the character sheet
setAttrs({
"force_open_door": AT_STR.getStrengthValue('Minor', stat_str, stat_str_per),
"force_open_door_locked": AT_STR.getStrengthValue('Minor', stat_str, stat_str_per, true),
"bend_bars": AT_STR.getStrengthValue('Major', stat_str, stat_str_per),
"str_bonus_attack": AT_STR.getStrengthValue('Attack', stat_str, stat_str_per),
"str_bonus_damage": AT_STR.getStrengthValue('Damage', stat_str, stat_str_per),
});
});
}); These events are in global scope.