Skip to content

Sword & Shield Storage System

Montblanc edited this page May 29, 2026 · 5 revisions

Branch link

swsh_storage_system_demo_1 swsh_storage_system_demo_2 swsh_storage_system_demo_3

This is a demake of the Pokemon storage system (PC) from Pokemon Sword and Shield.

Pull instructions

With a clean working directory, run the following commands:

git remote add montblanc https://github.com/montmoguri/pokeemerald-expansion.git
git pull montblanc swsh_storage_system

Then sort out any merge conflicts and commit the merge.

Notes

  • Supported only for the expansion master branch (not upcoming)
  • Up-to-date to Expansion 1.15.2

Usage notes if using with swsh_party_menu

src/pokemon_storage_system.c

 void PokemonPC_SetReturnToPartyCallback(MainCallback cb)
 {
     sReturnToPartyCallback = cb;
 }
 
+bool8 PokemonPC_HasReturnToPartyCallback(void)
+{
+    return sReturnToPartyCallback != NULL;
+}
+
 void ShowPokemonPCFromParty(void)
 {
+    if (SWSH_STORAGE_SYSTEM)
+    {
+        ShowPokemonPCFromParty_SwSh();
+        return;
+    }
     EnterPokeStorage(OPTION_MOVE_MONS);
 }

include/pokemon_storage_system.h

 void PokemonPC_SetReturnToPartyCallback(MainCallback cb);
+bool8 PokemonPC_HasReturnToPartyCallback(void);

src/swsh_storage_system.c

 static void CB2_ExitPokeStorage(void)
 {
     sPreviousBoxOption = GetCurrentBoxOption();
-    gFieldCallback = FieldTask_ReturnToPcMenu;
+#if SWSH_PARTY_MENU_PC_ACCESS
+    if (PokemonPC_HasReturnToPartyCallback())
+        gFieldCallback = CB2_ReopenPartyMenuFromPC;
+    else
+#endif
+        gFieldCallback = FieldTask_ReturnToPcMenu;
     SetMainCallback2(CB2_ReturnToField);
 }

Credits

  • Zatsu (helped me get alpha blend working in move items/chooseboxmon modes)
  • hedara (for pointing out, in an unrelated context, that the battle interface uses BG y-offsets, which I leveraged for the mon info panel)

Reach out to me on TAH Discord @montblanc09 if you find any bugs. (Sorry I tend to ignore DMs unless I know you)