Galv's Event Spawn Timers

Galv

Veteran
Veteran
Joined
Oct 1, 2012
Messages
1,235
Reaction score
1,428
First Language
English
Primarily Uses
RMMZ

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



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
 
Last edited:

Ilan14

Veteran
Veteran
Joined
Nov 28, 2015
Messages
220
Reaction score
69
First Language
Spanish
Cool! I've been waiting for this plugin to be on MV, along with the Visual Novel Choices Plugin. Great job as always! :D
 

Galv

Veteran
Veteran
Joined
Oct 1, 2012
Messages
1,235
Reaction score
1,428
First Language
English
Primarily Uses
RMMZ
Updated with a good idea request:


Version 1.1 - added script calls to modify timers. Also, fixed some bugs.
 

Farr

Veteran
Veteran
Joined
Feb 16, 2014
Messages
247
Reaction score
92
First Language
Portuguese
And here comes our map enemies.
 

billocity

Villager
Member
Joined
Jul 31, 2016
Messages
15
Reaction score
1
First Language
English
Primarily Uses
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
 

Galv

Veteran
Veteran
Joined
Oct 1, 2012
Messages
1,235
Reaction score
1,428
First Language
English
Primarily Uses
RMMZ
Did you start a new game after adding the plugin?
 

DuraLexSedLex

Villager
Member
Joined
Feb 13, 2016
Messages
26
Reaction score
4
Primarily Uses
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);
 

Galv

Veteran
Veteran
Joined
Oct 1, 2012
Messages
1,235
Reaction score
1,428
First Language
English
Primarily Uses
RMMZ
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).
 

DuraLexSedLex

Villager
Member
Joined
Feb 13, 2016
Messages
26
Reaction score
4
Primarily Uses
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)
 
Last edited by a moderator:

F11GeniusGaming

I, Doglord
Member
Joined
Jul 11, 2017
Messages
27
Reaction score
0
First Language
Filipino
Primarily Uses
RMMV
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?
 

Galv

Veteran
Veteran
Joined
Oct 1, 2012
Messages
1,235
Reaction score
1,428
First Language
English
Primarily Uses
RMMZ
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.
 

Dungeonmind

Lvl 4000 Humanoid
Veteran
Joined
Sep 2, 2013
Messages
477
Reaction score
287
First Language
English
Primarily Uses
RMMV
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?
 

Galv

Veteran
Veteran
Joined
Oct 1, 2012
Messages
1,235
Reaction score
1,428
First Language
English
Primarily Uses
RMMZ
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
 

Hahasea

Veteran
Veteran
Joined
Jul 4, 2019
Messages
151
Reaction score
17
First Language
English
Primarily Uses
RMMV
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.
 

tamayo831

Villager
Member
Joined
Apr 23, 2018
Messages
6
Reaction score
0
First Language
english
Primarily Uses
RMMV
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.
 

Hahasea

Veteran
Veteran
Joined
Jul 4, 2019
Messages
151
Reaction score
17
First Language
English
Primarily Uses
RMMV
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!
 

tamayo831

Villager
Member
Joined
Apr 23, 2018
Messages
6
Reaction score
0
First Language
english
Primarily Uses
RMMV
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.
 

Hahasea

Veteran
Veteran
Joined
Jul 4, 2019
Messages
151
Reaction score
17
First Language
English
Primarily Uses
RMMV
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.
 

arashiya

Veteran
Veteran
Joined
Jun 19, 2019
Messages
116
Reaction score
5
First Language
english
Primarily Uses
RMMV
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?
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

The Ace attorney series are so great games... But at the same time such a travesty.
Made a video showcasing a plugin (by Lanza) that adds 5 more weather effects to our MV games. :LZYsmile: Namely:
Ash-dust,
bloodrain,
Cherry Blossom Petals,
Hail,
and bubbles.

I just like this website:
lol

Forum statistics

Threads
103,239
Messages
998,300
Members
134,729
Latest member
Takufy
Top