I am not sure if this is the correct location to put this, but seeing as sheetWorkers are js, I thought that people in this form would probably know what is going on and why things are not really working as I expect. I have a sheetWorkers that are handling my repeating sections, specifically to output the row_id to a player friendly version so it can be easily used for other functions such as macros. The problem is that EVERY single time I make any change to and upload that change to the game. That field instantly reverts to the row_id of the FIRST ROW in the repeating section, and NEVER updates again. Obviously, this does not break macros made with the row_id. However, it is very frustrating to myself and my players, and it is costing us time redoing those repeating sections. I was wondering what, exactly is causing this and why. Also, what can be done to prevent/recalculate for the correct value. The following code is my repeating section js for my sheet worker (for one of my repeating sections): HTML (a single row in the repeating section, not the whole thing): <div>
<span data-i18n="identification-abbrv">ID</span>: <span name="attr_row_id" />
</div>
SheetWorker JS /* ******************** Invoker Class 0 -- Repeating Spells ************************ */
on('change:repeating_invoke:name change:repeating_invoke:misc-show change:repeating_invoke:splAtk-show change:repeating_invoke:splDam-show change:repeating_invoke:description-show change:repeating_invoke:macro-text-show change:repeating_invoke:ids-show', function() {
getSectionIDs("repeating_invoke", function (ids) {
_.each(ids, function (id) {
getAttrs(["repeating_invoke_" + id + "_ids"], function(v) {
setAttrs({ // %{FOO|repeating_invoke_+id+_roll}
'repeating_spells_row_id': "%{selected|repeating_invoke_"+id+"_roll}"
}); // setAttrs
}); // getAttrs
}); // _.each
}); // getSectionIDs
});
Hope that is enough.