Basic Game Time + Night/Day

Is there a way to toggle the clock?

I'm really new to scripts ;-;
It's literally in the script, that exact phrase line 41 "    CLOCK_TOGGLE    = :SHIFT"

Lol being new doesn't excuse you from reading them!
Awesome script!  Works great, even got the part for Khas lighting system. Is there anyway i can set either the "USE_CLOCK = TRUE" to a switch ? and or the visable clock. Id like to be able to enable and disable it depending on point of the game. Thanks alot 🙂
Script 'Game_Clock line 184: NameError occurred. uninitialized constant GameTime::Window_Base. Halp
thanks guys !!! 
How do keep the clock desabled since the beginig of the game and only set to desplay it when char looks at a clock (event on map)??
I need help! How do you change the time of the day so that in the beginning of the game you don't start at 12 o'clock?


And also i want the clock to not appear by default, please if you could help me.
How would I make something happen every thirty days or so?
Hello,


I am unsure if this is still active but i have a question for anyone who can help. When doing the overlay for my parallax mapping the overlay does not follow the the day and night script since it is its own separate event. Does anyone have any idea on how to counter it so it follows the day and night cycle?


Any help would be appreciated. Thanks
Code:
[B]Hey.[/B] I do not know where to paste. I pasted the menu and does not work!
PS . How to do that after the extinction of the screen has changed the time?
I have a bit of a problem, and so far I am unsure how to fix it. The script works fine, but in interferes with other tint screen events.


I want to have an event where the room starts out dark, and as you touch floating crystals they glow and brighten up the room


If I list the map in the script as one that shouldn't be tinted, the tint will flicker very rapidly, probably because the tint event and the no tint command in the script contradict. If not, the proper tint remains until I interact with a crystal  in which it fades to the tint the script enables. Does anyone know how to fix it?


If not I could use images instead, but I wanna see if there's a way this will work.
Hi, I love this script!   


One question - I want to have the toggle clock be "tab" instead of "shift"...it says something about see input help for this, but I don't see any input help section of the script?  and of course I tried changing the :SHIFT to :TAB, but pressing tab in game doesn't do anything.

Sadly, there's no way to use tab that I could find. The Input help section isn't in the script itself, To access it you can go to that top menu bar thing in RPG Maker (The thing that says file, edit, etc...) And click the rightmost option, (Which would be 'help') and click content. You can also just hit f1. Once the menu pops up make sure you're on the index tab and just type the letter i in the search bar. Double click the input option that shows up and all your input options will be on the right, though you'll have to scroll a bit to reach the options. I hope I helped.
Hello! I found this script while I was browsing and decided to use it. Firstly, thank you for uploading it, you're wonderful at this. Secondly, this will sound very newbish because I don't know anything about scripting and I apologize in advance, but how do I set script calls in events? Or can I even do that? I'm working on a game in which when you actually start the game, the time is set to 6 am. So, I have GameTime::clock(set), but I have no idea where to put it after that. The only thing that I've figured out is conditional branches can use scripts.


If you could help me out, I would be oh so very thankful!


EDIT: I figured it out, thankfully, but now I'm getting an error. 
Capture.PNG


I'm pretty sure it means that I missed something as I have no idea how scripts work. Please help!
EDIT: I figured it out, thankfully, but now I'm getting an error. 


I'm pretty sure it means that I missed something as I have no idea how scripts work. Please help!



You used the wrong script call. GameTime::clock(set) can only be set to true or false and is used to toggle the clock in the corner. You should be using GameTime::set(time) then place 360 in the brackets for 6am. But you don't even need an event for that. Find the part of the script that says "$game_time = 540" (It should be line 89. The number at the end might be different for you.) and change the number to 360 directly in the script. Using the event may cause the time to reset to 6am every time that event is present on the map. Hope I helped =^.^=.
You used the wrong script call. GameTime::clock(set) can only be set to true or false and is used to toggle the clock in the corner. You should be using GameTime::set(time) then place 360 in the brackets for 6am. But you don't even need an event for that. Find the part of the script that says "$game_time = 540" (It should be line 89. The number at the end might be different for you.) and change the number to 360 directly in the script. Using the event may cause the time to reset to 6am every time that event is present on the map. Hope I helped =^.^=.

Ohh thank you thank you! Thats very helpful! (pst, you wouldn't happen to know how to do the thing with days, would you?)
Ohh thank you thank you! Thats very helpful! (pst, you wouldn't happen to know how to do the thing with days, would you?)

"Thing with the days"? You might need to be a little more specific
"Thing with the days"? You might need to be a little more specific

ok... so... like..
 


I am working on a dating simulator and the guys/girls/potatos move around depending on the day. You also have to go to work on certain days and what not. I am trying to set up switches for days and I can't figure out which switches I am supposed to use. I thought it was something similar to the time of day one (which I have that down and it pleases me greatly, so I worship the bunnyrabbit a bit), but alas twas not the case for me. If you happen to know the correct script call, that would be very helpful.
I am working on a dating simulator and the guys/girls/potatos move around depending on the day. You also have to go to work on certain days and what not. I am trying to set up switches for days and I can't figure out which switches I am supposed to use. I thought it was something similar to the time of day one (which I have that down and it pleases me greatly, so I worship the bunnyrabbit a bit), but alas twas not the case for me. If you happen to know the correct script call, that would be very helpful.

Glad I helped, I mostly figured this out through guess work and careful thought, there are a lot more people who are better than me.


Hmm, I'm not entire sure if a script call would work but... I do have an idea.


Let's start simple. This example will use a weekly cycle of 7 days.


We could use a variable named Days (Or name it whatever you want, I won't judge). This variable will go from 0-6 every time the clock strikes midnight. This is done with conditional branches.


First, look in the script and see if the line USE_VARIABLE = true (line 83) is set to true. then in the line below it, pick what variable you want to use. Make sure it's different from your Days Variable. Name the variable Time (Or whatever you want) Have a parallel process event in every map (Just make one then copy-past it) that goes something like this:

Spoiler
Conditional Branch Time = 0 (or 1440)


  Conditional Branch (Yes a second one) Days = 6


    Control variable Days = 0


  Else


    Control variable Days + 1

I hope that works, to test it you can make a simple event where when a character looks at it it could say "It's Sunday" If the day is 0 or "It's Tuesday" If the day is 2. And so on and so forth. Good luck! I hope your game goes well. A more complex event could result in the days of the week AND the day of the month being tracked, but starting out simple is probably the safest route.
Hello!


I'm having a problem adding a Second line to the section that keeps the day tint out of buildings/rooms via the Map# . I filled up the provided line section but when I try to enter some into  a second line it doesn't recognize it?
You don't need to. Just keep going on the same line and it should work. If that still doesn't work, then perhaps there is a limit on the amount of maps that do not have a tint. 


Also, this script seems to be adamant on spitting out an error message, which is as follows:


Script: 'Game Interpreter' line 1411: NoMethodError occurred. 


undefined method: 'visible=' for nil:NilClass


That comes up in my first map where I have an autorun event set up to set the time.  

Original thread: https://forums.rpgmakerweb.com/threads/basic-game-time-night-day.1079/