Command to reset "renpy.random" results?
Posted: Fri Nov 25, 2022 5:04 am
Hello Ren'Py nerds,
I've noticed that when using something like the Result will be random, but only once per launch of the game. It's the same every time if you roll back, or even when finish the game, returning you to the menu, starting the game again and playing back to the point where Result is determined.
The only ways I've found to actually have it produce different results are to either completely close and open the game (Not even shift-r works it seems), or to reload a save from before Result is determined.
Is there some sort of command I can use to force it to regenerate the seed or whatever it uses to determine what renpy.random.randint generates?
Specifically, a command to force that instance of $ Result = renpy.random.randint(1,20) to produce different results upon rollback? I'm aware I could just put in another instance of $ Result = renpy.random.randint(1,20), but that doesn't solve my specific problem.
Many thanks.
I've noticed that when using something like
Code: Select all
$ Result = renpy.random.randint(1,20)
The only ways I've found to actually have it produce different results are to either completely close and open the game (Not even shift-r works it seems), or to reload a save from before Result is determined.
Is there some sort of command I can use to force it to regenerate the seed or whatever it uses to determine what renpy.random.randint generates?
Specifically, a command to force that instance of $ Result = renpy.random.randint(1,20) to produce different results upon rollback? I'm aware I could just put in another instance of $ Result = renpy.random.randint(1,20), but that doesn't solve my specific problem.
Many thanks.