• The Eevee Expo Game Jam #10 has concluded, congratulations to all participants! Now it's time for the judges to play through the games, and you can play along to vote who deserves the community choice spotlight.
    You can check out the submitted games here!
    Play through the games and provide some feedback to the devs while you're at it!
  • Hi, Guest!
    Some images might be missing as we move away from using embedded images, sorry for the mess!
    From now on, you'll be required to use a third party to host images. You can learn how to add images here, and if your thread is missing images you can request them here.
    Do not use Discord to host any images you post, these links expire quickly!
DPPt Pause Menu

Resource DPPt Pause Menu v1.0

Marin submitted a new resource:

DP Pause Menu - A replica of Generation 4's Pause Menu. Easy and modular.

Generation 4 had a pretty simplistic Pause menu. It resembles Generation 3's, but it has icons. This resource will turn your boring Pause menu into something with a little more spice.

If you have Luka S.J.'s Easy Mouse System installed, this menu will also work with mouse. If not, it won't (duh).


uc




Features:
  • Supports all screensizes
  • Modular and easy to edit
  • Remembers...

Read more about this resource...
 

Marina

Cooltrainer
Member
Joined
Mar 10, 2018
Posts
125
My game is having some strange behaviours like opening the Debug Menu by itself:
bLusGhH.png

Here, see this post if you want to know what Changes I've made to my Scripts: Pokemon_Evolution and PItem_Bag.

Here is your DP Pause Menu:

Ruby:
Expand Collapse Copy
#==============================================================================#
#                         Diamond/Pearl Pause Menu                             #
#                                  by Marin                                    #
#==============================================================================#
#                                Instructions                                  #
#                                                                              #
#  To call the Pause menu individually (not by pressing B), use _pbPauseMenu_  #
#                                                                              #
# To make/add your own options, find _@options = []_. Underneath, all options  #
#        are initialized and added. They follow a very simple format:          #
#           [displayname, unselected, selected, code, (condition)]             #
# _displayname_ : This is what's actually displayed on screen.                 #
# _unselected_ : This is the icon that will be displayed when the option is    #
#                NOT selected. For it to be gender dependent, make it an array #
# _selected_ : This is the icon that will be displayed when the option IS      #
#              selected. For it to be gender dependent, make it an array.      #
# _code_ : This is what's executed when you click the button.                  #
# _condition_ : If you only want the option to be visible at certain times,    #
#               this is where you can add a condition (e.g. $Trainer.pokedex). #
#==============================================================================#
#                    Please give credit when using this.                       #
#==============================================================================#

# Calls the Pause menu
def pbPauseMenu
  DP_PauseMenu.new
end

# This overwrites the old pause menu. Take/comment out these 10 lines to keep
# the old Pause menu.
class Scene_Map
  def call_menu
    $game_temp.menu_calling = false
    $game_temp.in_menu = true
    $game_player.straighten
    $game_map.update
    pbPauseMenu # Calls the DP Pause Menu
    $game_temp.in_menu = false
  end
end

# Variables used to store last selected index.
class PokemonGlobalMetadata
  attr_accessor :last_menu_index
end

