4 hours ago(This post was last modified: 4 hours ago by DerVVulfman.)
Map Resizer Version: 1.0
also available for RPGMaker VX and VXAce
Introduction
Tired of being stuck with maps that cannot be any larger than 500x500 or whatever limitation was set within your game editor? This script allows one to tell RPGMaker to take a hike!
With this script, you can force a map to a new width and height of your choice. And that map size remains stored in your maps file data so altering the 'properties' doesn't change anything... unless you alter the size in the map's properties window itself.
If you create dimensions for a map that does not exist in your map tree, no error will occur as it will any settings you created that are invalid.
After execution, t he script/program will end. If your currently viewed map is one of those being resized, merely switch to another map and then return and you will see the new map freshly reloaded and resized!
Features
Break the maximum size limit
Works with all three Ruby-based editors
Change the SUFFIX value to rxdata/rvdata/rvdata2
Keep editing even after run
Screenshots
It would just be two shots of the map editor, before map resizing and after.
Script
Have Fun!
Code:
#==============================================================================
# ** Map Resizer
#------------------------------------------------------------------------------
# by DerVVulfman
# version 1.0
# 07-27-2026 (mm/dd/yyyy)
# RGSS(1-3) / RPGMaker XP to VXAce
#==============================================================================
#
# INTRODUCTION:
#
# Tired of being stuck with maps that cannot be any larger than 500x500 or
# whatever limitation was set within your game editor? This script allows
# one to tell RPGMaker to take a hike!
#
# With this script, you can force a map to a new width and height of your
# choice. And that map size remains stored in your maps file data so alter-
# ing the 'properties' doesn't change anything... unless you alter the size
# in the map's properties window itself.
#
# If you create dimensions for a map that does not exist in your map tree,
# no error will occur as it will any settings you created that are invalid.
#
# After execution, t he script/program will end. If your currently viewed
# map is one of those being resized, merely switch to another map and then
# return and you will see the new map freshly reloaded and resized!
#
#------------------------------------------------------------------------------
#
# NOTES:
#
# Originally, it was meant as an exercise for RPGMaker XP as I am more flu-
# end in that editor. But upon looking, I realized that there was nothing
# within that would prevent it from working with the other two Ruby-based
# editors. However, the script does set the minimum map size to 20x15.
#
# I have the intention to eventually update this system with various modes
# in which the maps are resized. But for now, I merely have Mode #0 as a
# placeholder. The current and only mode existing will take the tile data
# from the top-left most corner of the map and create a whole new map with
# just that data.
#
# So it is recommended NOT for use on maps that already have drawn content.
#
#------------------------------------------------------------------------------
#
# COMPATIBILITY:
#
# Fairly compatible for all Ruby-based RPGMaker engines. No default classes
# were touched.
#
#
#==============================================================================
#
# TERMS OF USE:
#
# Free for use, even in commercial games. Only due credit is required.
#
#
#==============================================================================
#==============================================================================
# ** Map_Resizer
#------------------------------------------------------------------------------
# The configuration portion
#==============================================================================
module Map_Resizer
#--------------------------------------------------------------------------
MAP_LIST = {} # Do Not Touch
#--------------------------------------------------------------------------
# GENERAL SETTINGS
#--------------------------------------------------------------------------
# Basic safety parameter settings that the end user should still be aware.
#
ACTIVATE = true # Enabled/disabled. Set to true to execute
SUFFIX = ".rxdata" # File suffix (for XP/VX/ACE usage)
SAFETY_WIDTH = 2000 # Maximum width of any map despite settings
SAFETY_HEIGHT = 2000 # Maximum height of any map despite settings
SAFETY_DEPTH = 3 # Maximum layer depth of any map
# INDIVIDUAL MAPS BY ID
#--------------------------------------------------------------------------
# Hash array where each map is given a 3 or 4-parameter array defining
# how the map is resized. Depth is optional ans assumed 3-layer standard.
#
# * Mode : Drawing Mode. Currently just '0' and required
# * Width : Revised width (in tiles) for the given map
# * Height : Revised height (in tiles) for the given map
# * Depth : (optional) Number of layers in the map (ground, lower, etc)
#
#
# Map ID Mode Width Height Depth
# ==== ====== ====== ====== ======
MAP_LIST[1] = [ 0, 50, 30]
MAP_LIST[2] = [ 0, 30, 30, 3]
end
#==============================================================================
# ** Map_Resizer
#------------------------------------------------------------------------------
# This module will increase and/or decrease the size of designated maps.
#==============================================================================
module Map_Resizer
#--------------------------------------------------------------------------
# * Start execution of all maps to be updated
#--------------------------------------------------------------------------
def self.start
#
# Exit if disabled (and leaving it in?)
return unless ACTIVATE == true
#
# Acquire a list of all valid maps by ID
info = load_data("Data/MapInfos" + SUFFIX)
map_keys = info.keys
#
#
# Sort through maps in the list
for key in MAP_LIST.keys
#
# Skip if no map with key/id exists
next unless map_keys.include?(key)
#
# Process individual map
process_map(key, dimensions(key) )
#
end
#
# Exit execution
exit
#
end
#--------------------------------------------------------------------------
# * Acquire creation mode and new dimensions for the map
# map_id : Map ID
#--------------------------------------------------------------------------
def self.dimensions(key)
#
# Obtain map mode & dimensions
mode = MAP_LIST[key][0]
width = MAP_LIST[key][1]
height = MAP_LIST[key][2]
depth = 3
depth = MAP_LIST[key][3] if MAP_LIST[key][3] != nil
#
# Acquire safety settings
safety_w = SAFETY_WIDTH
safety_h = SAFETY_HEIGHT
safety_d = SAFETY_DEPTH
#
# Ensure safety settings not below minimum
# Yes, I consider someone may BOTCH safety settings
safety_w = 20 if safety_w < 20
safety_h = 15 if safety_h < 15
safety_d = 3 if safety_d < 3
#
# Ensure map settings not below minumum
width = 20 if width < 20
height = 15 if height < 15
depth = 3 if depth < 3
#
# Ensure valid maximums
width = safety_w if width > safety_w
height = safety_h if height > safety_h
depth = safety_d if depth > safety_d
#
return [mode, width, height, depth]
#
end
#--------------------------------------------------------------------------
# * Process recreation of individual map
# map_id : Map ID
# dimensions : recreation dimensions for map
#--------------------------------------------------------------------------
def self.process_map(map_id, dimensions)
#
# Get filename and new dimensions
filename = sprintf("Data/Map%03d" + SUFFIX, map_id)
system_mode = dimensions[0]
new_width = dimensions[1]
new_height = dimensions[2]
new_depth = dimensions[3]
#
# Obtain data from already existing map
map = load_data(filename)
old_height = map.height
old_width = map.width
old_data = map.data
#
# Make storage array for top-left tile data
tiledata = Array.new(new_depth)
for z2 in 0...new_depth
tiledata[z2] = old_data[0, 0, z2]
end
#
# Create new table for data
new_data = Table.new(new_width, new_height, 3)
#
# Populate new table with tile data
for z2 in 0...new_depth
for y2 in 0...new_height
for x2 in 0...new_width
new_data[x2,y2,z2] = tiledata[z2]
end
end
end
#
# Replace map data and save
map.data = new_data
map.width = new_width
map.height = new_height
save_data(map, filename)
#
end
end
#----------------------------------------------------------------------------
# Executes the script
#----------------------------------------------------------------------------
Map_Resizer.start
Instructions
Place below Scene_Debug and above Main. Make sure the ACTIVATE value is set to true when you DO want it to run. And set the SUFFIX value to the proper file extension of your chosen RPG Maker editor's data files.
Other content should be easily understandable.
FAQ
Heh. I didn't expect I'd make something that works carte blanche for all three when I started half an hour ago. Yep, this was a quick script creation with a hella good payout!
Compatibility
Fairly compatible for all Ruby-based RPGMaker engines. No default classes were touched.
Terms and Conditions
Free for use, even in commercial games. Only due credit is required.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)