
The K-scaffold Sheet Framework continues to be updated and gain superpowers to make coding Roll20 character sheets easier and more straightforward. The big news with v2.7.0 is that repeating section data is now even easier to work with. K-scaffold v2.7.0 Bug Fixes nested tabs now work properly (Thanks @riernar ) Extraneous logs from the k-scaffold have been removed New Features k.verboseMode variable added. Allows enabling the verbose dev logging mode (aka what the scaffold used to do). Added the ability to call and iterate repeating section information in a nested manner directly on the attributes argument (e.g. attributes.repeating_weapons[0].name instead of attributes[`repeating_weapons_${id}_name`] This means that doing something like iterating over all the items in an equipment section to get the total weight is now as easy as: const calcWeight = function({trigger,attributes,sections,casc}){
const coinWeight = attributes.gold + attributes.silver * 0.5 + attributes.copper * 0.25;
return attributes.repeating_inventory.reduce((total,row) => {
const itemWeight = row.quantity * row.weight;
return total + row.carried * itemWeight;
},coinWeight);
};
k.registerFuncs({calcWeight});