Posts: 545
Threads: 34
Joined: Oct 2010
This is great.
Im ganna try it out.
I need something like this in my game soo thankies!
My collection of music :Bandcamp
" being a punk isnt about just being a nihilistic violent antiauthority protestor, its about valuing people over some systemic machine. if the machine works for everyone then it is not authority, if it works for few, it is. the role of bigotry is then to convince you a machine that works for few works for all, while a machine that works for all is communism."
my discord handle: RD (\(ㅇㅅㅇ❀)/)
Posts: 12,633
Threads: 1,794
Joined: May 2009
Dear Habs11:
HOW THE HELL ARE YA, PAL!!! IT'S BEEN A WHILE!!!
There isn't a feature to say 'Change time to 12:pm, but it does have a system that says 'advance time by 1 hour'
Code: # * $game_time.adjust_seconds(number) Increases or decreases the seconds
# * $game_time.adjust_minutes(number) Increases or decreases the minutes
# * $game_time.adjust_hours(number) Increases or decreases the hours
# * $game_time.adjust_days(number) Increases or decreases the days
# * $game_time.adjust_years(number) Increases or decreases the years
One could create an algorythm with some of the below statements:
Code: # * $game_time.clock_seconds Returns the current seconds(ex 1-60)
# * $game_time.clock_minutes Returns the current minutes(ex 1-60)
# * $game_time.clock_hours Returns the current hours(ex 1-24)
... to set up such a system. If it's 8:15am and you want it to be 10pm... Determine both clock minutes and clock hours... determine 'X' hours between (14 hours) and subtract suitable minutes (60 - 15minutes = 45)... 13 hours, 45 minutes. Then use .adjust minutes and .adjust hours accordingly.
If it's an event script (an inn for example)... well, I just showed you pseudocode to do it.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
Above are clickable links
Posts: 66
Threads: 5
Joined: May 2009
Thank you very much for your response. I should have thought of this before. Now just to let you know, if I use any of the
Code: # * $game_time.clock_seconds Returns the current seconds(ex 1-60)
# * $game_time.clock_minutes Returns the current minutes(ex 1-60)
# * $game_time.clock_hours Returns the current hours(ex 1-24)
I get this error:
NoMethodError occurred while running the script.
undefined method 'clock_seconds' for #<Game_Time0x966bd40>
It's the same for the minutes and hours. I wanted to bring it to your attention.
However, I did find a way to get the same effect using the fact that you allowed the system to set variables for the seconds, minutes, hours, etc. In reality the only thing that matters is that the hour is correct (10:15pm vs 10:33pm makes no difference to me, just as though it's in the 22nd hour). So what I did was set up 23 different conditional branches, each having the pre-condition that the hours variable is set to 1, 2, 3, etc. Then depending on the number the I would use $game_time.adjust_hours(number) to jump forward or backward to hour 22. Then I can jump to morning because I know the hour will be 10am, and I can adjust to 6am easily. If there is any problem with that way of doing it, or if there is an easier way to get the same effect, please let me know. Thanks again, keep up the great work!
EDIT: I also got this error when I attempted to test a battle in the database, not sure if it's something you can fix or not:
Script 'Day and Night' line 386: NoMethodError occurred
undefined method 'update' for nil:NilClass
I am using CTB by Charlie Fleed with all of his gadgets for a battle system if you needed to know.
In addition, if I try and manually tint the screen(Fade in/out to simulate a scene), the screen will only begin to fade for 1 frame, then it will freeze and not complete the actual screen tint change. This problem only occurs on maps that are affected by the day and night script. The "inside" maps still work normally. I have tried both of these on the demo and it yielded the same results, so I can hope that it's not just my project. Thanks for any assistance.
Habs11
Posts: 3
Threads: 0
Joined: Mar 2011
(02-24-2011, 09:32 PM)habs11 Wrote: Thank you very much for your response. I should have thought of this before. Now just to let you know, if I use any of the
Code: # * $game_time.clock_seconds Returns the current seconds(ex 1-60)
# * $game_time.clock_minutes Returns the current minutes(ex 1-60)
# * $game_time.clock_hours Returns the current hours(ex 1-24)
I get this error:
NoMethodError occurred while running the script.
undefined method 'clock_seconds' for #<Game_Time0x966bd40>
It's the same for the minutes and hours. I wanted to bring it to your attention.
However, I did find a way to get the same effect using the fact that you allowed the system to set variables for the seconds, minutes, hours, etc. In reality the only thing that matters is that the hour is correct (10:15pm vs 10:33pm makes no difference to me, just as though it's in the 22nd hour). So what I did was set up 23 different conditional branches, each having the pre-condition that the hours variable is set to 1, 2, 3, etc. Then depending on the number the I would use $game_time.adjust_hours(number) to jump forward or backward to hour 22. Then I can jump to morning because I know the hour will be 10am, and I can adjust to 6am easily. If there is any problem with that way of doing it, or if there is an easier way to get the same effect, please let me know. Thanks again, keep up the great work!
EDIT: I also got this error when I attempted to test a battle in the database, not sure if it's something you can fix or not:
Script 'Day and Night' line 386: NoMethodError occurred
undefined method 'update' for nil:NilClass
I am using CTB by Charlie Fleed with all of his gadgets for a battle system if you needed to know.
In addition, if I try and manually tint the screen(Fade in/out to simulate a scene), the screen will only begin to fade for 1 frame, then it will freeze and not complete the actual screen tint change. This problem only occurs on maps that are affected by the day and night script. The "inside" maps still work normally. I have tried both of these on the demo and it yielded the same results, so I can hope that it's not just my project. Thanks for any assistance.
That CTB By Charlie Fleed Uses Variables Or Switches?
The Same Thing Happened With Me Using This Script Along With Mog Animated Panorama.
The Charlie Fleed And Day Night Or Another Script Must "NOT" Share Switches And Variables ,That Solved My Problem.
Posts: 12,633
Threads: 1,794
Joined: May 2009
Er....
BUMP!
to version 1.4
I forgot to include attr_accessor codes to the clock_seconds, clock_minutes and clock_hours variables which I described earlier. Meep!!! My bad.
As to the battle test system, I took some time to add an alias that adds the $game_time variable to the battlesystem. Quick fix, though unexpected.
And yeah. If I'm using variables, and someone else is using 'em. That could cause a problem Good catch there.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
Above are clickable links
Posts: 66
Threads: 5
Joined: May 2009
Hey DerVVUlfman,
I wasn't sure if you took a look at the manual tinted screen problem I described above. It's not the biggest issue in the world, however it does complicated things with your vehicle system when going to the "World Map" when you cannot get the screen to fully fade out and you see the vehicle appear right before you. If you can take a look, that would be great. Thanks.
EDIT: I figured it out. I just had to change the pause tint value to true. I thought it might have been simple. Thanks again.
Habs11
Posts: 12,633
Threads: 1,794
Joined: May 2009
BUMP!
to version 1.5
I missed a bump somewhere down the line, but the new system allows you to turn on/off RPGMaker XP switches based on the hours, the calendar date and day of the week (or a combination thereof). Unlike the previous version, you can set up multiple switches in this fashion now.
And now there are commands to pause and restart the game time. :)
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
Above are clickable links
Posts: 12,633
Threads: 1,794
Joined: May 2009
BUMP!
to version 1.6
A bug was found by Rosair that affected the day-overlap function that interefered with the script's game switch toggling system. Bug squished real good.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
Above are clickable links
Posts: 607
Threads: 36
Joined: May 2009
I thought it was a compatibility error, so I didn't mention it and fixed it myself. Great update.
My partner in crime = TREXRELL
Posts: 545
Threads: 34
Joined: Oct 2010
(01-26-2012, 03:18 PM)Yin Wrote: I thought it was a compatibility error, so I didn't mention it and fixed it myself. Great update. GAH!  so its your fault... but I thought it was too at first. I only told him once I noticed that it works but incorrectly.
My collection of music :Bandcamp
" being a punk isnt about just being a nihilistic violent antiauthority protestor, its about valuing people over some systemic machine. if the machine works for everyone then it is not authority, if it works for few, it is. the role of bigotry is then to convince you a machine that works for few works for all, while a machine that works for all is communism."
my discord handle: RD (\(ㅇㅅㅇ❀)/)
|