-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Toggle Trainer Sight
Bryce Wilson edited this page Mar 17, 2023
·
3 revisions
Credit to ghoulslash
Likely more useful for a debug menu feature, this may have utility for game events. Note that this only prevents them from noticing you. Talking directly to the trainer will still initiate the battle.
Open include/constants/flags.h. Replace an unused flag with FLAG_SYS_TOGGLE_TRAINER_BATTLES
. For example:
#define FLAG_UNUSED_0x881 (SYSTEM_FLAGS + 0x21) // Unused Flag
becomes
#define FLAG_SYS_TOGGLE_TRAINER_BATTLES (SYSTEM_FLAGS + 0x21)
Open src/trainer_see.c. Find CheckForTrainersWantingBattle
And replace with the following:
bool8 CheckForTrainersWantingBattle(void)
{
u8 i;
gNoOfApproachingTrainers = 0;
gApproachingTrainerId = 0;
if (FlagGet(FLAG_SYS_TOGGLE_TRAINER_BATTLES))
return FALSE;
for (i = 0; i < OBJECT_EVENTS_COUNT; i++)
//etc...