A downloadable RPG Maker MV Plugin

Get this RPG Maker MV Plugin and 9 more for $30.00 USD
View bundle
Buy Now$5.00 USD or more

Boundary System finds tiles within or on a boundary and returns tile coordinates for use in other plugins. Alone this plugin  does nothing more than returning tile coordinates but when paired with a plugin which utilizes those coordinates properly it makes for a very powerful tool.

When using this plugin alongside Ritter Ultimate Event Spawner see the help file within the Event Spawner for help using boundaries as those commands differ from the basic Boundary System commands. Please do not use the script calls below for the spawner. These script calls do not include everything needed for the spawner to function properly, use the spawners script calls instead.

These script calls are for anyone looking to utilize the boundary system in their own plugins for other purposes, as this was made to be used for more than just a spawner.

Click here to Purchase Ritter Ultimate Event Spawner & Ritter Boundary System Bundle and save!

Script Calls:

Ritter.Boundary.createBoundary(width, height, thickness, name, eventId, expandBy, centerx, centery)

  • width = the number of tiles that make up the width of the boundary.
  • height = the number of tiles that make up the height of the boundary.
  • thickness = the number of tiles thick the boundary is.
  • name = the "name" of the boundary.
  • eventId = 0 for player, eventId number for event, -1 if using centerx, centery coordinates on map.
  • expandBy = the number of tiles to expand the boundary in the direction the player is moving, this increases the probability that something will happen in front of the player instead of  same odds on side and back.
  • centerx = the x location of the boundaries center. use this only when boundary is not placed on anchor event or player.
  • centery = the y location of the boundaries center. use this only when boundary is not placed on anchor event or player.

Example:

Ritter.Boundary.createBoundary(17, 15, 1, "spawn", 0, 3)

This would create a boundary named "spawn" around the game player which is 17 tiles wide and 15 tiles high with 1 thickness that expands by 3 thickness in the direction the player is moving.

Once a boundary is created the boundary will be stored inside an object. To access the boundary after it's been created use the script call below.

Ritter.Boundary.getBoundary(boundaryName)

  • boundaryName = the "name" of a boundary you created.

This will return the boundary object you created to be stored in a variable.

 

Example: var boundary = Ritter.Boundary.getBoundary(boundaryName);

Once you have your boundary stored to a variable you can then use the following functions, you will feed these functions the boundary object you created and stored to a variable.

Ritter.Boundary.getInBoundaryTiles(boundary)

This function returns every tile by [x,y] coordinates that is INSIDE the boundary. (picture a fully colored in rectangle)

Ritter.Boundary.getOnBoundaryTiles(boundary)

This function returns every tile by [x,y] coordinates that is ON the boundary. (picture the outline of a rectangle)

Ritter.Boundary.randomRegionInBoundary(regions, boundary)

  • regions = regionId(s) to randomly select a tile from that are INSIDE the boundary. To use multiple regionIds list them as an array. [1, 2, 3]
  • boundary = the boundary object you created and stored to a variable.

This function returns one tiles coordinates that is INSIDE the boundary marked with any of the regionId(s) specified.

Example: Ritter.Boundary.randomRegionInBoundary([1, 2, 3], "spawn")

This would return one random tile that is marked with any of the regionIds 1, 2, or 3 that lies INSIDE the boundary.

 

Ritter.Boundary.randomRegionOnBoundary(regions, boundary)

  • regions = regionId(s) to randomly select a tile from that are INSIDE the boundary. To use multiple regionIds list them as an array. [1, 2, 3]
  • boundary = the boundary object you created and stored to a variable.

This function returns one tiles coordinates that is ON the boundary marked with any of the regionId(s) specified.

 

Example: Ritter.Boundary.randomRegionOnBoundary([1, 2, 3], "spawn")

This would return one random tile that is marked with any of hte regionIds 1, 2, or 3 that lies ON the boundary.


Terms of Use:

  • You are granted non-exclusive rights to use this plugin for Commercial and Non-Commercial Use in as many projects as you wish to create.
  • Do not redistribute this plugin without permission.
  • Do not take code from this plugin without permission.
  • Do not remove my name from @Author.
  • Do not take credit for creating this plugin.
  • Editing of code is allowed as long as it's within plugin file.
  • I do not offer support for any changes made to plugin code.
  • While it's not mandatory please consider crediting me in your game credits:
    • (Something similar to this would be great)
    • Boundary System Plugin
    • Craig "Ritter" Barger
