Jump to content

Recommended Posts

Fast Travel Script 1.0
by Black Mage
​

 

Introduction
Fast travel is a concept where you have several locations in a map (Usually this map is called an overworld map) and by selecting one of those locations, you’re transported to their respective location. That's this script's main function.

Features
1. Allow you to fast travel between location.
2. You can use big map for your overworld.
3. Customizable BGM & SFX for the map.
4. Several additional windows for the map.
5. Animated location icon.

Screenshots
I'll put a video instead. It's showing how the map selection works.

Youtube

P.S Anyone know how to embed youtube video?

 

How to Use
1. Put the script on your game.
2. Put the map graphic inside Graphics/System folder. Make sure you named the graphics “Map_Selectâ€.
3. Put the location selection window graphic inside Graphics/System folder. Make sure you named the graphic “Window_Mapâ€.
4. Put an empty graphic named “Emptyâ€. This graphic is needed to run the script, mostly as a placeholder.
5. Put the locations on the script.
6. Customize where each location will transfer the player when they're selected.
7. Customize a lot of other variables found within the script.
8. Call the map using this script call:
SceneManager.call(Scene_Map_Select)

Demo
Demo using Script V-1.0 (Mediafire)

Demo using Script V-1.1 (Mediafire)

Script

 

 


#----------------------------------------------------------------------------# Fast Travel Script By Black Mage (Credit required to use)# Version : 1.1#----------------------------------------------------------------------------## * The script creates a map that hover through listed locations.## * The background image is named "Map_Select", and placed inside #   Graphics/System folder.## * The image named "Empty" is required as dummy and placeholder in several cases.#   You can use an empty PNG files for it.#   The image is placed inside Graphics/System folder.## * The image named "Window_Map" is used as the location selection window.#   The image is placed inside Graphics/System folder.##----------------------------------------------------------------------------## * How to use:## * Enlist every available location into MAP_LIST.## * Assign a switch for each location. Put them on SWITCH_LIST.## * When you want a map is listed on the Map Select menu, simply turn their#   respective switch value to "true".## * Assign x and y variables for the screen to hover when a location is #   highlighted. Put them on LOCATION_COORDINATE## * Assign where to teleport when a location is selected. Put them on #   TELEPORT_LIST.## * Enjoy your map select menu.##----------------------------------------------------------------------------## * There's several additional option below. Feel free to edit them.##----------------------------------------------------------------------------module BLACK_MAP_LIST    #--------------------------------------------------------------------------  # Map name list. This is needed for metaprogramming.  #--------------------------------------------------------------------------  MAP_LIST = ["Australia",               "Russia",               "America"]    #--------------------------------------------------------------------------  # Switches that enable the map.  #--------------------------------------------------------------------------  SWITCH_LIST = [1, # When switch 01 is on, you can transfer to Australia.                 3, # When switch 03 is on, you can transfer to Russia.                 2] # And so on.  #--------------------------------------------------------------------------  # Assign each map name where to teleport.   #--------------------------------------------------------------------------  #                 Map ID, x,  y,  player direction  TELEPORT_LIST = [[2,      8,  1,  2], # This is where "Australia" is going to be.                   [3,      8, 11,  8], # "Russia".                   [1,     15,  7,  4]] # and so on.      #--------------------------------------------------------------------------  # Assign overworld location coordinate.   #--------------------------------------------------------------------------  LOCATION_COORDINATE = [[-470,-100], #The map will move here when "Australia" is highlighted                         [-120,560],                         [880,300]]  #--------------------------------------------------------------------------  # Assign text color for location selection. The color depends on Window   # graphic that you use. 0 is the default color.  #--------------------------------------------------------------------------  TEXT_LOCA_COLOR = [0,                      3,                     2]  #--------------------------------------------------------------------------  # Position of the background image.  #--------------------------------------------------------------------------  MAP_POSITION = [0,0] #[x,y]    #--------------------------------------------------------------------------  # How far the background image is zoomed out.  #--------------------------------------------------------------------------  MAP_ZOOM_OUT = [0.25, 0.25] #[zoom_x, zoom_y]  #--------------------------------------------------------------------------  # How far the background image is zoomed in when a location is selected.  #--------------------------------------------------------------------------  MAP_ZOOM_IN = [1, 1] #[x, y]  #--------------------------------------------------------------------------  # Maximum magnify speed when the scene is started.  #--------------------------------------------------------------------------  MAX_ZOOM_SPEED = 0.01    #--------------------------------------------------------------------------  # Position of the available choices.  #--------------------------------------------------------------------------  CHOICE_POSITION = [0,0] #[x,y]  #--------------------------------------------------------------------------  # Position of window that hold list of the available choices.  #--------------------------------------------------------------------------  WINDOW_POSITION = [0,10] #[x,y]  #--------------------------------------------------------------------------  # The width for location selection choices.  #--------------------------------------------------------------------------  MAP_WINDOW_WIDTH = 132  #--------------------------------------------------------------------------  # The height for location selection choices.   #--------------------------------------------------------------------------  MAP_WINDOW_HEIGHT = 10 # Amount of visible choices in the window.  #--------------------------------------------------------------------------  # Maximum scroll speed when scrolling through the map.  #--------------------------------------------------------------------------  MAX_SCROLL_SPEED = 20  #--------------------------------------------------------------------------  # The map won't scrolled until the zoom are above this number for x and y.  #--------------------------------------------------------------------------  SCROLL_BOUNDARY = [0.5, 0.5] #[zoom_x, zoom_y]  #--------------------------------------------------------------------------  # Position of location selection window picture.  #--------------------------------------------------------------------------  WINDOW_PIC_POSITION = [0, 0] #[x, y]  #--------------------------------------------------------------------------  # Opacity of location selection window picture.  #--------------------------------------------------------------------------  WINDOW_PIC_OPACITY = 200    #--------------------------------------------------------------------------  # Map Menu BGM.  #--------------------------------------------------------------------------  MAP_MENU_BGM = ["Field3", 100, 100] #["BGM name", Volume, Pitch]    #--------------------------------------------------------------------------  # SFX played when the selection is changed.  #--------------------------------------------------------------------------  MAP_MENU_SFX = ["Wind1", 100, 100] #["SFX name", Volume, Pitch]      #--------------------------------------------------------------------------  #   # * Below is the configuration of additional information window.  #  #--------------------------------------------------------------------------    #--------------------------------------------------------------------------  # Location name.  #--------------------------------------------------------------------------  ADD_LOC_NAME = true # Set this to true to enable the location name info  #--------------------------------------------------------------------------  # Location name info position.  #--------------------------------------------------------------------------  ADD_LOC_NAME_POS = [347,0]  #--------------------------------------------------------------------------  # Location name info width & height.  #--------------------------------------------------------------------------  ADD_LOC_NAME_W_H = [200,100] # [width, height]  #--------------------------------------------------------------------------  # Location name font size.  #--------------------------------------------------------------------------  ADD_LOC_NAME_F_SIZE = 20    #--------------------------------------------------------------------------  # Location description.  #--------------------------------------------------------------------------  ADD_LOC_DESC = true # Set this to true to enable the location description info  #--------------------------------------------------------------------------  # Location description position.  #--------------------------------------------------------------------------  ADD_LOC_DESC_POS = [347,155] # [x, y]  #--------------------------------------------------------------------------  # Location description width & height.  #--------------------------------------------------------------------------  ADD_LOC_DESC_W_H = [300,100] # [width, height]  #--------------------------------------------------------------------------  # Location description font size.  #--------------------------------------------------------------------------  ADD_LOC_DESC_F_SIZE = 20  #--------------------------------------------------------------------------  # Description for each location.  #--------------------------------------------------------------------------  ADD_LOC_DESC_VALUE = ["Australia is, well," + "\n" + "Australia.",  # Desc. for Australia.                        "Russia..." + "\n" + "Yeah, Russia.",         # Desc. for Russia.                        "America is America."]                        # and so on.                          #--------------------------------------------------------------------------  # Location thumbnail.  #--------------------------------------------------------------------------  ADD_LOC_THUMB = true # Set this to true to enable the location thumbnail.  #--------------------------------------------------------------------------  # Location description position.  #--------------------------------------------------------------------------  ADD_LOC_THUMB_POS = [376,47] # [x, y]    #--------------------------------------------------------------------------  # Location quests.  #--------------------------------------------------------------------------  ADD_LOC_QUEST = true  #--------------------------------------------------------------------------  # Location quests switches.  #--------------------------------------------------------------------------  ADD_LOC_QUEST_S = [[],                     [6],                     [4,5]]  #--------------------------------------------------------------------------  # Location quests text.  #--------------------------------------------------------------------------  #                 [switch number,   text to show when the value is true]  ADD_LOC_Q_TEXT = [[4,               "* Find a way to" + "\n" + "Russia!"],                    [5,               "* Get the package!"],                    [6,               "* Deliver the package"]]  #--------------------------------------------------------------------------  # Location quests position.  #--------------------------------------------------------------------------  ADD_LOC_QUEST_POS = [347,200] # [x, y]  #--------------------------------------------------------------------------  # Location quests width & height.  #--------------------------------------------------------------------------  ADD_LOC_QUEST_W_H = [300,300] # [width, height]  #--------------------------------------------------------------------------  # Location quests font size.  #--------------------------------------------------------------------------  ADD_LOC_QUEST_F_SIZE = 20    #--------------------------------------------------------------------------  # Information Window Picture.  #--------------------------------------------------------------------------  ADD_WIN_PIC = true # Set this to true to enable the information window picture.  #--------------------------------------------------------------------------  # Position of additional information window picture.  #--------------------------------------------------------------------------  ADD_WIN_PIC_POS = [350, 3] #[x, y]  #--------------------------------------------------------------------------  # Opacity of additional information window picture.  #--------------------------------------------------------------------------  ADD_WIN_PIC_OPA = 200    #--------------------------------------------------------------------------  # Current Party Window.  #--------------------------------------------------------------------------  ADD_CUR_PARTY = true  #--------------------------------------------------------------------------  # Location quests position.  #--------------------------------------------------------------------------  ADD_CUR_PARTY_POS = [352,340] # [x, y]  #--------------------------------------------------------------------------  # Location quests width & height.  #--------------------------------------------------------------------------  ADD_CUR_PARTY_W_H = [180,80] # [width, height]  #--------------------------------------------------------------------------  # * This is an instruction if you want to use an icon for your location.  # * First, the icon canvas mus be as big as the overworld canvas. This is  #   the case to make sure the scrolling is as smooth as possible.  # * Second, the icon must be named after the location found in MAP_LIST.  # * Third, after the icon name, put the frame number of the icon. The number  #   is start from 0.  #--------------------------------------------------------------------------  #--------------------------------------------------------------------------  # * Location animated icon.  #--------------------------------------------------------------------------  LOC_ANI_ICON = true  #--------------------------------------------------------------------------  # * Location animated icon delay.  #   You can call this animation speed. Decrease the value to make the animation  #   faster.  #--------------------------------------------------------------------------  LOC_ANI_ICON_DELAY = 10    end#----------------------------------------------------------------------------# * Beyond this is the sacred land of code. You need programming qualification #   to dwelve deeper, or it'll cause many unnecessary problems. Proceed on your #   own risk.#----------------------------------------------------------------------------class Scene_Map_Select < Scene_Base    include BLACK_MAP_LIST      def start    super    @last_map = "placeholder"    @first_sfx = false    @last_position = [MAP_POSITION[0], MAP_POSITION[1]]    @distance_x = 0    @distance_y = 0        @last_zoom = [MAP_ZOOM_OUT[0], MAP_ZOOM_OUT[1]]        @icon_max = 0    @icon_current = 0    @icon_delay_cur = 0        create_maplist        create_information_window    create_command_window        create_background    create_map_icon    create_map_window    location_update_index    RPG::BGM.new(MAP_MENU_BGM[0], MAP_MENU_BGM[1], MAP_MENU_BGM[2]).play  end      def create_information_window    if ADD_LOC_NAME      @information_window_1 = Window_Information_1.new      @information_window_1.opacity = 0    end    if ADD_LOC_DESC      @information_window_2 = Window_Information_2.new      @information_window_2.opacity = 0    end    if ADD_LOC_THUMB      @information_window_3 = Sprite.new      @information_window_3.bitmap = Cache.system("Empty")          @information_window_3.ox = 0      @information_window_3.oy = 0      @information_window_3.x = ADD_LOC_THUMB_POS[0]      @information_window_3.y = ADD_LOC_THUMB_POS[1]        @information_window_3.z = 2    end    if ADD_LOC_QUEST      @information_window_4 = Window_Information_4.new      @information_window_4.opacity = 0    end    if ADD_WIN_PIC      @info_window = Sprite.new      @info_window.bitmap = Cache.system("Window_Info")          @info_window.ox = 0      @info_window.oy = 0      @info_window.x = ADD_WIN_PIC_POS[0]      @info_window.y = ADD_WIN_PIC_POS[1]        @info_window.z = 2      @info_window.opacity = 0    end    if ADD_CUR_PARTY      @current_party_window = Window_Current_Party.new      @current_party_window.opacity = 0      @current_party_window.refresh    end  end    def create_map_window    @map_window = Sprite.new    @map_window.bitmap = Cache.system("Window_Map")        @map_window.ox = 0    @map_window.oy = 0    @map_window.x = WINDOW_PIC_POSITION[0]    @map_window.y = WINDOW_PIC_POSITION[1]      @map_window.z = 2    @map_window.opacity = 0  end      def create_maplist    @map_list = []    for i in 0..MAP_LIST.size - 1      if $game_switches[SWITCH_LIST[i]] == true        @map_list.push(MAP_LIST[i])      end    end  end    alias black_update update  def update    black_update    if @map_list.size != 0      icon_update if @map_window != nil    end  end    def location_update_index    if @command_window != nil      @last_map = @map_list[@command_window.index].to_s            if LOC_ANI_ICON        @map_name = assigned_number(@map_list[@command_window.index].to_s)        @map_name = @map_list[@command_window.index].to_s        @map_icon.bitmap = Cache.system(@map_name + "0")        @icon_max = pic_list_number        @icon_current = 0      else        @map_icon.bitmap = Cache.system("Empty")      end          end    if @first_sfx == true      RPG::SE.new(MAP_MENU_SFX[0], MAP_MENU_SFX[1], MAP_MENU_SFX[2]).play    end  end      def pic_list_number    @map_name    @pic_frames = []    for index in 0..999      begin        picture = Cache.system(@map_name + index.to_s).nil?      rescue         nil      else        @pic_frames[index] = index      end      break if @pic_frames[index] == nil    end    return @pic_frames.size  end    def icon_update    if LOC_ANI_ICON      if @icon_delay_cur < LOC_ANI_ICON_DELAY        @icon_delay_cur += 1      else        @icon_delay_cur = 0        if @icon_current.to_i < (@icon_max - 1)          @map_icon.bitmap = Cache.system(@map_name + (@icon_current.to_i + 1).to_s)          @icon_current += 1        else          @map_icon.bitmap = Cache.system(@map_name + "0")          @icon_current = 0        end      end    end        @map_window.opacity = WINDOW_PIC_OPACITY    @info_window.opacity = ADD_WIN_PIC_OPA if ADD_WIN_PIC        @map_index = assigned_number(@map_list[@command_window.index].to_s)    map_move(@last_position[0], @last_position[1],             LOCATION_COORDINATE[@map_index][0], LOCATION_COORDINATE[@map_index][1],             255)                 #--------------------------------------------------------------------------    # Define the magnifying speed.    #--------------------------------------------------------------------------    @magnify_x = (MAP_ZOOM_IN[0] - @last_zoom[0])/10        if @magnify_x > 0      @magnify_x = [MAX_ZOOM_SPEED, @magnify_x].min    end    if @magnify_x < 0      @magnify_x = [MAX_ZOOM_SPEED, @magnify_x].max    end          if @magnify_x < 0.005 and @magnify_x > 0        @magnify_x = 0.005    elsif @magnify_x > -0.005 and @magnify_x < 0        @magnify_x = -0.005    end                 @magnify_y = (MAP_ZOOM_IN[1] - @last_zoom[1])/10        if @magnify_y > 0      @magnify_y = [MAX_ZOOM_SPEED, @magnify_y].min    end    if @magnify_y < 0      @magnify_y = [MAX_ZOOM_SPEED, @magnify_y].max    end        if @magnify_y < 0.005 and @magnify_y > 0        @magnify_y = 0.005    elsif @magnify_y > -0.005 and @magnify_y < 0        @magnify_y = -0.005    end            #--------------------------------------------------------------------------    # Scrolling.    #--------------------------------------------------------------------------    if @background_sprite.zoom_x > SCROLL_BOUNDARY[0] and @background_sprite.zoom_y > SCROLL_BOUNDARY[1]      if @first_sfx == false        RPG::SE.new(MAP_MENU_SFX[0], MAP_MENU_SFX[1], MAP_MENU_SFX[2]).play        @first_sfx = true      end      @background_sprite.x = @background_sprite.x + @distance_x      @background_sprite.y = @background_sprite.y + @distance_y      @map_icon.x = @map_icon.x + @distance_x      @map_icon.y = @map_icon.y + @distance_y    end        @background_sprite.zoom_x = @background_sprite.zoom_x + @magnify_x    @map_icon.zoom_x = @map_icon.zoom_x + @magnify_x    if @magnify_x == 0.005      if @background_sprite.zoom_x > MAP_ZOOM_IN[0]        @background_sprite.zoom_x = MAP_ZOOM_IN[0]        @map_icon.zoom_x = MAP_ZOOM_IN[0]      end    elsif @magnify_x == -0.005      if @background_sprite.zoom_x < MAP_ZOOM_IN[0]        @background_sprite.zoom_x = MAP_ZOOM_IN[0]        @map_icon.zoom_x = MAP_ZOOM_IN[0]      end    end        @background_sprite.zoom_y = @background_sprite.zoom_y + @magnify_y    @map_icon.zoom_y = @map_icon.zoom_y + @magnify_y    if @magnify_y == 0.005      if @background_sprite.zoom_y > MAP_ZOOM_IN[1]        @background_sprite.zoom_y = MAP_ZOOM_IN[1]        @map_icon.zoom_y = MAP_ZOOM_IN[1]      end    elsif @magnify_y == -0.005      if @background_sprite.zoom_y < MAP_ZOOM_IN[1]        @background_sprite.zoom_y = MAP_ZOOM_IN[1]        @map_icon.zoom_y = MAP_ZOOM_IN[1]      end    end            #--------------------------------------------------------------------------    # Adjust the position.    #--------------------------------------------------------------------------    @last_position[0] = @background_sprite.x    @last_position[1] = @background_sprite.y    @last_zoom[0] = @background_sprite.zoom_x    @last_zoom[1] = @background_sprite.zoom_y      end    def map_move(f_x, f_y, x, y, opacity)    @distance_x = (x - f_x)/10    if @distance_x > 0      @distance_x = [MAX_SCROLL_SPEED, @distance_x].min    end    if @distance_x < 0      @distance_x = [(MAX_SCROLL_SPEED*(-1)), @distance_x].max    end        if @distance_x == 0      if @last_position[0] == LOCATION_COORDINATE[@map_index][0]      elsif (x - f_x) < 0        @distance_x = -1      else        @distance_x = 1              end    end        @distance_y = (y - f_y)/10    if @distance_y > 0      @distance_y = [MAX_SCROLL_SPEED, @distance_y].min    end    if @distance_y < 0      @distance_y = [(MAX_SCROLL_SPEED*(-1)), @distance_y].max    end    if @distance_y == 0      if @last_position[1] == LOCATION_COORDINATE[@map_index][1]      elsif (y - f_y) < 0        @distance_y = -1      else        @distance_y = 1              end    end      end      def create_command_window    @command_window = Window_MapSelect.new    @command_window.x = WINDOW_POSITION[0]    @command_window.y = WINDOW_POSITION[1]    for i in 0..MAP_LIST.size - 1      @command_window.set_handler(MAP_LIST[i].to_sym, method(MAP_LIST[i].to_sym))    end    @command_window.set_handler(:cancel,    method(:return_scene))    @command_window.information_window_1 = @information_window_1    @command_window.information_window_2 = @information_window_2    @command_window.information_window_4 = @information_window_4    @command_window.information_1_update if ADD_LOC_NAME    @command_window.information_2_update if ADD_LOC_DESC    information_3_update if ADD_LOC_THUMB    @command_window.information_4_update if ADD_LOC_QUEST  end    def information_3_update    if @information_window_3 != nil and @command_window !=nil      bitmap_pic = @map_list[@command_window.index].to_s + "_Thumb"      @information_window_3.bitmap = Cache.system(bitmap_pic)    end  end    def create_background    @background_sprite = Sprite.new    @background_sprite.bitmap = Cache.system("Map_Select")        @background_sprite.ox = @background_sprite.bitmap.width / 2    @background_sprite.oy = @background_sprite.bitmap.height / 2    @background_sprite.x = Graphics.width / 2    @background_sprite.y = Graphics.height / 2    @background_sprite.zoom_x = MAP_ZOOM_OUT[0]    @background_sprite.zoom_y = MAP_ZOOM_OUT[1]  end  def create_map_icon    @map_icon = Sprite.new    @map_icon.bitmap = Cache.system("Empty")        @map_icon.ox = @background_sprite.bitmap.width / 2    @map_icon.oy = @background_sprite.bitmap.height / 2    @map_icon.zoom_x = MAP_ZOOM_OUT[0]    @map_icon.zoom_y = MAP_ZOOM_OUT[1]    @map_icon.x = Graphics.width / 2    @map_icon.y = Graphics.height / 2    @map_icon.z = 1  end    MAP_LIST.each do |map_name|    define_method(map_name) do      list_number = assigned_number(map_name)      transfer_map(list_number)    end  end    def assigned_number(map_name)    for i in 0..MAP_LIST.size - 1      if MAP_LIST[i] == map_name        return i      end    end  end    def transfer_map(a)    b = TELEPORT_LIST    $game_temp.fade_type = 2    $game_player.reserve_transfer(b[a][0],b[a][1],b[a][2],b[a][3])    return_scene  end      def close_command_window    @command_window.close    update until @command_window.close?    fadeout_all    @command_window.dispose    @background_sprite.bitmap = nil  end    def black_dispose    @command_window.dispose    @map_window.bitmap.dispose ; @map_window.dispose ; @map_window = nil    @map_icon.bitmap.dispose ; @map_icon.dispose ; @map_icon = nil        if ADD_WIN_PIC      @info_window.bitmap.dispose      @info_window.dispose      @info_window = nil    end        if @background_sprite.bitmap != nil      @background_sprite.bitmap.dispose    end    @background_sprite.dispose    @background_sprite = nil        @information_window_1.dispose if ADD_LOC_NAME    @information_window_2.dispose if ADD_LOC_DESC        if ADD_LOC_THUMB      @information_window_3.bitmap.dispose      @information_window_3.dispose      @information_window_3 = nil    end        @information_window_4.dispose if ADD_LOC_QUEST    @current_party_window.dispose if ADD_CUR_PARTY  end    def return_scene    close_command_window    black_dispose    super    RPG::BGM.fade(500)    $game_map.autoplay  endend#--------------------------------------------------------------------------# * Map Command List Window#--------------------------------------------------------------------------class Window_MapSelect < Window_Command    include BLACK_MAP_LIST    #--------------------------------------------------------------------------  # * Object Initialization  #--------------------------------------------------------------------------  def initialize    create_maplist    super(0, 0)    self.openness = 0    open    self.opacity = 0  end      #--------------------------------------------------------------------------  # * Get Window Width  #--------------------------------------------------------------------------  def window_width    return MAP_WINDOW_WIDTH  end  #--------------------------------------------------------------------------  # * Create Command List  #--------------------------------------------------------------------------  def make_command_list    for i in 0..@map_list.size - 1      if @map_list.size != 0        add_command(@map_list[i], @map_list[i].to_sym)      end    end  end    #--------------------------------------------------------------------------  # * Get unlocked map list  #--------------------------------------------------------------------------  def create_maplist    @map_list = []    for i in 0..MAP_LIST.size - 1      if $game_switches[SWITCH_LIST[i]] == true        @map_list.push(MAP_LIST[i])      end    end  end    def index=(index)    super    SceneManager.scene.location_update_index    information_1_update if ADD_LOC_NAME    information_2_update if ADD_LOC_DESC    SceneManager.scene.information_3_update if ADD_LOC_THUMB    information_4_update if ADD_LOC_QUEST  end    #--------------------------------------------------------------------------  # * Draw Item  #--------------------------------------------------------------------------  def draw_item(index)    font_color = assigned_number(command_name(index))    change_color(text_color(TEXT_LOCA_COLOR[font_color]), command_enabled?(index))    draw_text(item_rect_for_text(index), command_name(index), alignment)  end      #--------------------------------------------------------------------------  # * Get Window Height  #--------------------------------------------------------------------------  def window_height    fitting_height(MAP_WINDOW_HEIGHT)  end    #--------------------------------------------------------------------------  # * Information Window  #--------------------------------------------------------------------------  def information_window_1=(information_window)    @information_window_1 = information_window  end    def information_window_2=(information_window)    @information_window_2 = information_window  end    def information_window_4=(information_window)    @information_window_4 = information_window  end    def information_1_update    if @information_window_1 != nil      @information_window_1.clear      text = @map_list[self.index].to_s      @information_window_1.set_text(text)    end  end    def information_2_update    if @information_window_2 != nil      @information_window_2.clear      text = ADD_LOC_DESC_VALUE[assigned_number(@map_list[self.index].to_s)]      @information_window_2.set_text(text)    end  end    def information_4_update    if @information_window_4 != nil      @information_window_4.clear      text = ""      map_num = assigned_number(@map_list[self.index].to_s)      for i in 0..ADD_LOC_QUEST_S[map_num].size - 1        if ADD_LOC_QUEST_S[map_num].size != -1          if $game_switches[ADD_LOC_QUEST_S[map_num][i]]            quest_desc = assigned_quest(ADD_LOC_QUEST_S[map_num][i])            text = text + "\n" + ADD_LOC_Q_TEXT[quest_desc][1]          end        end      end      @information_window_4.set_text(text)    end  end    #--------------------------------------------------------------------------  # * Return location number from location name  #--------------------------------------------------------------------------    def assigned_number(map_name)    for i in 0..MAP_LIST.size - 1      if MAP_LIST[i] == map_name        return i      end    end  end    #--------------------------------------------------------------------------  # * Return quest number from quest switch  #--------------------------------------------------------------------------    def assigned_quest(quest_switch)    for i in 0..ADD_LOC_Q_TEXT.size - 1      if ADD_LOC_Q_TEXT[i][0] == quest_switch        return i      end    end  end  end#--------------------------------------------------------------------------# * Map Additional Location Name Window#--------------------------------------------------------------------------class Window_Information_1 < Window_Base    include BLACK_MAP_LIST    #--------------------------------------------------------------------------  # * Object Initialization  #--------------------------------------------------------------------------  def initialize    super(ADD_LOC_NAME_POS[0], ADD_LOC_NAME_POS[1], ADD_LOC_NAME_W_H[0], ADD_LOC_NAME_W_H[1])  end  #--------------------------------------------------------------------------  # * Set Text  #--------------------------------------------------------------------------  def set_text(text)    if text != @text      @text = text      refresh    end  end  #--------------------------------------------------------------------------  # * Clear  #--------------------------------------------------------------------------  def clear    set_text("")  end  #--------------------------------------------------------------------------  # * Refresh  #--------------------------------------------------------------------------  def refresh    contents.clear    draw_text_ex(4, 0, @text)  end  def reset_font_settings    super # run's Window_Base's reset_font_settings    contents.font.size = ADD_LOC_NAME_F_SIZE  endendclass Window_Information_2 < Window_Base    include BLACK_MAP_LIST    #--------------------------------------------------------------------------  # * Object Initialization  #--------------------------------------------------------------------------  def initialize    super(ADD_LOC_DESC_POS[0], ADD_LOC_DESC_POS[1], ADD_LOC_DESC_W_H[0], ADD_LOC_DESC_W_H[1])  end  #--------------------------------------------------------------------------  # * Set Text  #--------------------------------------------------------------------------  def set_text(text)    if text != @text      @text = text      refresh    end  end  #--------------------------------------------------------------------------  # * Clear  #--------------------------------------------------------------------------  def clear    set_text("")  end  #--------------------------------------------------------------------------  # * Refresh  #--------------------------------------------------------------------------  def refresh    contents.clear    draw_text_ex(4, 0, @text)  end   def reset_font_settings    super # run's Window_Base's reset_font_settings    contents.font.size = ADD_LOC_DESC_F_SIZE  end  endclass Window_Information_4 < Window_Base    include BLACK_MAP_LIST    #--------------------------------------------------------------------------  # * Object Initialization  #--------------------------------------------------------------------------  def initialize    super(ADD_LOC_QUEST_POS[0], ADD_LOC_QUEST_POS[1], ADD_LOC_QUEST_W_H[0], ADD_LOC_QUEST_W_H[1])  end  #--------------------------------------------------------------------------  # * Set Text  #--------------------------------------------------------------------------  def set_text(text)    if text != @text      @text = text      refresh    end  end  #--------------------------------------------------------------------------  # * Clear  #--------------------------------------------------------------------------  def clear    set_text("")  end  #--------------------------------------------------------------------------  # * Refresh  #--------------------------------------------------------------------------  def refresh    contents.clear    draw_text_ex(4, 0, @text)  end   def reset_font_settings    super # run's Window_Base's reset_font_settings    contents.font.size = ADD_LOC_QUEST_F_SIZE  end  end#--------------------------------------------------------------------------# * Window Current Party#--------------------------------------------------------------------------class Window_Current_Party < Window_Base    include BLACK_MAP_LIST  #--------------------------------------------------------------------------  # * Object Initialization  #--------------------------------------------------------------------------  def initialize    super(ADD_CUR_PARTY_POS[0], ADD_CUR_PARTY_POS[1], ADD_CUR_PARTY_W_H[0], ADD_CUR_PARTY_W_H[1])  end  #--------------------------------------------------------------------------  # * Draw Item  #--------------------------------------------------------------------------  def item_max    return $game_party.members.size  end  def draw_all_items    item_max.times {|i| draw_item(i) }  end    def draw_item(index)    @actor = $game_party.members[index]    if @actor != nil      x_pos = 60      draw_actor_graphic(@actor, index*40 + 20, 45)    end  end    #--------------------------------------------------------------------------  # * Refresh  #--------------------------------------------------------------------------  def refresh    contents.clear    draw_all_items  end  end

 

 

