This is a fairly newbie question as I am just getting into Javascripts. I am using the RepeatingSum feature, which I have working great with Weight * Quantity for an inventory. However, what I want to do is add a checkbox input to indicate if an item is carried or not. The intention is for it to be easily to leave an item "off character" without much hassle. Unfortunately, I can't seem to figure out how to make both this code and the item * weight work together. The code examples from the Wiki I'm using I've posting below (I can get either to work, but not sure how to make them work in tandem): WEIGHT * QUANTITY on ( 'change:repeating_inventory remove:repeating_inventory' , function () {
repeatingSum ( "encumbrance_total" ,"inventory",[ "item_weight" ,"item_number"]);
}); WEIGHT * CARRIED CHECKBOX on ( 'change:repeating_armour remove:repeating_armour' , function () {
repeatingSum ( "armour_weight" , "armour" ,[ "armour_piece" ,"armour_worn"]);
}); Quick Summary: What formula would I use to effectively make Item_Weight multiplied by Item_Number multiplied by Item_Carried (Checkbox with a 0/1 result)? Effectively, combining the two. Thanks again. I'm not entirely understanding how Java does math or how this code works so have been trying to feel for a solution blind and have been unable to find a way to hybrid these solutions.