Skip to content

Disabling Union Room check when entering Pokémon Centers

LOuroboros edited this page Aug 31, 2022 · 12 revisions

Every time the player enters a Pokémon Center, the game checks for players that are currently in the Union Room. If they find someone, the Pokémon Center nurse informs the player about them.

However, this has the side effect of pausing the game mid-transition to do this. As there's currently no support for the GBA Wireless Adapter in emulators, we're gonna ommit this check to avoid having this awkward pause in the middle of the game.

First, go to data/scripts/cable_club.inc and comment out the following line:

CableClub_OnResume:
-	special InitUnionRoom
+	@special InitUnionRoom
	end

After that, go to data/scripts/pkmn_center_nurse.inc and change the following two scripts:

EventScript_PkmnCenterNurse_HealPkmn::
    incrementgamestat GAME_STAT_USED_POKECENTER
    compare VAR_0x8004, 0
    call_if_eq EventScript_PkmnCenterNurse_IllTakeYourPkmn
    compare VAR_0x8004, 1
    call_if_eq EventScript_PkmnCenterNurse_IllTakeYourPkmn2
    waitmessage
    call EventScript_PkmnCenterNurse_TakeAndHealPkmn
    goto_if_unset FLAG_POKERUS_EXPLAINED, EventScript_PkmnCenterNurse_CheckPokerus
-   goto EventScript_PkmnCenterNurse_CheckTrainerHillAndUnionRoom
+   goto EventScript_PkmnCenterNurse_ReturnPkmn
    end
EventScript_PkmnCenterNurse_CheckPokerus::
	specialvar VAR_RESULT, IsPokerusInParty
	goto_if_eq VAR_RESULT, TRUE, EventScript_PkmnCenterNurse_ExplainPokerus
-	goto_if_eq VAR_RESULT, FALSE, EventScript_PkmnCenterNurse_CheckTrainerHillAndUnionRoom
+	goto_if_eq VAR_RESULT, FALSE, EventScript_PkmnCenterNurse_ReturnPkmn
	end

In the latter's case, since we know in this instance that the VAR_RESULT can only hold a value of TRUE or FALSE, we can alternatively do:

EventScript_PkmnCenterNurse_CheckPokerus::
	specialvar VAR_RESULT, IsPokerusInParty
	goto_if_eq VAR_RESULT, TRUE, EventScript_PkmnCenterNurse_ExplainPokerus
-	goto_if_eq VAR_RESULT, FALSE, EventScript_PkmnCenterNurse_CheckTrainerHillAndUnionRoom
+	goto EventScript_PkmnCenterNurse_ReturnPkmn
	end

And that's it!

Clone this wiki locally