class DP_PauseMenu
  # Base color of the displayed text
  BaseColor = Color.new(82,82,90)
  # Shadow color of the displayed text
  ShadowColor = Color.new(165,165,173)
 
  def initialize
      unless (pbMarinUtility rescue false)
      raise "You need to have Marin's Scripting Utilities active!"
    end
    @options = []
    @options << ["Pokédex", "pokedexA", "pokedexB", proc {
      if DEXDEPENDSONLOCATION
        pbFadeOutIn(99999) do
          scene = PokemonPokedex_Scene.new
          screen = PokemonPokedexScreen.new(scene)
          screen.pbStartScreen
          end
      else
        if $PokemonGlobal.pokedexViable.length == 1
          $PokemonGlobal.pokedexDex = $PokemonGlobal.pokedexViable[0]
          $PokemonGlobal.pokedexDex = -1 if $PokemonGlobal.pokedexDex == $PokemonGlobal.pokedexUnlocked.length-1
          pbFadeOutIn(99999) do
            scene = PokemonPokedex_Scene.new
            screen = PokemonPokedexScreen.new(scene)
            screen.pbStartScreen
           end
        else
          pbFadeOutIn(99999) do
          scene = PokemonPokedexMenu_Scene.new
          screen = PokemonPokedexMenuScreen.new(scene)
          screen.pbStartScreen
          end
        end
      end
    }] if $Trainer.pokedex
    @options << ["Pokémon", "pokemonA", "pokemonB", proc {
      hiddenmove = nil
      pbFadeOutIn(99999) do
        sscene = PokemonParty_Scene.new
        sscreen = PokemonPartyScreen.new(sscene,$Trainer.party)
        hiddenmove = sscreen.pbPokemonScreen
        if hiddenmove
          @sprites.visible = false
          @done = true
        end
      end
      if hiddenmove
        $game_temp.in_menu = false
        Kernel.pbUseHiddenMove(hiddenmove[0],hiddenmove[1])
      end
    }] if $Trainer.party.size > 0
    @options << ["Beutel", "bagA", ["bagBm", "bagBf"], proc {
    item = 0
      pbFadeOutIn(99999) do
        scene = PokemonBag_Scene.new
        screen = PokemonBagScreen.new(scene,$PokemonBag)
        item = screen.pbStartScreen
        if item > 0
          @done = true
          @sprites.visible = false
        end
      end
      Kernel.pbUseKeyItemInField(item) if item > 0
    }]
    @options << [$Trainer.name, "trainercardA", "trainercardB", proc {
      pbFadeOutIn(99999) do
        scene = PokemonTrainerCard_Scene.new
        screen = PokemonTrainerCardScreen.new(scene)
        screen.pbStartScreen
      end
    }]
    @options << ["Speichern", "saveA", ["saveBm","saveBf"], proc {
    @sprites.visible = false
      scene = PokemonSave_Scene.new
      screen = PokemonSaveScreen.new(scene)
      if screen.pbSaveScreen
        @done = true
      else
        @sprites.visible = true
      end
    }]
    @options << ["Optionen", "optionsA", "optionsB", proc {
      pbFadeOutIn(99999) do
        scene = PokemonOption_Scene.new
        screen = PokemonOptionScreen.new(scene)
        screen.pbStartScreen
        pbUpdateSceneMap
      end
    }]
    @options << ["Beenden", "exitA", "exitB", proc {
      @done = true
    }]
    
    @count = @options.size
    return if @count == 0
    $PokemonGlobal.last_menu_index ||= 0
    @option = $PokemonGlobal.last_menu_index
    @option = 0 if @option >= @options.size
    @done = false
    @i = 0
    @scaling = 0
    @viewport = Viewport.new(Graphics.width - 204, 4, 200, 24 + 48 * @count)
    @viewport.z = 99999
    @sprites = SpriteHash.new
    @sprites["bgTop"] = Sprite.new(@viewport)
    @sprites["bgTop"].bmp("Graphics/Pictures/DP Pause Menu/bgTop")
    @sprites["bgMid"] = Sprite.new(@viewport)
    @sprites["bgMid"].bmp("Graphics/Pictures/DP Pause Menu/bgMid")
    @sprites["bgMid"].y = 12
    @sprites["bgMid"].zoom_y = 48 * @count
    @sprites["bgBtm"] = Sprite.new(@viewport)
    @sprites["bgBtm"].bmp("Graphics/Pictures/DP Pause Menu/bgBtm")
    @sprites["bgBtm"].y = 12 + @sprites["bgMid"].zoom_y
    @sprites["sel"] = Sprite.new(@viewport)
    @sprites["sel"].bmp("Graphics/Pictures/DP Pause Menu/selector")
    @sprites["sel"].xyz = 8, 10 + 48 * @option, 1
    @sprites["txt"] = TextSprite.new(@viewport)
    for i in 0...@options.size
      @sprites["txt"].draw([
          @options[i][0],68,20 + 48 * i,0,BaseColor,ShadowColor
      ])
      @sprites[@options[i][0]] = Sprite.new(@viewport)
      idx = (i == @option ? 2 : 1)
      path = @options[i][idx]
      path = path[$Trainer.gender] if path.is_a?(Array)
      @sprites[@options[i][0]].bmp("Graphics/Pictures/DP Pause Menu/#{path}")
      @sprites[@options[i][0]].center_origins
      @sprites[@options[i][0]].xyz = 39, 36 + 48 * i
    end
    main
  end
 
  def main
    loop do
      update
      old = @option
      if Input.repeat?(Input::DOWN)
        @option += 1
        @option = 0 if @option == @count
        changed = true
      end
      if Input.repeat?(Input::UP)
        @option -= 1
        @option = @count - 1 if @option == -1
        changed = true
      end
      if $mouse
        for i in 0...@count
          if i != @option && $mouse.inArea?(316,14 + 48 * i,184,52)
            @option = i
            changed = true
          end
        end
      end
      confirmed = ($mouse && $mouse.x >= 316 && $mouse.x <= 500 && $mouse.y >= 14 &&
         $mouse.y <= 14 + 48 * @count && $mouse.click?)
      confirmed = true if Input.trigger?(Input::C)
      if changed
        $PokemonGlobal.last_menu_index = @option
        path = @options[old][1]
        path = path[$Trainer.gender] if path.is_a?(Array)
        @sprites[@options[old][0]].bmp("Graphics/Pictures/DP Pause Menu/#{path}")
        @sprites[@options[old][0]].angle = 0
        @sprites[@options[old][0]].zoom_x = 1
        @sprites[@options[old][0]].zoom_y = 1
        @sprites["sel"].y = 10 + 48 * @option
        path = @options[@option][2]
        path = path[$Trainer.gender] if path.is_a?(Array)
        @sprites[@options[@option][0]].bmp("Graphics/Pictures/DP Pause Menu/#{path}")
        changed = false
        @scaling = 0
      end
      if confirmed
        @options[@option][3].call
        Input.update
      end
      confirmed = false
      break if Input.trigger?(Input::B) || @done
    end
    dispose
  end
 
  def update
    Graphics.update
    Input.update
    pbUpdateSceneMap
    if @scaling
      @scaling += 1
      case @scaling
      when 1..4
        @sprites[@options[@option][0]].zoom_x += 0.05
        @sprites[@options[@option][0]].zoom_y += 0.05
      when 8..12
        @sprites[@options[@option][0]].zoom_x -= 0.05
        @sprites[@options[@option][0]].zoom_y -= 0.05
      end
      @scaling = nil if @scaling == 12
    else
      @i += 1
      case @i
      when 1..6
        @sprites[@options[@option][0]].angle -= 2
      when 7..18
        @sprites[@options[@option][0]].angle += 2
      when 19..24
        @sprites[@options[@option][0]].angle -= 2
      end
      @i = 0 if @i == 24
    end
  end
 
  def dispose
    @sprites.dispose
    @viewport.dispose
    Input.update
  end
