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

regional number 0

70
Posts
18
Years
  • Hi there,

    How can i give a pokémon the regional number 0 (e.g Victini)? The number 0 in "RegionalNumbers=" (pokemon.txt file) would effect that the pokemon doesn't appear in the regionaldex.

    regards Pokemon 3000

    @;aruno: Thanks a lot
     
    Last edited:

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    Add 1 to all the regional numbers in that Dex (e.g. Victini is 1, Snivy is 2, etc.), then edit the Pokédex scripts to subtract 1 from the regional number when displaying it in that Regional Dex.

    EDIT: Here's the script changes you need to make.

    First, in Settings, create an array like REGIONALDEXSHIFT=[4]. The 4 is the fifth Regional Dex defined (the first is 0, second is 1, etc.), and you should change that to whichever number it needs to be. You can put multiple numbers into this array to affect multiple Regional Dexes.

    Next, go into PokemonPokedex. In def pbGetDexList, add the parts in red:

    Code:
            [COLOR=Red]shift=[/COLOR][COLOR=Red][COLOR=Red]REGIONALDEXSHIFT.include?[/COLOR](pbGetPokedexRegion)[/COLOR]
            dexlist.push([nationalSpecies,
               PBSpecies.getName(nationalSpecies),height,weight,i[COLOR=Red],shift[/COLOR]])
    In the second def drawItem (starting at around line 171), add the parts in red:

    Code:
          text=_ISPRINTF("{1:03d}{2:s} {3:s}",[COLOR=Red][COLOR=Red]@commands[index][5][/COLOR] ? indexNumber-1 :[/COLOR] indexNumber," ",@commands[index][1])
        else
          text=_ISPRINTF("{1:03d}  ----------",[COLOR=Red]@commands[index][5][/COLOR][COLOR=Red] ? indexNumber-1 : [/COLOR]indexNumber)
    Finally, in def pbChangeToDexEntry, add the part in red:

    Code:
        indexNumber=pbGetRegionalNumber(pbGetPokedexRegion(),species)
        indexNumber=species if indexNumber==0
        [COLOR=Red]indexNumber-=1 if [/COLOR][COLOR=Red][COLOR=Red]REGIONALDEXSHIFT.include?[/COLOR](pbGetPokedexRegion)[/COLOR]
     
    Last edited:
    Back
    Top