Orange Time System

Discussion in 'JS Plugin Releases (RMMV)' started by Hudell, Oct 24, 2015.

  1. Hudell

    Hudell Dog Lord Veteran

    Messages:
    3,320
    Likes Received:
    2,945
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    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.

    I'll need to modify the plugin to add an option for this.
     
  2. fizzly

    fizzly Veteran Veteran

    Messages:
    394
    Likes Received:
    274
    Location:
    Poland
    First Language:
    Polish
    Primarily Uses:
    N/A
    @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.
     
    Last edited: Sep 16, 2017
  3. KingTentacleAU

    KingTentacleAU TheGreatWigglyOne Veteran

    Messages:
    42
    Likes Received:
    1
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    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.
     
  4. Zizka

    Zizka Veteran Veteran

    Messages:
    127
    Likes Received:
    24
    First Language:
    English
    Primarily Uses:
    RMMV
    Yes, me too. I'd also be interested in that.
     
    KingTentacleAU likes this.
  5. KingTentacleAU

    KingTentacleAU TheGreatWigglyOne Veteran

    Messages:
    42
    Likes Received:
    1
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    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
     
  6. JohnVorpal

    JohnVorpal Warper Member

    Messages:
    1
    Likes Received:
    0
    First Language:
    French
    Primarily Uses:
    RMMV
    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).
     
  7. wendyred

    wendyred Villager Member

    Messages:
    22
    Likes Received:
    3
    First Language:
    English
    Primarily Uses:
    N/A
    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();
     
  8. wendyred

    wendyred Villager Member

    Messages:
    22
    Likes Received:
    3
    First Language:
    English
    Primarily Uses:
    N/A
    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.
     
  9. BBaggins2112

    BBaggins2112 Total Amateur Member

    Messages:
    1
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    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! :)
     

    Attached Files:

  10. Llareian

    Llareian Jack of All Trades, Master of None Veteran

    Messages:
    603
    Likes Received:
    1,400
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    @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!)
     
  11. Hudell

    Hudell Dog Lord Veteran

    Messages:
    3,320
    Likes Received:
    2,945
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    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).
     
    Llareian likes this.
  12. wendyred

    wendyred Villager Member

    Messages:
    22
    Likes Received:
    3
    First Language:
    English
    Primarily Uses:
    N/A
    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!
     
  13. AllisonMayberry

    AllisonMayberry Not a Programmer Member

    Messages:
    2
    Likes Received:
    2
    First Language:
    English
    Primarily Uses:
    RMMV
    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!
     
    Joy Diamond likes this.
  14. Joy Diamond

    Joy Diamond Talkative Veteran

    Messages:
    135
    Likes Received:
    172
    First Language:
    English
    Primarily Uses:
    RMMV
    Welcome to the forums, @AllisonMayberry, it's great to have you join us.
    • I like the picture you choose :cool:
    upload_2017-12-6_7-39-59.png
     
  15. AllisonMayberry

    AllisonMayberry Not a Programmer Member

    Messages:
    2
    Likes Received:
    2
    First Language:
    English
    Primarily Uses:
    RMMV
    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.
     
    Joy Diamond likes this.
  16. Rob64_IV

    Rob64_IV Villager Member

    Messages:
    7
    Likes Received:
    8
    First Language:
    English
    Primarily Uses:
    RMMV
    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?
     
  17. Skydorm

    Skydorm Villager Member

    Messages:
    20
    Likes Received:
    2
    First Language:
    German
    Can someone please explain how exactly it works, to make a ingame time clock with the plugin OrangeHudClock?
     
  18. RobertMato

    RobertMato Warper Member

    Messages:
    4
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    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.
     
  19. Louis529

    Louis529 Villager Member

    Messages:
    29
    Likes Received:
    1
    First Language:
    mandarin
    Primarily Uses:
    RMMV
    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.]
     
    Last edited by a moderator: Jan 19, 2018
  20. Kes

    Kes Global Moderators Global Mod

    Messages:
    20,794
    Likes Received:
    10,584
    First Language:
    English
    Primarily Uses:
    RMVXA
    @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.
     

Share This Page