Different teleport per switch

Njiua

Villager
Member
Joined
Sep 9, 2020
Messages
5
Reaction score
0
First Language
Dutch
Primarily Uses
RMMV
Hey guys..

Just a quickie..
I've got this map which allows the player to select a few options to "generate" a dungeon.

The npc asks a few questions.. And after that a dungeon is chosen from the few maps I pre created.

Every answer activates a switch.. Up till now I've used multiple conditional branches.. But it does not work totally smooth.. Anyone here who knows a better solution?

An example.
What dungeon type: water
How many floors: 2
How hard: medium

This should enable the switches water,2, medium
So my teleport event has to check these switches if they're on or off..
In this case it teleport you to a 2 story water dungeon on medium difficulty

The same teleport could also teleport the player to a 5 story hardcore fire dungeon if the questions are answered else.. And thus other switches are selected..

Anyone who can help me out?

Cheers!
 

ScorchedGround

Blizzards most disappointed fan
Veteran
Joined
Apr 12, 2020
Messages
328
Reaction score
472
First Language
German
Primarily Uses
RMMV
Well, for one you could use variables instead of switches.

Have a variable "Floor_Amount" and a variable "Difficulty" and set it to different numbers depending on what the player chooses.

If the player chooses 4 floors, you set the "Floor_Amount" variable to 4.

If the player chooses medium difficulty, you set the "Difficulty" variable to 2.
-> Basically, 1 is easy, 2 is medium, 3 is difficult and 4 is hardcore (or whatever you desire)


You can do the same for the dungeon type, but then you probably want to write down which number corresponds to what dungeon type, like so:
1 - Water
2 - Fire
3 - Air
etc.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,246
Reaction score
7,625
First Language
German
Primarily Uses
RMMV
in all cases (no matter if you're using switches or variables) the key is care when constructing the event logic.
Basically you should sort your data parts into different layer, like the first layer decides which element, the second one decides difficulty and the third one decides number of floors.

then you place all the conditional branches for the first layer.
then inside each of those branches you place all the branches for difficulty - you'll have one such branch for every difficulty below each element conditional branch.
and then inside every one of those difficulty branches, you'll need a branch for every possible floor number - and that is where you place the transfers to the different maps inside.

it will basically be a large decision tree, and I strongly suggest that you disable the else-branches for everyone of those conditional branch commands. You don't need them in such a tree, and the result will be better readable than with elses.
 

Tiamat-86

old jrpg gamer
Veteran
Joined
Dec 5, 2017
Messages
540
Reaction score
219
First Language
english
Primarily Uses
RMMV
can take it 1 step further adding a 4th variable for room variation.
100floor dungeon could have 500 room variations just by making every floor have 5 starting/ending points based on what random variable it got
 

Njiua

Villager
Member
Joined
Sep 9, 2020
Messages
5
Reaction score
0
First Language
Dutch
Primarily Uses
RMMV
Changed the switches to a binary value system.

So for every choice the value increases. For every value a different conditional branch..

Per example
Fire is 1
Water is 2

Easy is 4
Medium is 8

2 layer 16
3 layer 32

In case of an easy 3 layer water dungeon the value is 38
In case of a medium 3 layer fire dungeon the value is 41

It takes some time.. But till now it runs smooth.

Thanks for the help!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

GOBBLE GOBBLE! Happy thanksgiving.
Oh no. That moment when you try to fix something you modified in your game, like, a year ago but didn't want to fix then, and you now have no idea what you even did. Me right now, trying to figure out why my gold window is over stretched?
LittlePIGGY wrote on atreyoray's profile.
Where are you TT^TT
We need ARP_InGameManual for MZ
Oh my gosh. Thank you, Macy's! Thank you so much! You have made me very happy!

Forum statistics

Threads
105,552
Messages
1,014,573
Members
137,225
Latest member
Eryndor
Top