Title Screen Option - Map Transfer

● ARCHIVED · READ-ONLY
Started by MartaLualdi 8 posts View original ↗
  1. I decided to implement my own title menu options, however this one has been bugging me for quite a while now.

    Some of you might now, that if you want to start a new game, and go directly to the map your character's initial position is. This will me more a less the coding used for that task:

    Spoiler
      def command_new_game    
          Sound.play_ok
          DataManager.setup_new_game
          fadeout_all
          $game_map.autoplay
          SceneManager.goto(Scene_Map)      
      end
    What I'm aiming for, is for a similar command, the only difference is that once selected, it will send me to another initial map instead. I have already tried adding a transfer player script equivalent ($game_player.reserve_transfer(16, 1, 14, 0)), however, it sends me to the real first map first, runs all parallel/autorun, and AFTER all that, it transfers my player, totally not what I want. Since player transfer isn't an option (for as much as I've tried),

    I was wondering if there was another way to move my character directly to the map with ID 016, without going first to the one with the "initial player position" event.

    (I already have a placeholder for the command, so it is pretty much reduced to knowing how to code it).

    In case you were wondering, I created a map dedicated to unlockables, every time you unlock an image, trophy, etc. It will appear on that map (it already works, just need to get the title command to work)
  2. bump~
  3. What does going to a particular map when you start a new game have to do with the title screen? Why don't you just set the player start position accordingly? Sounds like you need to actually explain WHAT you're trying to accomplish rather than how you're trying to go about it, because it's just not clear WHY you're wanting to change the script.
  4. ^ I assume it's for an option other than new game. Some sort of Unlockables option.

    The function that sets up which map you start on is actually in DataManager

    Code:
      #--------------------------------------------------------------------------  # * Set Up New Game  #--------------------------------------------------------------------------  def self.setup_new_game    create_game_objects    $game_party.setup_starting_members    $game_map.setup($data_system.start_map_id)    $game_player.moveto($data_system.start_x, $data_system.start_y)    $game_player.refresh    Graphics.frame_count = 0  end
    So you'll need a new function for that as well as your new command function. Hope that's enough to solve your problem. If not, just let me know and I'll write up a more specific answer.
  5. Yato said:
    ^ I assume it's for an option other than new game. Some sort of Unlockables option.

    The function that sets up which map you start on is actually in DataManager

    #-------------------------------------------------------------------------- # * Set Up New Game #-------------------------------------------------------------------------- def self.setup_new_game create_game_objects $game_party.setup_starting_members $game_map.setup($data_system.start_map_id) $game_player.moveto($data_system.start_x, $data_system.start_y) $game_player.refresh Graphics.frame_count = 0 endSo you'll need a new function for that as well as your new command function. Hope that's enough to solve your problem. If not, just let me know and I'll write up a more specific answer.
    Yup, I wanted another option besides the New Game one. New game, starts where I leave the player start position, while the other one always leaves you on a specific map, and doesn´t change.

    Also yup~ I was aware of that function on DataManager, however, I was unable to properly code it myself (still getting into coding). So I copy-pasted part of the default New Game command, but all I managed to do was a command that transferred me to the New Game map and then to the map I wanted, instead of that second map from the beginning, Which is basically a command with an unnecessary map transfer, rather than a direct map transfer one.

    So that is basically it, I'm aiming to keep the new game command, while having a second similar command that transfers you directly to a fixed map (that isn't the player start location).
  6. Spoiler
    module DataManager #-------------------------------------------------------------------------- # * Set Up Bonus #-------------------------------------------------------------------------- def self.setup_bonus create_game_objects $game_party.setup_starting_members $game_map.setup(2) #set map id here $game_player.moveto(8, 6) #set x and y of player here $game_player.refresh Graphics.frame_count = 0 endendclass Window_TitleCommand < Window_Command #-------------------------------------------------------------------------- # * Create Command List #-------------------------------------------------------------------------- def make_command_list add_command(Vocab::new_game, :new_game) add_command(Vocab::continue, :continue, continue_enabled) add_command("Bonus", :bonus) #set name of command here add_command(Vocab::shutdown, :shutdown) endendclass Scene_Title < Scene_Base #-------------------------------------------------------------------------- # * Create Command Window #-------------------------------------------------------------------------- def create_command_window @command_window = Window_TitleCommand.new @command_window.set_handler:)new_game, method:)command_new_game)) @command_window.set_handler:)continue, method:)command_continue)) @command_window.set_handler:)bonus, method:)command_bonus)) @command_window.set_handler:)shutdown, method:)command_shutdown)) end #-------------------------------------------------------------------------- # * [Bonus] Command #-------------------------------------------------------------------------- def command_bonus DataManager.setup_bonus close_command_window fadeout_all $game_map.autoplay SceneManager.goto(Scene_Map) endend
    I called the command bonus and had it transfer to map 2, but it should be pretty easy to set. I kind of commented where you can change things.
  7. Yato said:
    Spoiler
    module DataManager #-------------------------------------------------------------------------- # * Set Up Bonus #-------------------------------------------------------------------------- def self.setup_bonus create_game_objects $game_party.setup_starting_members $game_map.setup(2) #set map id here $game_player.moveto(8, 6) #set x and y of player here $game_player.refresh Graphics.frame_count = 0 endendclass Window_TitleCommand < Window_Command #-------------------------------------------------------------------------- # * Create Command List #-------------------------------------------------------------------------- def make_command_list add_command(Vocab::new_game, :new_game) add_command(Vocab::continue, :continue, continue_enabled) add_command("Bonus", :bonus) #set name of command here add_command(Vocab::shutdown, :shutdown) endendclass Scene_Title < Scene_Base #-------------------------------------------------------------------------- # * Create Command Window #-------------------------------------------------------------------------- def create_command_window @command_window = Window_TitleCommand.new @command_window.set_handler:)new_game, method:)command_new_game)) @command_window.set_handler:)continue, method:)command_continue)) @command_window.set_handler:)bonus, method:)command_bonus)) @command_window.set_handler:)shutdown, method:)command_shutdown)) end #-------------------------------------------------------------------------- # * [Bonus] Command #-------------------------------------------------------------------------- def command_bonus DataManager.setup_bonus close_command_window fadeout_all $game_map.autoplay SceneManager.goto(Scene_Map) endend
    Spoiler
    I called the command bonus and had it transfer to map 2, but it should be pretty easy to set. I kind of commented where you can change things.
    Ah I see, thank you very much! It works now ^-^, I forgot to change DataManager.setup_new_game to DataManager.setup_my_bonus_command x)

    THANK YOU VERY MUCH! :D , works like a charm
  8. 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.