Don't know how else to word this.
But basically, I was thinking of an idea where DnD-like checks can dictate an outcome. So for example, you have a Strength Score of 4, and you have a 4 in 10 chance of succeeding this outcome. Is there a way to make something like this?
I'm assuming using Variables, but how do I use the Variables to essentially make dice rolls.
Right there in the Control Variables event command is an option to assign it a random value. So you do that, then use Conditional Branch to see if it was higher or lower than whatever.
If you're using something like YEP Action Sequences or VE Battle Motions, you can do things like this on the fly when using a skill. You'd basically set a variable during the sequence, and check against it to see if the skill succeeds or not, all using the notetags for the action sequences.
For example, I personally use VE Battle Motions for this kind of thing.
<action sequence: execute>
variable: 1, = 0 // Start by resetting the variable to 0 to avoid issues with the result on subsequent use
variable: 1, = 1 + Math.randomInt(9) // You'd use 9 here because randomInt also includes zero as a result
if: $gameVariables.value(1) <= a.atk
effect: all targets, 100%
end
</action sequence>
With the above, it rolls a random value between 0-9 for variable 1, then adds 1 to eliminate zero as a result. If that result is lower or equal to the user's Attack, the action succeeds and damage is done or whatever you set. If not, it does nothing.