
I have the same to hit chart on the character tab and the journal tab but it only updates on the character tab. Can someone explain how to get it to update on both tabs. Thanks in advance. (not full code removed the repeating section.) <script type="text/worker">
const buttonlist = ["character","journal","configuration"];
buttonlist.forEach(button => {
on(`clicked:${button}`, function() {
setAttrs({
sheetTab: button
});
});
});
</script>
<script type="text/worker">
//Set Active Defense, Movement, and Description according to the Maneuver value
on("sheet:opened change:WeaponSkill", function() {
getAttrs(["WeaponSkill", "thws1", "thws2", "thws3", "thws4", "thws5", "thws6", "thws7", "thws8", "thws9", "thws10"], function(value) {
if (value.WeaponSkill === " ") {
console.log("Setting Archetype and Feature to blank");
setAttrs({thws1: "",
thws2: "",
thws3: "",
thws4: "",
thws5: "",
thws6: "",
thws7: "",
thws8: "",
thws9: "",
thws10: ""});
}
else if (value.WeaponSkill === "1") {
console.log("Updating To Hit based on weapon skill of 1");
setAttrs({thws1: "4",
thws2: "4",
thws3: "5",
thws4: "6",
thws5: "6",
thws6: "6",
thws7: "6",
thws8: "6",
thws9: "6",
thws10: "6"});
}