Basic Game Time + Night/Day

Forgive me, I am a complete Noob to RPGM ...and I'm trying to prevent tinting on certainmaps ...but I dont know what format the numering uses

your script says

NOTINTMAPS = [2]   <<< what do I put here

in my Data folder the maps are listed as Map001.rvdata2, Map002,rvdata2 ..etc

 How would I prevent map 002 from using tinting ?

Duh ...sorry, I figured it out
Hay, Vlue when I try to play test my project I keep on getting the error message

Script 'Day/Night' line 119: NoMethodError occurred.

undefined method `/' for nil:NilClass
If you could help, I'd appreciate it 😀
Is the following at the very bottom of the script?

GameTime::init

Sometimes people don't copy that for one reason or another from what I've read, and is the most common cause of that problem.
Hay, Vlue when I try to play test my project I keep on getting the error message

If you could help, I'd appreciate it 😀
.It is indeed a very common problem, which prompted me to move that line to where it won't do any harm! Just try deleting the script and getting it again from the pastebin
Hay Vlue.

Can you explain to me how I can change the color of the clock and frame around it?

I am unable to find the output in your script to edit it by myself and I want to change the basic white to something else.

Greetings
Alchemist
Beginner here at scripting.

I'm trying to make a small edit to show the number of days since the game beginning. I made it kind of work with a common event, but I'm facing some problems with scripting.

if $game_variables[2] == 0 # timethen $game_variables[16] += 1 # number of daysendself.contents.draw_text(0,20,100,24, $game_variables[16], ". Day")So the first problem is that when the time really goes to midnight it makes the adding operation 50 times, ending up with "50. Day". The second is that I get "can't convert string into integer" for the last line and third, when I try and declare the variable $game_variables[16] = 1 at the beginning of Vlue's script so that it starts on the first day I get a "No method error occured. undefined method '[]=' nil for for nil:NilClass"
Beginner here at scripting.

I'm trying to make a small edit to show the number of days since the game beginning. I made it kind of work with a common event, but I'm facing some problems with scripting.

if $game_variables[2] == 0 # timethen $game_variables[16] += 1 # number of daysendself.contents.draw_text(0,20,100,24, $game_variables[16], ". Day")So the first problem is that when the time really goes to midnight it makes the adding operation 50 times, ending up with "50. Day". The second is that I get "can't convert string into integer" for the last line and third, when I try and declare the variable $game_variables[16] = 1 at the beginning of Vlue's script so that it starts on the first day I get a "undefined method '[]=' nil for for nil:NilClass"
You would be better off using the Advanced Time system Vlue made, instead of this one, if you want the script to support days, as well. Personally, I jut used this script and then used my own events to add up to a year and using a season system, in place of months. It is easier to event those than trying to add them to this script, f you are only a beginner or less with scripting.
I used just that, thanks. I also got a huge FPS increase since switching to the advanced one, from 30 to 50 (on a 100 x 100 map). Dunno if it's a coincidence. 🙂
Probably isn't a coincidence.  Last I checked this script redraws the clock every frame, instead of whenever the time actually changes.  As a result when the hud is used, the framerate can really drop.  Vlue probably handled it better in his advanced time script, which might be why you noticed a difference.
Looking great! Just a few thing for me I guess...: 😛

1/ When I'm in an indoor map, it get's tinted when displaying Text (dialogs) and Choices!  Got this one

 

2/ How can I create an event that makes me show/hide the clock on one particular map?

3/ Whatever I try, I don't understand how I can setup the time when the game starts.

Any ideas?

Thx 🙂

Rik

Went through the posts here and tried some of those script lines but nothings's working nowhere....
2 => Use a script call: GameTime.clock(true/false)

3 => change the 0 on line 89 (or whatever line close to that that reads: $gametime = 0) to whatever minute you want to time to start as
2 => Use a script call: GameTime.clock(true/false)

3 => change the 0 on line 89 (or whatever line close to that that reads: $gametime = 0) to whatever minute you want to time to start as
I got the second one, thanks!

Now I'm no scripter so ,what I did is , in the event in "script" I copy/pasted just like this "GameTime.clock(false)" and 

of course I got an error...  😛

What's the right thing to write?

🙂 Rik
Should be exactly that. Though without the quotes.

What's the error?
Should be exactly that. Though without the quotes.

What's the error?
Hi this is the error message I get:

[IMG]http://img16.imageshack.us/img16/891/clockbug.jpg[/IMG]

 

Thx! 🙂

 

Rik
Scene Name? When are you calling the script call?
Scene Name? When are you calling the script call?
You know what? read this. I found a solution, purely based on unknown hasard & intuition...

I have that parallel process in the "intro" map where you can input your name before the game starts.

Now(!)...  imagine the event box (@>) ...

If I put the line with the script call just after the name input process, I got that error.

If I put the script call just before the name input process, there's no error but I only can input the name on the next map!

But if the script call is before the name input process and between the two I put a Text message I have neither the error and I still can input a name before the game starts!

Like this:

[IMG]http://img832.imageshack.us/img832/826/clockbug2.jpg[/IMG]

 

So I don't know why this happens, but mostly I don't even imagine how my brain got to fix this. 🤔

 

Because it's fixed. And now it's awesome!

 

Thank you very much for your script, your time and your help!

 

🙂 Rik
First off, thank you so much for this script!

Second: how would I make the time move faster in some maps and slower in others? I want to have the Overworld (and maybe other maps) run time faster than the others. I suspect that I can tie the TIME_COUNT to a variable that is called on the individual maps somehow, but am not sure how to do this--or if this is the best manner of accomplishing my aim.

Thanks in advance for the help.
The easiest way would be changing TIME_COUNT to $time_count

then you could just make a script call like:

$time_count = 120

and the speed of time will change.

Lines 44, 98, 102, 104.
Awesome, that seems to be working how I had hoped. Thanks for the help!
I'm trying to make a game, and I want the time to be locked at night. Is there a way to do this? (In case you can't tell already, I'm making a "horror" game.) I just want to keep it locked at 12:00 AM.

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