You really don't need to understand how sheet workers work, to be honest. As long as you copy the change / get attrs / setattrs sections properly, to get the data you operate on with fairly standard programming techniques. Here's a simple template on("change:stat1 change:stat2 sheet:opened", function() { //sheet:opened is optional, but is useful for some workers - the script runs every time the sheet opens. getAttrs(["stat1","stat2"], function(values) { let stat1 = values.stat1; // wrap this in a parseInt function if you need it to be a number let stat2 = parseInt(values.stat2)||0; // like so // ============================
// at this point you have the variables you need to work with. Do whatever you need below, using ifs, switches, for loops, and so on
// as you would in other programming languages. You can use very simple stuff, similar to BASIC programming, whatever suits your level of skill.
// then once you have done whatever stuff you need to do to get your desired output:
// the bit below the line lets you wrap up the sheet worker.
// ============================ setAttrs({ stat1:stat1,
stat2:stat2 }); }); }); If you have different, more, or less stats, you just need to add them to the change, getattrs, and setattrs lines, and the variable assignments. You really dont need to understand how they work, as long as you can copy them and update them with correct values. Then you can do what you need with them between the double lines. I hope this helps. In the beginning I was just as befuddled about them as you are, and using a template like this got me started. Two tips I'd suggest when starting out: keep your attribute names lower case Don't use dashes or other symbols except underscores in attribute names So if you have a name like Health-Value, change it to health_value. You can break these guidelines when you know what you're doing, but you need to write the sheet workers slightly differently, and it's better to avoid the hassle when starting out.