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

10-Character limit bypass

Leaf Shinigami

Comic-Book Writer in Training
85
Posts
19
Years
  • Hi, I'm currently part of an RMXP fan game project and I was wondering if there is any possible way to bypass the 10 character limit when it comes to naming a Pokemon/Fakemon. Thank you!
     

    thor348

    That's Oak to You
    137
    Posts
    11
    Years
  • here's what i know, hopefully others can expound on it.

    go to the script editor.

    find this code in PokemonUtilities section:
    (this is only for the trainer name length)
    Code:
    def pbTrainerName(name=nil)
      if $PokemonGlobal.playerID<0
        pbChangePlayer(0)
      end
      trainertype=pbGetPlayerTrainerType
      trname=name
      if trname==nil
        [COLOR="Blue"]trname=pbEnterText("Your name?",0,7)[/COLOR]
        gender=pbGetTrainerTypeGender(trainertype) 
        if trname==""
          trname=pbSuggestTrainerName(gender)
        end
      end
      $Trainer=PokeBattle_Trainer.new(trname,trainertype)
      $PokemonBag=PokemonBag.new
      $PokemonTemp.begunNewGame=true
    end

    change the 7 to what you want.

    now find this code in PokemonSummary:
    Code:
    textpos=[
           [_INTL("INFO"),26,16,0,base,shadow],
           [pokename,46,62,0,base,shadow],
           [_INTL("{1}",pokemon.level),46,92,0,Color.new(64,64,64),Color.new(176,176,176)],
           [_INTL("Item"),16,320,0,base,shadow],
           [itemname,16,352,0,Color.new(64,64,64),Color.new(176,176,176)],
           [_ISPRINTF("Dex No."),238,80,0,base,shadow],
         [COLOR="Blue"]  [_ISPRINTF("{1:03d}",pokemon.species),435,80,2,numberbase,numbershadow],[/COLOR]
           [_INTL("Species"),238,112,0,base,shadow],
           [_INTL("{1}",speciesname),435,112,2,Color.new(64,64,64),Color.new(176,176,176)],
           [_INTL("Type"),238,144,0,base,shadow],
           [_INTL("OT"),238,176,0,base,shadow],
           [_INTL("ID No."),238,208,0,base,shadow],
        ]

    you'll have to adjust the blue line according to your new length of characters.

    now find this code in PokeBattle_ActualScene:
    (this is for pokemon now)
    Code:
      def pbNameEntry(helptext)
        [COLOR="blue"]return pbEnterText(helptext,0,10)[/COLOR]
      end

    change the blue line, 10 being the max, to what you want.

    now back to PokemonUtilities, find this:

    Code:
      # Set nickname
      if nickname && nickname!=""
    [COLOR="blue"]    pokemon.name=nickname[0,10][/COLOR]
      end

    change to 10 to whatever you changed it to previously.
    now find this in the same section:
    Code:
    def pbNickname(pokemon)
      speciesname=PBSpecies.getName(pokemon.species)
      if Kernel.pbConfirmMessage(_INTL("Would you like to give a nickname to {1}?",speciesname))
        helptext=_INTL("{1}'s nickname?",speciesname)
    [COLOR="blue"]    newname=pbEnterText(helptext,0,10)[/COLOR]
        pokemon.name=newname if newname!=""
      end
    end

    again change the 10 to what you wanted.

    now go to the Compiler section and find this:
    Code:
    elsif key=="Name"
                       raise _INTL("Species name {1} is greater than [COLOR="blue"]10[/COLOR] characters long (section {2}, PBS/pokemon.txt)",value,currentmap) if value.length>[COLOR="blue"]10[/COLOR]
                       speciesnames[currentmap]=value

    change the blue numbers to what you wanted.

    now back to PokeBattle_ActualScene, find this:

    Code:
    def refresh
        self.bitmap.clear
        return if [email protected]
        self.bitmap.blt(0,0,@databox.bitmap,Rect.new(0,0,@databox.width,@databox.height))
        base=PokeBattle_Scene::BOXTEXTBASECOLOR
        shadow=PokeBattle_Scene::BOXTEXTSHADOWCOLOR
        [email protected]
        if @battler.name.split('').last=="♂" || @battler.name.split('').last=="♀"
          [email protected][0..-2]
        end
        pbSetSystemFont(self.bitmap)
        textpos=[]
        textpos.push([pokename,@spritebaseX+8,6,false,base,shadow])
        genderX=self.bitmap.text_size(pokename).width
        genderX+=@spritebaseX+14
        if @battler.gender==0 # Male
          textpos.push([_INTL("♂"),genderX,6,false,Color.new(48,96,216),shadow])
        elsif @battler.gender==1 # Female
          textpos.push([_INTL("♀"),genderX,6,false,Color.new(248,88,40),shadow])
        end
        pbDrawTextPositions(self.bitmap,textpos)
        pbSetSmallFont(self.bitmap)
        textpos=[]
        [COLOR="blue"]textpos.push([_INTL("Lv{1}",@battler.level),@spritebaseX+202,8,true,base,shadow])[/COLOR]
        hpstring=_ISPRINTF("{1: 2d}/{2: 2d}",self.hp,@battler.totalhp)
        if @showhp
          [COLOR="blue"]textpos.push([hpstring,@spritebaseX+188,48,true,base,shadow])[/COLOR]
        end
        pbDrawTextPositions(self.bitmap,textpos)
        if @battler.pokemon.isShiny?
          shinyX=206
          shinyX=-6 if (@battler.index&1)==0 # If player's Pokémon
          imagepos=[["Graphics/Pictures/shiny.png",@spritebaseX+shinyX,36,0,0,-1,-1]]
          pbDrawImagePositions(self.bitmap,imagepos)
        end
        if @battler.owned && (@battler.index&1)==1
          imagepos=[["Graphics/Pictures/battleBoxOwned.png",@spritebaseX+8,36,0,0,-1,-1]]
          pbDrawImagePositions(self.bitmap,imagepos)
        end
        if @battler.status>0
          self.bitmap.blt(@spritebaseX+24,36,@statuses.bitmap,
             Rect.new(0,(@battler.status-1)*16,44,16))
        end
        hpGaugeSize=PokeBattle_Scene::HPGAUGESIZE
        [email protected]==0 ? 0 : (self.hp*hpGaugeSize/@battler.totalhp)
        hpgauge=1 if hpgauge==0 && self.hp>0
        hpzone=0
        hpzone=1 if self.hp<=(@battler.totalhp/2).floor
        hpzone=2 if self.hp<=(@battler.totalhp/4).floor
        hpcolors=[
           PokeBattle_Scene::HPCOLORSHADOW1,
           PokeBattle_Scene::HPCOLORBASE1,
           PokeBattle_Scene::HPCOLORSHADOW2,
           PokeBattle_Scene::HPCOLORBASE2,
           PokeBattle_Scene::HPCOLORSHADOW3,
           PokeBattle_Scene::HPCOLORBASE3
        ]

    you'll have to edit this accordingly.

    now go to PokemonSummary and find this:
    Code:
      textpos=[
           [_INTL("INFO"),26,16,0,base,shadow],
           [pokename,46,62,0,base,shadow],
           [_INTL("{1}",pokemon.level),46,92,0,Color.new(64,64,64),Color.new(176,176,176)],
           [_INTL("Item"),16,320,0,base,shadow],
           [itemname,16,352,0,Color.new(64,64,64),Color.new(176,176,176)],
           [_ISPRINTF("Dex No."),238,80,0,base,shadow],
           [_ISPRINTF("{1:03d}",pokemon.species),435,80,2,numberbase,numbershadow],
          [COLOR="blue"] [_INTL("Species"),238,112,0,base,shadow],
           [_INTL("{1}",speciesname),435,112,2,Color.new(64,64,64),Color.new(176,176,176)],[/COLOR]
           [_INTL("Type"),238,144,0,base,shadow],
           [_INTL("OT"),238,176,0,base,shadow],
           [_INTL("ID No."),238,208,0,base,shadow],
        ]

    you'll have to edit accordingly.

    now go to PokemonParty and find this:
    Code:
    @spriteXOffset=28
        @spriteYOffset=0
        @pokeballXOffset=10
        @pokeballYOffset=0
        @pokenameX=96
        @pokenameY=16
        @levelX=20
        @levelY=62
        @statusX=80
        @statusY=68
        @genderX=224
        @genderY=16
        @hpX=224
        @hpY=60
        @hpbarX=96
        @hpbarY=50
        @gaugeX=128
        @gaugeY=52
        @itemXOffset=62
        @itemYOffset=48
        @annotX=96
        @annotY=58
        xvalues=[0,256,0,256,0,256]
        yvalues=[0,16,96,112,192,208]

    you'll have to edit accordingly.

    lastly, we have the name rater, here's the script:
    Code:
    pkmn=pbGetPokemon(1)
    species=PBSpecies.getName(pkmn.species)
    pbTextEntry("#{species}'s nickname?",0,[COLOR="Blue"]10[/COLOR],5)

    just change the 10 to what you've been setting it as.

    hope this helped!
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    I didn't read any of what thor said, so I can't comment on it.

    The character limit for various names only exists because, if the names are any longer, they'll no longer fit into the spaces they're supposed to go into (e.g. battle boxes for Pokémon names). If I could have let them be longer, I would have. It's up to you if you want to increase/remove the limit, but then you'll either have to redesign some things to accommodate the longer names or be stuck with too-long names failing to fit into small spaces.
     

    thor348

    That's Oak to You
    137
    Posts
    11
    Years
  • I didn't read any of what thor said, so I can't comment on it.

    The character limit for various names only exists because, if the names are any longer, they'll no longer fit into the spaces they're supposed to go into (e.g. battle boxes for Pokémon names). If I could have let them be longer, I would have. It's up to you if you want to increase/remove the limit, but then you'll either have to redesign some things to accommodate the longer names or be stuck with too-long names failing to fit into small spaces.

    I gave him the locations of where to increase the length, as well as where to change the dimensions of various places so the new length will fit.
     
    Back
    Top