Basic Game Time + Night/Day

I think i found a bug in the script, maybe it's in the program it's self i don't know.

But the script was working 100%, all the maps i had listed where not being tinted.

NOTINTMAPS = [1,2,6,7,8,11,12,20,21,22,27]

But i delete 4 inside maps and i copy pasted them from my backup project, so i did not have re-event them all again.

It changed the map ID's from 7,8,20,21 to 9,10,17,18 and now the script don't reconizes them anymore?

I updated it to reflect the changed ID's, NOTINTMAPS = [1,2,6,9,10,11,12,17,18,22,27]

I made sure they where acurate ID's, but it still tints them... < The copy-pasted maps, the old ones still work ok.

I am not sure what is causign this issue, are they supose to be in order? Like they way the maps where created.

Or do i have to sort them as the player encounters them.

Sorry to bother you, i just want to get past this part haha
Sorry, I completely do not understand scripting and I have noooo clue on how to use this other than putting it in the script manager.

How do I make it so that when it's midnight or later than 10, everyone is asleep and you can't enter their houses?
I think i found a bug in the script, maybe it's in the program it's self i don't know.

But the script was working 100%, all the maps i had listed where not being tinted.

NOTINTMAPS = [1,2,6,7,8,11,12,20,21,22,27]

But i delete 4 inside maps and i copy pasted them from my backup project, so i did not have re-event them all again.

It changed the map ID's from 7,8,20,21 to 9,10,17,18 and now the script don't reconizes them anymore?

I updated it to reflect the changed ID's, NOTINTMAPS = [1,2,6,9,10,11,12,17,18,22,27]

I made sure they where acurate ID's, but it still tints them... < The copy-pasted maps, the old ones still work ok.

I am not sure what is causign this issue, are they supose to be in order? Like they way the maps where created.

Or do i have to sort them as the player encounters them.

Sorry to bother you, i just want to get past this part haha
Late response go! I was away for the weekend.

It certainly shouldn't be a problem, I'm sure you double checked several times the map_ids but were the id #'s the same in the backup project? The id's of the maps will be the same in the new project as it were in the backup project as the map_ids are grabbed by the filename of the map and not by the order they were placed in. It's the only thing that comes to mind that could cause an error.

Sorry, I completely do not understand scripting and I have noooo clue on how to use this other than putting it in the script manager.

How do I make it so that when it's midnight or later than 10, everyone is asleep and you can't enter their houses?
Simple! In the conditional branch events there is a script option, you can use something simple there like GameTime::hour? > 22 and that conditional branch will activate as long as the time is between 10pm and 12am, or you can do something more complicated like GameTime::hour > 18 or GameTime::hour? < 6 and that conditional branch will activate as long as the time is between 6pm and 6am. Using branches like that you can prevent doors from working between certain times and more!
Late response go! I was away for the weekend.It certainly shouldn't be a problem, I'm sure you double checked several times the map_ids but were the id #'s the same in the backup project? The id's of the maps will be the same in the new project as it were in the backup project as the map_ids are grabbed by the filename of the map and not by the order they were placed in. It's the only thing that comes to mind that could cause an error.
Yeah a couple where different order that's why i asked lol, i started a new project and made all the mapsthis time, before i copy-pasted my events and it seems to be working just fine now.

Sucky part was making the maps all over again, but it gave me a chance to update a few maps i did not like so at least it's fixed now thanks.

Note: I tried out your GameTime::hour > 18, if brings up an error.

undefined method `hour` for GameTime:Module.

I believe the correct way is: GameTime::hour? == 18 or GameTime::hour? == 6

[IMG]http://img145.imageshack.us/img145/8132/conditionbranch.png[/IMG]
edit

Deleted my post here.

Wrong version to post in lol, I was using the advanced one. sorry about that.
How could I set up certain shops to be closed during the night, and/or, pubs to have more people during the night?
How could I set up certain shops to be closed during the night, and/or, pubs to have more people during the night?
Conditional Branches within events, they have a script option and you can use something like...

