with a script call in-game
Change Region At Specified Coordinates
RGSS3 Script Requestsnot possible without a full script
by default all mapdata is read-only, any change would be lost on all map reloads and a few other problems. Basically you'll need a script like tsukihimes tileswap script to keep track of changes.
however, why would you even need to change the region? If that is to change some data for a different script you better give a link to that script (or explain whatever else you want to do) because even with a dynamic region change a different script might not react correctly to that or have compatibility issues.
by default all mapdata is read-only, any change would be lost on all map reloads and a few other problems. Basically you'll need a script like tsukihimes tileswap script to keep track of changes.
however, why would you even need to change the region? If that is to change some data for a different script you better give a link to that script (or explain whatever else you want to do) because even with a dynamic region change a different script might not react correctly to that or have compatibility issues.
That's fine, if I can manage it with events it'd suffice.
Here's a solution I found:
Napoleon's Region Limit Breaker
(their wordpress seems to give me a 404, and I couldn't find any other original page of it, so I'll just put it here)
Code:
#sb:region_limit_breaker [field, utility]
#==============================================================================
# Region Limit Breaker
# Version 1.00
# By Napoleon
#
# About:
# Allows you to assign extra regions to a map up to 127.
# Meant for advanced users.
#
# Instructions:
# - Place below "▼ Materials" but above "▼ Main Process".
# - Edit the Settings part to your needs.
# - Optional: use the new "assign_region(x, y, region_id=0)" command.
#
# Requires:
# - RPG Maker VX Ace
#
# Terms of Use:
# - Attribution 3.0 Unported (CC BY 3.0)
# http://creativecommons.org/licenses/by/3.0/
# - Attribution is not required. This overrules what's stated in the above
# license.
#
# Version History:
# 1.00 (09 December 2013)
# - First Release
#-------------------------------------------------------------------------------
# Settings
# Note: Do NOT add values > 127 or you will get weird values.
#
# ALSO you can use assign_region(5, 10, region_id=1) as a script call
# to temporarily change any region (change will not be saved upon map reload).
#
#-------------------------------------------------------------------------------
NAP_MAPS_LB = {
1 => { # MAP ID HERE
#[x,y] => id
[1,10] => 65,
},
2 => {
[5,6] => 127,
}
}
#-------------------------------------------------------------------------------
$imported ||= {}
$imported[:region_limit_breaker] = 1.00
class Game_Map
alias nap_region_lb_setup setup
def setup(map_id)
nap_region_lb_setup(map_id)
return if NAP_MAPS_LB[map_id].nil?
NAP_MAPS_LB[map_id].each_pair do |k,v|
$game_map.data[k[0], k[1], 3] = v * 256
end
end # setup
end # Game_Map
class Game_Interpreter
def assign_region(x, y, region_id=0)
$game_map.data[x, y, 3] = region_id * 256
end
end
#===============================================================================
#
# End of File
#
#===============================================================================
It's intended to set regions from 0 to 127 on any map preemptively (this will be saved with map reload)
but you can also call "assign_region(x y, region_id=z)" to temporarily change a region (this won't be saved).
Original thread: https://forums.rpgmakerweb.com/threads/change-region-at-specified-coordinates.125374/