Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEAT: Add Pokémon Trading/Colosseum support #1007

Merged
merged 15 commits into from
Jul 18, 2023
Merged

Conversation

XK9274
Copy link
Member

@XK9274 XK9274 commented Jul 15, 2023

WIKI

Overview

This is a Hotspot/GLO function and does not currently support trading globally - it will work with friends nearby over the hotspot connection - I will work on Global another time

The first connection after a reboot may fail. (Looking into this)

Includes a recent compile of hostapd_cli and a change to hostapd.conf to add a ctrl_interface for hostapd to hook.

Adds Pokémon Trading/Battling over link for:

  • Red <-> Blue <-> Yellow
  • Gold <-> Silver <-> Crystal

I've tested this on:

  • Red -> Blue
  • Blue -> Yellow
  • Red -> Yellow
  • Crystal -> Crystal

There may be a delay for the host when leaving RetroArch - unsure of the cause and also present in Easy Netplay

For the host:

You must use GLO and press Y on the game you want to host (EG loading Pokémon Red will load the Pokémon Red save)

For the client

You must use GLO and press Y on the game you want

Notes

It does NOT matter which core is set to default in GLO - this process hardcodes TGB Dual for the trade. However! When you load into RA to play on your own you must take the saved location into consideration. They will be in the TGB Dual folder.
This means when you start the game through normal means and your core isn't set to TGB Dual you will not load these saves unless you move them (or just load TGB Dual).

You MUST have saves that match the identical name of the Rom

If your rom is called: Pokémon - Red Version (USA, Europe) (SGB Enhanced).zip
Your save must be called: Pokémon - Red Version (USA, Europe) (SGB Enhanced).srm

The save files must be located in:
/mnt/SDCARD/Saves/CurrentProfile/saves/TGB Dual

You MUST exit the trade room in Pokémon by going to Menu -> Reset (On Gold/silver/crystal just leave the room)
You MUST then save the game by going to Menu -> Save when you load back in
You MUST Exit RetroArch gracefully after (Menu -> Quit)
You MUST NOT interrupt the process after RetroArch exits.

You may have changed the settings in TGB Dual so you have 2 screens showing or you may not, the script should handle this so only 1 is showing (yours)

Logging available by touching .tmp_update/config/.logging and will be generated in ./tmp_update/logs

Test process

Preparation

  • Perform fresh install (OR manually copy the files from the PR) - A format generally isn't required
  • If you don't format/fresh install, make sure your retroarch.cfg is the default one installed by Onion (I haven't tested on other configs*)
  • Enable & connect WIFI
  • Add the save files/roms to the relevant locations
  • Open your /mnt/SDCARD/Saves/CurrentProfile/config/TGB Dual/TGB Dual.opt file and take note of the contents (The script makes changes but reverts them afterwards)
  • EITHER Connect with wifi already enabled or Disable WIFI (script will bring it up)

You'll currently have 20 seconds after starting the host to start the client. We can discuss this timeout.

Session Setup

  • On the host: Head to the rom you wish to play, for example: Go to Games, GBC, Pokémon Crystal and press Y to open GLO (Also in Recents/favs etc)
  • On the host: Select "Pokémon Trade/Battle: Host Hotspot" - It will now wait for a client
  • On the client: Head to the rom you wish to play, for example: Go to Games, GBC, Pokémon Crystal and press Y to open GLO
  • On the host: Select "Pokémon Trade/Battle: Join Hotspot"
  • Wait for the process to complete
  • Select Join on the splash screens - You MUST join on the host first for the Netplay session to go live

The trade

  • Go to the Pokémon center and head to the trade link person
  • Go through the dialogue until she allows you into the room
  • Trade your Pokémon
  • If on Red/Blue/Yellow Go to menu Reset and load back in
  • If on Gold/Silver/Crystal Go out of the door
  • Press start to open the menu
  • Save your game on both devices
  • Important: Retroarch must exit gracefully without the script dying with it. - Press Menu + Select and then B, then Exit.
  • Important: Do not interrupt this process, you should see the host/client talk to each other and sync the changes
  • Go back to GLO on the game you selected and set the default core to TGB Dual
  • Start the game in single player mode (Just click it from recents/fav etc) and it should load your save.
  • Observe in both games you have now traded Pokemon.

Cleanup

  • Observe WIFI on both clients reassociates with the original network (if any)
  • Observe you have a backup of your original save before the trade took place in the /mnt/SDCARD/Saves/CurrentProfile/saves/TGB Dual folder
  • Make sure your /mnt/SDCARD/Saves/CurrentProfile/config/TGB Dual/TGB Dual.opt file contents have reverted (Stayed the same as they were at the start)

Retry the process after a fresh restart with WIFI enabled in the preparation stage (Rather than disabling it)

All files generated by the script are intended to be cleaned apart from save backups, check save folders/rom folders for duplicates.

@XK9274 XK9274 self-assigned this Jul 16, 2023
@Aemiii91 Aemiii91 changed the title FEAT: Add Pokemon Red/Blue/Yellow - Silver/Gold/Crystal Trading/Colesseum support FEAT: Add Pokémon Red/Blue/Yellow - Silver/Gold/Crystal Trading/Colosseum support Jul 17, 2023
@Aemiii91 Aemiii91 changed the title FEAT: Add Pokémon Red/Blue/Yellow - Silver/Gold/Crystal Trading/Colosseum support FEAT: Add Pokémon Trading/Colosseum support Jul 17, 2023
@Aemiii91 Aemiii91 added this pull request to the merge queue Jul 18, 2023
@Aemiii91 Aemiii91 added this to the v4.2 milestone Jul 18, 2023
Merged via the queue into main with commit a75d37a Jul 18, 2023
2 checks passed
@Aemiii91 Aemiii91 deleted the add_pokemon_trading branch July 18, 2023 01:14
@Aemiii91 Aemiii91 added the enhancement New or improved feature label Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New or improved feature
Projects
Status: 💣 Test
Development

Successfully merging this pull request may close these issues.

2 participants