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

PC nickname option

66
Posts
6
Years
    • Seen May 2, 2020
    Okay, so basically i want it so that you have an option when you select a Pokemon when your in the box menu in the PC called nickname where you can just rename your Pokemon's nickname, just like this:
    pD9v49S.png

    So how do I add this?
     
    971
    Posts
    7
    Years
    • Age 21
    • Seen Nov 28, 2022
    In a new script section above Main:

    Code:
    class PokemonStorageScreen
      alias nickname_pbStartScreen pbStartScreen
      def pbStartScreen(command)
        @heldpkmn = nil
    ### MOVE #######################################################################
        if command == 0
          @scene.pbStartBox(self,command)
          loop do
            selected = @scene.pbSelectBox(@storage.party)
            if selected == nil
              if pbHeldPokemon
                pbDisplay(_INTL("You're holding a Pok?mon!"))
                next
              end
              next if pbConfirm(_INTL("Continue Box operations?"))
              break
            elsif selected[0] == -3 # Close box
              if pbHeldPokemon
                pbDisplay(_INTL("You're holding a Pok?mon!"))
                next
              end
              break if pbConfirm(_INTL("Exit from the Box?"))
              next
            elsif selected[0] == -4 # Box name
              pbBoxCommands
            else
              pokemon = @storage[selected[0],selected[1]]
              heldpoke = pbHeldPokemon
              next if !pokemon && !heldpoke
              if @scene.quickswap
                if @heldpkmn
                  (pokemon) ? pbSwap(selected) : pbPlace(selected)
                else
                  pbHold(selected)
                end
              else
                commands = []
                cmdMove     = -1
                cmdSummary  = -1
                cmdWithdraw = -1
                cmdItem     = -1
                cmdMark     = -1
                cmdRelease  = -1
                cmdNickname = -1
                cmdDebug    = -1
                cmdCancel   = -1
                if heldpoke
                  helptext = _INTL("{1} is selected.",heldpoke.name)
                  commands[cmdMove = commands.length]   = (pokemon) ? _INTL("Shift") : _INTL("Place")
                elsif pokemon
                  helptext = _INTL("{1} is selected.",pokemon.name)
                  commands[cmdMove = commands.length]   = _INTL("Move")
                end
                commands[cmdSummary = commands.length]  = _INTL("Summary")
                commands[cmdWithdraw = commands.length] = (selected[0] == -1) ? _INTL("Store") : _INTL("Withdraw")
                commands[cmdItem = commands.length]     = _INTL("Item")
                commands[cmdMark = commands.length]     = _INTL("Mark")
                commands[cmdRelease = commands.length]  = _INTL("Release")
                commands[cmdNickname = commands.length] = _INTL("Nickname")
                commands[cmdDebug = commands.length]    = _INTL("Debug") if $DEBUG
                commands[cmdCancel = commands.length]   = _INTL("Cancel")
                command = pbShowCommands(helptext,commands)
                if cmdMove >= 0 && command == cmdMove   # Move/Shift/Place
                  if @heldpkmn
                    (pokemon) ? pbSwap(selected) : pbPlace(selected)
                  else
                    pbHold(selected)
                  end
                elsif cmdSummary >= 0 && command == cmdSummary   # Summary
                  pbSummary(selected, @heldpkmn)
                elsif cmdWithdraw >= 0 && command == cmdWithdraw   # Withdraw/Store
                  (selected[0] == -1) ? pbStore(selected, @heldpkmn) : pbWithdraw(selected, @heldpkmn)
                elsif cmdItem >= 0 && command == cmdItem   # Item
                  pbItem(selected, @heldpkmn)
                elsif cmdMark >= 0 && command == cmdMark   # Mark
                  pbMark(selected,@heldpkmn)
                elsif cmdRelease >= 0 && command == cmdRelease   # Release
                  pbRelease(selected, @heldpkmn)
                elsif cmdNickname >= 0 && command == cmdNickname
                  p = @heldpkmn || pokemon
                  Kernel.pbMessage(_INTL("Choose a nickname for #{p.name}."))
                  name = pbEnterPokemonName("", 0, PokeBattle_Pokemon::NAMELIMIT,
                      p.name, p)
                  if name != p.name && name.size > 0
                    p.name = name
                    pbHardRefresh
                  end
                elsif cmdDebug >= 0 && command == cmdDebug   # Debug
                  pbPokemonDebug((@heldpkmn) ? @heldpkmn : pokemon, selected, heldpoke)
                end
              end
            end
          end
          @scene.pbCloseBox
        else
          nickname_pbStartScreen(command)
        end
      end
    end
     
    Back
    Top