[RMXP] How to call the load menu with scripts

Status
Not open for further replies.

NardBruh

Villager
Member
Joined
Jun 2, 2021
Messages
17
Reaction score
1
First Language
Portuguese
Primarily Uses
Other
Title is self explanatory, how can I call the load menu using a script call in a event, in a similar way to SceneManager.push from RPG Maker MV and such?
 

KK20

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
374
Reaction score
146
First Language
English
Primarily Uses
RMXP
The default load scene is only meant to be accessible from the title screen. You'll have to make a couple changes for it to be used from the map.

Make the following edits to the Scene_Load script
Code:
  def initialize(from_map = false)
    @from_map = from_map
    # Remake temporary object
    $game_temp = Game_Temp.new
    # Timestamp selects new file
    $game_temp.last_file_index = 0
    latest_time = Time.at(0)
    for i in 0..3
      filename = make_filename(i)
      if FileTest.exist?(filename)
        file = File.open(filename, "r")
        if file.mtime > latest_time
          latest_time = file.mtime
          $game_temp.last_file_index = i
        end
        file.close
      end
    end
    super("Which file would you like to load?")
  end
Code:
  def on_cancel
    # Play cancel SE
    $game_system.se_play($data_system.cancel_se)
    # Switch to title screen
    $scene = @from_map ? Scene_Map.new : Scene_Title.new
  end
Then you should be able to call it via
Code:
$scene = Scene_Load.new(true)
That 'true' bit is absolutely required.
 

NardBruh

Villager
Member
Joined
Jun 2, 2021
Messages
17
Reaction score
1
First Language
Portuguese
Primarily Uses
Other
Oh my! Thank you so much, it works perfectly!
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
8,926
Reaction score
5,849
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

Malak is still waiting for Dark Deception Chapter 4... This was him yesterday after another sugar crash.
Again, he's fine. He's just bored at this point, considering he's exhausted his entire vacation bucket list.
Am I the only one who files custom resources under specific folders to remember who to credit? :kaoswt2:
1632263519730.png
I always smile to myself when I see someone do the "immediate halt and spin around" from forgetting something. I find it sort of endearing how we all do it without ever being taught to.
I've been viewing trailers and product banners on Steam as part of studying marketing for videogames, specifically JRPGs. There's a huge gap between the top and bottom in terms of quality and even a mixed review game can have a much better look than a game with great reviews. I can see why skilled publishers become attractive (for hire) to many aspiring game devs.

Forum statistics

Threads
115,260
Messages
1,088,429
Members
149,862
Latest member
raeellee
Top