-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Disabling Union Room check when entering Pokémon Centers
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. If one wants to keep this functionality only when the Wireless Adapter is connected, they can remove this hitch in the vast majority of situations by checking if the Wireless Adapter is present first and only checking the Union Room if it is. Otherwise, they could just omit the function call that checks the Union Room entirely to completely disable it. Both methods will be presented here.
Go to data/scripts/cable_club.inc and add this to it:
CableClub_OnResume:
+ specialvar VAR_RESULT, IsWirelessAdapterConnected
+ goto_if_eq VAR_RESULT, FALSE, CableClub_OnResume_DisableUnionRoomNurseText
special InitUnionRoom
end
+
+CableClub_OnResume_DisableUnionRoomNurseText:
+ setflag FLAG_NURSE_UNION_ROOM_REMINDER
+ end
That's it. You're done.
This first checks if the Wireless Adapter is connected. If not, it jumps to a new script that sets a flag preventing the nurse from mentioning Union Room players and ends. This is needed to stop the nurse from attempting to load a player name from an uninitialized Union Room, which will crash the game. If it is connected, only then is the Union Room checked.
This removes the hitch while warping into the Pokémon Center when the Wireless Adapter is not connected, which will fix this for almost all players. Presumably, a player with the Wireless Adapter connected will want Wireless Adapter-related functionality, and this preserves that for that minority of players.
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
call_if_eq VAR_0x8004, 0, EventScript_PkmnCenterNurse_IllTakeYourPkmn
call_if_eq VAR_0x8004, 1, 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
Naturally, the end
is not required in this instance either, since you know that you'll end up jumping to one out of two scripts no matter what, but it's still good practice to include it.
And that's it!