Orange Time System

@Hudell I'm not sure I should report that to you or KHAS, but I'm using your time system and KHAS Ultra Lighting, but every time while I'm inside (by switch or tilkeset) - lights are gone. Not sure why...

Not sure, it might be something on my side. I can look at it if you can make me a sample project with the issue.

@Hudell
And 2nd thing: I want to make home (where is inside, but normal tint screening) and caves (where is inside but there is very dark always) - how can I achieve this? There is only one "inside" :blush:

I'll need to modify the plugin to add an option for this.
@Hudell Okay, I'll prepare project. Can you please add that option for inside areas? I would be so grateful!

Edit: I've send you PM.
Sorry for such a noob question, but is there tutorial on how this all works and how to get it set up inside my game?

Im VERY new to MV and have not used any plugins yet, kinda scared of them atm.
Yes, me too. I'd also be interested in that.
i have had a play with it, but cannot seem to get it to work. something covering the basics on setting it up would be really helpful.

I was going to use it to control the time and date system for my HM like game
I've seen many references to demos regarding how to use the Orange Time System, but I can't manage to find it anywhere. I was trying to use the plugins to setup events based on the time in which the user is in, but for some reason, it doesn't seem to work.

I was hoping a demo would help me figure out what I'm doing wrong.

Basically, I tried to link the time setting to variables and switches. When I try to show the value of these variables in a message, 0 is being displayed for everything (hour, minute, day, etc). And if I wait, minutes start growing from there instead of what I made the start time being (9h10).
I'm primarily using this to track time periods in my game as opposed to hour and minute. IE, morning, noon, evening, night essentially. If I increment the variable I have assigned to dayPeriod does it update the actual day period in the game? IE: VarDayPeriod += 1?

Or is there a script call I should be making? I know I can "set" the day period but I want to increment. Essentially, I want this kind of functionally.

