[RESOLVED] RMXP - Allowing player to open menu anytime?

Started by Zangetsu, November 18, 2015, 02:14:55 am

Previous topic - Next topic

Zangetsu

November 18, 2015, 02:14:55 am Last Edit: February 13, 2016, 12:49:56 am by Zangetsu
I recently posted this issue on another game development site, but no one could help me find the right answer.

What I'm looking for is a way to get the menu to open anytime in an RMXP game, whether or not messages are being displayed on screen. Ideally, it wouldn't close the message that's currently being displayed--it would just force the menu open, then return to the message that was being displayed.

I've been using RMXP for ages, and this is the one thing I've been wondering ever since I started using it. It seems annoying that you're unable to do that... or would a function to open the menu at the same time as a message somehow screw up the system?

If there is no way currently, can someone direct me to the parts in the script editor that might have something to do with menu access? So I can toy around with it :)

Someone did suggest to me to replace this section of code in Scene_Map:


with this:
Spoiler: ShowHide
    # If B button was pressed
    if Input.trigger?(Input::B)
      # If event is running, or menu is not forbidden
      unless $game_system.menu_disabled
        # Set menu calling flag or beep flag
        $game_temp.menu_calling = true
        $game_temp.menu_beep = true
      end
    end


... but it didn't work. This feature is really important to my game, so I'd really appreciate it if someone were able to show me how to solve this problem.

Thanks for any help in advance!

~Zangetsu
My name is Kitsuki.

KK20

The main problem is that the menu and the map are two different scenes. RMXP made it so that only one scene can be playing at any time. When you change scenes, the game assumes that you are done with the current scene you were on and moving to the next. What that means is that everything in that scene is disposed of in preparation for the next scene (because it's useless data--why do we need to have a player map object still floating around in the game memory when we don't need it in the menu?). As a result, if you were to change scenes in the middle of dialogue, there's no way to preserve that game state. You would go to the Menu, close it, and still be facing the event, but the dialogue has to start all over again.

Your best bet is to make your menu run in parallel with the map (i.e. don't make the menu a separate scene). I'm not sure how many scripts that do this exist out there. Even changing the default menu system to do this is already a lot of work as each option in the menu is a separate scene, meaning you have to make all of them not be scenes too.

Also keep in mind that if you had an item that called a common event, it could lead to some unexpected and unintended results, especially if interrupting dialogue.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Zangetsu

Thanks, KK20.

I understand why it's not possible! I figured that since I can't do that, I decided against using it as a function in the game  :^_^': I'll make the game mechanics work differently now since I can't find other scripts that can handle such a thing.

Thanks for your help!
My name is Kitsuki.