• 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?".
  • Staff applications for our PokéCommunity Daily and Social Media team are now open! Interested in joining staff? Then click here for more info!
  • 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.

[Essentials Tutorial] Implementing Regional Storages

averyindahouse

Creator of Pokemon Sigma (Coming Soon)
  • 41
    Posts
    9
    Years
    Creating Regional Storage
    A tutorial by averyindahouse
    Credit highly appreciated but not required​

    Good day to you all! I am sure you have seen me asking around about how to use Regional Storages. Well, to those of you who wanted to know yourselves, I have cracked the code with help from a bunch of amazing people.

    Special Thanks go out to:
    thesuzerain
    mej71
    Me, of course!

    Anyway, let's get to it!

    NOTE: There are codes in the Pokemon Essentials scripts for Regional storage. However, they are presumed to be incomplete and nobody knows how to use them. For the record, we will NOT be using those codes.

    This tutorial will cover two things:

    1. How to create a second storage, and how to switch between them.
    2. How to create a second party, and how to switch between them.

    1. Creating the new storage
    I used NPC's for simplicity's sake, however you can use whatever events you like.
    Steps:
    Step 1. Create two events with two pages with the following code on the appropriate pages. It should look like this:
    NPC 1:
    Page 1:
    Spoiler:

    Page 2:
    Note: This page is dependent on Self Switch 'A' being ON.
    Spoiler:


    NPC 2:
    Page 1:
    Spoiler:

    Page 2:
    Note: This page is dependent on Self Switch 'A' being ON
    Spoiler:


    Step 2. Talk to NPC 1 first. This will store your current storage in the variable 'xxx' that you specified. It will then create a new storage.
    Then, talk to NPC 2 next. This will assign the new storage to variable 'yyy' and swap back to your other storage under variable 'xxx'.
    After you have assigned the storages to variables, you can now swap between these storages using the following code:
    Spoiler:

    NOTE: You must maintain an order when swapping storages. For example, if you are using region 'xxx' storage and then swap to region 'yyy' storage, YOU MUST swap to region xxx storage if you decide to swap again. If you were to, say, be currently in region yyy, and then try to swap to region yyy, you're going to have a bad time, as this will possibly duplicate your storages.

    And that's it for Storages. Now, onto parties

    2. Creating a new Party
    NOTE: This step is completely optional for creating a new storage. However, when starting over in a new region, it makes sense to leave your old Pokemon behind and start anew, right...? No? You like cheesing the first Gym Leader with your Lv. 100 Mega Charizard Y? Ehh, whatever, we're gonna do it anyway.

    This is VERY similar to what we just did, except we will be replacing $PokemonStorage with $Trainer.party for the most part . Here we go!

    Steps:
    Step 1. Create two events with two pages with the following code on the appropriate pages. It should look like this:
    NPC 3:
    Page 1:
    Spoiler:

    Page 2:
    Note: This page is dependent on Self Switch 'A' being ON.
    Spoiler:


    NPC 4:
    Page 1:
    Spoiler:

    Page 2:
    Note: This page is dependent on Self Switch 'A' being ON
    Spoiler:


    Step 2: Talk to NPC 3 first. This will store your current party under a variable 'aaa' and create a new party. Then, talk to NPC 4, this will store your new party under a variable 'bbb'.
    After you have assigned the parties to variables, you can now swap between these parties using the following code:
    Spoiler:

    NOTE: You must maintain an order when swapping parties. For example, if you are using region 'aaa' party and then swap to region 'bbb' party, YOU MUST swap to region 'aaa' party if you decide to swap again. If you were to, say, be currently in region 'aaa', and then try to swap to region 'aaa', you're going to have a bad time, as this will possibly duplicate your parties, and we don't want that now do we?

    I hope this tutorial helps anybody like me who was looking for how to make multiple storages for games with more than one region. Credit is greatly appreciated but not required
     
    Last edited:
    I still get confused with this is the game_var [xx] the name of it can I put a name in instead of a number?
     
    so if i want to switch to region 2 i would need to change to region one first?

    Edit: I tired this out but the game keeps crashing after i try to switch back to region one im using 100 as region one for yyy and 200 for region 2 xxx. Any idea how to fix this?
     
    Last edited:
    so if i want to switch to region 2 i would need to change to region one first?

    Edit: I tired this out but the game keeps crashing after i try to switch back to region one im using 100 as region one for yyy and 200 for region 2 xxx. Any idea how to fix this?

    There aren't 200 game variables. You need to add more if you need that many. As far as I can remember the default is 100.
     
    Hey thanks for this tutorial.

    I have also the problem that my game crashes when I want to switch back. It says:

    Message: (eval): 2:in 'pbExecuteScript' undefined local variable or method
    'game variables' for#<Interpreter:0x9b32028>

    Any idea? It would be wonderful if this script would work!!

    I'm Dutch btw, languages weren't my best part at school :P

    BTW: I only used the script to create a new party, I didn't make a new storage yet

    I see already what went wrong!!!!

    At the first page of NPC4 you forget to place the "$" sign, before "game_variables" in the code bar.
     
    Last edited by a moderator:
    Hey thanks for this tutorial.

    I have also the problem that my game crashes when I want to switch back. It says:

    Message: (eval): 2:in 'pbExecuteScript' undefined local variable or method
    'game variables' for#<Interpreter:0x9b32028>

    Any idea? It would be wonderful if this script would work!!

    I'm Dutch btw, languages weren't my best part at school :P

    BTW: I only used the script to create a new party, I didn't make a new storage yet

    I see already what went wrong!!!!

    At the first page of NPC4 you forget to place the "$" sign, before "game_variables" in the code bar.

    Yeah I overlooked that. I'll fix it.
     
    Back
    Top