Is there any way to break the 64-region limit?

I need about 80 regions for a script on a large 250x200 map...
I'm not sure. Maybe you could look for some scripts, or you could try using events. Also, you might find this tutorial I made useful for your map. You could apply it to x and y position detection via events.
One thing I would consider is to simply store the regions externally and write a tool that allows you to manage regions visually.


Another option is to combine the terrain tag with the region ID, but that will result in you needing to use duplicate tiles just to have extended regions.
No, not with the same functionality.


As said, you can provide additional data for the map, but that data cannot be entered by the editor, and it cannot be entered into regionID (which is limited to 6-Bit (= 0 to 63).


What exactly do you want to set by the region ID?


There are a lot of different ways to code data (Tsukihime gave one example with the terrain tag), and if we know what you're planning to do we might be able to guide you to a better coding - I had a lot of ideas how to use region IDs myself, but even with multiple functions in a single game that wouldn't use more than half the available ID numbers...
I take it that there is no real solution nor any existing script then. I use those regions for controlling traffic lights. Using regular events is not something that I'd consider for that task because it would most likely be a huge performance killer.

I could indeed somehow create the regions bigger than 64 by code when the map loads. But they won't be visible in the editor. Or maybe my script sucks when I need more than 64 regions. But a T-intersection = 3 regions and a crossroads = 4 regions. That adds up pretty fast.

To assign a region at runtime, all I have to do is this right?:

$game_map.data[13,3,3] = 94 * 256 # assigns region 94 to tile [13,3].So I could create a script for it now. But this somehow feels like a dirty workaround...

EDIT (got ninja-ed):

I have a custom script (It might be a bad script but it's the best I could do so far for creating traffic lights) that flips a variable. Each region is tied to that variable and will block cars (=autonomous events that are marked with a special comment-tag) depending on the variable value (1-4). But every intersection needs 4 regions (1 for each direction). See attachment.

Edit2:

Maybe I could re-use regions... I mean, who cares that the intersection at the topleft of the map is synched with the traffic light near the bottom right...

Solution:

Reuse of regions combined with the script below to increase the amount of regions to 127 while still having the first 64 visible in the editor (obviously).

Spoiler
#==============================================================================# 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.#-------------------------------------------------------------------------------NAP_MAPS_LB = { 1 => { # 1 will apply this ONLY to the map with map_id == 1 [4,4] => 127, # Will assign region #127 to tile [4,4] [0,0] => 89, # Will assign region #98 to tile [0,0] (most top left tile) }}#-------------------------------------------------------------------------------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 # setupend # Game_Mapclass Game_Interpreter def assign_region(x, y, region_id=0) $game_map.data[x, y, 3] = region_id * 256 endend#===============================================================================## End of File##===============================================================================
sample.png
But every intersection needs 4 regions (1 for each direction). See attachment.


Edit2:


Maybe I could re-use regions... I mean, who cares that the intersection at the topleft of the map is synched with the traffic light near the bottom right...
Not only re-use regions, you usually need only two codes per intersection, unless your game world has some really strange traffic laws...
Both sides of a street can usually move at the same time, that's why there are two lanes in most streets.


In your example you would use region code 10 four times for vertical movement (Up AND down) and code 11 for horizontal movement (right AND left), because in all countries I know of the to lanes of a single road are allowed to move counter to each other at the same time...
I got it working now.

Nah I still need 4 per intersection (because they can turn and the cars would get stuck in one another... Yes.. My traffic-light script is not so well-written...

Original thread: https://forums.rpgmakerweb.com/threads/is-there-any-way-to-break-the-64-region-limit.20795/