FAQ
None yet.

Credit and Thanks
Black Mage.

Thanks to Sixth from RMW for reminding me that I forgot to put the dispose method inside the script. Also for several other contributions. clear.png;)

Author's Note
If you having trouble on using this script, and it seems that I rarely appeared here, you can go directly to my wordpress, and ask something there. I mostly roaming around there so there's no need to worry that your question will be left unanswered.

Here's a link to the pages of this script in my wordpress.
Fast Travel Script

Edited by Black Mage

Share this post


Link to post
Share on other sites

can you add a small thumbnail on the map...

Something like this, right?

 

If that's what you want, it's there actually. Explanations for it are placed on FAQ. I'll continue from there. The Picture needs to be named the same as the location name and placed inside Graphics/System folder. So, if you set the location name as "Australia", then the picture name would be "Australia".

 

I'm aware that my instructions for this are a bit vague. You're welcome to ask questions regarding these matters.

 

P.S The FAQ is updated with the explanation from this post.

Share this post


Link to post
Share on other sites

Sorry for late but To tell the truth this is what I mean...

 

hhh.PNG

I think It would be cool if you can add it, but thanks.

Share this post


Link to post
Share on other sites

Whoa, sorry for my misunderstanding. :P

Actually, I planned to add Location information window on the script in the future. I'll put an option for the thumbnail inside :D

