Galv's Event Spawn Timers


Event Spawn Timers - Version 1.2
RPG Maker MV Plugin
Galv

​


Introduction
Another one from my Ace scripts - get some time-related stuff happening.


Screenshot
6Raa2H9.jpg



Features
Allows you to set a respawn time for events that can activate a self switch or switch once their timer has expired. This time works from map to map.
This could be used for things like planting seeds that will grow, enemy encounters that will respawn and more.

The timers are checked manually in a script call or within move-routes for more up-to-date checking when close to the events. This was done to allow a lot of timers without causing lag with hundreds of timers counting down at the same time.


How to Use
- Copy the "GALV_EventSpawnTimers.js" file into your project's /js/plugins/ folder.
- Activate plugin using the 'Plugin Manager'
- Read the help file and examine the demo to learn how it works.


Plugin
Get it here


Credit and Thanks
- Galv


Terms
Free to use in any RPG Maker MV project including commercial. Please credit "Galv". 🙂


Updates
2016-03-26 - Version 1.1 - added script calls to modify timers. Fixed some bugs.
2016-03-25 - Version 1.0 - Release
Cool! I've been waiting for this plugin to be on MV, along with the Visual Novel Choices Plugin. Great job as always! 😀
Updated with a good idea request:


Version 1.1 - added script calls to modify timers. Also, fixed some bugs.
And here comes our map enemies.
Hi, I really like your plugin. Unfortunately, it's not working for me and I'm not sure why. I tried copy and pasting one of your events from your demo game (the chicken one) straight into mine and still got an error message. Take a look if you get the chance!

Screen Shot 2016-08-20 at 7.12.42 AM.png
Did you start a new game after adding the plugin?
Hi, Galv! Is there a way to make it compatible with Yanfly's more self switches and self variables? Or do you have a plugin that creates more self variables to ease compatibility issues? Or maybe is there a way to run a condition, plugin or another script upon the timer's expiration? I'm trying to make a farming system with multiple farm plots and with a minimal use of global switches. I currently have 12 grow-able crops and  54 farm plots which would require hundreds of global switches to switch from stages to stages of growth. 


These are the scripts I have tried:


this.doTimer(32,7,138,true);


