Currently when you unspawn a saved event, the event ID it was using remains "in use" as in it wont be overwritten by future spawned events. I was wondering, if it's possible, if you could tell me how to change this behavior so future spawned events will overwrite the IDs of deleted events. It's fine if it breaks the restoring deleted events function.
Note: I'm using v1.4 as the newer version doesn't work with my game.
The image shows the events of the current map. There were originally 6 "Weed" events, I then destroyed 2 (red arrows) and spawned 2 more (blue arrows).
I want the newly spawned events to overwrite the IDs of the unspawned events. My game will have thousands of spawned events and I'm worried about the event data array getting out of hand. (Maybe this fear is unfounded?)
Hello! It appears you may just need to remove the saved event data when unspawning a saved event.
let eventId = this._eventId; let removeSave = true; Ritter.unspawnEvent(eventId, removeSave);
typically you would remove the saved event data unless there is a specific need for retaining the data and the event it was tied to, it's left available as an option but typically you'd be removing the saved event data when unspawning.
If you remove the save data when you unspawn a saved event the unspawned event should be returned to the pool and continue to be recycled as normal.
For all intents and purposes a saved event is a "real" event, it will always exist and it will be treated differently until the saved event data is removed.
as a side note your fears are not unfounded, if you aren't removing saved event data then you will end up with thousands of events on the map which will cause performance issues. As long as we're managing our saved events properly and keeping the number of events active at once in check (ie not having 5000 events active on the map at once) then you should be able to spawn millions of events and never have those performance drops which are caused by too many events on the map.
Thank you and I hope this solves your issue! Good luck with your project!
I am removing the save when I unspawn it. Reading your reply that it should be removing it from the maps event list caused me to do more digging and it turns out its a conflict with another plugin causing it to keep the event data after being removed.
I am using the Hakuen Studio Self Variable Plugin and have added increasing time-based Self Variables to spawned events and use your plugin to spawn these events.
The plugins work flawlessly together as long as I don't leave the map where I spawn your event.
If I leave the map and re-enter the original map where the event has spawned, I receive this error.
I'm taking a look into it and so far I'm unable to replicate the crash (using Ultimate Event Spawner v1.8). I seem to have both plugins working together even after a map change. I've tried setting self variables on temp events and leaving the map and returning which works (I wouldn't advise using temporary spawned events with these self variables but i tested it anyway), I also did the same with saved spawn events which also worked when returning to the map.
At this point I'm not sure what's causing your problems but it seems like it might be deeper than these 2 plugins conflicting. I'd need more information or a dummy project which crashes (remove all the plugins from js/plugins folder before zipping it, if you decide to do this)
To yourself any anyone reading this, I meant to post this in the MZ plugin, not the MV plugin.
I will try to get that to you that information and video later today after work and will repost in the correct thread. My apologies for the wrong thread.
I'll do it on a fresh save with only those two plugins and will send over to you later today (: Your activity and willingness to help is incredible. Will see if it's a deeper issue, my brain is definitely confused by this one haha
Does this plugin have a spawn overlap command? It seems things won't spawn if the player or another event is on the tile, even if the existing event is on another layer or set to through. I would like this feature because I sometimes change the player to a cursor, and want to spawn something at the cursor's position.
Hello! I'll take a look into making this easier to do in the near future but the code which is blocking your events from spawning is located inside the Ritter.canSpawnOn() Function. I do have one method in place to allow for spawning on events which requires a script call to enable it.
If you use the script call
Ritter._spawnOnEvents = true;
this will allow you to spawn on top of events.
it can be disabled by using
Ritter._spawnOnEvents = false;
it's defaulted to false so if you want to spawn on top of events set it to true.
I'm considering adding this as an optional argument for the Ritter.spawnEvent command, that may be something that happens in an update soon.
Thank you and I hope this helps you out in the meantime!
Ok, so that script call does work for spawning on events but not for spawning on the player.
E: I found the line blocking spawn on player position, I'll add an additional check for if the player is not set to through or same as character priority
I picked this up with the sale and it replaced Yanfly Event Morph nicely. The notetags work and the script call is a lot simpler.
However I am trying the event spawner on a map that spawns both moving and non moving events. If I unspawn a moving event (using Autonomous movement>random) then spawn a static event, the new static event moves for a few tiles before settling in a position. If I only unspawn static events and respawn the same static event there's no issue. I could get a video and a screencap of the event pages if you need to see it in action.
Hello again! Glad to see that some stuff is working for you! I've tried creating some events to spawn where one was using autonomous movement random and the other was using autonomous movement fixed. I was unable to replicate your issue. If you could show me what's happening along with the events in question that would help clear things up.
Steps I took:
Created 2 events on a spawn map. One using Autonomous movement Random and the other using Autonomous movement Fixed. I spawned the random event first and let it move around for a little bit. I unspawned the random event. I then spawned the Fixed event. resulting in the fixed event staying in place on the tile it was spawned on without moving. I did this a few more times alternating between the two events and couldn't get it to break.
Thanks for testing. It's being caused by Altimit Pixel Movement as when I turned it off the issue dissapeared. Although I don't get the issue with Galv spawn+Altimit so I'll try to narrow down where the conflict is.
Interesting one here. So it seems like the events are returning to the tile the chicken event was on when it unspawned upon being respawned as the other berry bush event.
This is happening with my spawner, for a reason I'll soon be looking into, but not with other spawners because this spawner recycles events. So when you unspawn a chicken that event goes into a sort of 'unspawned events pool' which the spawner looks to before spawning another event. if there are any unspawned 'null' events available it will grab one of those and transform it into a new event instead of creating another event on the map. Whereas galv spawner will just spawn a new event every single time you spawn an event.
The problem seems to be that the event wants to return to the position it was in when it was last unspawned.
spawn chicken unspawn chicken spawn berry bush berry bush wants to move to where chicken previously was.
I'll take a look into this and hopefully have a fix soon.
Edit:
I've located the problem within altimit movement code, deciding on the best fix.
I just uploaded version 1.4 of the spawner which should fix this issue.
If you're curious about what the issue here was with altimit movement and the way my spawner recycles events... basically with altimit movement whenever an event is moving it is given a ._moveTarget = true property and also ._moveTargetX and ._moveTargetY properties. These properties had to be reset when unspawning an event since these events are recycled.
The events were respawning with flags that tell altimit when and where to move the event to lol.
I hope this works out for you! If you find any other issues or if this one somehow persists be sure to let me know!
There's currently no function in this plugin to allow for unspawning events by name but something like that is very possible to do, it's just there are often more than one event sharing the same name. In a situation with multiple events sharing the same name (spawned from the same template event) then you'd need to either unspawn them all or just unspawn the first one or last one in the list, or create other parameters.
Overall something like that would be very easy to set up depending on what your needs are. I could write a function to do this.
If you're still interested let me know what your needs are and i'll see what I can do.
Hello. Thanks for the reply & sorry for the delay in responding.
If you could implement additional functionality it would be helpful.
I use the chrono engine to spawn enemies.
I would like to make an enemy disappear when an event (enemy) is defeated or when a certain amount of time has elapsed after the event (enemy) has spawned.
The current specs assign the ID of the spawn event in the order in which they spawned.
Therefore. It is difficult when I want to unspawn a spawn event by specifying a specific event ID. Therefore, I wanted to use individual event names to unspawn events.
I do not have a problem with the same name being unspawned at the same time.
(I see no problem with the hassle of preparing multiple events with the same content but different names).
However, I also think it would be useful to have the ability to unspawn events in the order they are spawned, with the event names specified.
I have one more question,
In ChronoEngine, when a spawn event (enemy) is defeated, the spawn event (enemy) does not seem to be unspawned.
It seems that the event itself remains on the map without being unspawned even if the spawning event (enemy) is defeated.
1: In the "Ritter Ultimate Event Spawner", is it possible to erase an event and not be unspawned?
Is it only with the unspawn command that spawned events can be unspawned?
2: The chrono engine does not seem to process "event (enemy) defeated = event (enemy) erase".
I would like to add a self unspawner to the chrono engine side to handle when an enemy disappears, but is it possible to quote "Ritter Ultimate Event Spawner" as a separate plugin? (I'm a programming beginner, so I'll give up if it seems too difficult)
There may be some discrepancies in the machine-translated English. Thanks for reading.
One more question: Does the event transform feature also copy the notetag of the template event? I need something to replace YEP Event Morph which overlooked that feature
Hello again, sorry i've been a bit busy lately and haven't gotten around to testing the benchmark with this spawner. I'd assume it would be very similar in performance to other spawners as it seems the benchmark just spawn in events as it needs them. Unless there's a benchmark test which spawns & unspawns events constantly to see how many spawns & unspawns you can do before framerate goes down. That kind of benchmark is where you'd see the biggest difference between this spawner and others.
To address your other concern, my spawner does indeed copy the notetag from the template event when an event is transformed. All data on the template event should be copied over when you transform an event.
Hey itch summer sale is in 10 days and I'll be participating in it. I currently have some bundles available on my profile which offer some discount. Single plugin discounts will be available during the sale.
If type more than a certain number in 'Preload', the black screen will appear and the game will not run. (Demo: 4 , My Game: 5). can you please fix this? The recycle event spawner plugin is really powerful, but I can't use it because of this issue.
Hello this is an interesting one, sorry you're experiencing this issue. I was able to replicate this issue and I'm taking a look into solving it now. Thank you for reporting this.
Were you able to fix your other issue with the $gameMap._lastSpawnEventId command?
Just posting to let you know that I haven't forgotten about this and I've been trying to find an optimal solution to the black screen issue. Sadly it's not resolved just yet. Sorry about the delay.
Hello I've uploaded a version 1.3 of the event spawner. This update fixes the black screen bug when adding a bunch of pre-load maps to the plugin parameters.
As far as the other issue with the last spawn eventId... that's still unresolved as of now. I've poured some time into trying to find a solution to this specific problem you're having but it's more specific to the way you're trying to access it rather than the command itself failing. I'll continue to try to find a solution for your needs but it may just be the method of its use in this case causing the issue.
Hello again! I hope you're having a great holiday season! I love so much your plugins! I was testing them a little bit more and I noticed 2 important issues. To spawn the events, I used the script call Ritter.spawnEventRegion(mapId, eventId, regions, save)
1. First of all, your Ultimate Event Spawner plugin and your Boundary System plugin seem to have an issue when using them with the Orange Time System plugin by Hudell. For example, if I use this plugin command within a spawned event
TOGGLE SELF SWITCH A IN 10 SECONDS
it won't work as intended if the player is transferred into another map and then comes back. It only works if the player stays in the same map until that self switch is toggled. I made some gifs to let you see what's going on. - In this gif, you can see that the plugin command by Hudell is working properly because the player stays in the map until the self switch is toggled: https://imgur.com/e8rR1Q7 - And in this gif, you can see that the issue happens when changing the map and infact the self switch isn't toggled: https://imgur.com/1xk4x4i - The same issue happens even after changing the map, saving the game and reloading the save file (in case you don't know this, the Orange Time System plugin is intended to work even after closing the game because it tracks the flowing of time): https://imgur.com/4rb4rnp
2. The second issue is happening when using your plugins with the Galv's Simple Crops plugin. In a previous message, you said that your plugins were working properly with it, but they seem to have an issue. The Simple Crops plugin works properly with a spawned event if the player doesn't change the map, as you can see in this gif: https://imgur.com/KjruTQk The issue happens when the player changes the map and then comes back and as you can see in this gif the spawned event starts to flicker:
These plugins are so important for my game, so please... can you fix those issues? I extremely need them.
(Fortunately, your plugins are working properly with the Galv's Tools plugin, so far!)
EDIT 1: After installing the Ritter_EventSpawner SavedEvent Fix Testing plugin, the Galv's Crops plugin seems to be working properly, but that didn't fix the issues with the Orange Time System plugin. As you can see in this gif, now the self switch is toggled properly even after changing the map... but the game crashes if the player saves the game, closes the game, re-opens the game, loads the save file, changes the map and finally comes back to that map where the self switch was toggled (the crash happens at the end of the gif):
And here's the console log:
rpg_managers.js:1949 TypeError: Cannot read property 'events' of undefined
at Game_Map.restoreSavedEvents (Ritter_EventSpawner.js:630)
at Game_Map.setupEvents (Ritter_EventSpawner.js:674)
at Game_Map.setup (rpg_objects.js:5442)
at Game_Map.setup (Galv_SimpleCrops.js:572)
at Game_Map.setup (Ritter_EventSpawner.js:355)
at Game_Player.performTransfer (rpg_objects.js:7480)
at Scene_Map.onMapLoaded (rpg_scenes.js:569)
at Scene_Map.isReady (rpg_scenes.js:561)
at Function.SceneManager.updateScene (rpg_managers.js:2018)
at Function.SceneManager.updateMain (rpg_managers.js:1983)
EDIT 2: Well... After more testing, the game crashes even with the Galv's Simple Crops plugin with the Ritter_EventSpawner SavedEvent Fix Testing plugin. As you can see in this gif, the game crashes after spawning the plantable event, planting the seed, waiting for the plant to grow, saving the game in another map, closing the game, re-opening the game, loading the save file and coming back to the map in which there is the plant (the crash happens at the end of the gif):
And here's the console log:
rpg_managers.js:1949 TypeError: Cannot read property 'events' of undefined
at Game_Map.restoreSavedEvents (Ritter_EventSpawner.js:630)
at Game_Map.setupEvents (Ritter_EventSpawner.js:674)
at Game_Map.setup (rpg_objects.js:5442)
at Game_Map.setup (Galv_SimpleCrops.js:572)
at Game_Map.setup (Ritter_EventSpawner.js:355)
at Game_Player.performTransfer (rpg_objects.js:7480)
at Scene_Map.onMapLoaded (rpg_scenes.js:569)
at Scene_Map.isReady (rpg_scenes.js:561)
at Function.SceneManager.updateScene (rpg_managers.js:2018)
at Function.SceneManager.updateMain (rpg_managers.js:1983)
EDIT 3: After even more testing, the crashes didn't happen anymore after setting the spawn map in the Preload Spawn Maps parameter of your Ritter_EventSpawner SavedEvent Fix Testing plugin. I really don't know why that fixed the crashes! XD
Hello! I just bought your plugins (Event Spawner and Boundary System) and I'm testing the demo you uploaded. The game crashes right after clicking on "Playtest". I'm using Event Spawner v1.2 and Boundary System v2.0. Since the demo had the Event Spawner v1.1, I installed the latest version of the plugin (v1.2), but the game crashes with both of them. The game doesn't crash if I don't install the Boundary System plugin. Here's the console log:
rpg_managers.js:1949 TypeError: Ritter.clearBoundaryEvents is not a function
at Game_Player.reserveTransfer (Ritter_EventSpawner.js:673)
at Function.DataManager.setupNewGame (rpg_managers.js:220)
at Scene_Boot.start (rpg_scenes.js:402)
at Function.SceneManager.updateScene (rpg_managers.js:2019)
at Function.SceneManager.updateMain (rpg_managers.js:1983)
at Function.SceneManager.update (rpg_managers.js:1907)
Hey again, sorry about this! Chances are I may have broken something in the demo with an update to the spawner + boundary system and didn't think to check the demo. I'll get around to looking into this soon. Hopefully in the meantime the info provided in the plugin files and on the store page for the spawner will help you get the plugins working.
I tried to install both of the plugins in a new blank project and the game crashes the same way as the demo!
EDIT: Nevermind! I was putting the plugins in the wrong order! Now I put the Boundary System over the Event Spawner and it doesn't crash anymore! Sorry for the misunderstanding. XD
Hello! I want to buy this plugin for RPG Maker MV, but before buying it, I'd like to know some things. First of all, is this plugin compatible with the ABS plugins made by the RPG Maker community? I'm referring to qABS (made by Quxios) and Alpha ABS (made by KageDesu). I tested other event spawner plugins and they don't seem to work with event note tags of spawned events (for example, when I tried to use an event spawner plugin made by someone else, the game throws an error like "can't read property 'notetag' of undefined" if I interact with a spawned event with an event note tag in it after quitting the game and loading a save file because it seems like event note tags of spawned events are not copied/saved after reloading the game and in fact they seem to work only the first time the player spawns those events). Event note tags are extremely important for ABS plugins because they work with them. And I also need event note tags for other things. So, does this plugin work with event note tags of spawned events?
Hello! Thank you for taking interest in this plugin. I developed this plugin initially for myself in a project using Chrono Engine ABS (Moghunter) and I developed the spawner with notetags in mind. While I have not tested this plugin against qABS or Alpha ABS I would be willing to give it a go over the weekend if you'd like. If any issues with notetags not working or anything else is reported I do try to implement compatibility patches for popular plugins such as those ABS plugins.
Thank you for the reply! Well, if your plugin works with the Moghunter ABS plugin, I suppose it should work with other plugins that use event note tags in general. For example, I would like to know also if your plugin works with some plugins made by Galv that use event note tags as well (such as Galv Tool plugin and Galv Simple Crops plugin). If that worked, I would instant buy your plugins because I really need them! You can give it a go over the weekend if you want to try those plugins. I would be so grateful with you!
Hello I did some testing against Galvs Tool Plugin and Simple Crops plugin and the seem to work together. I did some testing with saving the game and loading the save which seemed to work as well. Crops I planted were still at their proper stage after reloading the save.
My crop events were spawned onto the map using the spawner as saved events and continued to work as they should. This was using the Ritter_EventSpawner SavedEvent Fix Testing.zip version of the plugin.
If you're going to unspawn the events after crops are harvested you'll want to be sure to erase the saved event data.
I didn't get around to testing against those ABS plugins yet but I'd be surprised if they weren't compatible with each other.
Removing the first party member and the even associated crashes the game. The game will not crash upon reloading the map when removing other events, but it will if I reload the map and then open and close the menu (not shown). Note: it will not crash if the event I despawned was the last spawned event. I am using SavedEventFixTesting version of the plugin because the default will not work with my project.
Hello thank you for choosing this plugin and I'm sorry you're having an issue with the Saved Event Fix Testing plugin file. I'll take a look into this as soon as I can to see if I can replicate and fix the problem.
Hey, sorry it took a few days things have been really busy for me. I was able to replicate the crash successfully and I believe I've solved the crashing issue but it may require more testing. I'm currently unable to get it to crash anymore by doing the following steps:
spawn saved event
spawn another saved event
unspawn first saved event
change map
return to original map (where it would crash)
I'm also unable to make it crash anymore when opening the menu instead of changing maps.
Just download the Ritter_EventSpawner SavedEvent Fix Testing.zip again and replace the old plugin with this new one, be sure to let me know if you encounter any more problems! This version of the plugin may require more testing still before I'm satisfied enough to replace the original spawner with this other method.
Hello sorry to hear you're having problems! I'm taking a look into this but so far in my testing with Autorun events I've encountered no issues. Any additional information about the event you're having problems with could help.
I don't know maybe I'm the only one who got this bug xD The solution is to change the event page from Autorun to Parallel, or to change it's self switch before it gets spawned. I'm just posting this in case someone else got this issue.
Srry didn't mean to sound frustrated. I've tried YEP's and GALV's plugins before that and it's by far the best one :)
Found this plugin while looking for a solution to the performance issues of the YanFly EventSpawner.
With this plugin, my game has been spawning / destroying events for a minute before performance started to go down. I don't know if I'm doing something wrong, I'm just using spawnEvent ( no saving ) and unspawnEvent when the event hits a certain region. There are at best 40 events moving on the map simultaneously, rest are unspawned. I don't see why performance would degrade over time.
Also, this plugin is not compatible with RPG Maker MV < 1.6 ( has to do with node js version ).
Worked on it a bit more. To give a bit more context : I have a mountain, from which boulders go down. There are a few spawners at different places which are parallel events. The boulders themselves are parallel events with movement routes.
1/ I encountered the same weird problem with YEP_EventSpawner : when I let the game run for a bit and my FPS is heavily impacted, if i just open a ShowText command, the game is back up to 120 FPS. The moment i close it though, I'm back to 1 FPS.
2/ Used the profiler inside the console. I saw that a ton of performance was used on processMoveCommand, which might mean that the movement was continued to be processed, even in unspawned events .
By adding the line "this._index = this._list.length;", i completely removed this problem and gained a TON of FPS. Still, letting the game run the FPS are still going down.
3/ Did a simple check on $gameMap._events and it's kinda obvious. The _events array is getting bigger and bigger as game goes on. I see a ton of events flagged "erased=true" though. I get it's the engine way to "remove" events. But it also means you can't get away with not pooling events...
Hello and thank you for purchasing this plugin! I'm sorry to see you're having problems with it. If you're seeing the event array grow larger that would mean events are not being recycled which is leading to the fps drop. I would need more information on the process you're using to spawn and unspawn the events to understand why this is happening. It could be a number of things causing this to occur, the only way this spawner will create a new event on the map is if there are no unspawned events to transform, so something is causing the spawner to miss some/all of the unspawned events, or events are not being unspawned properly.
I'd need more information on the boulder events and the event(s)/common event(s) you're using to spawn/unspawn them to get a clear view of what's happening.
Thank you for the reply ! My setup is quite simple :
I have a parallel event to spawn boulders, with 2 commands : - Script : Ritter.spawnEvent(13, 1, 11, 87, false) - Wait(60)
The event spawned, my boulder, is on a separate template map. This event is also a parallel event with the following commands : - Script : <custom plugin checking region tile of the boulder for ajusting speed / unspawning event > - SetMoveRoute >This Event > Move Down ( repeat/skip/wait unchecked )
The script checking the region tile also handles the removal of the event if the boulder is on a specific tile : > this._index = this._list.length; > Ritter.unspawnEvent(this.eventId(), true);
Quick update, I kinda hate myself because I left the YEP_EventSpawner plugin in the project and that was the cause of all the non-recycling weirdness... fml. So performances are great now !
That being said, I still have a problem with the plugin. I created a test project with only your plugin and absolutely nothing else. I have a parallel event with only 1 command : SetMoveRoute > This Event > Down with repeat/wait/skip unchecked ( it's the Boulder ).
I have two test map :
- First map, the Boulder is placed on the map. - Second map, the Boulder is spawned using Ritter.spawnEvent.
I also have on both map an Event (Action Trigger), that does a simple TransferPlayer command on the current map.
When this last event is interacted with : - First map, no problem. - Second map ( spawned event ), callstack :
I can send you the test project if you'd like.
EDIT 1 : If I TransferPlayer from the Map 2 to another map, it works, even if the new map also has Ritter.spawnEvent. So the only problem is if I transfer from a map using Ritter.spawnEvent to the exact same map. Which is a bummer for respawning in my case.
EDIT 2 : As a workaround I transfer the player in a temporary map, and then back to the original map. Not as clean as I wish but it works and from a user perspective there's no difference.
Interesting, I'll have to take a look into this issue you encountered to see if I can replicate it and patch it, seems like something worth fixing. Glad to see you have figured out a way to get things working. Thank you for reporting this! I'll put out a devlog for this plugin once this is patched.
Is there anything special about the saved event you are spawning? I've tested this every way I could think of and couldn't get it to crash... but I'm not very familiar with this DisableEventStart plugin so maybe there are other conditions that occur?
Heya Ritter it seems this event spawner is completely incompatible with the popular Qmovement (via the required Qplus plugin) for some reason, is there a way to patch this? ^^ Thanks in advance <3
Thank-you so much for looking into it! <3 Good luck!
Although it may be impossible, there's another common bug with other spawner's spawned events being un-interactable, while I've been working around it with my current spawner if you also happen to fix that issue in yours I'll actually die of happiness. But just getting it working is a+ as well!
Hey sorry its taking so long, I've been trying to solve this issue it's just had me baffled for a bit. I'm hoping I'll get this solved soon! I'm still working on this. I've made some progress and was able to get it to stop crashing but only if I disabled a wait timer for spawned events but I'm sure that method will interfere with the QPlus plugin in one way or another, I'm trying to fix the actual problem causing the issue. On the plus side after disabling that timer I was able to interact with spawned events so hopefully once I find the root cause of the problem everything should work out.
Edit:
Okay so I'm not really 100% on this fix BUT I uploaded it, so if you want to help out testing it just download the plugin again and replace the old one with this new one. So far in my testing it seems to be working pretty well but it always helps to have extra testing.
Aye aye sir! Will download it and toss it into my game- let you know as soon as I run into any trouble! I am working on my crops today so it'll hopefully get put through the ringer!
And THANK-YOU so much for working on this problem aaaaa- you're freakin' awesome!
I'm currently in the process of doing finishing touches on the Spawner & Boundary system demo. It'll be finished shortly. I also went and updated the spawner a bit adding in a couple more commands (relating to boundary system) and made it easier to restore unspawned saved events. So on top of a demo we're also getting a spawner update :]
Hey notritter, I got your spawn plugin, seems like I can't spawn a full regionID Area using the script provide (I did success doing that with 'galv_spawn' thought), any solution for that?
I use common event, then connect it to a 'var' and added a 'jump to label' commend with limit number of 1000, but even do the area of the region I spawn it to was less then 1000 tiles, it didn't cover the all area.
Again when using galv spawn event this mothed did work when I use the following script:
or Ritter.spawn.Event($gameVariables.value(35),15,true);
or Ritter.spawnEventRegion($gameVariables.value(26),14,true);
the map stop when entering like it can read it.
Do you know which script I should use instead? I need it to work with 2000-3000 event tile area, but for start I'm checking it on 1000.
In short: what should I do to get a full area of region cover with the 'spawn event' using your plugin? Here is a screen shot when using normal script without connecting it with the script to the 'var' (it spawn more event but not the full amount set.
(when player attack the ground with 'x' tool he will get item the ground change as you see in the second picture).
and 'gif' show what's happen on the map, the base tile are 'grass'(green), and the event image are the yellow ground you see that spawn, I couldn't upload the all thing but you can see the idea of what need to happened there.
The above show case are only when using your ffical script as you see in the event picture, as I said when I try to use the 'var' script Ritter.spawnEvent($gameVariables.value(35),15,true); and similar, the game stop when entering the map.
Note:
I'm building a game that will include 'digging ground' event (like in zelda 2d) using ABS and 'Spawn Event'.
I'm in the process of trouble shooting this issue, I'm able to fill an entire 2500 tile map in one second using my Ritter.spawnEvent script call but it takes considerably longer when using regions to spawn events. I'll update here when I solve what's going on with the delay when region spawning.
for (let w = 0; w < $dataMap.width; w++) { for (let h = 0; h < $dataMap.height; h++) { Ritter.spawnEvent(2, 1, w, h) } }
this script call worked smoothly to fill an entire map, but that just places an event on every single tile which isn't quite what you need.
I edited that script call a little to include region ids and it does exactly what it seems like you need.
so what this does essentially is it loops through every single tile on the game map once and checks if its regionId is 1 ($gameMap.regionId(w,h) == 1)
then if the regionId is 1 it will execute the script call where 2 is the SpawnMap ID, Math.randomInt(27) + 1 will pick a random eventId on the spawn map from 1-27 and w,h is the x,y coordinates of the tile it found.
this will fill up an entire map almost instantly with events (tested on a 50x50 map). this spawner wasn't really created with the idea of filling an entire region with events but I can add in a script call to do so shortly if needed.
Thanks for checking it out, I did notice the amount of time it takes to spawn big amount of events, solving that will help a lot.
And you right, cover the full map with events will not work for this case, since there are walls, and places I will put other events, small and big event size (house...), that why control the area with Region are the most affective way for my case but I still need it to cover the full region area.
So If you find a way to add the option to spawn full region area (%100 of the region ID) using a script call that will be very helpful, I checked many spawn events, and when is come to 'fps' with big amount of event (like I need) your spawn win them all as you probably know (galv as I emanation have the option to cover 'full' region area with spawn, but the fps drop when I spawn 600-700 event already so I can't use it).
I included a script call in my last post which does what you need, but it will be a lot of events spawned at once and will likely cause the same fps issues you had with other spawners as MV has problems handling that many events at once.
In a game I'm making (which is on hold while I work on my biggest tool/plugin project yet) I got around that issue by creating the boundary system which I used to spawn and unspawn events outside of the players screen so that I could reuse unspawned events over again and get a result of having practically unlimited amount of events (as far as the player knows at least) without the fps drops.
My spawner works best when events are unspawned and respawned instead of spawning 1000+ events on the map at once.
I see, that probably be the best way to go with then, just got your 'boundary' plugin, I still need to learn how to do this right. and I think I didn't explain it right, I don't need it to spawn at once, just to spawn fast as passible like your original script for region already do, but instead of spawn to part of the region spawn it to the full area of the region.
And yes, I sew the script above but is for 'random' events from the map id, and I need to spawn 'specific' event id on the full region area, Is that passible? Also I don't need it to spawn in the same second, as long as it spawn fast enough to not fill like is take forever (7-10 seconds?). Do you know why the method with the 'var' doesn't work? It's work with 'galv spawn', and 'galv' is weaker then your spawn, so why something like
doesn't work with your plugin? is should make it spawn not at the same time but still fill the all region (with 'jump to label' I show in the picture above.
Here is the same idea but with 'galv spawn' script the connect to a 'var', as you can see it's fill the all region area, not at the same time but that works for me as long as is fill the all region area without to much fps dropping:
'68' are the event number from the spawn map Id, '34' are the 'var' ID, and '11' are the region it will spawn on, using 'if: Random = 500 jump to label' make the script to repeat itself until the all area full, however when trying this way with your spawn is only add some amount of repeating but doesn't get the all region area full , but when trying to use the same idea with RitterSpawn is not working at all, is like the main 'Ritter.spawnEvent' script can't be connect to the 'variable' for some reason, could you check it out? I have other problems with 'galv' so if I can do similar thing with your spawn I prefer to use yours. There is no rush or anything so if you need time to check it that ok.
And again It's not have to be spawn at the same time (I sew how is drop the 'fps' like you said), is just need to fill it up fast as you can get it to be. Thanks again for your time, I appreciate it!
I'm currently creating a demo project which will show various ways to utilize the spawner and boundary system. I'll upload it to the store page once it's finished.
This is probably the best route to showcase the features and make it easier to understand on the users end.
I believe I have a good idea of what you're trying to accomplish here and there is a good way to handle this task with my spawner + boundary system that will be explained in the demo. You'll be able to see it in action and if it's what you need you'll be able to inspect the events which handle it within the demo and see how it's done :)
I appreciate your patience and will get this done as soon as I can! Thank you!
← Return to RPG Maker MV Plugin
Comments
Log in with itch.io to leave a comment.
I'm wondering if you can help me with something.
Currently when you unspawn a saved event, the event ID it was using remains "in use" as in it wont be overwritten by future spawned events. I was wondering, if it's possible, if you could tell me how to change this behavior so future spawned events will overwrite the IDs of deleted events. It's fine if it breaks the restoring deleted events function.
Note: I'm using v1.4 as the newer version doesn't work with my game.
The image shows the events of the current map. There were originally 6 "Weed" events, I then destroyed 2 (red arrows) and spawned 2 more (blue arrows).
I want the newly spawned events to overwrite the IDs of the unspawned events. My game will have thousands of spawned events and I'm worried about the event data array getting out of hand. (Maybe this fear is unfounded?)
Hello! It appears you may just need to remove the saved event data when unspawning a saved event.
let eventId = this._eventId;
let removeSave = true;
Ritter.unspawnEvent(eventId, removeSave);
typically you would remove the saved event data unless there is a specific need for retaining the data and the event it was tied to, it's left available as an option but typically you'd be removing the saved event data when unspawning.
If you remove the save data when you unspawn a saved event the unspawned event should be returned to the pool and continue to be recycled as normal.
For all intents and purposes a saved event is a "real" event, it will always exist and it will be treated differently until the saved event data is removed.
as a side note your fears are not unfounded, if you aren't removing saved event data then you will end up with thousands of events on the map which will cause performance issues. As long as we're managing our saved events properly and keeping the number of events active at once in check (ie not having 5000 events active on the map at once) then you should be able to spawn millions of events and never have those performance drops which are caused by too many events on the map.
Thank you and I hope this solves your issue! Good luck with your project!
I am removing the save when I unspawn it. Reading your reply that it should be removing it from the maps event list caused me to do more digging and it turns out its a conflict with another plugin causing it to keep the event data after being removed.
Hi Ritter - I have a question.
I am using the Hakuen Studio Self Variable Plugin and have added increasing time-based Self Variables to spawned events and use your plugin to spawn these events.
The plugins work flawlessly together as long as I don't leave the map where I spawn your event.
If I leave the map and re-enter the original map where the event has spawned, I receive this error.
https://imgur.com/a/1zqg2Ho
Example:
I spawn your event. I leave the map. I re-enter the map and game crashes. Game doesn't crash if self-variables are not enabled.
Any idea why this is happening, or is this something I should reach out to Hakuen Studio about?
Game works fine if events are not spawned using your plugin but are already placed within the map. Crash only happens with spawned events.
I'm taking a look into it and so far I'm unable to replicate the crash (using Ultimate Event Spawner v1.8). I seem to have both plugins working together even after a map change. I've tried setting self variables on temp events and leaving the map and returning which works (I wouldn't advise using temporary spawned events with these self variables but i tested it anyway), I also did the same with saved spawn events which also worked when returning to the map.
At this point I'm not sure what's causing your problems but it seems like it might be deeper than these 2 plugins conflicting. I'd need more information or a dummy project which crashes (remove all the plugins from js/plugins folder before zipping it, if you decide to do this)
Gotcha.
To yourself any anyone reading this, I meant to post this in the MZ plugin, not the MV plugin.
I will try to get that to you that information and video later today after work and will repost in the correct thread. My apologies for the wrong thread.
I'll do it on a fresh save with only those two plugins and will send over to you later today (: Your activity and willingness to help is incredible. Will see if it's a deeper issue, my brain is definitely confused by this one haha
Does this plugin have a spawn overlap command? It seems things won't spawn if the player or another event is on the tile, even if the existing event is on another layer or set to through. I would like this feature because I sometimes change the player to a cursor, and want to spawn something at the cursor's position.
Hello! I'll take a look into making this easier to do in the near future but the code which is blocking your events from spawning is located inside the Ritter.canSpawnOn() Function. I do have one method in place to allow for spawning on events which requires a script call to enable it.
If you use the script call
Ritter._spawnOnEvents = true;
this will allow you to spawn on top of events.
it can be disabled by using
Ritter._spawnOnEvents = false;
it's defaulted to false so if you want to spawn on top of events set it to true.
I'm considering adding this as an optional argument for the Ritter.spawnEvent command, that may be something that happens in an update soon.
Thank you and I hope this helps you out in the meantime!
Thank you very much. A script call is fine, as long as it's mentioned in the documentation.
Ok, so that script call does work for spawning on events but not for spawning on the player.
E: I found the line blocking spawn on player position, I'll add an additional check for if the player is not set to through or same as character priority
I picked this up with the sale and it replaced Yanfly Event Morph nicely. The notetags work and the script call is a lot simpler.
However I am trying the event spawner on a map that spawns both moving and non moving events. If I unspawn a moving event (using Autonomous movement>random) then spawn a static event, the new static event moves for a few tiles before settling in a position. If I only unspawn static events and respawn the same static event there's no issue. I could get a video and a screencap of the event pages if you need to see it in action.
Hello again! Glad to see that some stuff is working for you! I've tried creating some events to spawn where one was using autonomous movement random and the other was using autonomous movement fixed. I was unable to replicate your issue. If you could show me what's happening along with the events in question that would help clear things up.
Steps I took:
Created 2 events on a spawn map.
One using Autonomous movement Random and the other using Autonomous movement Fixed.
I spawned the random event first and let it move around for a little bit.
I unspawned the random event.
I then spawned the Fixed event.
resulting in the fixed event staying in place on the tile it was spawned on without moving.
I did this a few more times alternating between the two events and couldn't get it to break.
I can dig deeper with more information.
Thank you and Good Luck!
Thanks for testing. It's being caused by Altimit Pixel Movement as when I turned it off the issue dissapeared. Although I don't get the issue with Galv spawn+Altimit so I'll try to narrow down where the conflict is.
Interesting one here. So it seems like the events are returning to the tile the chicken event was on when it unspawned upon being respawned as the other berry bush event.
This is happening with my spawner, for a reason I'll soon be looking into, but not with other spawners because this spawner recycles events. So when you unspawn a chicken that event goes into a sort of 'unspawned events pool' which the spawner looks to before spawning another event. if there are any unspawned 'null' events available it will grab one of those and transform it into a new event instead of creating another event on the map. Whereas galv spawner will just spawn a new event every single time you spawn an event.
The problem seems to be that the event wants to return to the position it was in when it was last unspawned.
spawn chicken
unspawn chicken
spawn berry bush
berry bush wants to move to where chicken previously was.
I'll take a look into this and hopefully have a fix soon.
Edit:
I've located the problem within altimit movement code, deciding on the best fix.
I just uploaded version 1.4 of the spawner which should fix this issue.
If you're curious about what the issue here was with altimit movement and the way my spawner recycles events... basically with altimit movement whenever an event is moving it is given a ._moveTarget = true property and also ._moveTargetX and ._moveTargetY properties. These properties had to be reset when unspawning an event since these events are recycled.
The events were respawning with flags that tell altimit when and where to move the event to lol.
I hope this works out for you! If you find any other issues or if this one somehow persists be sure to let me know!
Thank you!
Works like a charm! Thanks again for resolving such a niche bug report so fast. This plugin replaced both Yanfly Event Morph and Galv Spawn for me.
Hello
I want to unspawn the spawned event (by event name, not by event id)
Is there a way?
If the feature isn't there, could you add it?
Hello!
There's currently no function in this plugin to allow for unspawning events by name but something like that is very possible to do, it's just there are often more than one event sharing the same name. In a situation with multiple events sharing the same name (spawned from the same template event) then you'd need to either unspawn them all or just unspawn the first one or last one in the list, or create other parameters.
Overall something like that would be very easy to set up depending on what your needs are. I could write a function to do this.
If you're still interested let me know what your needs are and i'll see what I can do.
Thank you!
Hello. Thanks for the reply & sorry for the delay in responding.
If you could implement additional functionality it would be helpful.
I use the chrono engine to spawn enemies.
I would like to make an enemy disappear when an event (enemy) is defeated or when a certain amount of time has elapsed after the event (enemy) has spawned.
The current specs assign the ID of the spawn event in the order in which they spawned.
Therefore. It is difficult when I want to unspawn a spawn event by specifying a specific event ID. Therefore, I wanted to use individual event names to unspawn events.
I do not have a problem with the same name being unspawned at the same time.
(I see no problem with the hassle of preparing multiple events with the same content but different names).
However, I also think it would be useful to have the ability to unspawn events in the order they are spawned, with the event names specified.
I have one more question,
In ChronoEngine, when a spawn event (enemy) is defeated, the spawn event (enemy) does not seem to be unspawned.
It seems that the event itself remains on the map without being unspawned even if the spawning event (enemy) is defeated.
1: In the "Ritter Ultimate Event Spawner", is it possible to erase an event and not be unspawned?
Is it only with the unspawn command that spawned events can be unspawned?
2: The chrono engine does not seem to process "event (enemy) defeated = event (enemy) erase".
I would like to add a self unspawner to the chrono engine side to handle when an enemy disappears, but is it possible to quote "Ritter Ultimate Event Spawner" as a separate plugin? (I'm a programming beginner, so I'll give up if it seems too difficult)
There may be some discrepancies in the machine-translated English. Thanks for reading.
Have you done a stress test/performance benchmark on your spawner? https://forums.rpgmakerweb.com/index.php?threads/here-is-a-benchmark-test-for-th...
Hello! I have not done this yet but it looks interesting. I'll get to it soon and see how it goes!
One more question: Does the event transform feature also copy the notetag of the template event? I need something to replace YEP Event Morph which overlooked that feature
Hello again, sorry i've been a bit busy lately and haven't gotten around to testing the benchmark with this spawner. I'd assume it would be very similar in performance to other spawners as it seems the benchmark just spawn in events as it needs them. Unless there's a benchmark test which spawns & unspawns events constantly to see how many spawns & unspawns you can do before framerate goes down. That kind of benchmark is where you'd see the biggest difference between this spawner and others.
To address your other concern, my spawner does indeed copy the notetag from the template event when an event is transformed. All data on the template event should be copied over when you transform an event.
Thank you for taking interest in this plugin!
Ok, thank you for always being so responsive. Are you having another sale soon?
Hey itch summer sale is in 10 days and I'll be participating in it. I currently have some bundles available on my profile which offer some discount. Single plugin discounts will be available during the sale.
Thank you!
If type more than a certain number in 'Preload', the black screen will appear and the game will not run. (Demo: 4 , My Game: 5). can you please fix this? The recycle event spawner plugin is really powerful, but I can't use it because of this issue.
Hello this is an interesting one, sorry you're experiencing this issue. I was able to replicate this issue and I'm taking a look into solving it now. Thank you for reporting this.
Were you able to fix your other issue with the $gameMap._lastSpawnEventId command?
Just posting to let you know that I haven't forgotten about this and I've been trying to find an optimal solution to the black screen issue. Sadly it's not resolved just yet. Sorry about the delay.
Thank you for your efforts.
I was lucky to find this plugin, so I'll be sad if I can't use it.
Hello I've uploaded a version 1.3 of the event spawner. This update fixes the black screen bug when adding a bunch of pre-load maps to the plugin parameters.
As far as the other issue with the last spawn eventId... that's still unresolved as of now. I've poured some time into trying to find a solution to this specific problem you're having but it's more specific to the way you're trying to access it rather than the command itself failing. I'll continue to try to find a solution for your needs but it may just be the method of its use in this case causing the issue.
(See also the EDITs at the end of this message.)
Hello again! I hope you're having a great holiday season! I love so much your plugins!
I was testing them a little bit more and I noticed 2 important issues.
To spawn the events, I used the script call Ritter.spawnEventRegion(mapId, eventId, regions, save)
1. First of all, your Ultimate Event Spawner plugin and your Boundary System plugin seem to have an issue when using them with the Orange Time System plugin by Hudell.
For example, if I use this plugin command within a spawned event
TOGGLE SELF SWITCH A IN 10 SECONDS
it won't work as intended if the player is transferred into another map and then comes back. It only works if the player stays in the same map until that self switch is toggled. I made some gifs to let you see what's going on.
- In this gif, you can see that the plugin command by Hudell is working properly because the player stays in the map until the self switch is toggled: https://imgur.com/e8rR1Q7
- And in this gif, you can see that the issue happens when changing the map and infact the self switch isn't toggled: https://imgur.com/1xk4x4i
- The same issue happens even after changing the map, saving the game and reloading the save file (in case you don't know this, the Orange Time System plugin is intended to work even after closing the game because it tracks the flowing of time): https://imgur.com/4rb4rnp
2. The second issue is happening when using your plugins with the Galv's Simple Crops plugin. In a previous message, you said that your plugins were working properly with it, but they seem to have an issue.
The Simple Crops plugin works properly with a spawned event if the player doesn't change the map, as you can see in this gif: https://imgur.com/KjruTQk
The issue happens when the player changes the map and then comes back and as you can see in this gif the spawned event starts to flicker:
These plugins are so important for my game, so please... can you fix those issues? I extremely need them.
(Fortunately, your plugins are working properly with the Galv's Tools plugin, so far!)
EDIT 1: After installing the Ritter_EventSpawner SavedEvent Fix Testing plugin, the Galv's Crops plugin seems to be working properly, but that didn't fix the issues with the Orange Time System plugin. As you can see in this gif, now the self switch is toggled properly even after changing the map... but the game crashes if the player saves the game, closes the game, re-opens the game, loads the save file, changes the map and finally comes back to that map where the self switch was toggled (the crash happens at the end of the gif):
And here's the console log:
rpg_managers.js:1949 TypeError: Cannot read property 'events' of undefined
at Game_Map.restoreSavedEvents (Ritter_EventSpawner.js:630)
at Game_Map.setupEvents (Ritter_EventSpawner.js:674)
at Game_Map.setup (rpg_objects.js:5442)
at Game_Map.setup (Galv_SimpleCrops.js:572)
at Game_Map.setup (Ritter_EventSpawner.js:355)
at Game_Player.performTransfer (rpg_objects.js:7480)
at Scene_Map.onMapLoaded (rpg_scenes.js:569)
at Scene_Map.isReady (rpg_scenes.js:561)
at Function.SceneManager.updateScene (rpg_managers.js:2018)
at Function.SceneManager.updateMain (rpg_managers.js:1983)
SceneManager.catchException @ rpg_managers.js:1949
EDIT 2: Well... After more testing, the game crashes even with the Galv's Simple Crops plugin with the Ritter_EventSpawner SavedEvent Fix Testing plugin. As you can see in this gif, the game crashes after spawning the plantable event, planting the seed, waiting for the plant to grow, saving the game in another map, closing the game, re-opening the game, loading the save file and coming back to the map in which there is the plant (the crash happens at the end of the gif):
And here's the console log:
rpg_managers.js:1949 TypeError: Cannot read property 'events' of undefined
at Game_Map.restoreSavedEvents (Ritter_EventSpawner.js:630)
at Game_Map.setupEvents (Ritter_EventSpawner.js:674)
at Game_Map.setup (rpg_objects.js:5442)
at Game_Map.setup (Galv_SimpleCrops.js:572)
at Game_Map.setup (Ritter_EventSpawner.js:355)
at Game_Player.performTransfer (rpg_objects.js:7480)
at Scene_Map.onMapLoaded (rpg_scenes.js:569)
at Scene_Map.isReady (rpg_scenes.js:561)
at Function.SceneManager.updateScene (rpg_managers.js:2018)
at Function.SceneManager.updateMain (rpg_managers.js:1983)
SceneManager.catchException @ rpg_managers.js:1949
EDIT 3: After even more testing, the crashes didn't happen anymore after setting the spawn map in the Preload Spawn Maps parameter of your Ritter_EventSpawner SavedEvent Fix Testing plugin. I really don't know why that fixed the crashes! XD
Hello! I just bought your plugins (Event Spawner and Boundary System) and I'm testing the demo you uploaded. The game crashes right after clicking on "Playtest". I'm using Event Spawner v1.2 and Boundary System v2.0. Since the demo had the Event Spawner v1.1, I installed the latest version of the plugin (v1.2), but the game crashes with both of them. The game doesn't crash if I don't install the Boundary System plugin. Here's the console log:
rpg_managers.js:1949 TypeError: Ritter.clearBoundaryEvents is not a function
at Game_Player.reserveTransfer (Ritter_EventSpawner.js:673)
at Function.DataManager.setupNewGame (rpg_managers.js:220)
at Scene_Boot.start (rpg_scenes.js:402)
at Function.SceneManager.updateScene (rpg_managers.js:2019)
at Function.SceneManager.updateMain (rpg_managers.js:1983)
at Function.SceneManager.update (rpg_managers.js:1907)
SceneManager.catchException @ rpg_managers.js:1949
Hey again, sorry about this! Chances are I may have broken something in the demo with an update to the spawner + boundary system and didn't think to check the demo. I'll get around to looking into this soon. Hopefully in the meantime the info provided in the plugin files and on the store page for the spawner will help you get the plugins working.
I tried to install both of the plugins in a new blank project and the game crashes the same way as the demo!
EDIT: Nevermind! I was putting the plugins in the wrong order! Now I put the Boundary System over the Event Spawner and it doesn't crash anymore! Sorry for the misunderstanding. XD
Hello! I want to buy this plugin for RPG Maker MV, but before buying it, I'd like to know some things. First of all, is this plugin compatible with the ABS plugins made by the RPG Maker community? I'm referring to qABS (made by Quxios) and Alpha ABS (made by KageDesu). I tested other event spawner plugins and they don't seem to work with event note tags of spawned events (for example, when I tried to use an event spawner plugin made by someone else, the game throws an error like "can't read property 'notetag' of undefined" if I interact with a spawned event with an event note tag in it after quitting the game and loading a save file because it seems like event note tags of spawned events are not copied/saved after reloading the game and in fact they seem to work only the first time the player spawns those events). Event note tags are extremely important for ABS plugins because they work with them. And I also need event note tags for other things. So, does this plugin work with event note tags of spawned events?
Hello! Thank you for taking interest in this plugin. I developed this plugin initially for myself in a project using Chrono Engine ABS (Moghunter) and I developed the spawner with notetags in mind. While I have not tested this plugin against qABS or Alpha ABS I would be willing to give it a go over the weekend if you'd like. If any issues with notetags not working or anything else is reported I do try to implement compatibility patches for popular plugins such as those ABS plugins.
Thank you for the reply! Well, if your plugin works with the Moghunter ABS plugin, I suppose it should work with other plugins that use event note tags in general. For example, I would like to know also if your plugin works with some plugins made by Galv that use event note tags as well (such as Galv Tool plugin and Galv Simple Crops plugin). If that worked, I would instant buy your plugins because I really need them! You can give it a go over the weekend if you want to try those plugins. I would be so grateful with you!
Hello I did some testing against Galvs Tool Plugin and Simple Crops plugin and the seem to work together. I did some testing with saving the game and loading the save which seemed to work as well. Crops I planted were still at their proper stage after reloading the save.
My crop events were spawned onto the map using the spawner as saved events and continued to work as they should. This was using the Ritter_EventSpawner SavedEvent Fix Testing.zip version of the plugin.
If you're going to unspawn the events after crops are harvested you'll want to be sure to erase the saved event data.
I didn't get around to testing against those ABS plugins yet but I'd be surprised if they weren't compatible with each other.
Hey, thank you so much for testing those plugins! I'm gonna buy your plugin right now! Can't wait to play around with it!
Here is a video showing a bug I found.
Removing the first party member and the even associated crashes the game. The game will not crash upon reloading the map when removing other events, but it will if I reload the map and then open and close the menu (not shown). Note: it will not crash if the event I despawned was the last spawned event. I am using SavedEventFixTesting version of the plugin because the default will not work with my project.
some other useful info
Hello thank you for choosing this plugin and I'm sorry you're having an issue with the Saved Event Fix Testing plugin file. I'll take a look into this as soon as I can to see if I can replicate and fix the problem.
Hey, sorry it took a few days things have been really busy for me. I was able to replicate the crash successfully and I believe I've solved the crashing issue but it may require more testing. I'm currently unable to get it to crash anymore by doing the following steps:
I'm also unable to make it crash anymore when opening the menu instead of changing maps.
Just download the Ritter_EventSpawner SavedEvent Fix Testing.zip again and replace the old plugin with this new one, be sure to let me know if you encounter any more problems! This version of the plugin may require more testing still before I'm satisfied enough to replace the original spawner with this other method.
Thanks again!
I found a weird bug that cost me hours of work x0
Basically, the spawned event can't load new (in my case triggered by self-switches) event pages in "Autorun" mode.
Hello sorry to hear you're having problems! I'm taking a look into this but so far in my testing with Autorun events I've encountered no issues. Any additional information about the event you're having problems with could help.
I don't know maybe I'm the only one who got this bug xD The solution is to change the event page from Autorun to Parallel, or to change it's self switch before it gets spawned. I'm just posting this in case someone else got this issue.
Srry didn't mean to sound frustrated. I've tried YEP's and GALV's plugins before that and it's by far the best one :)
P.S. Also, please, please make sure that your event is spawning on a tile, in case you're working with parallax.
Found this plugin while looking for a solution to the performance issues of the YanFly EventSpawner.
With this plugin, my game has been spawning / destroying events for a minute before performance started to go down. I don't know if I'm doing something wrong, I'm just using spawnEvent ( no saving ) and unspawnEvent when the event hits a certain region. There are at best 40 events moving on the map simultaneously, rest are unspawned. I don't see why performance would degrade over time.
Also, this plugin is not compatible with RPG Maker MV < 1.6 ( has to do with node js version ).
Worked on it a bit more. To give a bit more context : I have a mountain, from which boulders go down. There are a few spawners at different places which are parallel events. The boulders themselves are parallel events with movement routes.
1/ I encountered the same weird problem with YEP_EventSpawner : when I let the game run for a bit and my FPS is heavily impacted, if i just open a ShowText command, the game is back up to 120 FPS. The moment i close it though, I'm back to 1 FPS.
2/ Used the profiler inside the console. I saw that a ton of performance was used on processMoveCommand, which might mean that the movement was continued to be processed, even in unspawned events .
By adding the line "this._index = this._list.length;", i completely removed this problem and gained a TON of FPS. Still, letting the game run the FPS are still going down.
3/ Did a simple check on $gameMap._events and it's kinda obvious. The _events array is getting bigger and bigger as game goes on. I see a ton of events flagged "erased=true" though. I get it's the engine way to "remove" events. But it also means you can't get away with not pooling events...
Hello and thank you for purchasing this plugin! I'm sorry to see you're having problems with it. If you're seeing the event array grow larger that would mean events are not being recycled which is leading to the fps drop. I would need more information on the process you're using to spawn and unspawn the events to understand why this is happening. It could be a number of things causing this to occur, the only way this spawner will create a new event on the map is if there are no unspawned events to transform, so something is causing the spawner to miss some/all of the unspawned events, or events are not being unspawned properly.
I'd need more information on the boulder events and the event(s)/common event(s) you're using to spawn/unspawn them to get a clear view of what's happening.
Hey notRitter,
Thank you for the reply ! My setup is quite simple :
I have a parallel event to spawn boulders, with 2 commands :
- Script : Ritter.spawnEvent(13, 1, 11, 87, false)
- Wait(60)
The event spawned, my boulder, is on a separate template map. This event is also a parallel event with the following commands :
- Script : <custom plugin checking region tile of the boulder for ajusting speed / unspawning event >
- SetMoveRoute >This Event > Move Down ( repeat/skip/wait unchecked )
The script checking the region tile also handles the removal of the event if the boulder is on a specific tile :
> this._index = this._list.length;
> Ritter.unspawnEvent(this.eventId(), true);
Quick update, I kinda hate myself because I left the YEP_EventSpawner plugin in the project and that was the cause of all the non-recycling weirdness... fml. So performances are great now !
That being said, I still have a problem with the plugin. I created a test project with only your plugin and absolutely nothing else. I have a parallel event with only 1 command : SetMoveRoute > This Event > Down with repeat/wait/skip unchecked ( it's the Boulder ).
I have two test map :
- First map, the Boulder is placed on the map.
- Second map, the Boulder is spawned using Ritter.spawnEvent.
I also have on both map an Event (Action Trigger), that does a simple TransferPlayer command on the current map.
When this last event is interacted with :
- First map, no problem.
- Second map ( spawned event ), callstack :
I can send you the test project if you'd like.
EDIT 1 : If I TransferPlayer from the Map 2 to another map, it works, even if the new map also has Ritter.spawnEvent. So the only problem is if I transfer from a map using Ritter.spawnEvent to the exact same map. Which is a bummer for respawning in my case.
EDIT 2 : As a workaround I transfer the player in a temporary map, and then back to the original map. Not as clean as I wish but it works and from a user perspective there's no difference.
Interesting, I'll have to take a look into this issue you encountered to see if I can replicate it and patch it, seems like something worth fixing. Glad to see you have figured out a way to get things working. Thank you for reporting this! I'll put out a devlog for this plugin once this is patched.
Hi notRitter!
I see that you are active at the moment so I take this opportunity to report my problem hoping to find a solution here.
The error occurs after returning to a map that contains a saved spawned event.
The bug disappears when I deactivate this plugin precisely.
https://drive.google.com/file/d/1JkIQm4yKJTWzNlDwu3-E67GuVIz544yr/view
I already tested it with "Ritter_EventSpawner SavedEvent Fix Testing".
Hello sorry to see you're encountering this problem. I'll take a look at this plugin and see if there's anything that can be done.
Is there anything special about the saved event you are spawning? I've tested this every way I could think of and couldn't get it to crash... but I'm not very familiar with this DisableEventStart plugin so maybe there are other conditions that occur?
Heya Ritter it seems this event spawner is completely incompatible with the popular Qmovement (via the required Qplus plugin) for some reason, is there a way to patch this? ^^ Thanks in advance <3
Oh my sorry about that I'll look into this!
Thank you I'll let you know what I can do soon.
Thank-you so much for looking into it! <3 Good luck!
Although it may be impossible, there's another common bug with other spawner's spawned events being un-interactable, while I've been working around it with my current spawner if you also happen to fix that issue in yours I'll actually die of happiness. But just getting it working is a+ as well!
Hey Ritter just touching base after a week to see if any progress may have been made or if a solution could not be found~
Hey sorry its taking so long, I've been trying to solve this issue it's just had me baffled for a bit. I'm hoping I'll get this solved soon! I'm still working on this. I've made some progress and was able to get it to stop crashing but only if I disabled a wait timer for spawned events but I'm sure that method will interfere with the QPlus plugin in one way or another, I'm trying to fix the actual problem causing the issue. On the plus side after disabling that timer I was able to interact with spawned events so hopefully once I find the root cause of the problem everything should work out.
Edit:
Okay so I'm not really 100% on this fix BUT I uploaded it, so if you want to help out testing it just download the plugin again and replace the old one with this new one. So far in my testing it seems to be working pretty well but it always helps to have extra testing.
Aye aye sir! Will download it and toss it into my game- let you know as soon as I run into any trouble! I am working on my crops today so it'll hopefully get put through the ringer!
And THANK-YOU so much for working on this problem aaaaa- you're freakin' awesome!
Hmmmm redownloaded it from itch.to and threw it in a fresh project but I still seem to get the same error? Using mv 1.6.2 btw~ <3
Ohh I made a small mistake heh. Used a > when i should have used >=
just reuploaded a fixed version, try this one out. sorry about that.
your plugin order looks good too, the spawner does need to be below QPlus and Qmovement for this fix to work so thats good
I'm currently in the process of doing finishing touches on the Spawner & Boundary system demo. It'll be finished shortly. I also went and updated the spawner a bit adding in a couple more commands (relating to boundary system) and made it easier to restore unspawned saved events. So on top of a demo we're also getting a spawner update :]
Hey notritter, I got your spawn plugin, seems like I can't spawn a full regionID Area using the script provide (I did success doing that with 'galv_spawn' thought), any solution for that?
I use common event, then connect it to a 'var' and added a 'jump to label' commend with limit number of 1000, but even do the area of the region I spawn it to was less then 1000 tiles, it didn't cover the all area.
Again when using galv spawn event this mothed did work when I use the following script:
Galv.SPAWN.event($gameVariables.value(35),15,true);
I will assume using something similar with your spawn plugin will work but It didn't work when I try to use:
Ritter.spawnEvent($gameVariables.value(35),15,true);
or Ritter.spawn.Event($gameVariables.value(35),15,true);
or Ritter.spawnEventRegion($gameVariables.value(26),14,true);
the map stop when entering like it can read it.
Do you know which script I should use instead? I need it to work with 2000-3000 event tile area, but for start I'm checking it on 1000.
In short: what should I do to get a full area of region cover with the 'spawn event' using your plugin? Here is a screen shot when using normal script without connecting it with the script to the 'var' (it spawn more event but not the full amount set.
(when player attack the ground with 'x' tool he will get item the ground change as you see in the second picture).
and 'gif' show what's happen on the map, the base tile are 'grass'(green), and the event image are the yellow ground you see that spawn, I couldn't upload the all thing but you can see the idea of what need to happened there.
The above show case are only when using your ffical script as you see in the event picture, as I said when I try to use the 'var' script Ritter.spawnEvent($gameVariables.value(35),15,true); and similar, the game stop when entering the map.
Note:
I'm building a game that will include 'digging ground' event (like in zelda 2d) using ABS and 'Spawn Event'.
I'm in the process of trouble shooting this issue, I'm able to fill an entire 2500 tile map in one second using my Ritter.spawnEvent script call but it takes considerably longer when using regions to spawn events. I'll update here when I solve what's going on with the delay when region spawning.
for (let w = 0; w < $dataMap.width; w++) { for (let h = 0; h < $dataMap.height; h++) { Ritter.spawnEvent(2, 1, w, h) } }
this script call worked smoothly to fill an entire map, but that just places an event on every single tile which isn't quite what you need.
I edited that script call a little to include region ids and it does exactly what it seems like you need.
for (let w = 0; w < $dataMap.width; w++) {
for (let h = 0; h < $dataMap.height; h++) {
if ($gameMap.regionId(w, h) == 1) {
Ritter.spawnEvent(2, Math.randomInt(27) + 1, w, h)
} } }
so what this does essentially is it loops through every single tile on the game map once and checks if its regionId is 1 ($gameMap.regionId(w,h) == 1)
then if the regionId is 1 it will execute the script call where 2 is the SpawnMap ID, Math.randomInt(27) + 1 will pick a random eventId on the spawn map from 1-27 and w,h is the x,y coordinates of the tile it found.
this will fill up an entire map almost instantly with events (tested on a 50x50 map). this spawner wasn't really created with the idea of filling an entire region with events but I can add in a script call to do so shortly if needed.
Thanks for checking it out, I did notice the amount of time it takes to spawn big amount of events, solving that will help a lot.
And you right, cover the full map with events will not work for this case, since there are walls, and places I will put other events, small and big event size (house...), that why control the area with Region are the most affective way for my case but I still need it to cover the full region area.
So If you find a way to add the option to spawn full region area (%100 of the region ID) using a script call that will be very helpful, I checked many spawn events, and when is come to 'fps' with big amount of event (like I need) your spawn win them all as you probably know (galv as I emanation have the option to cover 'full' region area with spawn, but the fps drop when I spawn 600-700 event already so I can't use it).
I included a script call in my last post which does what you need, but it will be a lot of events spawned at once and will likely cause the same fps issues you had with other spawners as MV has problems handling that many events at once.
In a game I'm making (which is on hold while I work on my biggest tool/plugin project yet) I got around that issue by creating the boundary system which I used to spawn and unspawn events outside of the players screen so that I could reuse unspawned events over again and get a result of having practically unlimited amount of events (as far as the player knows at least) without the fps drops.
My spawner works best when events are unspawned and respawned instead of spawning 1000+ events on the map at once.
I see, that probably be the best way to go with then, just got your 'boundary' plugin, I still need to learn how to do this right. and I think I didn't explain it right, I don't need it to spawn at once, just to spawn fast as passible like your original script for region already do, but instead of spawn to part of the region spawn it to the full area of the region.
And yes, I sew the script above but is for 'random' events from the map id, and I need to spawn 'specific' event id on the full region area, Is that passible? Also I don't need it to spawn in the same second, as long as it spawn fast enough to not fill like is take forever (7-10 seconds?). Do you know why the method with the 'var' doesn't work? It's work with 'galv spawn', and 'galv' is weaker then your spawn, so why something like
Ritter.spawnEvent($gameVariables.value(35),15,true);
doesn't work with your plugin? is should make it spawn not at the same time but still fill the all region (with 'jump to label' I show in the picture above.
Here is the same idea but with 'galv spawn' script the connect to a 'var', as you can see it's fill the all region area, not at the same time but that works for me as long as is fill the all region area without to much fps dropping:
'68' are the event number from the spawn map Id, '34' are the 'var' ID, and '11' are the region it will spawn on, using 'if: Random = 500 jump to label' make the script to repeat itself until the all area full, however when trying this way with your spawn is only add some amount of repeating but doesn't get the all region area full , but when trying to use the same idea with RitterSpawn is not working at all, is like the main 'Ritter.spawnEvent' script can't be connect to the 'variable' for some reason, could you check it out? I have other problems with 'galv' so if I can do similar thing with your spawn I prefer to use yours. There is no rush or anything so if you need time to check it that ok.
And again It's not have to be spawn at the same time (I sew how is drop the 'fps' like you said), is just need to fill it up fast as you can get it to be. Thanks again for your time, I appreciate it!
I'm currently creating a demo project which will show various ways to utilize the spawner and boundary system. I'll upload it to the store page once it's finished.
This is probably the best route to showcase the features and make it easier to understand on the users end.
I believe I have a good idea of what you're trying to accomplish here and there is a good way to handle this task with my spawner + boundary system that will be explained in the demo. You'll be able to see it in action and if it's what you need you'll be able to inspect the events which handle it within the demo and see how it's done :)
I appreciate your patience and will get this done as soon as I can! Thank you!