# Time proportion here. # So if it is 100, one second in real time will be 100 seconds in game. # If it is 60, one second in real time will be one minute in game. NTS_TIMEPROPORTION=60
Change the time proportion there if you want the time to be faster.
You don't need my script for doing this. Put the below code above main (untested):Is it possible for the time to pass by even when the game isn't running? oO
def pbGetTimeNow
return Time.now if !$PokemonGlobal || !$PokemonGlobal.startTime
timeProportion = 2
return (Time.now - $PokemonGlobal.startTime)*timeProportion + $PokemonGlobal.startTime
end
Change the code into:Ty! But when I add it i get a Type Error.
def pbGetTimeNow
return Time.now if !$PokemonGlobal || !$PokemonGlobal.startTime
timeProportion = 2
actualInterval = Time.now - $PokemonGlobal.startTime
return Time.at($PokemonGlobal.startTime + actualInterval*timeProportion)
end
if pokemon.timeReceived
month=pbGetAbbrevMonthName(pokemon.timeReceived.mon)
date=pokemon.timeReceived.day
year=pokemon.timeReceived.year
time=pokemon.timeReceived.strftime("%I:%M %p") # CHANGED
memo+=_INTL("<c3=404040,B0B0B0>{1} {2}, {3} at {4}\n",month,date,year,time) # CHANGED
The Time Received used global time by Maruno's decision. To use default time, change line '@timeReceived=time.getgm.to_i # Use GMT' into '@timeReceived=pbGetTimeNow'.Hi there, Unreal Time users,
I'm struggling to figure out an issue in which the Time Received (and Time Hatched, if applicable) on a Pokémon's or Egg's summary screen is 4 hours earlier than the actual time it was received or hatched. I successfully added the "Watch in the Pokégear" feature using the tutorial that's on the Essentials Wiki (also by FL; your scripts are fantastic), so I'm able to compare the time shown in the summary screen to the time shown in the Pokégear, and confirm that the summary screen is the only one that's incorrect.
I first realized the issue because I'd set the game's initial time to be 1:18am, and I noticed that Pokémon and Eggs were showing their Time Received as the previous day. I then made the following changes to PScreen_Summary, on PageOneEgg and on PageTwo:
It successfully added the hour and minute received to the summary screen, in addition to the date and year that were already there, and I was able to confirm that the difference was 4 hours; for example, a Pokémon received at 1:30am would show 9:30pm of the previous day on its summary screen. However, I've got no clue why it's happening, or how to fix it.Code:if pokemon.timeReceived month=pbGetAbbrevMonthName(pokemon.timeReceived.mon) date=pokemon.timeReceived.day year=pokemon.timeReceived.year time=pokemon.timeReceived.strftime("%I:%M %p") # CHANGED memo+=_INTL("<c3=404040,B0B0B0>{1} {2}, {3} at {4}\n",month,date,year,time) # CHANGED
I did also check the summary screen with Unreal Time turned off, and the time and date shown then matched the real time, which was also what displayed in the Pokégear.
Any thoughts? Thank you!
Forget my last post. Change '.utc' in my script to '.local'. I updated the script.Thanks so much, FL! That solved it.
For whatever reason, Time Hatched was still showing as 4 hours previous, even when Time Received was correct. I went into PScreen_EggHatching, and it already said 'pokemon.timeEggHatched=pbGetTimeNow', so I just added '+14400' (4hrs in seconds) to the end of it, which was a bit of a "blunt instrument" style approach, but it worked! Don't know why that would have been the case, but I solved it, so I'm happy.
Just follow the examples about how to get a date string.This script was really awesome the only problem I have now is that I tried to put it in another project and when I go to the pause menu it won't display in the pause menu. Do I have to do something to make the time display in the pause menu?
I want to make it like when the player heals his pokemon, time will advance by three hours.
I saw the first few comments, but since it was mainly for when the player sleeps, I didn't try it out...
It works exactly the same way as when the player sleeps.
In the Unreal Time Script, you have to define the variable "NTN_EXTRASECONDS", that affects the current time.
You can then do this in an event (for example in each nurse event):
Set Variable {Your NTN_EXTRASECONDS Variable} to +10.800 (there are 10.800 seconds in 3 hours);
Note: If you freeze the time using the NTN_SWITCHSTOPS switch, you need to be sure that the switch is OFF before attempting to change the time (otherwise it won't work)
At my script.
def pbGraphicsUpdate
$PokemonGlobal.addNewFrameCount
pbGraphicsUpdateold
end
end
end
end
end
def pbGraphicsUpdate
$PokemonGlobal.addNewFrameCount
pbGraphicsUpdateold
end
if !@lastHour || @lastHour != pbGetTimeNow.hour
@lastHour = pbGetTimeNow.hour
$game_map.need_refresh = true
end
end
end
end
end
No. I meant between 'updateold' and 'end' here:Do you mean here?
Code:def pbGraphicsUpdate $PokemonGlobal.addNewFrameCount pbGraphicsUpdateold end end end end end
If so. It should be like this?
Code:def pbGraphicsUpdate $PokemonGlobal.addNewFrameCount pbGraphicsUpdateold end if !@lastHour || @lastHour != pbGetTimeNow.hour @lastHour = pbGetTimeNow.hour $game_map.need_refresh = true end end end end end
def update
$PokemonGlobal.addNewFrameCount
updateold
end
def update
$PokemonGlobal.addNewFrameCount
updateold
if !@lastHour || @lastHour != pbGetTimeNow.hour
@lastHour = pbGetTimeNow.hour
$game_map.need_refresh = true
end
end
No. I meant between 'updateold' and 'end' here:Code:def update $PokemonGlobal.addNewFrameCount updateold end
So the code should be:
Code:def update $PokemonGlobal.addNewFrameCount updateold if !@lastHour || @lastHour != pbGetTimeNow.hour @lastHour = pbGetTimeNow.hour $game_map.need_refresh = true end end
Yep. The main language of my game is the proof.Thanks for the answer brother xD But I already managed to find it I was missing something on your explanation before, btw quick question: are you brazilian?