A downloadable RPG Maker MZ Plugin

Get this RPG Maker MZ Plugin and 1 more for $8.00 USD
View bundle
Buy Now$5.00 USD or more


An event spawner allows you to create a new event on the game map by creating a copy of a template event located on another map. This spawner reuses unspawned events to allow for more freedom to spawn even more events.

Demo now available!


Event Spawner which recycles unspawned events!

This event spawner will automatically recycle unspawned events before spawning a new event. This greatly(completely if used properly) decreases performance loss over time due to event clutter.  This spawner should never encounter framerate drops if used properly.

Ultimate Event Spawner Features:

  • Use as many spawn/template maps as you wish to hold your spawnable events.
  • Spawn an event from a spawn map onto the game map using x,y coordinates or regionId(s).
  • Spawning an event onto a regionId will pick a random tile marked with regionId(s) specified to spawn the event on.
  • Save spawned events. Saved events will re-appear when the player re-enters the map.
  • Restore unspawned saved events exactly as they were before they were unspawned and/or on map change, retains current event page and eventId.
  • Transform events on the game map using events on another map as a template.
  • Complete compatibility with Ritter_BoundarySystem plugin allowing the spawning and unspawning of events on boundaries you create using script calls. 

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

Major Update v1.5! (Aug 20, 2021)

With version 1.5 of Ritter Ultimate Event Spawner comes Plugin Commands, New Features for Spawner Boundary System, a bug fix, and more!

  • Added Plugin Commands for Spawner & Spawner Boundary System for ease of use.
  • Added Automatic Boundaries which Spawn/Unspawn events automatically based on conditions set by the developer.
  • Added Saved Boundary Events!
  • Added Develoepr Mode Warning Alerts! This will pop up a warning if the developer makes a common mistake with information on what was wrong and a suggestion on how to fix the problem instead of crashing the game. (Work in progress, will expand more soon. Did not want to delay this update for this.)
  • Added Helpful Info Text throughout Plugin Code to help developers find what they need and make edits easier without as much guess work.
  • Fixed an issue with recycled event sprites not being removed completely.


Install Instructions!

Follow the Instructions below to Install the Plugin.

Download the plugin file and place it inside your projects js/plugins folder.


Add Ritter_EventSpawner plugin to your projects plugin manager.

Place below Ritter_BoundarySystem when using Boundary System + Spawner.


Configure the parameters to fit your needs.

Create a new map to use for holding your source/template events to be used by the spawner to copy onto the game map. Create your events on the new map.


Play test and try the script calls  and/or Plugin Commands below!

Script Calls & Plugin Commands!

Script Call and Plugin Commands Info!
Plugin Commands Added in v1.5!

Ritter.spawnEvent(mapId, eventId, x, y, save)

  • mapId = the Id or "Name" of the map which holds the event you want to spawn.
  • eventId = the Id or "Name" of the event on the map specified in mapId.
  • x = x coordinate to place the event on the game map.
  • y = y coordinate to place the event on the game map.
  • save = true to save event and respawn it when you re-enter map.
  • save = false to use the event as a temporary event which goes away on map change. You can leave out save from script call to not save the event.

Example script call:

Ritter.spawnEvent(42, 15, 8, 16, true)

Would spawn event 15 from map 42 on the game map at 8,16 coordinates and save the event data to automatically be respawned upon re-entering the map.

Example script call two:

Ritter.spawnEvent(42, 15, 8, 16)

Would spawn event 15 from map 42 on the game map at 8,16 coordinates as a temporary event that goes away on map change. 

Example script call three:

Ritter.spawnEvent("SpawnMap", "Slime", 8, 16)

Would spawn the event named "Slime" from the map named "SpawnMap" onto the game map at 8,16 coordinates as a temporary event that goes away on map change. 

If duplicate names are found only the first one will ever be used, avoid duplicating names for spawn maps and spawn template events.

Ritter.spawnEventRegion(mapId, eventId, regions, save)

  • mapId = the Id of the map which holds the event you want to spawn.
  • eventId = the Id of the event on the map specified in mapId.
  • regions = regionId(s) to place the spawned event on randomly. To use multiple regionIds to randomly pick from list them like this [4,8,15,16,23,42]
  • save = true to save event and respawn it when you re-enter map.
  • save = false to use the event as a temporary event which goes away on map change.

