07-13-2017, 12:56 AM 
(This post was last modified: 12-14-2023, 05:21 AM by DerVVulfman.
 Edit Reason: <(^_^<)  *Dance dance dance.  BUFFERS!  Helps going for hella ridiculous maps!
)
	
	
	![[Image: uSqjY09.png]](https://i.imgur.com/uSqjY09.png)
Version: 1.7
Introduction
This allows you to chain multiple maps together to make one hellacious big honkin' map!
All seamless, it creates a single map in memory based on the maps you merge together. Save, load, teleport between, so far, it all works!
Script
 Big Maps
  			Code:
#==============================================================================
# ** BIG MAPS
#------------------------------------------------------------------------------
#    by DerVVulfman
#    version 1.7
#    06-12-2020 (mm/dd/yyyy)
#    RGSS / RPGMaker XP
#==============================================================================
#
#  This allows you to chain multiple maps together to make one hellacious big
#  honkin' map!
#
#                                == * == * ==
#
#  BRANCHES &  Standard use of both 'Conditional Branches' and 'Control
#  CONTROL     Variables' is unhampered by this system.
#  VARIABLES:  Performing both with an event to acquire event data (such as
#              map ID, position, facing direction) only functions on events
#              made within its 'individual map' A map event cannot test the
#              data of  another event  if the  target event  was made  on a
#              different map.
#              EX:  Event 1 on map 3 cannot get data from Event 4 on map 2.
#                   Event 1 on map 3 'can' get data from Event 2 on map 3.
#
#
#  TELEPORT:   Standard teleporting between normal maps remains unchanged.
#              Teleporting to a 'big map' has special attributes:
#              1) Setting coordinates to one  of the  individual maps in a
#                 'big map' permitted.  Placement is adjusted accordingly.
#              2) Using variables to teleport into a 'big map' works.  You
#                 can set  the individual map ID and x/y coordinates.   If
#                 the X/Y coodinates  are outside  of the  individual map, 
#                 it may place the player into the next adjoining map.
# 
#
#  SET EVENT   See Teleport.  Functionally the same for events, except the
#  LOCATION:   event cannot leave the 'big map'.  No Map ID to set/define.
#              Swapping two events limited to those defined in the indivi-
#              dual map.   Cannot swap events  defined in  different maps.
#
#
#  ANIMATIONS: Unhampered by this system.   The editor's  dropdown menu to
#              set an animation  only permites those events  in that given
#              map.   An event on one map cannot apply  an animation to an
#              event created on another.
#
#  EVENT IDs:  Under normal circumstances, you can view the ID of an event
#              in a script call like @>Script: p event_id
#              This will give you the 'new' ID of the event if it was one
#              added to the accumulated Big Map. Obviously different than
#              the original.  To acquire the original Map anedEvent_ID of
#              the event, use  "p $game_map.old_big_event(event_id)".
#              Newly added,the "$game_map.old_big_event" command will re-
#              turn the map and event ID for the event.   There is also a
#              matching command to get the new ID of an event  based upon
#              its original map and ID values, this being :new_big_event"
#              It is used like  "p $game_map.new_big_event(2,23)".
#
#
#                                == * == * ==
#
#  INCLUDED:  A warning system that tests the following:
#             1) If a map is defined in two or more 'big maps' 
#             2) If a map is defined more than once in a single 'big map'
#             3) If a big map is incorrectly defined by the following
#                a) Incorrect dimensions provided
#                b) Insufficient maps to fill defined big map dimensions
#             4) If maps within a big map do not use the same tileset (*)
#
#  (*) NOTE:  All map data regarding tileset, fog, etc. are derived from the
#             first map loaded.   Ensure all maps use the same tileset data.
#
#
#------------------------------------------------------------------------------
#
#  KNOWN / TESTED WITH THE FOLLOWING:
#
#  * Auto Populate by Charlie Fleed  - Functional   Must be below Big Maps. 
#  * Tileset Swap by ccoa            - Functional.  Must be above Big Maps.
#  * MGC Mode7 Edit by DerVVulfman   - Functional.  Can be above or below.   **
#    (Until the bitmap render limit is reached)
#  * Fog of War by Wachunga          - Functional.  Must be below Big Maps.  **
#  * Dynamic Maps by Near Fantastica - Failed.      A new system needed.    ***
#  * MiniMaps DVV                    - Failed.
#  * Selwyn's Passable MiniMaps      - Failed.
#  * Pass.. Minimaps by Charlie Fleed-Failed.
#  * Charlie's Passable Minimaps     - Functional. Below Big Maps w Patch
#  * Zeriab's Anti-Lag               - Functional  Must be above Big Maps
#                                                  -for up to 5000 events -
#
#                                == * == * ==
#
#   ** Special map codes defined  by these systems must be in the name of any
#      map where the player  may enter/teleport.  Save Games retain settings.
#
#  *** Dynamic Maps permits events and settings to be stored/saved before one
#      leaves the map.   On returning,  the previously saved data is restored,
#      beneficial for features such as Fog of War.
#
#
#==============================================================================
#==============================================================================
# ** BigMaps
#------------------------------------------------------------------------------
#  This module handles map configuration properties, and the map test switch.
#==============================================================================
module BigMaps
  
  # Creates the map array.  Do not remove. -----------------------------------
  Map = {} # Do not touch ----------------------------------------------------
  # --------------------------------------------------------------------------
  
  # Testing Switch
  # ==============
  # If true, runs system test prior to game execution.
  # Must be off/false for encrypted projects.
  #
    Test = true
  # Loading Buffer
  # ===============
  # This sets how many calculations/iterations are performed before
  # graphically updating the system to prevent script hanging errors.
  # Lower numbers slow down, but at a cost of security against error.
  #
    Buffer = 600000  # Tested successfully up to 700000
  # Visible Load
  # ==============
  # This is an array which lists which 'Big Maps' that display the
  # generic Loading screen that appears when entering a big map.
  #
    Load = ['f']
  # MAP LIST        Hor Ver       List of BigMaps
  # =========       === ===       ============
  #
 
    Map['f']  = [ [   3,  3 ]  ,   [ 2, 3, 4,
                                     5, 6, 7,
                                     8, 9, 10 ]]
#    Map['f']  = [ [   7,  7 ]  ,   [ 2, 3, 4, 5, 6, 7, 8,
#                                     9,10,11,12,13,14,15,
#                                    16,17,18,19,20,21,22,
#                                    23,24,25,26,27,28,29,
#                                    30,31,32,33,34,35,36,
#                                    37,38,39,40,41,42,43,
#                                    44,45,46,47,48,49,50] ]
#    Map['f']  = [ [ 18, 18 ]  ,
#      [   2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
#         20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
#         38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
#         56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
#         74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
#         92, 93, 94, 95, 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,
#        110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
#        128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,
#        146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,
#        164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,
#        182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,
#        200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,
#        218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,
#        236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,
#        254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,
#        272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,
#        290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,
#        308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325
#        ]]
end
#==============================================================================
# ** BigMaps
#------------------------------------------------------------------------------
#  This module handles routines executed without the need of the Game_Map
#  class being loaded to test validity of Big Map data
#==============================================================================
module BigMaps
  #--------------------------------------------------------------------------
  # * Map Test
  #     map_id : Map ID
  #--------------------------------------------------------------------------
  def self.map_test(map_id)
    # Clear return flag
    returnval = nil
    # Cycle through all BigMaps defined
    BigMaps::Map.each {|mapset|
      # Set up a blank array (storage for BigMapset data)
      map_array   = []
      map_dims    = []
      map_ids     = []
      map_key     = mapset[0]
      map_array   = mapset[1]
      map_dims    = map_array[0]
      map_ids     = map_array[1]
      # Test map dimensions against list of BigMaps
      returnval   = true if (map_dims[0] * map_dims[1]) == map_ids.size
      # Exit if Dimensions not matching list of BigMaps
      return nil if returnval == false
      # Clear return flag
      returnval = nil
      counter   = 0
      # Cycle through map dimensions
      for y in 0..map_dims[1]-1
        for x in 0..map_dims[0]-1
          # Acquire the map key if the map array has the current map
          if map_id == map_ids[counter]
            returnval = map_key
            return returnval
          end
          counter += 1
        end
      end
    }
    # End Method
    return returnval
  end
  #--------------------------------------------------------------------------
  # * Warning Test
  #--------------------------------------------------------------------------
  def self.warnings
    # Cycle through project's maps for duplicates
    mappins = load_data(sprintf("Data/MapInfos.rxdata"))
    mappins.each  {|map|
      maptest = 0
      BigMaps::Map.each {|set|
      unless set[1].nil?
        unless set[1].size != 2
          # Run Through Each Increaing Times if object is equal
          times = 0
          set[1][1].each {|element| times += 1 if element == map[0].to_i}
          maptest += 1 if times > 0
          if times > 1
            print "Project map is used more than once in a single big map.\n"+
                  "Map ID: " + map[0].to_s + " / Bigmap set: " + set[0].to_s
          end
        end
      end
      }        
      if maptest > 1
        print "Project map is in more than one big map.\n"+
              "Map ID: " + map[0].to_s
      end
    }    
    # Cycle through big maps for data errors
    BigMaps::Map.each {|set|
      if set[1].nil?
        p "Invalid set data detected for set " + set[0].to_s
      else
        if set[1].size != 2
          p "Invalid set data detected for set " + set[0].to_s
        else
          if set[1][0].size != 2
            "Invalid set dimensional data for set " + set[0].to_s
          else
            mapgrid = set[1][0][0] * set[1][0][1]
            if mapgrid < 2
              p "Invalid Big Map dimensions for set " + set[0].to_s
            else
              if mapgrid != set[1][1].size
                p "maps != dimension requirements for set " + set[0].to_s
              else
                failflag = false
                for i in set[1][1]
                  flag = FileTest.file?(sprintf("Data/Map%03d.rxdata", i)) 
                  failflag = true if flag == false
                end
                if failflag == true
                  p "missing maps used within set " + set[0].to_s  
                else
                  mid   = set[1][1][0]
                  map   = load_data(sprintf("Data/Map%03d.rxdata", mid))
                  mapx  = map.data.xsize
                  mapy  = map.data.ysize
                  mapfail = false
                  for i in set[1][1]
                    map = load_data(sprintf("Data/Map%03d.rxdata", i)) 
                    mapfail = true if mapx != map.data.xsize 
                    mapfail = true if mapy != map.data.ysize 
                  end
                  if mapfail
                    p "map sizes differ for set " + set[0].to_s  
                  else
                    mid     = set[1][1][0]
                    map     = load_data(sprintf("Data/Map%03d.rxdata", mid))
                    ts      = map.tileset_id
                    mapfail = false
                    for i in set[1][1]
                      map = load_data(sprintf("Data/Map%03d.rxdata", i)) 
                      mapfail = true  if ts != map.tileset_id
                    end
                    if mapfail
                      p "Tilesets differ between maps in set "+ set[0].to_s
                    end
                  end
                end
              end
            end
          end
        end
      end
    }    
  end
end
#==============================================================================
# ** BigMaps Automated Data Test
#------------------------------------------------------------------------------
#  Run before everything else, this checks every big map configured to ensure
#  proper data entries were made.
#==============================================================================
BigMaps.warnings if BigMaps::Test
#==============================================================================
# ** RPG
#------------------------------------------------------------------------------
#  A module containing RPGXP's data structures and more.
#==============================================================================
module RPG
  #============================================================================
  # ** Event
  #----------------------------------------------------------------------------
  #  Data class for map events.
  #============================================================================
  class Event
    #------------------------------------------------------------------------
    # * Update Events
    #------------------------------------------------------------------------
    def update_events_for_bigmaps(orig_map_id, ofs_x, ofs_y, ofs_id)
      @pages.each {|page|
        update_page_events(page, orig_map_id, ofs_x, ofs_y, ofs_id)
      }
    end
    #------------------------------------------------------------------------
    # * Update Data in Event Pages
    #------------------------------------------------------------------------
    def update_page_events(page, orig_map_id, ofs_x, ofs_y, ofs_id)
      page.list.each {|cmd|
        params = cmd.parameters
        case cmd.code
        # Conditional branch:  Option 6 (Event Facing Direction)
        when 111 ; params[1] += ofs_id if params[0] == 6 && params[1] > 0
        # Control Variable:  Option 6 (Acquiring map data for Selected Event)
        when 122 ; params[4] += ofs_id if params[3] == 6 && params[4] > 0
        # Set event location 
        when 202
          params[0] += ofs_id if params[0] > 0
          # swap with character
          if params[1] == 2 && params[2] > 0
            params[2] += ofs_id 
          # move to position by direct designation
          elsif params[1] == 0
            params[2] += ofs_x
            params[3] += ofs_y
          end
        # When Show Animation or Move Route
        when 207, 209
          params[0] += ofs_id if params[0] > 0
        end               
      }
    end
  end
end
#==============================================================================
# ** Game_Map
#------------------------------------------------------------------------------
#  This class handles the map. It includes scrolling and passable determining
#  functions. Refer to "$game_map" for the instance of this class.
#==============================================================================
class Game_Map
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :oldbigmap_id             # ID of previous map if 'big map'
  attr_accessor :map_restart              # Big Map setup restart flag
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias bigmaps_gm_width width
  alias bigmaps_gm_height height
  alias bigmaps_gm_setup setup
  if method_defined? :move_event
    alias zeriab_move_event move_event
  end
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    @map_id         = 0
    @display_x      = 0
    @display_y      = 0
    @oldbigmap_id   = 0
    @map_restart    = false
    @bigmap_events  = {}
  end
  #--------------------------------------------------------------------------
  # * Setup
  #     map_id : map ID
  #--------------------------------------------------------------------------
  def setup(map_id)
    # Test and exit if teleporting within same big map and big map is valid
    map_key1 = BigMaps.map_test(@oldbigmap_id)
    map_key2 = BigMaps.map_test(map_id)
    return if map_key1 == map_key2 && map_key2 != nil
    # Erase revised width/height
    @new_width  = nil
    @new_height = nil
    #
    @bigmap_events  = {}
    # Test if big map
    map_key = BigMaps.map_test(map_id)
    # Set Big Map Restart flag if Big Map Tested
    @map_restart = true unless map_key.nil?
    # Perform the original call
    bigmaps_gm_setup(map_id)
    # Reset Big Map Restart flag
    @map_restart = false
    # Exit unless bigmap
    return if map_key.nil?
    # Generate big map
    bigmaps_gm_generate(map_key, map_id)
    @map.width  ||= @new_width 
    @map.height ||= @new_height
    @map.width  = @new_width
    @map.height = @new_height
  end
  #--------------------------------------------------------------------------
  # * Get Width
  #--------------------------------------------------------------------------
  def width
    @new_width || bigmaps_gm_width
  end
  #--------------------------------------------------------------------------
  # * Get Height
  #--------------------------------------------------------------------------
  def height
    @new_height || bigmaps_gm_height
  end
  #--------------------------------------------------------------------------
  # * Get old map ID and event ID (returns array if valid)
  #     event_id
  #--------------------------------------------------------------------------
  def old_big_event(event_id)
    @bigmap_events.index(event_id)
  end
  #--------------------------------------------------------------------------
  # * Get the new event ID based on the original Map and event ID
  #     event_id
  #--------------------------------------------------------------------------
  def new_big_event(map_id, event_id)
    @bigmap_events[[map_id, event_id]]
  end
  #--------------------------------------------------------------------------
  # * Generate Big Map
  #     map_key : key for specified big map hash array
  #     map_id  : map ID
  #--------------------------------------------------------------------------
  def bigmaps_gm_generate(map_key, map_id)
    # Acquire big map data
    map_data        = []
    map_data        = BigMaps::Map[map_key]
    # Obtain first map from array
    bigmap          = load_data(sprintf("Data/Map%03d.rxdata", map_data[1][0]))
    # Define new 'big map' size
    map_xsize       = map_data[0][0] * bigmap.data.xsize
    map_ysize       = map_data[0][1] * bigmap.data.ysize
    # Resize the map
    @new_width  = map_xsize
    @new_height = map_ysize
    @map.data.resize(map_xsize, map_ysize, @map.data.zsize)
    # Reset values for target map loop
    counter = 0  # Counter
    ox      = 0  # Original X Offset
    oy      = 0  # Original Y Offset
    evsize  = 0  # Size/Number of events
    # Set map event data
    @events = {}
    # Cycle through Big Map data
    for y in 0..(map_data[0][1])-1
      for x in 0..(map_data[0][0])-1
        # Acquire map ID and advance counter
        mid = map_data[1][counter]
        counter += 1
        # Acquire current map to add
        bigmap = load_data(sprintf("Data/Map%03d.rxdata", mid)) 
        # Add/Increase Encounters from map data
        bigmaps_gm_generate_enc(bigmap.encounter_list)
        # Draw new map from map data
        bigmaps_gm_generate_tiles(bigmap.data, ox, oy)
        # Add Events from map data, increasing event size for offset
        newsize = bigmaps_gm_generate_events(bigmap.events, mid, ox, oy, evsize)
        evsize  = newsize
        # Advance offxet X
        ox += bigmap.data.xsize
      end
      # Advance offxet Y (Resetting offset X)
      oy += bigmap.data.ysize
      ox = 0
    end    
    # Cycle through all events
    for event in @events.values
      # Adaptation for Zeriab's Anti-Lag
      if Game_Event.method_defined? :check_update 
        event.check_update(true)
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Add Tiles into Big Map
  #     map_data : individual map tile/size data
  #     ox       : x-location drawing offset
  #     oy       : y-location drawing offset
  #--------------------------------------------------------------------------
  def bigmaps_gm_generate_tiles(map_data, ox, oy)
    hangfix = 0
    for z in [2, 1, 0]
      
      for x in 0 ... map_data.xsize
        for y in 0 ... map_data.ysize
          hangfix += 1
          if hangfix > BigMaps::Buffer
            Graphics.update
            hangfix = 0
          end
          @map.data[ox + x, oy + y, z] = map_data[x, y, z]
        end
      end
    end
  end  
  #--------------------------------------------------------------------------
  # * Add to Big Map Encounter List
  #     new_enc_list : individual map encounter list
  #--------------------------------------------------------------------------
  def bigmaps_gm_generate_enc(new_enc_list)
    @map.encounter_list.concat(new_enc_list)
  end  
  #--------------------------------------------------------------------------
  # * Generate Big Map Events
  #     events      :
  #     orig_map_id :
  #     ofs_x       :
  #     ofs_y       :
  #     ofs_evt     : 
  #--------------------------------------------------------------------------
  def bigmaps_gm_generate_events(events, orig_map_id, ofs_x, ofs_y, ofs_evt)
    # Set temp map event data
    new_events = {}
    # Calculate returned event list size (return if unchanged)
    sizer = ofs_evt + events.size unless events.nil?
    return sizer if events.nil?
    # Cycle through each new event
    events.each {|id, event|
      # Set new event ID
      new_id    = id + ofs_evt
      event.id  = new_id
      # Add to list of map event returns
      @bigmap_events[[orig_map_id,id]] = new_id
      # Adjust new event coords
      event.x += ofs_x
      event.y += ofs_y
      # Update general event data
      event.update_events_for_bigmaps(orig_map_id, ofs_x, ofs_y, ofs_evt)
      # Push into temp map event array
      new_events[new_id]  = event
    }
    # Set up events in map
    bigmaps_gm_generate_events_setup(new_events)
    # End Method with new size
    return sizer
  end  
  #--------------------------------------------------------------------------
  # * Add the Map Events
  #     events : events added to map event list
  #--------------------------------------------------------------------------
  def bigmaps_gm_generate_events_setup(events)
    events.each do |i, event|
      @events[i] = Game_Event.new(@map_id, event)
      # Adaptation for Zeriab's Anti-Lag
      #if Game_Event.method_defined? :check_update 
      #  @events[i].check_update
      #end
    end
  end  
  #--------------------------------------------------------------------------
  # * Called when an event has been moved with it's old x and y coordinate
  #   Used to update its position in the event_map
  #--------------------------------------------------------------------------
  if method_defined? :move_event
    def move_event(old_x, old_y, event)
      return if @map_restart == true
      zeriab_move_event(old_x, old_y, event)
    end
  end
end
#==============================================================================
# ** Game_Event
#------------------------------------------------------------------------------
#  This class deals with events. It handles functions including event page 
#  switching via condition determinants, and running parallel process events.
#  It's used within the Game_Map class.
#==============================================================================
class Game_Event < Game_Character
  # Rewrite of method in Zeriab's Anti-Lag
  if Game_Event.method_defined? :check_update 
    #------------------------------------------------------------------------
    # * Checks how the event should be updated.
    #------------------------------------------------------------------------
    def check_update(big_map=false)
      name = @event.name
      # Checks if the event is never to be updated. (For decoration)
      for pattern in NEVER_UPDATE_NAME_PATTERNS
        if (pattern.is_a?(String) and name.include?(pattern)) ||
        (pattern.is_a?(Regexp) and !(pattern =~ name).nil?)
          self.never_update = true
        end
      end
      # Checks if the event is to be always updated.
      for pattern in ALWAYS_UPDATE_NAME_PATTERNS
        if (pattern.is_a?(String) and name.include?(pattern)) ||
        (pattern.is_a?(Regexp) and !(pattern =~ name).nil?)
          self.always_update = true
        end
      end
      # Acquire map/event key
      map_event_key = [@map_id,@id]
      # Re-Acquire key if a big map, using big map event ID
      if big_map == true
        map_event_key = $game_map.old_big_event(@id)
      end
      # Checks for special update for the particular id (overrules the patterns)
      special_update = SPECIAL_UPDATE_IDS[map_event_key]
      unless special_update.nil?
        # Checks if it never should be updated
        if special_update.downcase == 'n'
          self.never_update = true
          self.always_update = false
        # Checks if it always should be updated
        elsif special_update.downcase == 'a'
          self.always_update = true
          self.never_update = false
        end
      end
    end    
  end
end
#==============================================================================
# ** Window_MapLoad
#------------------------------------------------------------------------------
#  This window displays amount of gold.
#==============================================================================
class Window_MapLoad < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(254, 208, 132, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = normal_color
    self.contents.draw_text(0, 0, 100, 32, "LOADING", 1)
  end
end
#==============================================================================
# ** Interpreter
#------------------------------------------------------------------------------
#  This interpreter runs event commands. This class is used within the
#  Game_System class and the Game_Event class.
#==============================================================================
class Interpreter
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias bigmaps_inter_command_201 command_201
  #--------------------------------------------------------------------------
  # * Transfer Player
  #--------------------------------------------------------------------------
  def command_201
    # Perform the original call with effective state
    effective = bigmaps_inter_command_201
    # Reset old map value
    $game_map.oldbigmap_id  = 0
    # Skip all this if not teleporting to a biggun
    map_key = BigMaps.map_test($game_temp.player_new_map_id)
    return effective if map_key.nil?
    # Define old map being left as 'big map' by ID
    $game_map.oldbigmap_id = $game_map.map_id
    # Reset values for target map loop
    counter   = 0  # Counter
    ox        = 0  # Original X Offset
    oy        = 0  # Original Y Offset
    map_data  = BigMaps::Map[map_key]
    # Get initial data from 1st map for individual map sizes
    bigmap    = load_data(sprintf("Data/Map%03d.rxdata", map_data[1][0])) 
    # Cycle through Big Map data
    for y in 0..(map_data[0][1])-1
      for x in 0..(map_data[0][0])-1
        # Acquire map ID and advance counter
        mid = map_data[1][counter]
        counter += 1
        # If it is the target Map ID
        if mid == $game_temp.player_new_map_id
          # Redefine new coordinates
          $game_temp.player_new_x += ox
          $game_temp.player_new_y += oy
        end
        # Advance offxet X
        ox += bigmap.data.xsize
      end
      # Advance offxet Y (Resetting offset X)
      oy += bigmap.data.ysize
      ox = 0
    end     
    # Exit Method Effective
    return effective
  end
end
#==============================================================================
# ** Scene_Title
#------------------------------------------------------------------------------
#  This class performs title screen processing.
#==============================================================================
class Scene_Title
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias bigmap_stitle_command_new_game command_new_game
  #--------------------------------------------------------------------------
  # * Command: New Game
  #--------------------------------------------------------------------------
  def command_new_game
    # Reset new start coordinate for big maps
    command_new_game_bigmap
    # Perform the original call
    bigmap_stitle_command_new_game
  end
  #--------------------------------------------------------------------------
  # * Adjust New Game Start for Big Map
  #--------------------------------------------------------------------------
  def command_new_game_bigmap
    # Test if big map and exit otherwise
    map_key   = BigMaps.map_test($data_system.start_map_id)
    return if map_key.nil?
    # Reset values for target map loop
    counter   = 0  # Counter
    ox        = 0  # Original X Offset
    oy        = 0  # Original Y Offset
    map_data  = BigMaps::Map[map_key]
    # Get initial data from 1st map for individual map sizes
    bigmap    = load_data(sprintf("Data/Map%03d.rxdata", map_data[1][0])) 
    # Cycle through Big Map data
    for y in 0..(map_data[0][1])-1
      for x in 0..(map_data[0][0])-1
        # Acquire map ID and advance counter
        mid = map_data[1][counter]
        counter += 1
        # If it is the target Map ID
        if mid == $data_system.start_map_id
          # Redefine new coordinates
          $data_system.start_x += ox
          $data_system.start_y += oy
        end
        # Advance offxet X
        ox += bigmap.data.xsize
      end
      # Advance offxet Y (Resetting offset X)
      oy += bigmap.data.ysize
      ox = 0
    end 
  end
end
#==============================================================================
# ** Scene_Map
#------------------------------------------------------------------------------
#  This class performs map screen processing.
#==============================================================================
class Scene_Map
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias bigmap_smap_transfer_player transfer_player
  #--------------------------------------------------------------------------
  # * Player Place Move
  #--------------------------------------------------------------------------
  def transfer_player
    # Clear player place move call flag
    $game_temp.player_transferring = false
    # Test if big map and exit otherwise
    map_key = BigMaps.map_test($game_temp.player_new_map_id)
    # Run check if a big map for load screen option
    unless map_key.nil?    
      # Determine if it brings up the load screen
      if BigMaps::Load.include?(map_key)
        @window_mapload = Window_MapLoad.new
        for i in 0..40
          update
        end
      # Otherwise, cancel load screen option  
      else
        map_key = nil
      end
    end
    # Perform the original call
    bigmap_smap_transfer_player
    # Remove the window if present
    @window_mapload.dispose unless map_key.nil? 
  end
endCredits and Thanks
Er.. me? And my little test subject who loved it (Trade Secret).
Author's Notes
Damn, that's a big map. Did ya just make a 2000x2000 tile map????
Terms and Conditions
Free for use, even in commercial projects.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
	  Above are clickable links

 
 
 BIG MAPS
 BIG MAPS
 
 
![[Image: QrnbKlx.jpg]](https://i.imgur.com/QrnbKlx.jpg)
![[Image: sGz1ErF.png]](https://i.imgur.com/sGz1ErF.png)
![[Image: liM4ikn.png]](https://i.imgur.com/liM4ikn.png)
![[Image: fdzKgZA.png]](https://i.imgur.com/fdzKgZA.png)
![[Image: sj0H81z.png]](https://i.imgur.com/sj0H81z.png)
![[Image: QL7oRau.png]](https://i.imgur.com/QL7oRau.png)
![[Image: GAA3qE9.png]](https://i.imgur.com/GAA3qE9.png)
![[Image: 2Hmnx1G.png]](https://i.imgur.com/2Hmnx1G.png)
![[Image: BwtNdKw.png%5B]](https://i.imgur.com/BwtNdKw.png%5B)


 
![[Image: katy-succubus-on-couch-modding-union-signature.png]](https://s31.postimg.cc/v0004hl9n/katy-succubus-on-couch-modding-union-signature.png) 
 Still, if it works with the map looping feature of the Mode 7 Edit I rereleased... mebby?
  Still, if it works with the map looping feature of the Mode 7 Edit I rereleased... mebby?
	
