Make tiles impassable by region ID?

I want to make it so characters cannot walk on certain tiles even though the tiles are passable. have already marked the tiles I do not want people to walk on with a specific region ID. How would I go about taking that region ID and make the tiles impassable?

I do not want to just set the tile as impassable in the tileset because there are tiles like it that I need to be passable.


I already know how to create a variable with "$game_player.region_id"

but how do I take that and turn the region ID as impassable?
Yanfly region restriction script
Yanfly region restriction script


According to a Google search, that is only for MV and no download links or code anywhere whatsoever and nothing in the way of VX Ace
According to a Google search, that is only for MV and no download links or code anywhere whatsoever and nothing in the way of VX Ace
It's actually called move restrict region
The script DOES NOT work! I installed the script, created my region and put in "<player restrict: 63>" but I can STILL step on region 63!

Edit: What is worse is that once I step onto tile 63, my character's movement is 100% restricted to the tile that I step on making it impossible to move.

This script seems to ONLY block you once you are in the region, NOT prevent you from GOING into the region.

Edit 2: So I found out what the problem is

Spoiler: Result
It's a bug

The blocked region is ignored when exiting a vehicle such as the boat or ship. I am blocked from manually walking on the tiles but it does not prevent the user from exiting the boat onto blocked region IDs

If someone could create a patch to fix that, I would appreciate it.
patch
Ruby:
# ╔═════════════════════════════════════╦════════════════════╗
# ║ Title: Yanfly Move Restrict patch   ║  Version: 1.00     ║
# ║ Author: Roninator2                  ║                    ║
# ╠═════════════════════════════════════╬════════════════════╣
# ║ Function:                           ║   Date Created     ║
# ║                                     ╠════════════════════╣
# ║ Stop vehicle landing if not able to ║    14 Apr 2023     ║
# ╚═════════════════════════════════════╩════════════════════╝
# ╔══════════════════════════════════════════════════════════╗
# ║ Instructions:  None                                      ║
# ║                                                          ║
# ║    The script simple fixes an issue that a player        ║
# ║    can get off a ship or airship onto a region that      ║
# ║    is configured to block the player.                    ║
# ║                                                          ║
# ╚══════════════════════════════════════════════════════════╝
# ╔══════════════════════════════════════════════════════════╗
# ║ Updates:                                                 ║
# ║   2023-May-16 - Initial publish                          ║
# ╚══════════════════════════════════════════════════════════╝
# ╔══════════════════════════════════════════════════════════╗
# ║ Terms of use:                                            ║
# ║ Free for all uses in RPG Maker VX Ace except nudity      ║
# ╚══════════════════════════════════════════════════════════╝

#==============================================================================
# ** Game CharacterBase
#==============================================================================
class Game_CharacterBase
  #--------------------------------------------------------------------------
  # new method: vehicle dismount
  #--------------------------------------------------------------------------
  def vehicle_dismount(x, y)
    return false if debug_through?
    region = 0
    region = $game_map.region_id(x, y)
    return true if $game_map.all_restrict_regions.include?(region)
    return true if $game_map.player_restrict_regions.include?(region)
    return true if $game_map.player_block_regions.include?(region)
    return false
  end
  #--------------------------------------------------------------------------
  # new method: airship dismount
  #--------------------------------------------------------------------------
  def airship_dismount(x, y)
    return false if debug_through?
    region = 0
    region = $game_map.region_id(x, y)
    return true if $game_map.all_restrict_regions.include?(region) && @in_air
    return true if $game_map.player_restrict_regions.include?(region)
    return true if $game_map.player_block_regions.include?(region)
    return true if $game_map.vehicle_restrict_regions.include?(region)
    return false
  end
end

#==============================================================================
# ** Game Vehicle
#==============================================================================
class Game_Vehicle
  def land_ok?(x, y, d)
    if @type == :airship
      return false unless $game_map.airship_land_ok?(x, y)
      return false unless $game_map.events_xy(x, y).empty?
      return false if airship_dismount(x, y)
    else
      x2 = $game_map.round_x_with_direction(x, d)
      y2 = $game_map.round_y_with_direction(y, d)
      return false unless $game_map.valid?(x2, y2)
      return false unless $game_map.passable?(x2, y2, reverse_dir(d))
      return false if vehicle_dismount(x2, y2)
      return false if collide_with_characters?(x2, y2)
    end
    return true
  end
end
Update crashes game on the very last line. It seems to think that there is a $end even though line 436 only shows "end" not "$end"
The script DOES NOT work! I installed the script, created my region and put in "<player restrict: 63>" but I can STILL step on region 63!
OK, really, buddy. You really expect that yelling at people is going to get them to fix the script? Calm down.
That error means that there are not enough end keywords in the file. I'm not sure where you might be missing one.
Update crashes game on the very last line. It seems to think that there is a $end even though line 436 only shows "end" not "$end"
Can you upload a small demo that we can test?
You could also just make another copy of the tileset for that map and use that, and set that copy to impassible. That would make it so that you don't even need a script.

Also there are Yanfly scripts for ACE. https://yanflychannel.wordpress.com/rmvxa/

Read carefully though how to get them and use them as the links changed a few times.
Can you upload a small demo that we can test?
I'm sort of working with him. He PM'd me and I sent my latest and greatest Yanfly Move Restrict Region script I've modified with the patch.
I've tested the issue and it works fine for me.
@MoltresRider I'm not sure if you know this but, everyone here is not paid to write scripts for you or anyone else (unless someone gets paid for a commission).
We all volunteer our free time to help other members.
I ended up reverting back to the 2019 script and adding the patch in as well below it. That fixed the issue.
Moved to: RGSS3 Script Requests

Original thread: https://forums.rpgmakerweb.com/threads/make-tiles-impassable-by-region-id.157566/