MV Needing help with Lighting and Time editor plugin

Hi all!

I hope im posting this in the right place as I honestly am so new to the forum etiquette and all, but thats not the point of the thread, so!

I'm currently attempting at using the best of this plug-in (https://forums.rpgmakerweb.com/index.php?threads/lighting-and-time-editor-continued.86409/) and it seems as the comments on this plugin are no longer read/supported as my question from almost a year ago didn't get answered (no shade! Life happens!), and I have no knowledge in java script as I'm an artist trying to figure all this stuff out on my own.
Is there any way to create an event that counts the amount of times that an in-game day passed, and if it detects it, for example, five times, it automatically sets up an event for the player? (ex. an NPC shows up) I'm not sure if its even possible to make with this specific plugin, but I personally find it very useful mostly because it has both the lighting and the time.

Thanks in advance!
1742081798080.png

You start this event by starting Day Counter ON Switch.
This event would save time from a plugin into variables ID 21 (hours) and 22 (minutes).
Next we check if hours == 0 and if so we add a day to days variable + remember that we counted that day in a switch. Else we reset the 'remember' switch. THen we wait to not cause performance issues as it makes no sense checking often. THis may not work if you will temper with time by for example setting time to certain value. You would have to then remember to count the day manually. (For example if character goes to sleep at 22:00 and wakes up at 6:00.)

EDIT: Now to setup an event you just need to set a condition on a variable DayCount.
View attachment 334487
You start this event by starting Day Counter ON Switch.
This event would save time from a plugin into variables ID 21 (hours) and 22 (minutes).
Next we check if hours == 0 and if so we add a day to days variable + remember that we counted that day in a switch. Else we reset the 'remember' switch. THen we wait to not cause performance issues as it makes no sense checking often. THis may not work if you will temper with time by for example setting time to certain value. You would have to then remember to count the day manually. (For example if character goes to sleep at 22:00 and wakes up at 6:00.)

EDIT: Now to setup an event you just need to set a condition on a variable DayCount.

Hi! I did as you suggested but I ran into the problem that this doesn't start up the event, also I don't know if it'll continue counting above 1? And I'm uncertain if it'll actually detect the exact hour and minute on time... Here's how I added it to my project (pretty much did the same to my understanding):
1742125576204.png
1742125598940.png

And in the switches I set the trigger to parallel as well, and just added the Control Switches daycounter on

1742125693064.png

I set the event to show up text
1742125744763.png

And as you can see after the set time which was 10.30 nothing showed up... Maybe I'm missing something?
Thank you so much for the help!!
Hi, you have your switches and variables mixed. Here is how it should look like:
1742148648297.png

You need 3 variables. 2 for storing hours and minutes of the day and 1 for actual day count.
In my example:
  • variable 21 - TimeHours is the one I write hours into and the one I check for 0.
  • variable 22 - TimeMinutes is not used but I need to store the minutes during plugin command somewhere.
  • variable 23 - DayCount is the variable you check your events
In your example you write hours into variable 10 but use variable 1 to check if it is 0.

Also you need 2 switches:
1742148899463.png


  • switch 1 - is for turning off and on the mechanism that enables the common event and it should be selected in common event at the top. You need to set that switch to ON for the event to work. Just do a button for testing and set day counter to ON like this:
1742149124635.png

  • switch 2 - Day Counted is to be used INSIDE of common event to prevent double counting of days.
Let me know if you need more info.

Original thread: https://forums.rpgmakerweb.com/threads/needing-help-with-lighting-and-time-editor-plugin.176269/