You cannot set them directly to a variable via the plugin command, you will need to use a conditional branch to check the variable value and use different plugin commands to set the rerolls to be equal to the variable value.
If you are comfortable with JS you can use a script call to use a variable value directly:
const diceId = ""; // set this to your dice id const resultVariable= 1; // Set this to the variable id you want to store the result in const rerolls = $gameVariables.value(1); // change the 1 here to the variable id that stores the amount of rerolls you want const disableCancel = false; // change to true to disable cancel const bg = ""; // change to your scene background preset id (if any) const dice = $cgmzTemp.getDice(diceId); SceneManager.push(CGMZ_Scene_Dice); SceneManager.prepareNextScene(dice, resultVariable, rerolls, bg, disableCancel);