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

Different pokedex data for different characters

226
Posts
8
Years
    • Seen Jul 19, 2023
    I could use some help with this, if someone feels in the mood.

    I am trying to alternate two main characters. The players starts with Trainer A and its Pokedex A; at some point, the story makes him play with Trainer B, and he should get a Pokedex B, and then get back to the initial situation (think of it as crossovers).

    First part of the alterning process, I want to give Trainer B a new Pokedex, instead of Pokedex A. This is relatively easy to do:
    Code:
    pbChangePlayer(3)
    pbTrainerName("Hi")
    $Trainer.pokedex=true
    The Pokedex is reset, which is perfect.

    Then when the time to switch has come I attempt to get the Trainer A his Pokedex back:
    Code:
    pbChangePlayer("0")
    pbTrainerName("Hey")
    $Trainer.pokedex=true
    This is where I'm stuck.
    If I simply give him back the Pokedex, it will not appear in the menu. The "pokedexViable.length" condition for that to be true is in fact set to 0. If I set it to 1 by making Trainer A see or own a Pokemon, I notice that all the data from the Pokedex A was lost.

    This seems to be some side effects of "pbTrainerName("Hi")". If I remove this line when calling the event, the Pokedex doesn't change. This is not ideal though, because I need it to reset for Trainer B, and because the name of Trainer A is still displayed in the Trainer Card while playing with Trainer B.

    "$Trainer.pokedex" is only returning true or false, so I can't store the Pokedex data by using it.

    So, I see three ways to solve the problem:
    1. Would it be possible to store your Pokedex in a variable (as you can store a Pokemon or your Bag)? If so, how? I have no idea on how to do that, or what script to call.
    Alternatively, could you display different Pokedex data based on the character played (and having several Pokedex data saved at the same time)?
    2. Would it be possible to change the Name of the Trainer without erasing Pokedex data? This would be imperfect but acceptable.
    3. Using regions. However since I have no regions and no regional dex I prefer to avoid if possible.

    Any tips are welcome!
     
    Last edited:
    Back
    Top