end

If M3rein has no time, I hope somebody else has the time to see if something's missing, thanks
 

rhaidor

Novice
Member
Joined
Aug 7, 2020
Posts
25
Hello!
I have a little problem. With this script, if i open the Pokedex it shows just the Regional Pokedex select screen with all of them locked ( it doesnt care if they are locked or unlocked by scriptcall ) and doesnt let me open the National Pokedex even if its unlocked. If i remove this script, the Pokedex menu goes right to the National Pokedex as its intended.
If i give the player the Pokedex + lock/unlock the Dexes as i want, save the game, quit, install the script , then load my game, the Pokedex also works.
 

SkyArmyRecru1t

Pokémon Master
Member
Joined
Aug 25, 2017
Posts
167
Wanted to report that the Pokédex part of the script doesn't work since it's using an outdated setting (DEXDEPENDSONLOCATION), which is an easy fix with replacing that with USE_CURRENT_REGION_DEX, which I guess is what it was replaced with. So not too big a problem just thought you should know
 

B +

Rookie
Member
Joined
Feb 23, 2021
Posts
1
Hey Marin,

It is likely because I am using 18.1, but I get an error when trying to view the Pokedex. I hope the code helps!
 

Attachments

  • error.png
    error.png
    10.7 KB · Views: 212

Mark93

Novice
Member
Joined
Jan 13, 2021
Posts
41
It's amazing but how can I resize the menu as the image show by Marin, because it comes out a little from the screen below.
Thanks for this.
 
Back
Top