• 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.

[Question] Set my own Time/Date

  • 67
    Posts
    5
    Years
    • Seen Jan 9, 2024
    I wanted to know if there is a way to set the date and time at the beginning of the game instead of letting it be based off the computer. Time would still be based off of real hours/minutes/days. The reason I want to do this is because I want there to be a mechanic where if the player uses Dialga's Roar of time they can change the time and day to whatever they want. Kind of like when Link uses the ocarina of time.
     

    StCooler

    Mayst thou thy peace discover.
  • 9,320
    Posts
    4
    Years
    • Seen today
    I don't know what version of Essentials you are using, but in v18, I could modify the function:
    Code:
    def pbGetTimeNow
    Actually don't modify it, rewrite it in the Ruby-style:

    Code:
    alias __essentials__pbGetTimeNow pbGetTimeNow # This is a kind of duplicate for the original function
    def pbGetTimeNow # Your rewriting
      time_now = __essentials__pbGetTimeNow # First call the 
      new_time = nil 
      
      # Now write your code to modify new_time as you wish
      
      return new_time ? new_time : time_now # if you did something with new_time, return it, otherwise return the default value.
    end
     
    Back
    Top