Example script call: 

Ritter.spawnEventRegion(4, 8, 15, true)

Would spawn event 8 from map 4 on a random tile marked with regionId 15 and save the events data to be automatically respawned upon re-entering the map.

Example script call with array of regions: 

Ritter.spawnEventRegion(4, 8, [15,16,23,42])

Would spawn event 8 from map 4 on a random tile marked with any of the regionIds 15,16,23,42 as a temporary event that isn't saved.

Ritter.transformEvent(eventId, mapId, spawnId)

  • eventId = id of the event on game map to transform.
  • mapId = spawn map id that has template event.
  • spawnId = id of event on spawn map to use as template.

Example Script call:

Ritter.transformEvent(1010, 4, 8)

Would transform event 1010 into event 8 from map 4.

Ritter.unspawnEvent(eventId, removeSave)

  • eventId = the Id of the event on the map to unspawn.
  • removeSave = true to remove the event from saved events.
  • removeSave = false to keep the event on save list to respawn upon re-entering the map. Leave removeSave empty to keep saved event.

Example script call: Ritter.unspawnEvent(1000, true)

Would unspawn event 1000 from the game map and delete the saved event data.

Example script call two: Ritter.unspawnEvent(1000)

Would unspawn event 1000 from the game map.

Ritter.unspawnEvent(x, y, removeSave)

  • x = x location to check for an event to unspawn.
  • y = y location to check for an event to unspawn.
  • removeSave = true to remove the event from saved events.
  • removeSave = false to keep the event on save list to respawn upon re-entering the map. Leave removeSave empty to keep saved event.

Example script call: Ritter.unspawnEvent(15, 16, true)

Would unspawn event found at 15, 16 from the game map and delete the saved event data.

Example script call two: Ritter.unspawnEvent(4, 8)

Would unspawn event found at 4, 8 from the game map.


Ritter.unspawnAll(removeSave)

  • removeSave = true to delete saved event data.
  • leave empty to retain saved event data.

Unspawns all spawned events on the map.

$gameMap._lastSpawnEventId

Returns the Id of the most recently spawned event.




Boundary System & Spawner!


The Boundary System plugin allows for the spawning and unspawning of events on or within boundaries you create using a simple script call (or refer to Automatic Boundaries section for the easiest solution for boundary spawning yet!). The boundaries are stored and later accessed using the name you gave your boundary. You can create as many boundaries as you wish.

Boundaries can be created around the player, around any event on the map, or around an x,y location on the map. This allows for the spawning of events in many creative ways including spawning enemies just outside of the players screen constantly, or at any pace you find that fits well in your game.

Easily limit the number of events that each boundary is allowed to spawn to prevent spawning too many events on the map and causing performance loss, when a boundary is limited to spawning 40 events it will only ever use 40 events at once, if any of the boundary events are unspawned in the unspawn boundary that frees up space for more events to spawn on the boundary.

Read the description of the script calls below to understand how the boundary system and Event Spawner work hand in hand to create a unique experience within your game.

New Automatic Boundaries Setup!

  • v1.5 Added August 20, 2021

Automatic Boundaries takes what was once a complicated task which required you to learn a lot of parameters in script calls and place them inside common events or whatever method you went for and spam the script call with a wait timer. That method is history! (But still works) 

Setting up Boundaries, getting them to run, and setting up the events to be spawned on boundaries has been simplified! 

Follow the instructions below for quick setup! See the Help Section below this section for further information on plugin commands.

First lets set up an odd-ball boundary. We'll go for a 3x3 Spawn Boundary around the player with a 5x5 Unspawn Boundary around the player. This will make it so as the player moves from tile to tile the player will always be surrounded by events which unspawn as the player moves away from them. Combining boundaries like these with saved boundary events would allow you to do a lot of different things as you can theoretically have an event on every/any valid passable tile, no matter the size of your map.

Lets take a look at the new method of setting up boundaries!

First we Create a Boundary and Add an AutoHandler to it.

Lets start with the 3x3 'FillIn' Boundary:


Now we have a Boundary Named "Player FillIn" that is 3x3 around the player (Event Id 0) which can spawn 11 events. I like to give a little extra room here than a 3x3 requires to ensure proper wiggle room.

