• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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
    6
    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.
     
    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