GameTime::hour? >= 21 or GameTime::hour? <= 6

to have whatever is in the conditional branch to only activate when the time is after 9pm and before 6am

i.e a door event only working when its between or not between those times, or a parallel process event which hides certain events if the time isn't right
In the same vein, you can also implement a system where when you go to sleep at an inn, you can choose how long you wish to sleep for, and then have the event add however many hours to the clock. I'm still trying to figure out how I can add that into the main menu (via Yanfly's Menu engine), but it's more than possible through events.
A few notes of what I've donw with this script:

I use a parallel common event that runs this for setting gather game time.

Control Variables: [0008:Time] = $game_time

it takes 3 pages for game doors:

Time > 0 closed

Time > 360 opens at 6 am

Time > 1020 closed again at 5 pm

A bit messy, maybe, but also works for my NPCs as well.

Another thing I've done with this script is this in a parallel:

GameTime::TIME_COUNT = ??

If the field map, it sets to 10 for fast time passage

If town map/dungeon, I set to something like 120
Hey Vlue!

Im using VX Ace and i tried a lot of Timescripts for Ace, but no one works for me...

Everytime i get Error messages...

well, i wanna use your script but i become a error message as well.

I have some Pictures about my Problems:

Spoiler
[IMG]http://www.youscreen.de/wtaojzfq16.jpg[/IMG]
and here is my script Page:

Spoiler
[IMG]http://www.youscreen.de/fcsccdta91.jpg[/IMG]
and the "error line":

Spoiler
[IMG]http://www.youscreen.de/xfrgddlx03.jpg[/IMG]
Do you can help me here Vlue?

I want to make a game like Harvest Moon, and for this, a good Time script is

neccesary.

Greetz

Yakuza
Hey Vlue!

Im using VX Ace and i tried a lot of Timescripts for Ace, but no one works for me...

Everytime i get Error messages...

well, i wanna use your script but i become a error message as well.

I have some Pictures about my Problems:

and here is my script Page:

and the "error line":

Do you can help me here Vlue?

I want to make a game like Harvest Moon, and for this, a good Time script is

neccesary.

Greetz

Yakuza
Lovely pictures! Perhaps put them in a spoiler next time though so it doesn't get too spammy up in here.

The reason you're getting that is because you are using the VX version. You'll want to use the easy to find

VX Ace version. The one linked at on the original post in this topic.
I am new to the rpg expereince and I love your script. I am a noob and i was wondering what do i do to switch it from night to day to day to night.
I am new to the rpg expereince and I love your script. I am a noob and i was wondering what do i do to switch it from night to day to day to night.
If you want to force the change, just use a script call in an event (it's an option under tab 3) and type in the command:

GameTime.set(0)

which would set it to midnight or

GameTime.set(720)

which would set it to noon. Stuff like that!
Is there a way to have the clock toggled off by default? I don't want it showing during my cutscene.
Put this on a line below the script:

$game_time_clock_visibility = false
Put this on a line below the script:

$game_time_clock_visibility = false
That's a lot easier than what I did 🙂 I made a switch control it, but it was a little buggy. Thanks for the help.
I keep getting an error message "Script 'Basic Game Time + Night/Day' line 101: NameError occurred. undefined local variable or method 'update_night_switch' for GameTime:Module'" what's wrong?

turned off the switch for day/night. and got a new error

"Script 'Basic Game Time + Night/Day' line 278: NoMethodError occurred. undefined method 'effect_surface' for #<game_map:0x9a2a1bc"
Spelling mistake on my part there for the first error, fixed on the pastebin.

That second one... would only, should only, occur if you put the KHAS patchy thing in but don't have KHAS installed.
EDIT: Nevermind, I'm switching to your Advanced Time system.
Ummmm... whenever I step inside one of my homes, it tints and goes night... seems the only place light is is outside >.> go figure... I put [2] on the notes page of all my homes... still nada >.> help

Nvm, fixed it

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