Skip to content

Kru_GameSeed

Bill Hunt edited this page May 12, 2019 · 2 revisions

download

live demo

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.

Example Setup

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.

Icons example file

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

  1. testing with a Script (tab 4) using a value such as the following, where 3 is the total number of paths and 2 is 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.

Icons example file

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.

Icons example file

Clone this wiki locally