OcRam - Time system plugin

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
519
Reaction score
606
First Language
Finnish
Primarily Uses
RMMV
I just realized I misspelled. I mean “moon” not “noon” lol. something akin to FF4: the after years where the moon phase changes every so often (probably a variable each time you stay at an inn) and add buffs and debuffs to magic.

For the case of the time system, the night phase would have branches based on the day. It takes 29 days for the moon to go through its phase cycle (for us here in Earth, but could be an option to change the cycle length). I’ve included a chart.
Thank you for the idea!

It is doable even in current version with common event (bound on day phase for example).

moon_phase.jpg
 

dragonx777

Veteran
Veteran
Joined
Jan 25, 2015
Messages
137
Reaction score
44
First Language
English
Primarily Uses
RMMV
messing around with the clock and got a new image (credit to MogHunter for the base before editing). it took some doing to get the x,y coordinates right and now trying to figure out how to make the clock hands white. i thought i found the code, but sadly it didn't work. i still have to add a part for the weather icon, but i, at the very least, wanted to share. i have some weather icons and day phase icons that i will be adding (after editing to a nice blue color to fit the clock theme). again, this is a great plugin. no, not great. exceptional, magnificent and so on.

1583789109943.png
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
519
Reaction score
606
First Language
Finnish
Primarily Uses
RMMV
Latest version - v2.04 (released 2020/03/14)
  • OcRam core v1.04 (requirement for all of my latest plugins)
    ...And prepares this plugin for OcRam demo project

  • New function OcRam.Time_System.updateSeasonalTileset();

  • New plugin parameter "Change tileset immediatly"
    • false = Will change season tileset on next transfer
    • true = Will change season tileset immediatly
 

Wizorrd

Villager
Member
Joined
Feb 17, 2019
Messages
28
Reaction score
9
First Language
English
Primarily Uses
RMMV
@OcRam Unrelated, but I wanted to put this link out for you, as you asked about the project. This is the latest compilation of some gameplay to get an idea! A mini Trailer if you will.
 

fizzly

Veteran
Veteran
Joined
Mar 23, 2012
Messages
630
Reaction score
390
First Language
Polish
Primarily Uses
RMMV
Hello @OcRam, just have a problem with time system. I need just seasons for my game, so the months are also a seasons (1st - spring, 2nd-summer, etc.), but after adding a month via "time add months 1" I've got error "cur_h is not defined". Can you please help me? Thank you.
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
519
Reaction score
606
First Language
Finnish
Primarily Uses
RMMV
Hello @OcRam, just have a problem with time system. I need just seasons for my game, so the months are also a seasons (1st - spring, 2nd-summer, etc.), but after adding a month via "time add months 1" I've got error "cur_h is not defined". Can you please help me? Thank you.
Thank you for the report!

As quick fix: Remove line 1041
Code:
_this.debug("time stamp:", cur_y + "." + cur_m + "." + cur_d + " " + cur_h + ":" + cur_n);
I will fix this in next version.
 

fizzly

Veteran
Veteran
Joined
Mar 23, 2012
Messages
630
Reaction score
390
First Language
Polish
Primarily Uses
RMMV
Thank you for the report!

As quick fix: Remove line 1041
Code:
_this.debug("time stamp:", cur_y + "." + cur_m + "." + cur_d + " " + cur_h + ":" + cur_n);
I will fix this in next version.
Thank you. Didn't got error this time, but "time add months 1" still does not work. Will be waiting for the update.

Edit-BUG1: The fun thing is that if I want to progress 2 months, it works! But cannot progress 1 month.

Edit-BUG2: I'm pretty sure I found another bug. When you set "show clock in menu" to false, it still shows weather as a text in menu -> there is a window that says "Clear". Okay, I found that the "clear" is the weather.... sometimes it says "rainy", etc. Bakaaa me.
 
Last edited:

Sed808

