Move Restrict Region

Last Updated: 2012.23.08
Download Link
Github Link

Not everybody wants NPC’s to travel all over the place. With this script, you can set NPC’s to be unable to move pass tiles marked by a specified Region. Simply draw out the area you want to enclose NPC’s in on and they’ll be unable to move past it unless they have Through on. Likewise, there areregions that you can prevent the player from moving onto, too!

Likewise, players can also be restricted by regions. To set up which regions will restrict movement, use the tags below in the desired map’s properties page notebox.

<all restrict: x>
<all restrict: x, x>

Players and NPC’s on the map will be unable to move past region x even if they have the “through” flag set. The only thing that can go past is if the player is using the debug through flag. Draw out the area you want to close the player and NPC’s in with the regions and both will be unable to move onto any of those tiles marked by region x. If you want to have more regions restrict NPC’s, insert multiples of this tag.

<npc restrict: x>
<npc restrict: x, x>

NPC’s on that map will be unable to move past regions x unless they have a “Through” flag on. Draw out the area you want to close NPC’s in with the regions and the NPC’s will be unable to move onto any of those tiles marked by region x. If you want to have more regions restrict NPC’s, insert multiples of this tag.

<player restrict: x>
<player restrict: x, x>

Players will not be able to move on tiles marked by region x unless the player has a “Through” flag on. Draw out the area you want to close the player in with the regions and the player will be unable to move past any of those tiles marked by region x. If you want to have more regions restrict the player, insert multiples of this tag.

And that’s all, folks!

