• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Script: [v13+] Unreal Time System (like Minecraft)

1,396
Posts
10
Years
  • Age 35
  • Seen today
Is there way to utilize this script to jump ahead by entire months at a time? I'm thinking about utilizing this for my birthsigns script. I tried a few things working off what you've already posted, but I kept on getting errors.
 

FL

Pokémon Island Creator
2,443
Posts
13
Years
  • Seen Apr 16, 2024
Is there way to utilize this script to jump ahead by entire months at a time? I'm thinking about utilizing this for my birthsigns script. I tried a few things working off what you've already posted, but I kept on getting errors.
If you put some variable in NTN_EXTRADAYS, like 97, just sum the day amount into this variable. Example: If you wish more two months, just sum 120 into variable 97.
 
1,396
Posts
10
Years
  • Age 35
  • Seen today
If you put some variable in NTN_EXTRADAYS, like 97, just sum the day amount into this variable. Example: If you wish more two months, just sum 120 into variable 97.
Thanks, ive got it working exactly how I want now. But I was wondering if there was a way to reset the current time through a script. Like lets say I go forward a few months, but then decide I want to change the time again to match the real-world time.
 

FL

Pokémon Island Creator
2,443
Posts
13
Years
  • Seen Apr 16, 2024
Will that work in a script? Im basically just trying to make a "reset time" button.
If you want to do this, use as a runtime variable instead of a constant value, put a "$" before it and use as lowercase (change every NTN_ENABLED into $ntnEnabled).

To reset the timer. use line '$PokemonGlobal.newFrameCount=0'. Remember, also, to clear variables than hold NTN_EXTRASECONDS and NTN_EXTRADAYS.
 
226
Posts
8
Years
  • Age 32
  • Seen Jul 19, 2023
Thank you for this script. It is working fine, however I have two questions regarding what can be done with it.

1) Is it possible to reach directly a defined hour? I believed you answered a similar question some time ago:

Spoiler:


However when I try to use one of those methods I get an error:

Spoiler:


2) Is it possible to pause - and unpause - the system in an event so that time doesn't pass - and freezes?

Thanks!
 
79
Posts
8
Years
  • Age 26
  • Seen Jan 17, 2017
Hey is it somehow possible to use the time system with the clock displayed on KleinsBwKit?
I dont want the real time to be displayed but the time of the game
 

FL

Pokémon Island Creator
2,443
Posts
13
Years
  • Seen Apr 16, 2024
Thank you for this script. It is working fine, however I have two questions regarding what can be done with it.

1) Is it possible to reach directly a defined hour? I believed you answered a similar question some time ago:

Spoiler:


However when I try to use one of those methods I get an error:

Spoiler:


2) Is it possible to pause - and unpause - the system in an event so that time doesn't pass - and freezes?

Thanks!
  1. In the last example, remove the line 'timeDifference += secInDay'. Maybe you have trouble calling it as event command, so copy into a script section the code:

    Code:
    def setNewTime(hour,min=0,sec=0) # Hour is 0..23
      timeNow = pbGetTimeNow
      secInDay = 60*60*24
      secNow = pbGetTimeNow.hour*60*60+pbGetTimeNow.min*60+pbGetTimeNow.sec
      secWished = hour*60*60+min*60+sec
      secondsAdded = secWished-secNow
      secondsAdded +=secInDay if secondsAdded<0
      $game_variables[NTN_EXTRASECONDS]+=secondsAdded
    end

    And call this line at a script command: 'setNewTime(18,0,0)'.
  2. Put a switch number in NTN_SWITCHSTOPS field and turn on this switch while the event is happening.

Hey is it somehow possible to use the time system with the clock displayed on KleinsBwKit?
I dont want the real time to be displayed but the time of the game
Yes, just make sure that this clock uses the time received from pbGetTimeNow method instead of something line Time.now.
 
38
Posts
8
Years
  • Age 32
  • Seen Nov 26, 2023
Its awesome and i want to use that, but, i figured when this script is on, essentials not load load scripts that work only in nighttime(or other times). In grass by example, if you set landday and landnight only landday pokemons r show.
 

FL

Pokémon Island Creator
2,443
Posts
13
Years
  • Seen Apr 16, 2024
Its awesome and i want to use that, but, i figured when this script is on, essentials not load load scripts that work only in nighttime(or other times). In grass by example, if you set landday and landnight only landday pokemons r show.
This doesn't happen. What version are you using?
 
7
Posts
7
Years
  • Age 30
  • Seen Jul 1, 2023
How can i make an event to use the days of the week with this script?

The event should read the day of the week to do what it is intended to...
 
55
Posts
10
Years
  • Seen Oct 8, 2019
Awesome script, it works absolutely fine.

To make it more realistic, I changed the graphics in the outdoor-tileset and made the windows/doors brighter.

To make it work I created an event on every window, with a new page where the default switch 15 "s:PBDayNight.isNight?(pbGetTimeNow)" is on. Additionally the event named "RegularTone"

So if it's night the switch turns on and the window shines bright.

But it only works, when the map refreshes (player changes the map, e.g. goes into a house and outside again).
If it gets dark and he's walking around, the windows stay dark.
And of course the other way round, when daylight comes back the windows are still glowing until the player enters a house and leave it again.

Is there any possibility to let the switch activated autimatically as soon as it gets dark, without going into a house and outside again?


The two top pictures are correct, the two lower ones incorrect.
 

FL

Pokémon Island Creator
2,443
Posts
13
Years
  • Seen Apr 16, 2024
Awesome script, it works absolutely fine.

To make it more realistic, I changed the graphics in the outdoor-tileset and made the windows/doors brighter.

To make it work I created an event on every window, with a new page where the default switch 15 "s:PBDayNight.isNight?(pbGetTimeNow)" is on. Additionally the event named "RegularTone"

So if it's night the switch turns on and the window shines bright.

But it only works, when the map refreshes (player changes the map, e.g. goes into a house and outside again).
If it gets dark and he's walking around, the windows stay dark.
And of course the other way round, when daylight comes back the windows are still glowing until the player enters a house and leave it again.

Is there any possibility to let the switch activated autimatically as soon as it gets dark, without going into a house and outside again?


The two top pictures are correct, the two lower ones incorrect.
After line 'updateold' add:

Code:
        if !@lastHour || @lastHour != pbGetTimeNow.hour
          @lastHour = pbGetTimeNow.hour
          $game_map.need_refresh = true
        end

This ensures one refresh per game hour.
 
55
Posts
10
Years
  • Seen Oct 8, 2019
After line 'updateold' add:

Code:
        if !@lastHour || @lastHour != pbGetTimeNow.hour
          @lastHour = pbGetTimeNow.hour
          $game_map.need_refresh = true
        end
This ensures one refresh per game hour.

Thanks for your reply, where do I find the line 'updateold'?
I was looking in the script section but couldn't find it.
 
3
Posts
7
Years
  • Age 28
  • Seen Jan 14, 2017
Is it possible for the time to pass by even when the game isn't running? oO
 
Back
Top