Clock And Calendar Plugin for MV is out now!

This plugin will calculate in-game time and dates. The outcome to those formula's will be put in variables so you can use those numbers in conditions. Those numbers are for you to work with.

This is useful for a FANTASY calendar! All months have the same length, which makes it less useful for real-life calendars. (But now worries... I'm working on a version for real life calendars too.)

Complete timestamps are generated as well, however, those are purely for show.

If you choose so, the plugin will also take control of the day-and-night cycles. Meaning it will get dark at night, but only when you're outside. Inside lights can be controlled by using a switch.

Before you begin, please set up all the parameters in the plugin!(!!) If you leave them at default in an existing project, it might mess up your variables.


Use the variables calculated by this plugin to control your game. For example, the variable that contains the hours, can be used to check what time it is. This is a 24hr counter, in which 0 means midnight, 12 means noon.

- You have 1 event, which is a bat.
- You want the bat to only appear between 10pm, and 4am
- In the first page of the event, you make the bat as usual.
- Leave the second page empty, put the hours variable in the condition.
Set this condition to 4
- The third page is a copy of the first, with the same variable in the cond.
Set this condition to 22 (which is 10pm)

The first page is what shows from midnight till 4. The second page hides the bat from 4 till 10, and the last page is shown 10pm till midnight.

You can use the same principle for seasons, if you want:

- You have 1 event, which is NPC Harrold.
- You want Harrold to wear a winter goat in winter, and a t-shirt for the
rest of the year.
- In the first page you make Harrold wear his winter coat.*
- In the second page, you make Harrold wear a t-shirt,*
Set the condition for this page: Months ≥ 3
- Make a third, which is a copy of the first page.
Set the condition for this last page: Months ≥ 12

You now have a Harrold that wears a winter coat starting December 1st, all the way up to March 1st.
Note that those numbers need to be different, if you have a calendar with more or less months than 12. If you want 4 seasons, it is the easiest to have your months be dividable by 4.
You could even replace the 3rd page with a version of Harrold in a Santa outfit. Now it will be all festive in December.
(* Graphics for Harrold not included. This is just an example.)


Time stamps and date stamps are written in the selected variables. They are not for conditions, or to calculate with. Those time stamps can be called upon in messages.
In our example, the variable for the time+date stamp is variable 8.

Then a message would look like this:
\>It is now \v[8]
\>How long do you want to sleep?

This will show as:
It is now Monday, 01 January 1995, 00:02 AM
How long do you want to sleep?

This brings us to the next step:

-- Skipping time --
You (the developer) can use the "control variable" command to set the variables chosen in the plugin parameters, to the number of hours/days you want to skip.

You can also use "Input Number..." instead of "Control Variable" to let the player decide how much time to skip.
Then trigger the plugin command cc_Wait or cc_Sleep.
The difference between the two is that cc_Wait only skips time, while cc_Sleep also gives the player the Rested state, which I will explain next:

-- Fatigue, hunger and thirst --

After you sleep, eat or drink, a state will be applied to your player. Those states can give any benefit you like. But if the player doesn't Eat for a long time, it loses their beneficial state, and after a bit more time they will even get a harming state.

When the player sleeps, trigger the plugin command cc_Sleep
When the player eats, trigger the plugin command cc_Eat
When the player drinks, trigger the plugin command cc_Drink

Here is a table showing how long it takes for a state to appear or disappear. Times are in-game hours:

                  | Sleeping     | Eating       | Drinking
 0 ~  6 hours     | Well Rested  | Well Fed     | Well Hydrated
 6 ~ 12 hours     | -none-       | -none-       | -none-
12 ~ 18 hours     | Tired        | Hungry       | Thirsty
18+     hours     | Exhausted    | Starving     | Dehydrated

Beneficial states are applied when you eat, drink or sleep. The negative states are triggered over time, and will take effect when using the transfer command to go from one map to another.


If you want, you can have the plugin control when it is light outside, or dark, depending on the time of day. When night falls, it slowly gets darker, and in the morning it slowly gets brighter.

Inside the house, lights are controlled with a switch, selected in the plugin parameters. This switch will actually work as a light-switch: Turn the switch on, the room lights up. Turn the lights off, and the room goes dark.
To use those settings right, it is important that you turn ON the outside switch every time BEFORE you transfer to a map outside, and turn it off every time BEFORE you transfer to a map inside.

If your game starts on a map outside, make sure you turn ON the OUTSIDE switch at the start of your game. If you start on a map inside, make sure you turn ON the LIGHT switch. Unless you want to start in a dark room.

This is updated always, so if you choose to let this plugin control the lightning, you can not use "Tint Window", because the color will be reset by the plugin straight away.

If "tint window" is an important feature in your game, turn this option OFF in the plugin parameters. You will have to control the lightning yourself.

== Time Multiplier a.k.a. Speed ==

Time in-game advances a lot faster than in real life. Well, if we want. By default, time goes 60 times as fast as real life. Meaning every real life second, one minute passes in game. And every real life minute, one hour went by in the game. A day in the game takes 24 real life minutes.

If this is not fast enough for you, you can speed it up to absurd heights, just by raising the multiplier. Set it to 3600, and every second an hour passes.

On the other hand, if you want the game to proceed slower, lower this number. Set it to 1, to make in-game time go as fast as real time. You can even take it further and set it to 0.25 which would make 1 in game second last 4 real live seconds. Meaning 1 in-game day takes 96 hours!!

But 60 makes most sense though.


- This plugin is FREE, and can only be used in NON-COMMERCIAL games!
- For a version to be used in a commercial games, contact JohnDoeNews.
- Please mention JohnDoeNews with the name of this plugin in your credits.
- Do NOT spread copies of this plugin, or edits of this plugin plugin.
- You may edit the plugin for your own project. The terms do still apply.
- Do not change the terms and conditions or the Author info.




The plugin for MZ will be released soon. For now, the MV plugin works in MZ, however, it is not possible to create plugin commands for this plugin in MZ. You can copy/paste the plugin command from the demo project and use that to trigger
the right plugin commands in stead.

Hopefully a MZ version will be out later this week.