Player engages in an activity in the morning. It takes up the morning and when they finish it is now daytime (noon). They go do another activity, it is now evening. And another, it is now night time. (Night time is already taken care of through a sleep script that changes the day.

I don't want it to work by setting a specific hour because I want these events to be doable at most times of the day. So I need them to simply take up a period of time.

I tried testing it with a simple event I'd click with the following script call but it's not working:

Code:
OrangeTimeSystem.dayPeriod = OrangeTimeSystem.dayPeriod + 1;
OrangeTimeSystem.updateTime();
I've seen many references to demos regarding how to use the Orange Time System, but I can't manage to find it anywhere. I was trying to use the plugins to setup events based on the time in which the user is in, but for some reason, it doesn't seem to work.

I was hoping a demo would help me figure out what I'm doing wrong.

Basically, I tried to link the time setting to variables and switches. When I try to show the value of these variables in a message, 0 is being displayed for everything (hour, minute, day, etc). And if I wait, minutes start growing from there instead of what I made the start time being (9h10).

There is a demo on one of Hudell's replies earlier in the thread it's just not linked in his OP. It's an older version of the plugin I think but you can see a clock and functionality like resting at an Inn. It manages to get the common event calls working which is something I've struggled with in my own game sadly and had to resort to setting my common event to parallel running which I didn't want to do.
You may have been asked this already, but is there a way to show the time in a corner of the screen? Something like in harvest moon or animal crossing where the time is either always shown in the top left, or shown when the hour changes? I'm just curious, as I would rather not have to force a player to keep talking to somebody or using a watch item just to check the time. Thanks! 🙂
@BBaggins2112 Try OrangeHudClock (get OrangeHud here). If that doesn't do exactly what you want to do, you can use the many features and types of OrangeHud add-ons to display your information.

@wendyred The day period is determined by the time, not the other way around. Try the method below.
Code:
var nextPeriodHour = 0;
if (OrangeTimeSystem.dayPeriod == 4) {nextPeriodHour = OrangeTimeSystem.Param.dayPeriod1Hour;};
if (OrangeTimeSystem.dayPeriod == 1) {nextPeriodHour = OrangeTimeSystem.Param.dayPeriod2Hour;};
if (OrangeTimeSystem.dayPeriod == 2) {nextPeriodHour = OrangeTimeSystem.Param.dayPeriod3Hour;};
if (OrangeTimeSystem.dayPeriod == 3) {nextPeriodHour = OrangeTimeSystem.Param.dayPeriod4Hour;};
var hoursToNextPeriod = nextPeriodHour - OrangeTimeSystem.hour;
if (hoursToNextPeriod < 0) {hoursToNextPeriod += OrangeTimeSystem.Param.dayLength};
OrangeTimeSystem.minute = 0;
OrangeTimeSystem.seconds = 0;
OrangeTimeSystem.addHours(hoursToNextPeriod);


@Hudell I would like to make sure I'm thinking about your code correctly, as my game will be heavily dependent upon storing events to run at a certain time. I would also like to be able to cancel that event before the time occurs.
Say I want Common Event 10 to run in two hours, is it appropriate to store the returned id in a variable such as
$gameVariables.setValue(1) = OrangeTimeSystem.runinHours(10, 2);
and if I want to then stop the event before it happens, then can I use
OrangeTimeSystem._afterTimeEvents[$gameVariables.value(1)].callback = 0;
to effectively "cancel" the event from happening? It seems to be working, I just want to make sure I'm understanding the system correctly. I'm afraid to use any method to remove the config object from the array for fear of ruining something else.

Thanks if you can respond. I love your plugins, they're working great for my needs! (Especially OrangeTimeSystem, OrangeWeather, and the OrangeHud family!)
Yes, but it would be interesting to clear those events from the list at some point (on the load game process, for example, should be completely safe).
@wendyred The day period is determined by the time, not the other way around. Try the method below.
Code:
var nextPeriodHour = 0;
if (OrangeTimeSystem.dayPeriod == 4) {nextPeriodHour = OrangeTimeSystem.Param.dayPeriod1Hour;};
if (OrangeTimeSystem.dayPeriod == 1) {nextPeriodHour = OrangeTimeSystem.Param.dayPeriod2Hour;};
if (OrangeTimeSystem.dayPeriod == 2) {nextPeriodHour = OrangeTimeSystem.Param.dayPeriod3Hour;};
if (OrangeTimeSystem.dayPeriod == 3) {nextPeriodHour = OrangeTimeSystem.Param.dayPeriod4Hour;};
var hoursToNextPeriod = nextPeriodHour - OrangeTimeSystem.hour;
if (hoursToNextPeriod < 0) {hoursToNextPeriod += OrangeTimeSystem.Param.dayLength};
OrangeTimeSystem.minute = 0;
OrangeTimeSystem.seconds = 0;
OrangeTimeSystem.addHours(hoursToNextPeriod);

I got it working shortly after I posted here. I had been using code for sleeping earlier in the thread that had

OrangeTimeSystem.update(false);

It was part of an "Inn" script. Once I removed the false everything started working. I set up a test event that everytime I clicked on it it set the hour to the start of one of the day periods (6,9,18,20 if memory serves) and then updated. Once I did that it all worked fine.

Now my Inn is set up to allow "naps" which advance the time or sleep which moves to the next day. I have a common event that gets called when the day period changes. Right now it just advances a couple of variables in the morning as well as toggles lighting using the Thomas Edison plugin.

Anyway, this is a great system and is just what I needed!
Awesome-sounding plugin! However, I'm having a little trouble: no matter what I try, it won't display the time on the HUD itself. I have it use my computer's time, which is what I wanted it to do, but I wanted the time to be displayed on the HUD in-game, too, so the player (or at least I) can verify that the in-game time matches my computer system's time. Right now, for all I know, it could think it's 5:00 AM (it's quarter-past noon). I've gotten all the other plugins for Orange HUD to work and they work really well. Is there a way to display the time in-game on the HUD, either with this exact plugin or another Orange HUD script? Thanks in advance!
Welcome to the forums, @AllisonMayberry, it's great to have you join us.
  • I like the picture you choose 😎
Spoiler: Copy of Alison Mayberry's first posting
upload_2017-12-6_7-39-59.png
Thanks, @Joy Diamond! I was originally going to choose Marsha from MV as my avatar, but I ultimately decided not to, so I went with this.
Hey, I'm having an issue with the variables plugin. I want to display the time on screen using SRD's hud, but the time displays incorrectly, instead of displaying time as "8:01" it shows as "8:1". Any way to correct this?
Can someone please explain how exactly it works, to make a ingame time clock with the plugin OrangeHudClock?
I'm loving this plug-in and so far it's done everything I've been needing, but there's one feature I can't seem to find so I'm assuming it doesn't exist. Is there any way to toggle whether or not the RTC is running in sync with the system's clock or not?

I'd like to be able to have the game sync with the system clock upon starting a new save file (so that the player doesn't have to do it), but after that run independently so that the player (or my events in-game) can change the time later, without having to effect the system time. Especially since I don't believe there's any way in-engine of modifying the system time.
Hi, im really new in rpgmaker mv, could someone pls advise me how to set the variable number for orange time variable and orange hud variable. my setting seem like wrong as only the second is running, mins and hrs are remain 0. kindly pls advise. thanks!

[edited by Kes to remove quote. See post below.]
@Louis529 You managed to quote the entire opening post of this thread, with your own question buried within the quote. I have edited it for you to remove the OP, leaving just your query.

I wondered if perhaps you quoted that post because you wanted to alert Huddel to your query. All you have to do is to type @ plus the username, as I have done in this post, and select the name you want from the drop down list. That notifies the person that they have been mentioned.

Original thread: https://forums.rpgmakerweb.com/threads/orange-time-system.46509/