Now that we have our Boundary Created lets add an Auto Handler to it! We'll use the Boundary Name we just created above for this plugin command as shown below.


Now our Boundary will run automatically when on maps 3, 4, and 5. The boundary will attempt to spawn an event on every open tile within the 3x3 Boundary every 4 frames and it's enabled by default.

Next lets set up an Unspawn Boundary which can unspawn events on a boundary 1 tile outside of our spawn boundary. So as the player walks the events he/she walks away from will unspawn.

For this we'll go with a 5x5 "UnspawnOn" Boundary around the player.


You may notice Max Events 30 is set, 30 is the default and max events is not used by unspawn boundaries so any value there is fine.

Now lets add our Auto Handler for the 'Player UnspawnOn' Boundary.


Spawn Map Id is not needed here but I typically provide any preloaded spawn map just to be proper.

Before we get into a summary of what we did there's the Unspawn Settings to look into for Auto Handler.


In unspawn settings if the boundary is to be enabled as an Unspawn Boundary just Enable it in the settings then specify target boundaries this unspawn boundary is allowed to unspawn events from. If you spawn events on a boundary named "Player FillIn" then you must include "Player FillIn" on this list for unspawns if you want the boundary to unspawn events from that boundary.

Now we have a boundary which spawns events in a 3x3 boundary around the player named "Player FillIn" and a 5x5 Unspawn Boundary around the player which unspawns any event which was spawned by boundary "Player FillIn" that passes into a tile on the boundary.


Now that we have our boundaries set up it's time to set up events to spawn on the boundary!

Lets go to our spawn map and create an event with the Plugin Command 'BoundaryEventSetup' on its first page.


Now that we have this plugin command on the first page of an event on Spawn Map 2 (The Spawn Map we specified when we created our spawn boundary).  Our boundary will be able to see it and spawn it if it's enabled and a valid tile is found.

For more information on this plugin command see the Help Section below.

*Note: This plugin command does not run any code so it will not interfere with your event. This plugin command is parsed by the spawners boundary system code for data. It functions about the same as a Comment*

After you set up your Boundary Events on the Spawn Map you should be good to go.

Simply test your game and run the event which creates the boundaries and adds the auto handlers. If your boundaries are enabled by default, you are on a valid mapId, you have valid RegionIds nearby, and if your events you created are enabled by default, then you should see your events spawning around the player and unspawning as you walk away from them.

Events are visible so you can see what's happening. For a boundary like this you may want them invisible but allow player to interact in some way with them. The sky's the limit!

Boundary System Plugin Commands and Script Calls:


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

This is the script call to create your boundary, or boundaries.

width = the number of tiles wide your boundary is.

height = the number of tiles high your boundary is.

thickness = the number of tiles thick your boundary is.

name = the "name" of your boundary to be used later when spawning/unspawning on this boundary.

eventId = use 0 if creating a boundary around player, use an eventId if creating a boundary around an event, or use -1 if creating a boundary around an x,y location, and set the x, y location as shown below.

expandBy = the number of tiles the boundary expands its thickness by in the direction of the players movement. This helps increase the odds that events will spawn in front of the player while the player is moving as opposed to the sides and back, helping to ensure that the player has higher odds of encountering enemies in the direction the player is moving.

maxEvents = the number of events the boundary is allowed to spawn, use this to manage the total events on the map to prevent event clutter and performance loss.

centerx = only use centerx if spawning on an x,y location. centerx = the x location of the center of the boundary. leave out of the script call completely if spawning on player or event.

centery = only use centery if spawning on an x,y location. centery = the y location of the center of the boundary. leave out of the script call completely if spawning on player or event.

Example Script calls: Ritter.Boundary.createSpawnerBoundary(11, 11, 1, "spawn", 0, 2, 30)

This would create a boundary of 11 tiles width and height around the game player with 1 thickness which is named "spawn", the boundary will expand by 2 tiles in the direction the player is moving and have a maximum of 30 events it can spawn.

Ritter.Boundary.createSpawnerBoundary(15, 15, 1, "unspawn", 0, 0, 0) This would create a boundary of 15 tiles width and height around the game player with 1 thickness which is named "unspawn", the boundary will not expand in the direction the player is moving and will not be able to spawn any events.

