Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Loading - Event/Script call

Hello, I wish to in someway edit the RTP in RMVX (the scripting side)

All that I want/need is to be able to Load a save game upon an event. So for example a Script that might read $scene = Scene_load.new(save1.file format)

Thats all I need, no fancy windows just to beable to paste that into a Event on a 'Call Script' (Under Advanced on the Thrid Page).

I hope this is clear and if there is a way to do this in RMXP,please contriubute becuase I may be able to apply the main elements.

-Optioned
 
Okay, this example has been taken from my CMS and re-coded into a mini-script, here ya go!

Please note this is XP, not VX, but the concept should be the same. Only problem if you were to call Scene_Load is that when you cancel out, you'll be re-directed to the title (because thats how the default script works) instead of returning to the map, this should fix that.

To call the load scene from an event, its as simple as...

$game_temp.load_calling = true
$scene = Scene_Load.new


If you don't include the load calling = true then it'll return you to title, so please don't forget to include that line or people will be mad at you >.<

Code:
#===============================================================================
# ** Game_Temp
#===============================================================================
class Game_Temp
  #-----------------------------------------------------------------------------
  attr_accessor :load_calling
  #-----------------------------------------------------------------------------
  alias_method :kn_game_temp_initialize, :initialize
  #-----------------------------------------------------------------------------
  # * Initialize Method (Aliased)
  #-----------------------------------------------------------------------------
  def initialize
    # Call origional initialize method first
    kn_game_temp_initialize
    # New Initialize Data
    @load_calling = false
  end
end
#===============================================================================
# ** Scene_Load
#===============================================================================
class Scene_Load
  #-----------------------------------------------------------------------------
  # * On Cancel Method (Re-Written)
  #-----------------------------------------------------------------------------
  def on_cancel
    # Play cancel SE
    $game_system.se_play($data_system.cancel_se)
    # If called from event
    if $game_temp.load_calling
      # Clear save call flag
      $game_temp.load_calling = false
      # Switch to map screen
      $scene = Scene_Title.new
      return
    end
    # Switch to menu screen
    $scene = Scene_Map.new
  end
end
 
Yh i have all ready editted the load screen  so that when you press Cancel it goes the 'Scene_Event' (not sure what the bit is but it goes back to the map).


What I would like instead would be, to run:
$scene = Scene_Load.new(save1.rmvx)

then it would load up the 'Save1'

Thank you though, I might concider trying to cut down the scene then changing @index the 1.... 2.... 3.... for the numbers.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top