Title Screen Option - Map Transfer

Status
Not open for further replies.

MartaLualdi

Lullaby~
Veteran
Joined
Jan 6, 2014
Messages
35
Reaction score
5
Primarily Uses
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:

  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)
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
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.
 

Yato

(aka Racheal)
Veteran
Joined
Mar 17, 2012
Messages
825
Reaction score
346
Primarily Uses
^ 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.
 
Last edited by a moderator:

MartaLualdi

Lullaby~
Veteran
Joined
Jan 6, 2014
Messages
35
Reaction score
5
Primarily Uses
^ 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).
 
Last edited by a moderator:

Yato

(aka Racheal)
Veteran
Joined
Mar 17, 2012
Messages
825
Reaction score
346
Primarily Uses
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.
 
Last edited by a moderator:

MartaLualdi

Lullaby~
Veteran
Joined
Jan 6, 2014
Messages
35
Reaction score
5
Primarily Uses
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.
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
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
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.

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,977
Members
137,563
Latest member
cexojow
Top