Ritter.Boundary.createSpawnerBoundary(5, 5, 2, "eventBoundary", 50, 0, 5) This would create a boundary of 5 tiles width and height around event 50 with 2 thickness which is named "eventBoundary", the boundary will not expand and is limited to spawning 5 events maximum at a time.

Ritter.Boundary.createBoundary(5, 5, 1, "xyBoundary", -1, 0, 20, 50, 50) This would create a boundary of 5 tiles width and height around coordinates 50,50 on the game map which is named "xyBoundary", the boundary will not expand and is limited to spawning 20 events at a time.

Ritter.Boundary.addAutoHandler(name, spawnMap, maps, type, wait, enabled, boundaries) 

This new Feature allows the developer to abandon manually calling the spawn/unspawn boundaries and instead allows the developer to run them automatically! Simply Create your boundary and add an Auto Handler to it. Then set up your spawn events as explained in the next section. Easily Enable/Disable each Boundary with a plugin command or script call!

  • name = The "Name" of the boundary you wish to run on auto mode.
  • spawnMap = The Id of a SpawnMap to pull events from.
  • type = The Type of Boundary you wish to run.
    • "SpawnOn" = Spawn Events on the Boundary Edge.
    • "SpawnIn" = Spawn Events within a Boundary.
    • "FillOn" = Spawn Events on every tile along the edge of a Boundary.
    • "FillIn" = Spawn Events on Every tile within a Boundary.
    • "UnspawnOn" = Unspawn Events on the Boundary Edge.
    • "UnspawnIn" = Unspawn Events within a Boudnary.
  • wait = The number of frames to wait between boundary actions. Spawn/Unspawn calls.
  • enabled = Whether the Boundary is Enabled by Default or Not.
  • boundary = [Array]  of "Strings"- Only required for Unspawn Boundaries. This tells the Unspawn Boundary which Spawn Boundaries it is allowed to unspawn events from. It will check this array of "Boundary Name" strings against the events parentBoundary.

Boundary Event Setup

No Script Call for this Plugin Command as it is only parsed by Spawner Boundary System Code for Data.

This Plugin Command must be placed on the first page of every Event on a Spawn Map which is used for Auto Boundaries. It executes no code and is essentially the same as a Comment.

  • Boundary List = A List of Strings containing Boundary Names 'this' event may spawn on.
  • Map List = A List of MapIds 'this' event may spawn on.
  • RegionId List = A List of RegionIds 'this' event may spawn on.
  • Enabled By Default? = Whether spawning this Event is Enabled or Disabled by default. Can be toggled on/off with a plugin command.
  • Saved Event? = Whether the event is saved or not. Will respawn if tile passes through a valid spawn boundary (The Boundary which spawned 'this' event).
    • Saved Events work differently for Boundary Events than they do for Regular Spawned Events. The only difference would be the eventId does not remain the same for Saved Boundary Events, everything else will remain exactly as it was on Unspawn or Map Change. If Saved Boundary Events are allowed to retain EventIds this would allow for too many events to stack up on the map and cause performance loss, therefor we Recycle those Unspawned Saved Boundary Events while they're not being used. If you must retain the same eventId ,for some reason, then that specific event should be spawned regular and not by boundary.

Ritter.Boundary.initBoundaryEvents(boundaryName)

  • boundaryName = The "Name" of the boundary you wish to initialize.

Initializing a boundary is only required if you wish to Pre-Load all events within a boundary on map load. If your boundary type is "SpawnIn" or "FillIn" this plugin command does not need to be applied.

If you use "SpawnOn" or "FillOn" boundaries you may wish to initialize all nearby saved events so they are loaded when the player loads into the map. To accomplish this simply place this Plugin Command on an AutoRun event that erases itself after running its commands. 

This method may be deprecated in the future if I can find a proper spot in MZ code to  call this which doesn't crash the game xD


Ritter.Boundary.activate(boundaryName)

  • boundaryName = The "Name" of the boundary you wish to activate.

This command turns on a specified boundary. By turning on a boundary it allows the boundary to Spawn or Unspawn events as long as the conditions are met which allow this boundary to Spawn or Unspawn events.

