Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(2 edits)

can you use variables to determine the minimum and maximum die values?
can you roll more than 1 die at a time?
can you use a variable to determine number of rerolls?

(+1)

Hi, the dice are created via the parameters so if you create a 6 sided dice you would have 1-6 as the min/max roll for that dice. If you want different min/max you could make the dice unfair and just unable to roll certain numbers.

You can only roll 1 die at a time right now.

You set the rerolls in the plugin command so you can change it based on a variable.

so i can set rerolls to equal variable 3?

(2 edits) (+1)

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);