Updated 2 days ago
StatusReleased
CategoryTool
Rating
Rated 5.0 out of 5 stars
(1 total ratings)
AuthornotRitter
Tagsplugin, rmmv, RPG Maker, RPG Maker MV

Purchase

Get this RPG Maker MV Plugin and 9 more for $30.00 USD
View bundle
Buy Now$5.00 USD or more

In order to download this RPG Maker MV Plugin you must purchase it at or above the minimum price of $5 USD. You will get access to the following files:

Ritter_BoundarySystem.js 13 kB

Comments

Log in with itch.io to leave a comment.

Weird question, is this boundary all events, and if so, can we turn on a switch/off to make changes to those 'boundaries' events? (Like moving them?) I'm curious how this works...but it's exactly what I was looking for, I think...I was manually doing it with eventing, but it was getting so tedious and messy LOL

(+1)

Hello, this plugin doesn't quite work like that. What this plugin does is it will return an array containing data from the tiles located on or within the confines of a boundary which can be used to determine if there is an event on a tile within a boundary, or if any tiles within a boundary are a certain regionId, for example. Currently this plugin is used as an extension for the Ritter Ultimate Event Spawner. It's for sale separately to avoid raising the price of the base spawner and to allow others who may see a use in its features to utilize it for other purposes. This plugin could be used to box in events and prevent them from moving outside of those boundaries but that would take additional code written to do so. This plugin could also be used as event detection. Alone this plugin does no more than returning an array of data which you would then need to utilize in some way.

Overall this is an advanced plugin to use especially if it's being used for a purpose other than the Ritter Ultimate Event Spawner. It would without a doubt require more code to be written which utilizes the data it produces.

Ohhh thanks for letting me know! I really appreciate you letting me know. That makes a lot of sense, it probably wouldn't be compatible with a spawner I've already bought so I will look into something else, thank you for telling me :D

This is a great plugin, but If I'm not mistaken events do not get saved when unspawned, so when they respawn on the boundry they are reset back to their first state. No self switches or anything gets remembered. Have I got that right? You allowed saving events in the EventSpawner but not this one seemingly.

Hello, I may have forgotten to update the mv version to do what the mz version does. I have this handled in my version so I should be able to get this working over the weekend.

Thank you!

Deleted 248 days ago

Hi again, any news on getting it working with version?

Hello I'm still working on this, sorry about the delay. Shouldn't be much longer.

Do you have an updated estimate? I don't wish to rush you, but it would be good to know when to check back. Thanks.

Hello I'm sorry about the hold up on this update, I've been pretty busy lately, I'm hoping to have this wrapped up over this weekend.

Thank you for your patience

Hello, just to provide another update so you're not in the dark. I'm getting close to finished with this update, I'm currently running tests to ensure everything is working as intended. I'm hoping to have this finished up late tonight (EST time zone) or by tomorrow night at the latest. So far everything seems to be working well.

On a side note the plugin which will need to be updated on your end is the Ultimate Event Spawner plugin, the boundary system code remains the same after this update. All the code is done within the spawner since this is a spawner related update. 

I'll post here to let you know when the spawner update is ready to be downloaded.

Thank you for your patience! I know it's been a bit of an extended wait.

(1 edit)

Hey notritter, Hope you doing well. 

Could you make a new version of this plugin the will work with Pixel movement/Collider? or maybe there is a way to add a parameter in the current plugin the will change the checking of the conditioner to be with pixel/collider math (100 pixel in each tile size as you probably know)?  I'm using 'Altimit Pixel Movement' combine with mogABS. 

Unless is already work properly with 'Pixel movement'?

I can test this out and get back to you, what exactly are you trying to use this plugin for? Alongside the Ultimate Event Spawner? It would be easier to know what to test with a little more info. I've never used Altimit Pixel Movement plugin before so I cannot say for certain one way or the other just yet.

If this plugin is to be used alongside the Ultimate Event Spawner basically this plugin will feed the event spawner x,y coordinates that are on or within a boundary you create. So if spawning an event on an x,y coordinate works for you then this plugin should work as well.

Thank you for taking interest in my plugins :)

I was thinking to have a little more control on the ABS Tool event I spawn in my game (using your spawn plugin), Probably for some puzzles, maybe for enemies as well.