Conditions such as: Player is on proper map. A valid RegionId is within/on a boundary. There are enabled events for a nearby valid tile with.

Ritter.Boundary.deactivate(boundaryName, unspawnAll)

  • boundaryName = The "Name" of the boundary you wish to activate.
  • unspawnAll = true/false - Whether or not all events spawned by this boundary are unspawned when boundary is deactivated. (Turned OFF).

This command turns off a specified boundary. By turning off a boundary it stops running entirely. It will not spawn or unspawn any more events on any map until it is activated again.

Ritter.Boundary.enableEvent(spawnMap, eventId)

  • spawnMap = The MapId of a SpawnMap.
  • eventId = The EventId of an Event on a Spawn Map which you want to Enable.

Enabling an event allows the event to be spawned by the Auto Boundary system. If you set an event to be disabled by default and want the event to be later turned on somewhere in your game then this is the command you'll need to call when that spawn event should be enabled. Only Enabled events may be spawned by the auto boundaries.

Ritter.Boundary.disableEvent(spawnMap, eventId)

  • spawnMap = The MapId of a SpawnMap.
  • eventId = The EventId of an Event on a Spawn Map which you want to Disable.

Disabling an event will make it no longer be spawned by any boundaries. Be advised that any saved events made from this event will still be restored despite being deactivated. No new spawns.

Ritter.Boundary.editSpawnerBoundary(boundaryName, param, value)

  • boundaryName = The "Name" of the boundary you wish to edit.
  • param = the property you wish to edit.
  • value = the value you wish to set the property to.

When editing the properties of a Boundary using the Plugin Command leave the properties you wish untouched as 'undefined'. If you set a value for any property that value will be applied. 'undefined' values are ignored.

Please be advised that changing the width/height of unspawn boundaries may cause some boundary events to remain outside of the unspawn boundary. (Unspawn boundary can miss some events if shrunk, leaving events on the map that aren't unspawned. Be careful when resizing Unspawn boundaries)

Param list: 

*When using Script Call Use "strings" as param value.*

"width" - sets new width property for the boundary.

"height" - sets new height property for the boundary.

"thickness" - sets new thickness property for the boundary.

"expandby" - sets new expandBy property for the boundary.

"centerx" - sets new centerx property for the boundary.

"centery" - sets new centery property for the boundary.

"maxevents" - sets new maxEvents property for the boundary.

"waittime" - sets new wait time for automatic boundary.

Example script calls:

Ritter.Boundary.editSpawnerBoundary("spawn", "width", 25)

Ritter.Boundary.editSpawnerBoundary("spawn", "height", 17)

These calls would set the width of "spawn" to 25, and the height of "spawn" to 17.

Ritter.spawnEventOnBoundary(mapId, eventId, regions, boundaryName)

  • mapId = The mapId of the spawn map which holds your template/source event to be copied to game map.
  • eventId = The eventId of the template/source event to be copied to the game map.
  • regions = The region Ids to use for spawning events on. List as an array to use multiple regionIds. [1, 2, 3]
  • boundaryName = The "name" you gave your boundary that you wish to spawn on.

Example Script call using boundary created above: Ritter.spawnEventOnBoundary(4, 8, [15, 16], "spawn")

This would spawn event 8 from map 4 on a random tile marked with regionIds 15 or 16 that pass through the boundary named "spawn".

Ritter.spawnFillOnBoundary(mapId, eventId, regions, boundaryName)

  • mapId = The mapId of the spawn map which holds your template/source event to be copied to game map.
  • eventId = The eventId of the template/source event to be copied to the game map.
  • regions = The region Ids to use for spawning events on. List as an array to use multiple regionIds. [1, 2, 3]
  • boundaryName = The "name" you gave your boundary that you wish to spawn on.

Example Script call using boundary created above: Ritter.spawnFillOnBoundary(4, 8, [15, 16], "spawn")

This would spawn event 8 from map 4 on every tile marked with regionIds 15 or 16 that are along the edge of the boundary named "spawn".

Ritter.spawnEventInBoundary(mapId, eventId, regions, boundaryName)

  • mapId = The mapId of the spawn map which holds your template/source event to be copied to game map.
  • eventId = The eventId of the template/source event to be copied to the game map.
  • regions = The region Ids to use for spawning events on. List as an array to use multiple regionIds. [1, 2, 3]
  • boundaryName = the "name" you gave your boundary that you wish to spawn on.

Example Script call using boundary created above: Ritter.spawnEventInBoundary(4, 8, [15, 16], "spawn")

This would spawn event 8 from map 4 on a random tile marked with regionIds 15 or 16 that is within the boundary named "spawn".

Ritter.spawnFillInBoundary(mapId, eventId, regions, boundaryName)

  • mapId = The mapId of the spawn map which holds your template/source event to be copied to game map.
  • eventId = The eventId of the template/source event to be copied to the game map.
  • regions = The region Ids to use for spawning events on. List as an array to use multiple regionIds. [1, 2, 3]
  • boundaryName = the "name" you gave your boundary that you wish to spawn on.

Example Script call using boundary created above: Ritter.spawnFillInBoundary(4, 8, [15, 16], "spawn")

This would spawn event 8 from map 4 on all tiles marked with regionIds 15 or 16 that are within the boundary named "spawn".

Ritter.unspawnEventOnBoundary(boundaryName)

  • boundaryName = the "name" you assigned to the boundary you wish to use for unspawnEventOnBoundary.

Example Script call using boundary created above: Ritter.unspawnEventOnBoundary("unspawn")

This would unspawn any events located on the boundary "unspawn".

Ritter.unspawnEventInBoundary(boundaryName)

  • boundaryName = the "name" you assigned to the boundary you wish to use for unspawnEventOnBoundary.

Example Script call using boundary created above: Ritter.unspawnEventInBoundary("unspawn")

This would unspawn any events located within the boundary "unspawn".


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)
    • Ultimate Event Spawner Plugin
    • Craig "Ritter" Barger



