Content randomization problem

Wren

Veteran
Veteran
Joined
Jun 25, 2013
Messages
94
Reaction score
16
First Language
English
First off I want to thank everyone here on these boards for creating a community that helps others!

So I am working on a project that utilizes party manager plugins to create a multiplayer game. I have the party system squared away and I was looking to find a way to have the game have randomness for where key items are.

My concept is that the world map has events that transfer the player to static maps, each map has a different colored key on it and the players have to collect all the keys. The problem is how do I have these randomized so that each game is different? I'd like to have about 30 dungeons and there are 6 keys, the same color key can be obtained by each player from the same dungeon.

So for an example the map has 3 different ruins that the 1st player can see, if he goes into one and finds the red key, then another player has to go to the same ruin to get their red key as well. This sounds simple but then how do I tell all of the other ruins that the red key ruin has been set up and to not make another ruin be the red key ruin?

Hopefully this isn't too confusing and someone has a good idea how I can do this.

Thanks!
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,789
Reaction score
7,876
First Language
German
Primarily Uses
RMMV
you'll need to use variables for this.
At the beginning of the game, set a number of variables with random numbers (for defining which key is used, and on which map it should be found.

Then on each map, have the events conditioned on those variables to automatically switch to the correct event page for the key that is supposed to be there.
It's a bit tricky and needs good knowledge how to handle variables, but probably the easiest solution
 

Wren

Veteran
Veteran
Joined
Jun 25, 2013
Messages
94
Reaction score
16
First Language
English
Still not clear on how to use the variables, can you provide an example?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,789
Reaction score
7,876
First Language
German
Primarily Uses
RMMV
That is not something easily explained unless you know the basics about variables.
Please search for a tutorial called "variables guide" (if you don't find it, it is also linked in the starting point tutorial from my signature.

Then simply make a variable "key 1 color" and another "key 1 map" to store the random results (and the same for every other key), and have the events on the maps check those variables to decide which key (or none) they represent
 

Wren

Veteran
Veteran
Joined
Jun 25, 2013
Messages
94
Reaction score
16
First Language
English
I understand how variables work, you have it randomly assign a value between certain ranges, sure, simple, but how to I tell the game that if two of they keys roll the same number to reroll one of them without having a super complicated nested conditional branch?

I mean, I thought about this and without having each variable checked against all the other variables how do I have it just lock in which event leads to a different map?
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,789
Reaction score
7,876
First Language
German
Primarily Uses
RMMV
there are several ways - best would be to use a loop and break loop on single conditional branches, that will keep the checks streamlined.
Or use a script sequence instead of a control variable, but in that case you'll have to wait for a scripter, I'm more an eventer.

If going the event route, then for each key, you roll random inside a loop, check that result against the results of all previous keys, and break the loop only if it is different from all before. This way you'll still need one nested conditional branch for each previous key, but it will be a straight check.
(edit: you'll need a few elses, but nothing super complex)
 

Wren

Veteran
Veteran
Joined
Jun 25, 2013
Messages
94
Reaction score
16
First Language
English
Okay, I'll try something like you describe once I get home and let you know if I was able to get it working so we can mark this resolved! :)


Using a loop and conditional branches to check if things are not equal I am able to successfully create a game seed of 6 numbers ranging between 1 and 6 so it is sufficiently randomized! Thanks!
 
Last edited:

SirCumferance

Veteran
Veteran
Joined
Jul 17, 2012
Messages
52
Reaction score
11
First Language
English
Primarily Uses
RMMV
Ha, I woulda cheated and made an events in various places, with a random number rolled each variable and the event checking to see if its number comes up. If so, it Switches on, etc.

I do this to determine who the bad guys are going to be, so there is some randomness.
 

Latest Threads

Latest Posts

Latest Profile Posts

spending almost entire day to mod skyrim but it still couldn't run properly :(
My friend has become one with the glitter. @ImaginaryVillain, got any room in the Cult of the Sporkle?
I still cannot wrap my head around how to edit and use arrays in RPG Maker MV o_O
Gamemaking has been slower, but I do my best to make small progress every day. :)

Forum statistics

Threads
107,712
Messages
1,031,602
Members
139,849
Latest member
matthew_skull
Top