Warper
Member
Joined
Apr 23, 2020
Messages
3
Reaction score
2
First Language
Russian
Primarily Uses
RMMV
Hello @OcRam, I have the same problem as Wizzord did with time stopping after saving. I'm using 1.6.2 version and I've tried the plugin on a completely empty project with no other plugins installed but the problem remained. So started some experiments and installed Yanfly's Autosave plugin and noticed that the problem occurs only when I save manually. My "Time enabled switch Id" is saved in an off position as it is inactive while entering the menu and it doesn't switch to active when I load. But when the game autosaves the timer doesn't stop. It is also interesting that when I manually save the game the timer doesn't initiate even if I enter New game.
I'm not a programmer and know practically nothing about js, though I tried to find the solution within the js file.
I changed

line 1289
_prevTSEnabledState = $gameSwitches.value(_timeEnabledSwitchId);
to
_prevTSEnabledState = true;

line 1308
$gameSwitches.setValue(_timeEnabledSwitchId, _prevTSEnabledState);
to
$gameSwitches.setValue(_timeEnabledSwitchId, true);

line 1371
_this._menuCalled = false; $gameSwitches.setValue(_timeEnabledSwitchId, _prevTSEnabledState);
to
_this._menuCalled = false; $gameSwitches.setValue(_timeEnabledSwitchId, true);

And everything seemed to work. I'm not entirely sure what concequences these changes might have apart from, as I think, making the timer less dependent on plugin parameter, maybe I broke everything and it will backfire later lol.

I understand that this news was probably useless but I thought I have to share it since I'm not the only one with such problem
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
519
Reaction score
606
First Language
Finnish
Primarily Uses
RMMV
Hello @OcRam, I have the same problem as Wizzord did with time stopping after saving. I'm using 1.6.2 version and I've tried the plugin on a completely empty project with no other plugins installed but the problem remained. So started some experiments and installed Yanfly's Autosave plugin and noticed that the problem occurs only when I save manually. My "Time enabled switch Id" is saved in an off position as it is inactive while entering the menu and it doesn't switch to active when I load. But when the game autosaves the timer doesn't stop. It is also interesting that when I manually save the game the timer doesn't initiate even if I enter New game.
I'm not a programmer and know practically nothing about js, though I tried to find the solution within the js file.
I changed

line 1289
_prevTSEnabledState = $gameSwitches.value(_timeEnabledSwitchId);
to
_prevTSEnabledState = true;

line 1308
$gameSwitches.setValue(_timeEnabledSwitchId, _prevTSEnabledState);
to
$gameSwitches.setValue(_timeEnabledSwitchId, true);

line 1371
_this._menuCalled = false; $gameSwitches.setValue(_timeEnabledSwitchId, _prevTSEnabledState);
to
_this._menuCalled = false; $gameSwitches.setValue(_timeEnabledSwitchId, true);

And everything seemed to work. I'm not entirely sure what concequences these changes might have apart from, as I think, making the timer less dependent on plugin parameter, maybe I broke everything and it will backfire later lol.

I understand that this news was probably useless but I thought I have to share it since I'm not the only one with such problem
Thank you for the message,

Above changes will force time switch on (even if you have turned it off manually). I will double check this in next version of this plugin - But it seems to work normally for me (in development version)...
 

2biim2

Warper
Member
Joined
May 19, 2019
Messages
4
Reaction score
2
First Language
French
Primarily Uses
RMMV
Hello ! I find your plugin very usefull and well made ! Is there perhaps a plugin command to instantly change the day phase ?
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
519
Reaction score
606
First Language
Finnish
Primarily Uses
RMMV
Hello ! I find your plugin very usefull and well made ! Is there perhaps a plugin command to instantly change the day phase ?
Thank you for the message,

You mean day phase shouldn't fade? I would make it with event.

For example if you want to change day phase to "day" instantly (with default parameters)
set hour variable to 12
get player x, y
transfer player (no fade)