Version Log:

  • 1.0: Released Plugin.
  • 1.1: Discovered, Isolated, and Fixed a rare crash relating to unspawning an unspawned event and then changing scenes.
  • 1.2: Added spawning events by "SpawnMapName" & "EventName".
    • Added unspawning events by x, y location.
    • Added ability to easily edit boundary properties.
    • Added new boundary script calls for filling boundaries with events.
    • Added unspawnEventInBoundary script call.
  • 1.5: Added Plugin Commands for Event Spawner.
    • Added Plugin Commands for Boundary System.
    • Added Automated Boundaries.
    • Added Saved Boundary Events.
    • Added Developer Mode Warning Alerts. (Work in Progress)
    • Added Info Text Throughout Plugin Code.
    • Fixed an issue with recycled event sprites not being removed completely.
    • Fixed a Bug with Boundary Saved Events. (August 23, 2021)
  • 1.6: Made Load Spawn Map code a lot cleaner and more efficient.
    • Moved all SpawnMap Data into one Object. $MapData[mapId].
  • 1.7: Compatible with RPG Maker MZ Corescript 1.7.


Is this spawner missing something you need?

Have any ideas on expanding this plugin further?

I'd love to hear your thoughts in the comments below and if they're reasonable I'll see about adding them into the spawner!

StatusReleased
CategoryTool
Rating
Rated 5.0 out of 5 stars
(2 total ratings)
AuthornotRitter
GenreRole Playing
Tagsevent, JRPG, mz, RPG Maker, spawner

Purchase

Get this RPG Maker MZ Plugin and 1 more for $8.00 USD
View bundle
Buy Now$5.00 USD or more

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

Ritter Ultimate Event Spawner v1.7 20 kB
Ritter Ultimate Event Spawner v1.6 20 kB
Ritter Ultimate Event Spawner Plugin v1.2 34 kB
Ritter Ultimate Event Spawner v1.5 20 kB
Ritter Ultimate Event Spawner Demo 62 MB

Development log

Comments

Log in with itch.io to leave a comment.

Very interested in trying this out if it performs better than Galv's spawn events, my project has many predestrians and cars operating on large maps and I am curious if your plugin saves the graphics a spawned event uses, currently they use a plugin that choose a a selection of file names/races and an index at random.

Yeah, It looks like it's not working in 1.7

Sorry about this! I'll take a look into this as soon as I can

(1 edit)

