This plugin generates a new game seed each time you start a new game. This seed persists with your saved game. This can be used to create pseudo-random events, such as determining whether the east path or west path is blocked.
To make events that block paths, we'll use Hime's Custom Page Conditions, which will allow us to have events that appear or disappear based on custom conditions - in this case, our seed's value.
First, we create all of the events that may potentially block our paths.
If we have several paths that we want to block, and we want to decide between them evenly, we set one to check for the modulus of the seed divided by the number of paths. The first path will check modulus == 0, the second will check modulus == 1, and so on. We use the Event Command for Conditional Branch (tab
- testing with a Script (tab 4) using a value such as the following, where
3is the total number of paths and
2is the number of this specific event path.
seedTest(3) == 2
Alternatively, we can weight the modulus check - below we're dividing by 10 and then checking if the modulus is greater than 5 or not, but we could weight one heavier by setting this number lower or higher.
The result is that only one path is blocked. Our NPC here also uses the same check to show a different message depending on which path is open.