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
331
Reaction score
481
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,311
Reaction score
7,645
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
548
Reaction score
224
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

does there exist a word for a state of being that is between "living" and (not "dead", but ...) "not living" .... does that make sense, or do I just sound like Im high for something :[ ?
Hope you are all fine today~
Moderators, you must have so much patience to be able to deal with everything. I mod in a server of sorts and today we just got a message, which, despite it's helpful constructive criticism, basically stated that all of the mods were jerks and that was the only reason our server was unlikeable. So, thank you, for having patience. You are appreciated! :kaoluv:
Haired slime? Trying some different styles of art. Maybe I can make some resources with this new kind of painting.......

Forum statistics

Threads
105,743
Messages
1,016,058
Members
137,427
Latest member
olixproductions
Top