Share this post


Link to post
Share on other sites

Sorry for late but To tell the truth this is what I mean...

 

hhh.PNG

I think It would be cool if you can add it, but thanks.

The main post has been updated with the new version of the script, with this feature included. Also, I put a new video and demo.

 

Version 1.1 (13 May 2017)

– Bugfix for select location window position.

– Add dispose method to the script to prevent memory leaks.

– Add customized BGM & SFX for the map.

– Add customized location color feature.

– Add location name window.

– Add location description window.

– Add location thumbnail feature.

– Add available quest window for location.

– Add current party window feature.

– Add animated location icon feature.

Edited by Black Mage

Share this post


Link to post
Share on other sites

Ah yes, reminds me of the travel map in Skyrim.

 

Sort of; it lacks in the area of free scrolling.

 

But the demo was silly enough to get me to play it through and overall, it looks very nice. Well done.

Share this post


Link to post
Share on other sites

Hi, I'm having troubles and was hoping you or someone else could help me out.

Whenever I add more than three locations, the game crashes upon opening the map.


Script 'Game_Switches' line 19: TypeError occurred.

no implicit conversion from nil to integer

 

I have tried changing switches, location coordinates, window colors, and teleport coordinates, to no success.

 

Here's my edited script.

Thanks in advance!

 

