Here's a sheet worker that calculates the ATT and DEF values. I created extra repeating sections - passives and actives . Obviously you can change those - just remember to change them in this line: const section_names = ['equipment', 'passives', 'actives']; I also created an array to hold the attributes you want to use from outside the repeating section, like so const outside_attributes = ['strength', 'dexterity']; Just add as many attributes as you need, and the on(change) and getAttrs lines will automatically grab them. All you need to do is add the code inside the getAttrs function to use them how you want to. I added this at the end as an example: output.attack = output.attack + int(v.strength); output.defense = output.defense + int(v.dexterity); I've tested the sheet worker below to make sure it works. Enjoy! <div class="stats"> <label><span class="labeltext">Strength: </span><input type="number" value="0" name="attr_strength" /></label> <label><span class="labeltext">Dexterity: </span><input type="number" value="0" name="attr_dexterity" /></label> <label><span class="labeltext">Attack: </span><input type="number" value="0" name="attr_attack" /></label> <label><span class="labeltext">Defense: </span><input type="number" value="0" name="attr_defense" /></label> </div> <hr /> <div class="equip"> <label class="equipname">Equipment:</label> <fieldset class="repeating_equipment"> <input class="checkbox" type="checkbox" name="attr_equipment_toggle" value="1" /> <input class="equipname" type="text" name="attr_equipment_name" /> <input class="equipmod" type='number' name='attr_equipment_attack_mods' /> <input class="equipmod" type="number" name='attr_equipment_defense_mods' /> </fieldset> </div> <hr /> <div class="equip"> <label class="equipname">Passive Abilities:</label> <fieldset class="repeating_passives"> <input class="checkbox" type="checkbox" name="attr_passives_toggle" value="1" /> <input class="equipname" type="text" name="attr_passives_name" /> <input class="equipmod" type='number' name='attr_passives_attack_mods' /> <input class="equipmod" type="number" name='attr_passives_defense_mods' /> </fieldset> </div> <hr /> <div class="equip"> <label class="equipname">Active Abilities:</label> <fieldset class="repeating_actives"> <input class="checkbox" type="checkbox" name="attr_actives_toggle" value="1" /> <input class="equipname" type="text" name="attr_actives_name" /> <input class="equipmod" type='number' name='attr_actives_attack_mods' /> <input class="equipmod" type="number" name='attr_actives_defense_mods' /> </fieldset> </div> <script type="text/worker"> const int = (value, error = 0) => parseInt(value) || error; const derived_stats = ['attack', 'defense']; // an array of the repeating section names const section_names = ['equipment', 'passives', 'actives']; // an array of the attributes outside of the section you want to use. const outside_attributes = ['strength', 'dexterity']; // a function to quickly build repeating section names, suitable for this worker. const section_field = (section, field, id = ':') => `repeating_${section}${id === ':' ? id : `_${id}_`}${section}_${field}`; // altered buildChanges, so now it is a function that can hanndle all 3 repeating sections const buildChanges = (section) => derived_stats.reduce((total, item) => `${total} change:${section_field(section, item)}_mods`, ''); // created 3 variables for the change:stuff line, to make that less of a chore to write and read const toggleChanges = section_names.map(section => `change:repeating_${section}:${section}_toggle`).join(' '); const outsideChanges = outside_attributes.map(stat => `change:${stat}`).join(' '); const removeSections = section_names.map(section => `remove:repeating_${section}`).join(' '); on(`${toggleChanges} ${outsideChanges} ${buildChanges(section_names[0])} ${buildChanges(section_names[1])} ${buildChanges(section_names[2])} ${toggleChanges} ${removeSections} sheet:opened`, () => { // define the fieldnames outside the first getSectionIDs to make clear it doesnt belong to any of them const fieldnames = []; // notice the idarray array name has changed. It must be different in each getSectionIDs getSectionIDs(`repeating_${section_names[0]}`, idarray0 => { // loop through idarray0, and create the repeating section attribute for each modifier attribute name idarray0.forEach(id => { derived_stats.forEach(mod => fieldnames.push(section_field(section_names[0], `${mod}_mods`, id))); fieldnames.push(section_field(section_names[0], 'toggle', id)); }); getSectionIDs(`repeating_${section_names[1]}`, idarray1 => { // loop through idarray1, and create the repeating section attribute for each modifier attribute name idarray1.forEach(id => { derived_stats.forEach(mod => fieldnames.push(section_field(section_names[1], `${mod}_mods`, id))); fieldnames.push(section_field(section_names[1], 'toggle', id)); }); getSectionIDs(`repeating_${section_names[2]}`, idarray2 => { // loop through idarray2, and create the repeating section attribute for each modifier attribute name idarray2.forEach(id => { derived_stats.forEach(mod => fieldnames.push(section_field(section_names[2], `${mod}_mods`, id))); fieldnames.push(section_field(section_names[2], 'toggle', id)); }); // now we are ready to grab all the values from the character sheet // outside_attributes as an array of the attributes you want to usem that aren't in the repeating sections getAttrs([...fieldnames, ...outside_attributes], v => { console.log(v); console.log('v^'); // initialise the object used for output, with each total attribute set to a default value of 0 const output = {}; derived_stats.forEach(mod => output[`${mod}`] = 0); // loop through all 3 idarrays // first set up an array of arrays, to make the idearrays easy to access with an index const idarrays = [idarray0, idarray1, idarray2]; [0,1,2].forEach(num => { // now loop through each idarray, and get the various values and add them to output idarrays[num].forEach(id => { // check if this row is to be counted or not const toggle = int(v[section_field(section_names[num], 'toggle', id)]); if (toggle) { // add each modifier to the total derived_stats.forEach(mod => output[`${mod}`] = output[`${mod}`] + int(v[section_field(section_names[num], `${mod}_mods`, id)])); } }); }); // now handle the outsideattributes however you need to. output.attack = output.attack + int(v.strength); output.defense = output.defense + int(v.dexterity); setAttrs(output); }); }); }); }); }); </script>