diff --git a/Enable-trade-with-FRLG-without-beating-the-game.md b/Enable-trade-with-FRLG-without-beating-the-game.md new file mode 100644 index 0000000..e4d1a0c --- /dev/null +++ b/Enable-trade-with-FRLG-without-beating-the-game.md @@ -0,0 +1,59 @@ +Unlike Ruby and Sapphire, Pokémon Emerald requires the player to become the champion in order to trade with Fire Red or Leaf Green. + +You can disable this by following these steps: + +In `src/link.c`, go to `InitLocalLinkPlayer` and comment the following line: + +```diff +static void InitLocalLinkPlayer(void) +{ + gLocalLinkPlayer.trainerId = gSaveBlock2Ptr->playerTrainerId[0] | (gSaveBlock2Ptr->playerTrainerId[1] << 8) | (gSaveBlock2Ptr->playerTrainerId[2] << 16) | (gSaveBlock2Ptr->playerTrainerId[3] << 24); + StringCopy(gLocalLinkPlayer.name, gSaveBlock2Ptr->playerName); + gLocalLinkPlayer.gender = gSaveBlock2Ptr->playerGender; + gLocalLinkPlayer.linkType = gLinkType; + gLocalLinkPlayer.language = gGameLanguage; + gLocalLinkPlayer.version = gGameVersion + 0x4000; + gLocalLinkPlayer.lp_field_2 = 0x8000; + gLocalLinkPlayer.progressFlags = IsNationalPokedexEnabled(); +- if (FlagGet(FLAG_IS_CHAMPION)) ++ //if (FlagGet(FLAG_IS_CHAMPION)) + { + gLocalLinkPlayer.progressFlags |= 0x10; + } +} +``` + +And then, in `src/link_rfu_3.c`, go to `InitHostRFUtgtGname` and change the following line: + +```diff + + +void InitHostRFUtgtGname(struct GFtgtGname *data, u8 activity, bool32 started, s32 child_sprite_genders) +{ + s32 i; + + for (i = 0; i < 2; i++) + { + data->unk_00.playerTrainerId[i] = gSaveBlock2Ptr->playerTrainerId[i]; + } + for (i = 0; i < RFU_CHILD_MAX; i++) + { + data->child_sprite_gender[i] = child_sprite_genders; + child_sprite_genders >>= 8; + } + data->playerGender = gSaveBlock2Ptr->playerGender; + data->activity = activity; + data->started = started; + data->unk_00.language = GAME_LANGUAGE; + data->unk_00.version = GAME_VERSION; + data->unk_00.hasNews = FALSE; + data->unk_00.hasCard = FALSE; + data->unk_00.unknown = FALSE; +- data->unk_00.isChampion = FlagGet(FLAG_IS_CHAMPION); ++ data->unk_00.isChampion = TRUE; + data->unk_00.hasNationalDex = IsNationalPokedexEnabled(); + data->unk_00.gameClear = FlagGet(FLAG_SYS_GAME_CLEAR); +} +``` +And that's it! +~AsparagusEduardo