Resource icon

Nickname from the party

Pokémon Essentials Version
v18 ✅



Nice and easy to pop in:

In PScreen_Party, find this section:
Ruby:
      commands   = []
      cmdSummary = -1
      cmdDebug   = -1
      cmdMoves   = [-1,-1,-1,-1]
      cmdSwitch  = -1
      cmdMail    = -1
      cmdItem    = -1
Add this line:
Ruby:
      cmdRename  = -1
Renaming actually works just fine without this, except skipping this step results in a crash when hitting Cancel on an egg. If you're getting an error like that, this is probably your fix!

Next, find this section.
Ruby:
      commands[cmdSwitch = commands.length]       = _INTL("Switch") if @party.length>1
      if !pkmn.egg?
        if pkmn.mail
          commands[cmdMail = commands.length]     = _INTL("Mail")
        else
          commands[cmdItem = commands.length]     = _INTL("Item")
        end
      end
You're going to change it to this:
Ruby:
      commands[cmdSwitch = commands.length]       = _INTL("Switch") if @party.length>1
      if !pkmn.egg?
        if pkmn.mail
          commands[cmdMail = commands.length]     = _INTL("Mail")
        else
          commands[cmdItem = commands.length]     = _INTL("Item")
        end
          commands[cmdRename = commands.length]     = _INTL("Rename")
      end
Now, locate this section further down:
Ruby:
              if pbConfirm(_INTL("Would you like to switch the two items?"))
                newpkmn.setItem(item)
                pkmn.setItem(newitem)
                @scene.pbClearSwitching
                pbRefresh
                pbDisplay(_INTL("{1} was given the {2} to hold.",newpkmn.name,itemname))
                pbDisplay(_INTL("{1} was given the {2} to hold.",pkmn.name,newitemname))
                break
              end
            end
          end
        end
After the fourth end, add this:
Ruby:
      elsif cmdRename>=0 && command==cmdRename
        species=PBSpecies.getName(pkmn.species)
        $game_variables[5]=Kernel.pbMessageFreeText("#{species}'s nickname?",_INTL(""),false,15)
            if pbGet(5)==""
              pkmn.name=PBSpecies.getName(pkmn.species)
              pbSet(5,pkmn.name)
            end
        pkmn.name=pbGet(5)
        pbDisplay(_INTL("{1} was renamed to {2}.",species,pkmn.name))
Note that the 15 is the character limit for the name- you may want to adjust that to your tastes, but remember to keep it an amount that would be legible in gameplay.

If you'd like to use the cursor naming instead of the keyboard, use this code instead:
Ruby:
      elsif cmdRename>=0 && command==cmdRename
        species=PBSpecies.getName(pkmn.species)
        pbTextEntry("#{species}'s nickname?",0,15,5)
            if pbGet(5)==""
              pkmn.name=PBSpecies.getName(pkmn.species)
              pbSet(5,pkmn.name)
            end
        pkmn.name=pbGet(5)
        pbDisplay(_INTL("{1} was renamed to {2}.",species,pkmn.name))
I've done this without any restrictions apart from the egg, because I don't think the trend of not naming Shadow/Foreign Pokemon is dumb. But you could easily implement that by changing this:
Ruby:
      commands[cmdSwitch = commands.length]       = _INTL("Switch") if @party.length>1
      if !pkmn.egg?
        if pkmn.mail
          commands[cmdMail = commands.length]     = _INTL("Mail")
        else
          commands[cmdItem = commands.length]     = _INTL("Item")
        end
          commands[cmdRename = commands.length]     = _INTL("Rename")
      end
to this:
Ruby:
      commands[cmdSwitch = commands.length]       = _INTL("Switch") if @party.length>1
      if !pkmn.egg?
        if pkmn.mail
          commands[cmdMail = commands.length]     = _INTL("Mail")
        else
          commands[cmdItem = commands.length]     = _INTL("Item")
        end
          if !pkmn.isForeign?($Trainer) && !pkmn.isShadow?
                commands[cmdRename = commands.length]     = _INTL("Rename")
          end
      end
Credits
Credits to TechSkylander1518, please!
Author
TechSkylander1518
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from TechSkylander1518

Latest updates

  1. v18

    Updated to v18, formatted the code so you can actually read it on my posts lmao, and fixed the...
Top