this.doTimer(32,7,this.setSelfSwitchValue(,,,);


this.doTimer(32,7,this.pluginCommand(' ',' '));


this.doTimer(32,7,this.getSelfSwitchValue(,,,),true);
This plugin isn't compatible with self variables or anything, but if Yanfly's more self switches uses how normal self switches work, you could try using the script calls in this plugin's settings with higher self switch letters (and not using any new code like you have there).
I forgot to mention that I did that too, also treated them as normal switches, and also tried to make a condition/plugin/script run upon expiration, but it didn't work. Thanks! Great plugin by the way!


EDIT: I have figured it out, sorry for the trouble


if //using the script in the conditional flow control tab


this.respawnTime(32,7) == 0 && this.getSelfSwitchValue(32, 7, 126) == true;


//script call


this.setSelfSwitchValue(32, 7, 138, true)
Does the timer still run even when you're not on the map the event is on?
For example, I set the events to respawn every 5 mins or 300 secs on Map1, when I go to map2 does the timer on events on map 1 still run?
Technically it doesn't keep "running" but yes, when the timer event is checked if you go back to the map, that time will have passed while off the map. So effectively it is like the timer was still running.
Hi Galv! Just wanted to say I'm a huge fun of your work! I am using your plugin in a project of mine but I am wondering how exactly your plugin works:

  1. When you say "technically it doesn't keep running" How does it know the timer was done if it wasn't running?
  2. Say I have event ID 33 on map 1 set for a timer activation using your template event and I have the same event ID on another map will both still remain separate timers and events? *Just want to make sure before I go all event crazy with this plugin.
  3. And last but not least. Whats too many timers? There has to be a thresh hold. Like should I not have more than a thousand running at the same time? Or technically since there not running from map to map, does this not matter now?
1. You need to check the timer to know if it's done. The script in the move route does this check while you are near it. If you are not near it, you need to manually check to know if a timer is done.
2. Yes, they will be separate events as the map ID is also used to store them.
3. Because of how it works, only the events you check (like events near the player that do the move route script) will be processed - you can have 1000's of other timers set but they only get processed when you get near the event (or manually check them) thus preventing lag from too many. Unless you have them packed on the same screen, perhaps could cause isse
Hi @Galv , love your plugins!

I'm using your Simple Crops plugin, and I'm hoping that I can combine your Event Spawn Timers to enable a planted crop to be reharvestable? For example, if I plant an apple seed, it makes more sense for the apple tree to be semi-permanent, and just be able to harvest the apples off it periodically. Unfortunately I'm still a bit of a beginner, and can't quite figure out how to combine the plugins to get this to work. Sorry if it's a super obvious question.
Hi @Galv , love your plugins!

I'm using your Simple Crops plugin, and I'm hoping that I can combine your Event Spawn Timers to enable a planted crop to be reharvestable? For example, if I plant an apple seed, it makes more sense for the apple tree to be semi-permanent, and just be able to harvest the apples off it periodically. Unfortunately I'm still a bit of a beginner, and can't quite figure out how to combine the plugins to get this to work. Sorry if it's a super obvious question.


Did u ever figure this out? Im trying to do the same thing.
Did u ever figure this out? Im trying to do the same thing.
Unfortunately not yet ;_;

So let me know if you work it out, and I'll do the same!
Unfortunately not yet ;_;

So let me know if you work it out, and I'll do the same!

Im working on it, Ive been messing around with the spawn timer and switch "A" false and true on different pages on the event. Still cant get it.
Im working on it, Ive been messing around with the spawn timer and switch "A" false and true on different pages on the event. Still cant get it.
Yeah, I tried a few eventing things that I was sure would work, but no joy.
Hi Galv
thanks for your awesome plugin

I want the event to open two switch (one is selfswitch, one is a normal switch)
so I add one more this.doTimer in the route
but it seems to run the first this.doTimer only and the other switch is not turned on
what can I do if I want to open multiple switches?

Event Spawn Timers - Version 1.2
RPG Maker MV Plugin
Galv

​


Introduction
Another one from my Ace scripts - get some time-related stuff happening.


Screenshot
6Raa2H9.jpg



Features
Allows you to set a respawn time for events that can activate a self switch or switch once their timer has expired. This time works from map to map.
This could be used for things like planting seeds that will grow, enemy encounters that will respawn and more.

The timers are checked manually in a script call or within move-routes for more up-to-date checking when close to the events. This was done to allow a lot of timers without causing lag with hundreds of timers counting down at the same time.


How to Use
- Copy the "GALV_EventSpawnTimers.js" file into your project's /js/plugins/ folder.
- Activate plugin using the 'Plugin Manager'
- Read the help file and examine the demo to learn how it works.


Plugin
Get it here


Credit and Thanks
- Galv


Terms
Free to use in any RPG Maker MV project including commercial. Please credit "Galv". 🙂


Updates
2016-03-26 - Version 1.1 - added script calls to modify timers. Fixed some bugs.
2016-03-25 - Version 1.0 - Releas

I forgot to mention that I did that too, also treated them as normal switches, and also tried to make a condition/plugin/script run upon expiration, but it didn't work. Thanks! Great plugin by the way!


EDIT: I have figured it out, sorry for the trouble


if //using the script in the conditional flow control tab


this.respawnTime(32,7) == 0 && this.getSelfSwitchValue(32, 7, 126) == true;


//script call


this.setSelfSwitchValue(32, 7, 138, true)
I have been trying to figure this out myself!

Original thread: https://forums.rpgmakerweb.com/threads/galvs-event-spawn-timers.59315/