kinnay / NintendoClients

Python package to communicate with Switch, Wii U and 3DS servers
MIT License
558 stars 68 forks source link

Animal Crossing: New Horizons - online islands via dodo code? #21

Closed theogravity closed 4 years ago

theogravity commented 4 years ago

I noticed that in the wiki, ACNH uses the match making protocol. I was wondering if one of the methods in the MMP would provide island data for a given dodo code.

kinnay commented 4 years ago

Hi,

I'm pretty sure ACNH uses BrowseMatchmakeSessionNoHolderNoResultRange to find an island. The dodo code is in the m_Codeword field of the search criteria structure.

I'd guess that most of the island data is sent to your Switch through the P2P connection, but I also saw some interesting strings in the m_ApplicationBuffer field of the matchmake session that is returned by the server, such as the name of the island.

You're not the first person that wants know how ACNH discovers islands btw, maybe I'll write an example script.

kinnay commented 4 years ago

Here: https://github.com/Kinnay/NintendoClients/blob/master/example_animalcrossing.py

theogravity commented 4 years ago

Thank you!

theogravity commented 4 years ago

Verified that your script works. Thanks a bunch.