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

Quickly switch Pokémon storage boxes with L and R buttons

119
Posts
10
Years
    • Seen Sep 1, 2023
    As mentioned before in this post, I've made a small change to the Pokémon storage script a while back to allow switching between boxes with the L and R button (being Q and W on the keyboard respectively). I find this a very nice feature from the original games, and since it wasn't in essentials yet, I decided to code it myself.

    How to implement
    Go to the "PokemonStorage" script and find "def pbSelectBoxInternal(party)" then scroll down to the following code and add the highlighted section:
    Code:
          if Input.trigger?(Input::B)
            @selection=selection
            return nil
          end
          [S-HIGHLIGHT]if Input.trigger?(Input::L)
            #call function to switch box to the left
            nextbox=(@storage.currentBox==0) ? @storage.maxBoxes-1 : @storage.currentBox-1
            pbSwitchBoxToLeft(nextbox)
            @storage.currentBox=nextbox
          end
          if Input.trigger?(Input::R)
            #call function to switch box to the Right
            nextbox=(@[email protected]) ? 0 : @storage.currentBox+1
            pbSwitchBoxToRight(nextbox)
            @storage.currentBox=nextbox
          end[/S-HIGHLIGHT]
        end
      end

    This should do the job. If there are any questions, feel free to ask. Any comments or feedback are welcome.

    Optional Extra
    In the "PokemonStorage" script search for the following line; "def pbSelectPartyInternal(party,depositing)", and do the same as above. This will allow box switching while in the party screen.
     
    Last edited:

    FL

    Pokémon Island Creator
    2,450
    Posts
    13
    Years
    • Seen May 4, 2024
    The pokémon box sprites don't refresh correctly. For fixing this, put your changes before both lines 'if key>=0' and, after lines '@storage.currentBox=nextbox' (the four made with this change) add line 'key=0'.
     
    Back
    Top