49 comments on “Move Restrict Region

  1. Pingback: YSA Battle Add-on – Party Combo Counter « Yami World

  2. Is it somehow possible to restrict npcs from accessing certain regions even if they have a through flag on? Trying to figure out a way to stop for example ghosts that can move through walls to move through certain holy spaces or whatnot.

    • I have been trying to do the same thing, when an idea struck me: just make whatever you want them to pass through be passable itself, then just put a player restrict on it. Now you can have the ghost go through everything then just region him off at the edges with the player still restricted like normal.

      I only realised this today and it’s already led to some funky aesthetics and made life in general much simpler. Yanfly’s a true champ :)

  3. Would it be possible to integrate features similar to IEX-BackTilePassage (

    For example… regions that enable passability, overriding the default passability and regions that alter a character’s opacity (the two features found in the script basically)? I know I could always do what Tobye suggested for the passability part, but painting regions onto every map seems like a hassle compared to using Regions to replicate this script. :O

    • I thought of something similar, and i cant say i have checked into how that backtilepassage works, but its name sounds like what i was thinking of :P

      It would make things much easier to walk behind certain objects if i could assign a region i can move into / out from, from any direction but down. Atm i got for example an event looking like a barrel, with “same as character” as priority, standing on a transparent D-tile, not allowing movement down from the barrel, or up to the barrel. Then i can go and “hide” behind it, but still stand in front of it, giving depth to the world.

      But since i cant see where they are, i have ended up copying them to weird areas, suddenly not being able to move ^^; But im not clever enough to rescript it so i can have a region block only downwards from it, or upwards to it. I would just get afflicted with coma or halitosis :/

  4. The player move restrict regions prevent the player from moving through them even with the CTRL key held down in Test Mode.

  5. Pingback: Some Graphical updates « Ramiro's Script Collection for ACE

    • It may be that parallax mapping isn’t utilized by everyone – it detracts time from improving game play and allocates the author’s resources (basically time and concentration) that could be spent elsewhere.

      Parallax mapping is fine, if one wants their maps to look pretty, but it may detract time spent towards other areas of the game. It’d be difficult to utilize parallax mapping in an epic-long game. Small games are easier, but the real question is this: is it worth the time in effort in comparison to the cost of the potential of doing something else with the same time in question?

      People who love graphics will most likely find some joy in it, that’s fine, I guess. But VXA’s unlimited tilesets can make things a little more efficient for the numbers guy.

      Anyway ~ it’s probably that coupled with a low response rate and VXA not officially being in English yet that creates this sort of response. I don’t really visit – supposedly in which the bulk of the the parallax mappers post there, and am not sure about the proportion of the population there – just how low it is, that is. I’ve simply heard that it was a painful and excruciating task, especially to do just one map.

    • That’s insinuating map whores care about scripts that actually make their games playable instead of making their games good to look at.

  6. “Is it somehow possible to restrict npcs from accessing certain regions even if they have a through flag on? Trying to figure out a way to stop for example ghosts that can move through walls to move through certain holy spaces or whatnot.”

    im getting the same problem as well…. anyway of fixing this issue? Thanks a bunch!

  7. The all restrict option isn’t working at all. Players and NPCs with through on or off can still move through a region with all restrict. It’s hard to workaround because npc restrict and player restrict do not restrict characters with through on but they are working as intended. I am looking for a way to restrict characters with through enabled and all restrict is the only way. Thanks for the script, I would appreciate it if you looked at this!

  8. this script seems to be having incompatability issues with “Saba Kan’s Random Dungeon Generator 0.14” is there a way to fix this?

  9. is there any way to control whether or not the region stop players from walking through. So the region when a certain switch is turned on will prevent anything from walking through, however, only when the switch is turned on.

  10. I’m using a script for saving system: MOG – Scene File A (V1.3)… I save the game, and it works fine. After, I load the game. The scene appears, but when i attempt to take a step, i get this error:

    “Script ‘Move Restrict Region’ line 261: NoMethodError occurred.
    undefined method “include?” for nil:NilClass”

    What should i do? Thanks.

    • I am also getting this error when loading any game and I am not using any save scripting…

      I however am using “terrain tag”

      I just removed it and it loaded fine now… so I am guessing something is not compatible between the two scripts… which makes sense since they are both using Terrain Tags…

      I need to figure out a way to combine both… as having secret walls is pretty much as fun and necessary as having boundary for npc :)

      IF anyone checks this and have any suggestion i’d be really gratefull!!!
      Thanks and have a nice day!

  11. First, thank you for the script.
    I’m using ‘Overlay Maps’ of Tsukihime and if a define diferents restricted regions in two diferents lays of the map, the script only work in de active one (where the main character is). I’m doing something wrong?

  12. I’m having problems in RPGmaker with preventing the player from passing through the zone also. Is it just me?

  13. Any idea on how this could be made to work on a per event basis? been trying to make it use the comment box instead of the through flag. This item needs to be solid (so it can “collide”) with the player or walls etc, BUT it needs to be “through” or not solid so it can pass over tiles that are technically below it.

    I’m using an ABS system. And I have arcers in a tower. Now the archers can move about on the tower and won’t move off the tower, all good and awesome! But they can’t shoot because their projectiles will also be affected by the collision keeping the archers from moving off the tower.

    If I add “Through” then the projectile will fly even past the target and not collide with the target.

    Does that make my issue clear? A comment on an event that says “Hey, I pass through X tile but nothing else” would be incredibly useful.

  14. I’m supernoob and don’t know what to do when this message occur when I’m trying to run my game? Do you have any suggestions of what to do?

    “Script ‘My name of the script’ line 176: NameError occured. undefined method ‘setup’ for class ‘Game_Map'”

  15. Huh, I can use this to make my Sahagin walk through water but keep the player out. half an hour of frustration solved!

  16. It doesn’t work for me :I I think it’s my fault…
    But the player still walks on tiles that should be impassible (Like walls) even if I
    made like you said and even if in the tileset database there is a X on the wall used in the map…

  17. Does not work with Quasi’s advanced movement script, for some reason ONLY the Player one works (in the script default), and it blocks everything, not just players. Sad

  18. Any way to make all the regions passable only when a variable have the equal value? like, to walk on Region 1 you need variable X = 1, etc.
    I would like to make a height system like on Alundra and i need something like that.

  19. Is this really nessesary?
    NPCs already can’t walk over events, so I usually just use blank events as borders.

    • Thank you so, so much. I was having a lot of problems using this script, and your post solved everything. Empty events with priority “same as characters” will restrict player movement, and events with any priority will restrict npc movement. Genius!
      I know this is post is 3 years old now, but these pages still get thousands of views from people like me who are still using these scripts. Thank you again, Andrew!

  20. Pingback: How to Add Car Traffic! -

  21. Does anybody know if this can work on individual actors by putting it in their note section instead?
    (I’ll experament when I download it but just saving time for future ideas I have)
    I am using a tactics battle system and I am trying to find a way to where only specific units can move over specific terrain
    (Ships on water planes over everything ect)
    Or does anybody know of a way for me to do that? I cant find anything yet.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s