And if you want to change day phase to "day" - with fade effect just set hour var to 12
 

2biim2

Warper
Member
Joined
May 19, 2019
Messages
4
Reaction score
2
First Language
French
Primarily Uses
RMMV
Oh, so that was how to do it. Why didn't i try this method... Anyways thanks very much !
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
519
Reaction score
606
First Language
Finnish
Primarily Uses
RMMV
Latest version - v2.05 (released 2020/05/11)
  • Fixed bug in plugin command "time add months/days" and weather caption is not shown in menu, if "weather shown in menu" is false. (Credits to @fizzly )
 

fizzly

Veteran
Veteran
Joined
Mar 23, 2012
Messages
630
Reaction score
390
First Language
Polish
Primarily Uses
RMMV
Thank you @OcRam

Edit: Not sure if I'm missing something, but it still does not work for me... no error, but it just does nothing. "2" still works. I tried "time add months 1".
 
Last edited:

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
519
Reaction score
606
First Language
Finnish
Primarily Uses
RMMV
Thank you @OcRam

Edit: Not sure if I'm missing something, but it still does not work for me... no error, but it just does nothing. "2" still works. I tried "time add months 1".
Latest version - v2.06 (released 2020/05/12)
  • HotFix for v2.05 ...thank you @fizzly for the re-reporting and sorry for misunderstanding original post!
 

Beachsidey0

Villager
Member
Joined
Jun 3, 2020
Messages
8
Reaction score
1
First Language
English
Primarily Uses
RMMV
Have a quick question I am using Irina’s real-time plugin and was wondering if I could use your plugin to set up a season change of the map tile sets. I already am using a few of your other plugins like the layers, weather and audio which are great by the way. Would it be better to just swap to your plugin or just make a common event such as above.
 

Attachments

Last edited:

Beachsidey0

Villager
Member
Joined
Jun 3, 2020
Messages
8
Reaction score
1
First Language
English
Primarily Uses
RMMV
Have a quick question I am using Irina’s real-time plugin and was wondering if I could use your plugin to set up a season change of the map tile sets. I already am using a few of your other plugins like the layers, weather and audio which are great by the way. Would it be better to just swap to your plugin or just make a common event such as above.
Here is an update I got most of the variable settings correct I just wanted to ask what the time interval variable parameters are would it just be the same as the seconds variable from Irina's time plugin or is it measured differently? The Irina plugin variables are 0011-0017. Is there any correct way I could set up the day parameter to match the computers day shown on the date? The second pic just is showing that its the 1st day instead of the current day shown by the computers day which in this case is 19. So far this is pretty compatible with Irina's plugin which is great.
 

Attachments

Last edited:

autophagy

tank nerd
Veteran
Joined
Jun 9, 2014
Messages
86
Reaction score
75
First Language
German
Primarily Uses
RMMV
Hey OcRam, I was trying out your plugin today and noticed that it crashed when I was using Common Events for daytime changes. Turns out there was a typo (?) in line 1156 of the plugin:

The line read if (_dayPhaseCE != 0) runCE(_dayPhaseCE);, and it only stopped crashing when I changed that line to if (_dayPhaseCE != 0) OcRam.runCE(_dayPhaseCE);

Dunno if it was reported already. You might want to look into it. :smile: Thanks for making this plugin, I'm really loving it so far!

Cheers
 

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

Latest Threads

Latest Profile Posts

Should be able to release Haxe MV/MZ next weekend.
It look that somehow MZ tracks are messed up (for example battle4 is obviously a theme, castle2 is a ship, ship1 is a scene and so on..). Maybe they just named them after with some ambiguity.
is there a script call that return how much turn has passed in battle?
Does anyone find this hard to read?

Enjoying my weekend at home to stay Covid free. How is everyone else doing?

Forum statistics

Threads
100,603
Messages
977,740
Members
132,216
Latest member
Darkscythe25
Top