Advanced Game Time

Wait a second, it just changes. Is it possible to make it fade to the next tint? 
By change, I mean update. The tint is decided as a mix between next hours tint and current hours tint, so it fade's properly.
How would I use the script GameTime::set("addyear",n)?

I want to change the year in an event, can you help me giving the right script? Thanks

I used this script.

GameTime::set("Addyear",-1700)
no capitol, just GameTime.set("addyear",-1700)
Nevermind, solved it
You can set up a custom clock in the configuration, around lines 116-117.


Something simple like that would be:


CUSTOM_CLOCK = ["hour12",":00 ","meri"]


CUSTOM_CLOCK2 = []


Which would show just 10:00 AM, or whatever time it is.
How would I use the script GameTime::set("addyear",n)?

I want to change the year in an event, can you help me giving the right script? Thanks

I used this script.

GameTime::set("Addyear",-1700)
I've used GameTime::set("remyear", 1700) and it worked. Thanks
Well, I say well, now I know why I should copy and paste the whole script, comments included. So the original and I will be on the same line.
Hello! 

I am currently making a game where you can buy properties. The properties will generate income for you. You can buy houses, hospitals, restaurants, etc.

Houses will generate 10G every 24 hours (70G in a week), and hospitals will generate 10G every hour (1680G every week). The gold can be withdrawn from the bank.

Is it hard to do this with the script? Is it even possible? I really hope someone can help me here! Thanks! 🙂
Not that hard! There's an option in the script customization called TIMER_VARIABLES, if you set up that part like...

TIMER_VARIABLES = [1,3,5]

then the in game variables 1, 3, and 5 will count down by 1 every minute until they hit 0.

So you assign a variable to each building and have an event that checks if the variable is at 0, then when it is, give out the gold and reset the variable to whatever timer amount.
Hi Vlue

I was use your script, it was great but when i use it with Khas Lighting it not work at all

The screen was dark and the light was blink. How can i fix it, please tell me( sorry, i not good at English)
It's just the way KHAS works, you have to play around with the tint values to get the brightness you want.
Hey, thank you much for opening this up to commercial use 🙂

Not sure if I'll use it yet (if I do it will go with a rotating elemental 'wheel' for combat and other things).j

Assuming I use it, I only want time to change on one map (the world map) - everywhere else: towns, houses, dungeons, shops, etc... Time stands still.  Does anybody (Vlue or anyone else who's done this) know where the basic time check is so I don't have to notetag every single map to tell it not to use the clock here?

If not, I'll figure it out eventually and post what I did 😉

Edit: and I could've sworn I asked you this before, but I can't find it anywhere on the forums or in my notes... 🙁
If you have only one map that you want time to be active on then scroll down to lines 309-314, delete lines 310-312, and replace the final line (return true) with return $game_map.map_id == whateveridyourmapis

(Line 309 should be def self.no_time_map, and line 314 should be end, just to help you find the right spot)
Naturally, it can't be anything that simple... 

Clock still shows up and updates on all maps. Tried changing it to a "not" condition, but that didn't do anything either. I dropped the leading zeros so $game_map.map_id==1 is the condition.

I've also got to figure out how to hide the clock on the other maps. Changing the visibility to a conditional up where its first defined doesn't work as there's no game_map object defined yet - I'm a bit puzzled on that one. I've still got <shift> bound to "dash", so I'll have to do some rewriting there as well [ideally the clock will be always visible on map_id 1, and never visible anywhere else].

I'll figure something out. I'm sure it's nothing a bit of moving and shifting and rewriting can't fix 😉   I may go and look through the 'basic' time script first and then translate the changes over to this one if I can't get it up and running fairly quickly.
@Shaz: I'm double posting as it's been a week, and Vlue and everyone following this won't see the update otherwise.

*hangs head in shame*

You'll get a kick out of this, Vlue. I finally got around to looking at the code. It wasn't working because I left the clock update to system time. (I was only testing after all, why set up the custom clock first? :headshake: )

Your code tests for system clock before it checks for the no_time_map, which makes perfect sense since system time is always updating, but meant I wasn't seeing the non-update. I wonder if I was drunk or sleep deprived or both...? yeah, let's go with both...

For anyone else, what Vlue wrote above does work to limit clock updating to one map - clock remains visible normally.

Since I don't want the player staring at a clock that never changes, I added this code:

if ($game_map.map_id == 1) @gametimeclock.visible = true $gametimeclockvisible = @gametimeclock.visible @clockbackground.visible = @gametimeclock.visible if @clockbackgroundelse @gametimeclock.visible = false $gametimeclockvisible = @gametimeclock.visible @clockbackground.visible = @gametimeclock.visible if @clockbackground endRight before the "if Input.trigger?(CLOCK_TOGGLE)" @ line 759.

The only 'hitch' is that if you when you transfer either to or from the world map, the clock doesn't update for a few frames - so it's on very briefly when you enter a town, and takes a quick bit to come up on the world map. To keep the clock from  showing up on the very first map (which I have black for a text prologue), I set the initial value to false @ line 208. I also added a check for the map id to the CLOCK_TOGGLE line above - if you don't, pressing the toggle button causes the clock to 'flash' briefly on any other map.

Anyplace else I tried to change clock visibility either didn't work or else threw an exception trying to run a method on an object that didn't exist. Unless you know a better place offhand, I can live with it. If it really starts to bother me I can always have the transfer events toggle visibility off before transfer via script call.

The menu I'm leaving alone - the clock just stays up all the time there, especially since I don't have the clock set to change in the menu anyway. That also gives the player a place to check the time while they are in town.

Thanks for the help, Vlue 🙂
Hi,Vlue!

  I enjoy using your script, but now I have a problem. Using your advanced game time and  Khas's lighting effects script together, the tints do change with the time goes by, showing different idensity of the sun light. However, I have some dungeons in my game, and I want them always be dark no matter what time it is. There can be some difference between day and night in dungeons, yet I don't want them be as bright as what is on the surface when it is 12:00 A.M. Could you please help me?
Hi Vlue

I was use your script, it was great but when i use it with Khas Lighting it not work at all

The screen was dark and the light was blink. How can i fix it, please tell me( sorry, i not good at English)
If you use Khas Awesome Light Effect and want use Tint Screen, so look at the line 221 and set it's False. 

Sorry my English isn't good, maybe wrong grammar. 
If you use Khas Awesome Light Effect and want use Tint Screen, so look at the line 221 and set it's False. 

Sorry my English isn't good, maybe wrong grammar. 

You mean this one?

#Using KHAS lighting effects script? Turn this on to use that tint

USE_KHAS = true

 

Should I set it false?
You mean this one?

#Using KHAS lighting effects script? Turn this on to use that tint

USE_KHAS = true

 

Should I set it false?
No, I mean Surface_UE and set it false.

80Agp.png

Original thread: https://forums.rpgmakerweb.com/threads/advanced-game-time.3851/