The main issue is that all data is only loaded once so even with the variable, it will not work the way you want unless you call the function before battle.
This is not fool proof but I'll give it a shot.
You will need to make a few changes to the function (as shown below - save it as a js file to overwrite the Yanfly one).
Before every battle, you will need to run a script call before your battle processing IF you want to change the value of it.
Spoiler
JavaScript:
DataManager.processATBNotetags2 = function(group, bool) {
var range = bool ? Math.randomInt(101) / 100 : 1;
var noteA1 = /<(?:ATB START):[ ]([\+\-]\d+)>/i;
var noteA2 = /<(?:ATB START):[ ]([\+\-]\d+)([%%])>/i;
var noteB1 = /<(?:ATB TURN):[ ]([\+\-]\d+)>/i;
var noteB2 = /<(?:ATB TURN):[ ]([\+\-]\d+)([%%])>/i;
for (var n = 1; n < group.length; n++) {
var obj = group[n];
var notedata = obj.note.split(/[\r\n]+/);
obj.atbStartFlat = 0;
obj.atbStartRate = 0;
obj.atbTurnFlat = 0;
obj.atbTurnRate = 0;
var evalMode = 'none';
obj.atbHelp = undefined;
for (var i = 0; i < notedata.length; i++) {
var line = notedata[i];
if (line.match(noteA1)) {
obj.atbStartFlat = parseInt(RegExp.$1 * range);
} else if (line.match(noteA2)) {
obj.atbStartRate = parseFloat(RegExp.$1 * 0.01 * range);
} else if (line.match(noteB1)) {
obj.atbTurnFlat = parseInt(RegExp.$1 * range);
} else if (line.match(noteB2)) {
obj.atbTurnRate = parseFloat(RegExp.$1 * 0.01 * range);
} else if (line.match(/<(?:ATB HELP)>/i)) {
evalMode = 'atb help';
obj.atbHelp = '';
} else if (line.match(/<\/(?:ATB HELP)>/i)) {
evalMode = 'none';
} else if (evalMode === 'atb help') {
obj.atbHelp = obj.atbHelp + line + '\n';
}
}
}
The script call can be accompanied with a boolean (true or false, or leave it out completely) and must be run before the battle if you want to change it:
Spoiler
JavaScript:
DataManager.processATBNotetags2($dataActors, true);
The script call takes two parameters: the database items ($dataActors, $dataSkills, etc.) you want to evaluate again and a true or false. if you leave the 2nd parameter blank, it will keep it at whatever your notetag was set. If you set it to true, it will be a percentage of what you put down (between 0-100).
Hope this helps. I tested it with a vanilla project and it works for me. If you are feeling creative, you are welcome to make the changes to fit your needs.