Sorry about the delay but I've looked into this and it seems like I've got it working for MZ corescript 1.7.

Just download the new version 1.7 of the event spawner to try it out

let me know if you encounter any issues with it

Thank you for your patience!

(+1)

Its not starting with MZ 1.7 (Demo to if i update the core script to 1.7)

Sorry about the delayed response, I'm taking a look into this as soon as I can.

(+1)

Oh nice! No worry,  i tough this plugin can help me to fix a problem but i found  a other solution. But dam this looks very good for other projects, so i would be happy about a new Version for mz 1.7 in the future. Thx for your work.

(1 edit)

Sorry about the delay but I've looked into this and it seems like I've got it working for MZ corescript 1.7.

Just download the new version 1.7 of the event spawner to try it out

let me know if you encounter any issues with it

(the demo will likely still not work when updated, that'll need more work on my end before it works again)

Thank you for your patience!

(2 edits)

Hello, just got this plugin and was excited to try it out as other event spawning plugins have not worked for me. But this one also doesn't seem to want to work. I'm getting the message "Error Uncaught Error: Failed to load: data/MapNaN.json". I only have 1 map that has the events on it, and I have that map in the Pre Spawn Map setting. Still doesn't load. In order to see that error message I had to comment out lines 953-954 in the code as the console told me there was an "Uncaught SyntaxError: Unexpected token u in JSON at position 0 at JSON.parse (<anoymous>) at Ritter_EventSpawner_v1.6.js:954.

Any help would be appreciated, and if you need any other information I can provide. I've been looking for an even spawner that handles spawning events in certain regions for a while now and thought this one would work out.




(1 edit)

The events that I'm spawing seem to be non-functioning?

After using the typical Plugin SpawnEvent command, unlike the originals they are being copied from, the copies cannot be interacted with, the player can walk through them, the walk-in-place animation is absent, etc.

I saw in the trailer for the plugin that there is a section clearly show-casing that the shadow events move and interact with the player, but I can't really access that part of the demo because it utilizes the Region plugin add-on...

What am I doing wrong that the events end up as mere static sprites?

Hello, Sorry you're having an issue using this plugin. Typically issues such as this tend to be caused by an incompatibility with another plugin. Do you have another event spawner enabled? Have you tried testing in a project with less plugins enabled? have you tried disabling some other plugins within your existing project? Do you have your event(s) set up correctly? Without more information on what you're doing that isn't working it's hard to say for certain where the issue is.

Just did a bunch of testing, it seem the Events and Movement Core by VisuStella

(http://www.yanfly.moe/wiki/Events_and_Movement_Core_VisuStella_MZ)

completely renders the copied events non-functional.

T-T

Hello, I just ran some tests myself and seem to have found the same issue. I'll take a look into seeing if I can resolve this incompatibility.
Hopefully I'll figure something out, it might be tough with the obfuscated code.
Thank you for reporting this!

That's really nice! No pressure or anything! 

Just a shame that troubleshooting with Visustella is probably difficult T-T

Out of curiosity, was a fix ever found?

unfortunately not yet, it's a little rough trying to get two spawners to work together especially with obfuscation involved. I'm trying another approach now that you've reminded me about this issue which leans into the spawner that's inside of the eventsmovecore plugin. It's more of a workaround so here's hoping I succeed on this fresh attempt.

It's really a shame that Visustella decided to group their spawner inside of the eventsmovecore plugin which has so many other helpful features. So far I'm seeing some promising signs in my testing but transforming is an issue that I'm trying to resolve.

(3 edits)

I get this error every time I start the game for the first time

"Uncaught TypeError: Cannot set property 'events' of undefined"

But after F5 everything works fine . or restart the game.

What is the cause please?


Uncaught TypeError: Cannot set property 'events' of undefined

    at XMLHttpRequest.map.onload (Ritter_EventSpawner.js:1156)

(2 edits)

Hello version 1.2 after above is not compatible with VisuMZ_0_CoreEngine I don't know if there will be many bugs in version 1.2?

if I don't save the spawn

Should be able to use the old version, right?

Hello, I'm sorry you're having this issue! I'll take a look and see if I can find incompatibilities and fix them as soon as I can, in the meantime any additional information you can give will surely be helpful. Thank you for reporting this issue!

thanks for your reply

Can you describe the issue you're having?  Are you getting thrown any errors? Is something just not working as intended?

(1 edit)
I test directly with your demo
1.2 Ok 
1.5 No
1.6 No
Tried both in VisuMZ_0_CoreEngine top and VisuMZ_0_CoreEngine bottom
Script Call Error VisuMZ_0_CoreEngine.js:7685 TypeError: Ritter.spawnEvent is not a function

Okay I think the issue here is actually unrelated to Visustella Core MZ. When you placed the updated version of the spawner into the demo did you reconfigure the plugin parameters? 

In the spawner update to 1.5 there is a new Developer Mode which is still unfinished but this Developer Mode seems to be clashing with my own demo file. So to get around this issue just disable it.

Try this:

Open plugin manager and open Ritter_EventSpawner.

Set Developer Mode Parameter to False.

Set the Developer Mode Alert Settings to False.


Playtest again and see if it works.

Be sure to let me know if this doesn't resolve your problem!

Hello, I wanted to ask, if there is an option to unspawn "this event", the one you are interacting with?

Hello, that's quite do-able! Unspawning the Event you're interacting with should be as easy as this

On the event you're interacting with place a script call that looks like this

Ritter.unspawnEvent(this._eventId)

(1 edit)

Thank you. It partialy worked like "delete event", but when I leave and re-enter the map, event is still spawned there where it was. Can I unspawn it permanently? :)

If the event is a Saved Event then you must do:

Ritter.unspawnEvent(this._eventId, true)

This removes the saved event data to prevent the event from being restored on map change.

If it's not a saved event then something weird is going on.

I'm currently getting close to releasing a big update for this plugin which will include Plugin Commands and making things more efficient.

(1 edit)

Yeah, I tried with "Ritter.unspawnEvent(this._eventId, true)" myself, but that actually didn't even unspawned the event at all ^^'
Would be cool if you can fix it. Also can't wait for the update, thank you for your hard work!
Edit: Fun fact, when I erased the event after that command, it works fine! Thank you!!

Weird, I just tested this in the new version of the plugin and it's working for me without any issues.

Hmm, the unspawnEvent function should handle erasing the event itself, it should only take that one script call to unspawn the event and remove the save data while removing all trace of that event from the map.

Does the event remain on the same tile after it's unspawned or does it move to -1, -1? It definitely sounds like something isn't working as intended.

O vO now I'm back to annoy you with bugs on the MZ version lmao~

I'm not sure why, but using "Ritter.spawnEvent(2, 1, 5, 2, true);" doesn't seem to work~!
I tested this by adding true to the end of the spawns in the mz demo unspawn section and it seemed to not unspawn! "Great success" made me laugh!

https://gyazo.com/0a1c5c420ecdcd8de625297bbb3bcf82

Because I couldn't unspawn saved events I couldn't test the error we had with MV (spawning/moving new saved events on old saved+unspawned locations > map transfer)

A demo project would be great, unfortunately I have problems with unspawing spawned events.

I use this script-call to spawn an event: Ritter.spawnEvent(2, 1, 13, 2)


Then I use this script-call to unspawn it: Ritter.unspawnEvent($gameMap._lastSpawnEventId)

And I tried: Ritter.unspawnEvent(1000)

And: Ritter.unspawnEvent($gameVariables.value(3))

(I set Var 3 to $gameMap._lastSpawnEventId)


But nothing happend / nothing unspawned.

The parm is on Start with Event-ID 1000 (default).

(+1)

Hello, I'm sorry you're having problems with this plugin, I'm currently unable to replicate this problem but I did recently make a demo project for the MV version of this spawner + boundary system so I'll start work on an MZ version. It should be a much faster timeframe to complete this one.

Thank you! I'll get this done as soon as I can!

(+1)

The demo project has been released! I ended up doing more than I intended to do with it and now have some plans to expand on the demo once this next plugin is completed 100%.

Thank you and I hope it's helpful!

Hey, that's great!

And I found the problem: It's the "VisuMZ_1_EventsMoveCore" plugin, it also has an event spawn function, but yours is better. ^^

Plugin updated to v1.1 to fix a rare crash which occurred when unspawning an unspawned event followed by switching scenes.