Adventure Game-esque Puzzles

AuraTheDoof

Villager
Member
Joined
Feb 22, 2020
Messages
7
Reaction score
1
First Language
English
Primarily Uses
RMMV
I want to do a puzzle in RPG Maker where, when interacting with an object, it opens your Item menu and asks you to choose which item to use. How would I go about doing this?
 

SmashArtist

Lazy Artist
Veteran
Joined
May 31, 2016
Messages
774
Reaction score
1,279
First Language
English
Primarily Uses
RMMV
There's a built in mechanic called "Select Item".
It doesn't open up the item menu but instead you can have the player select an item from the item type(Regular Item/Key Item/Hidden Item A/Hidden Item B).
The item the player picks has it's ID stored in a variable of your choice so all you have to do is make a conditional branch based on what the value of that variable is.

The "Select Item" command is on the first page under the "Message" section.
 

AuraTheDoof

Villager
Member
Joined
Feb 22, 2020
Messages
7
Reaction score
1
First Language
English
Primarily Uses
RMMV
The way I'm designing the puzzle is that (to vastly oversimplify) you have three boxes and three items. It doesn't matter which goes in which, but they have to be the right three items. The game doesn't confirm the puzzle is solved until all three items are in the boxes. What I want is, when you put an item in the box, the game either flips the "correct" Switch or doesn't, but also takes that item. Then, if you go back to that box, it tells you what item is in it and asks if you want it back. Is there any way to do this without creating a ludicrous amount of Event Pages (I imagine not, but it's worth that ask :p)?
 

GE_Peter

Villager
Member
Joined
Dec 13, 2016
Messages
24
Reaction score
3
First Language
English
Primarily Uses
RMMV
You can do it with three events that are really only one event, copied with slight adjustments. You will need script calls, but just a few:
$gameParty.loseItem($dataItems[$gameVariables.value(15)], 1);
$gameParty.gainItem($dataItems[$gameVariables.value(15)], 1);
$gameVariables.setValue(15, 0);

I have the entire event in my RPG Maker, is there a quick and easy way to post the event script here to show how I did it? Copy n paste doesn't seem to work. Would the line from the .json file be useful?
 

GE_Peter

Villager
Member
Joined
Dec 13, 2016
Messages
24
Reaction score
3
First Language
English
Primarily Uses
RMMV
*EDIT*
Okay, using screenshots!

eventpage1.png

eventpage2.png

Three events, each like the above, should do the trick. You can copy and paste and just change the variables. E.g. 'If box a contents...' to box b and box c on the other two events. I used variables 15, 16 and 17, which are accessed in the script calls.

You can leave out the console.log lines, I just used them for debugging purposes.


*EDIT #2*
Sorry for the double post, I thought the screenshots were being inserted as an edit to the first post.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Is it okay to hug a tree? :/
The new intro Logo for my videos.

I speed it up, the one I use to use was to long.
The workweek is now over. Now I can work on my GamZzzzzZzzzzZzzzZzzZz....
Just watched Onward with the family. One of the best movies I've ever seen. <3

Forum statistics

Threads
95,824
Messages
932,209
Members
126,259
Latest member
Illuminachos
Top