v21.1 How do I add Time to my pause menu

This thread pertains to v21.1 of Pokémon Essentials.

doughDoe

Rookie
Member
Joined
Jan 20, 2024
Posts
8
I want to have the time shown in the top left corner or something because I'm using unreal time. How can I add that to the pause menu?
 

wrigty12

Tester-Coder Hybrid
Member
Joined
Jul 24, 2022
Posts
423
I want to have the time shown in the top left corner or something because I'm using unreal time. How can I add that to the pause menu?
Are you using the base essentials pause menu? If so, look for line def pbShowInfo; end (line 95 in UI_PauseMenu) and replace it with the following:
Ruby:
  def pbShowInfo
    @scene.pbShowInfo(_INTL("{1}",pbGetTimeNow.strftime("%I:%M %p")))
  end
1707618630675.png


Note: If you are in the Safari Zone, that window will be replaced by the Balls/Steps counter, so to keep time there, you'll have to make more edits.
In the SafariZone script, find:
Ruby:
  def pbShowInfo
    __safari_pbShowInfo
    return if !pbInSafari?
    if Settings::SAFARI_STEPS <= 0
      @scene.pbShowInfo(_INTL("Balls: {1}", pbSafariState.ballcount))
    else
      @scene.pbShowInfo(_INTL("Steps: {1}/{2}\nBalls: {3}",
                              pbSafariState.steps, Settings::SAFARI_STEPS, pbSafariState.ballcount))
    end
  end

And replace it with:

Ruby:
  def pbShowInfo
    __safari_pbShowInfo
    return if !pbInSafari?
    if Settings::SAFARI_STEPS <= 0
      @scene.pbShowInfo(_INTL("{1}\nBalls: {2}", pbGetTimeNow.strftime("%I:%M %p"),
                              pbSafariState.ballcount))
    else
      @scene.pbShowInfo(_INTL("{1}\nSteps: {2}/{3}\nBalls: {4}", pbGetTimeNow.strftime("%I:%M %p"),
                              pbSafariState.steps, Settings::SAFARI_STEPS, pbSafariState.ballcount))
    end
  end
 
Last edited:
Top