• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Cyndy, May, Hero (Conquest), or Wes - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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.

[Scripting Question] How to Call Pokedex

  • 8
    Posts
    8
    Years
    • Seen Jun 25, 2018
    Hello! I have been working on an easy Event based in Rotomdex, but im having some troubles for calling Pokedex tallking with Rotomdex! i really cant access...
    i want to add some more features like Storage pokemon (not full Pc) but i cant too.

    Someone can help me? which code i must use or something.

    Thanks!
     
    Last edited by a moderator:
    For the dex you can have a look at how the menu calls it. And for the storage you can look at the pc events or look at the pc scripts to find the code for storage specifically
     
    I did it! post this is not my 1st option, i cant see just a script to call Pokedex in one line or something like that.

    This is the part of Pause menu which contain pokedex.

    if cmdPokedex>=0 && command==cmdPokedex
    if DEXDEPENDSONLOCATION
    pbFadeOutIn(99999) {
    scene=PokemonPokedexScene.new
    screen=PokemonPokedex.new(scene)
    screen.pbStartScreen
    @scene.pbRefresh
    }
    else
    if $PokemonGlobal.pokedexViable.length==1
    $PokemonGlobal.pokedexDex=$PokemonGlobal.pokedexViable[0]
    $PokemonGlobal.pokedexDex=-1 if $PokemonGlobal.pokedexDex==$PokemonGlobal.pokedexUnlocked.length-1
    pbFadeOutIn(99999) {
    scene=PokemonPokedexScene.new
    screen=PokemonPokedex.new(scene)
    screen.pbStartScreen
    @scene.pbRefresh
    }
    else
    pbLoadRpgxpScene(Scene_PokedexMenu.new)
    end
    end


    How to use n event calling script?
     
    In your event add a script ebtry (2nd page i believe)
    And add paate that in

    Code:
    pbFadeOutIn(99999){
    scene=PokemonPokedexScene.new
    screen=PokemonPokedex.new(scene)
    screen.pbStartScreen @scene.pbRefresh
    }
     
    It doesnt work, i got an error:


    ---------------------------
    Pokemon Essentials
    ---------------------------
    Exception: RuntimeError

    Message: Script error within event 6, map 46 (Rotomdex):

    Exception: NoMethodError

    Message: (eval):4:in `pbExecuteScript'undefined method `pbRefresh' for nil:NilClass

    ***Full script:

    pbFadeOutIn(99999){
    scene=PokemonPokedexScene.new
    screen=PokemonPokedex.new(scene)
    screen.pbStartScreen @scene.pbRefresh
    }


    Interpreter:243:in `pbExecuteScript'

    (eval):1:in `pbFadeOutIn'

    (eval):1:in `pbExecuteScript'

    Interpreter:1606:in `eval'

    Interpreter:243:in `pbExecuteScript'

    Interpreter:1606:in `command_355'

    Interpreter:494:in `execute_command'

    Interpreter:193:in `update'

    Interpreter:106:in `loop'

    Interpreter:198:in `update'



    Interpreter:276:in `pbExecuteScript'

    Interpreter:1606:in `command_355'

    Interpreter:494:in `execute_command'

    Interpreter:193:in `update'

    Interpreter:106:in `loop'

    Interpreter:198:in `update'

    Scene_Map:103:in `follow_update'

    Scene_Map:101:in `loop'

    Scene_Map:114:in `follow_update'

    Pokemon Following:1544:in `update'



    This exception was logged in

    C:\Users\Victor\Saved Games/Pokemon Essentials/errorlog.txt.

    Press Ctrl+C to copy this message to the clipboard.
    ---------------------------
    Aceptar
    ---------------------------
     
    Sorry, change it so it looks like this

    Code:
    pbFadeOutIn(99999){
    scene=PokemonPokedexScene.new
    screen=PokemonPokedex.new(scene)
    screen.pbStartScreen
    }
     
    Back
    Top