#--------------------------------------------------------------------------
  # Map name list. This is needed for metaprogramming.
  #--------------------------------------------------------------------------
  MAP_LIST = ["Cracktown", 
              "Eastern Range Village",
              "Ithril",
              "Arriba",
              "Kan",
              "Barkleys House",
              "Great Sea Peninsula",
              "Turban",
              "Yokai Castle",
              "Rodney",
              "Bakastan",
              "Dimpleton",
              "Rodriguez",
              "X Fortress",
              "Clodingham",
              "Caroline",
              "Eregon",
              "Roowarts",
              "St. Leonardo",
              "Fuego",
              "Imperium",
              "Dynas House",
              "Gensokyo",
              "Slam Temple",
              "Benito Archipelago",
              "Polaris"]
  #--------------------------------------------------------------------------
  # Switches that enable the map.
  #--------------------------------------------------------------------------
  SWITCH_LIST =  [0001, # When switch 01 is on, you can transfer to Australia.
                 0001, # When switch 03 is on, you can transfer to Russia.
                 0001,
                 0001,
                 0001,
                 0001,
                 0001,
                 0001,
                 0001,
                 0001,
                 0001,
                 0001,
                 0001,
                 0001,
                 0001,
                 0001,
                 0001,
                 0001,
                 0001,
                 0001,
                 0001,
                 0001,
                 0001,
                 0001,
                 0001]# And so on.

  #--------------------------------------------------------------------------
  # Assign each map name where to teleport. 
  #--------------------------------------------------------------------------
  #                 Map ID, x,  y,  player direction
  TELEPORT_LIST = [[16,    25,  40,  2], # This is where "Australia" is going to be.
                   [13,    17,  35,  2], # "Russia".
                   [25,    25,  19,  2],
                   [37,    20,  28,  2],
                   [24,    70,  30,  4],
                   [49,    14,  17,  2],
                   [62,    18,  21,  2],
                   [68,    21,  40,  2],
                   [51,    19,  35,  2],
                   [106,   22,  17,  2],
                   [130,    6,   4,  2],
                   [139,   14,  26,  2],
                   [116,   25,  60,  6],
                   [149,   29,  43,  2],
                   [155,  197, 143,  2],
                   [167,    1,   9,  8],
                   [170,   22,  55,  6],
                   [229,   24,  56,  6],
                   [224,    1,  14,  6],
                   [267,   23,  41,  6],
                   [82,    33,  65,  6],
                   [222,  131,  91,  2],
                   [247,   66,  38,  2],
                   [202,   23,  20,  2],
                   [300,   16,  28,  6],
                   [205,   65,  82,  2]]# and so on.
    
  #--------------------------------------------------------------------------
  # Assign overworld location coordinate. 
  #--------------------------------------------------------------------------

  LOCATION_COORDINATE = [[10,-50], #The map will move here when "Australia" is highlighted
                         [-120,560],
                         [880,300],
                         [880,300],
                         [880,300],
                         [880,300],
                         [880,300],
                         [880,300],
                         [880,300],
                         [880,300],
                         [880,300],
                         [880,300],
                         [880,300],
                         [880,300],
                         [880,300],
                         [880,300],
                         [880,300],
                         [880,300],
                         [880,300],
                         [880,300],
                         [880,300],
                         [880,300],
                         [880,300],
                         [880,300],
                         [880,300],
                         [880,300]]

  #--------------------------------------------------------------------------
  # Assign text color for location selection. The color depends on Window 
  # graphic that you use. 0 is the default color.
  #--------------------------------------------------------------------------
  TEXT_LOCA_COLOR = [0, 
                     3,
                     2,
                     2,
                     2,
                     2,
                     2,
                     2,
                     2,
                     2,
                     2,
                     2,
                     2,
                     2,
                     2,
                     2,
                     2,
                     2,
                     2,
                     2,
                     2,
                     2,
                     2,
                     2,
                     2,
                     2]

 

Share this post


Link to post
Share on other sites

@Yung_Walrus I'm sorry that your post left unanswered for almost 5 month. A lot of IRL stuff are happening and I got busy this years. Not to mention that I rarely visit this forum.

 

Anyway, for your problem, it's actually simple. You have 26 places but you only assign 25 switches. Thus the error occurred. I tried adding one switch on the switch list and it works fine.

 

P.S As you already see, I rarely visit this forum. So if there's another problem occurs, you can tell me on my Wordpress and I'll visit this place again to solve it.

My Wordpress: Trail of A Developer

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×