This has been broken forever afaik, so I figured I'd finally deal with. Here's a bug report I just sent in, pasted here to give a description of the issue: When pressing the forward button in turn order, the new top turn will have its formula applied correctly. For example, when using a round counter that automatically counts up. However, when pressing the back button in turn order, the new top turn has its formula negatively applied. This is incorrect behavior. The previous top turn is the one that should have its formula negatively applied. For example, say Round Counter is 1, it's formula is +1, and it is currently the top turn. Round Counter is then followed by turn X. If you press the forward button, X is the new top turn. Then you press back, and Round Counter is the new top turn. At this point, the Round Counter will have its formula negatively applied (because we pressed back) and be updated to 0. Pressing forwards and then back again will decrement it to -1, -2, and so on. Because a formula is applied when you enter a turn with forwards, it should be negatively applied when you *leave* a turn with backwards. And then here is the fix I have, provided as-is. It's ripped out of another script, so hopefully I didn't miss anything. I figured I should share in case someone else finds it handy. It only accounts for simple formulas like "+1", anything that's a number. I don't know if there are more complex formulas, if so support would need to be added. Ideally Roll20 would just fix the bug. on("change:campaign:turnorder", (obj, prev) => {     // Capture initial prev/curr values before any changes are made     let prevTurnOrderJson = prev.turnorder;     let newTurnOrderJson = obj.get("turnorder");          // Check if the back button was pressed by simulating back on the previous turn order and seeing if it matches the new turn order     let wasBackPressed = (() => {         let prevTurnOrder = prevTurnOrderJson ? JSON.parse(prevTurnOrderJson) : [];         let newTurnOrder = newTurnOrderJson ? JSON.parse(newTurnOrderJson) : [];                  // If lengths don't match, back button definitely wasn't pressed         // If there are less than three items, back can't be distinguished from forwards         if (newTurnOrder.length != prevTurnOrder.length || newTurnOrder.length < 3) {             return false;         }         // Simulate back button press: move bottom item to the top         prevTurnOrder.unshift(prevTurnOrder.pop());                  // Simulate back button press: then apply its formula         let prevBottomTurn = prevTurnOrder[0];         let init = parseFloat(prevBottomTurn.pr);         let adjustment = parseFloat(prevBottomTurn.formula);         if (!isNaN(init) && !isNaN(adjustment)) {             prevBottomTurn.pr = init - adjustment;         }                  // See if simulated back button press matches new turn order, infer that back button was pressed if so         return JSON.stringify(newTurnOrder) == JSON.stringify(prevTurnOrder);     })();     // If back button was pressed, correct for Roll20's incorrect application of formulas when going back     if (wasBackPressed) {         let turnOrder = Campaign().get("turnorder");         turnOrder = turnOrder != "" ? JSON.parse(turnOrder) : [];                  // Undo formula adjustment Roll20 made at the incorrect time, to the new top turn         let topTurn = turnOrder[0];         let init = parseFloat(topTurn.pr);         let adjustment = parseFloat(topTurn.formula);         if (!isNaN(init) && !isNaN(adjustment)) {             //sendMessage(`Auto-correct back: undo incorrect formula application`);             topTurn.pr = init + adjustment;                          Campaign().set("turnorder", JSON.stringify(turnOrder));                             }         // Apply formula adjustment at the correct time, to the previous top turn         let prevTopTurn = turnOrder[1];         let init2 = parseFloat(prevTopTurn.pr);         let adjustment2 = parseFloat(prevTopTurn.formula);         if (!isNaN(init2) && !isNaN(adjustment2)) {             //sendMessage(`Auto-correct back: perform correct formula application`);             prevTopTurn.pr = init2 - adjustment2;                          Campaign().set("turnorder", JSON.stringify(turnOrder));                             }     } }