mm201 / pkmn-classic-framework

Pokémon application logic for Generation IV and V, including servers
http://pkmnclassic.net/
Other
219 stars 43 forks source link

Display of countries/regions in GTS results #79

Open mm201 opened 3 years ago

mm201 commented 3 years ago

In the GTS structure and elsewhere, country and region IDs are used. Region is scoped to the particular country. I need a machine readable source for this data in Gen4 and Gen5 in all supported languages.

InternalLoss commented 3 years ago

The country codes will absolutely be the same as Wii (as they are for 3DS/WiiU with some additions iirc) - 049 is US, 110 is UK, 001 is Japan. RC24 has info on the country->region IDs here as they were used for Forecast too (I can't confirm all match up but I don't see why they wouldnt ngl).

I'm incorrect here.

mm201 commented 3 years ago

If only it were that easy. Canada/Ontario is 36/9 in the Pokémon format, not 18/2 as in your data.

Gannio commented 3 years ago

The following text file should contain a list of all Geonet Country ID's (Specifically for B2W2, but from research I've done there doesn't seem to be any changes from Gen IV's? EDIT: I was wrong, Gen IV's are different. I'll get ID's for them tomorrow).

EDIT 2: Removed the names of countries due to the above issue. I pulled the names from this source for the country names initially since they were also in alphabetical order, but it seems their updates didn't account for Gen 5 despite otherwise updating the title.

GeoNetCountryRelationsRawV.txt

I obtained this by using the search function, which for Platinum onwards contains location details, and analyzing my DS's response for each country going down alphabetically. I'll re-look over the names tomorrow and add them alongside the Gen IV data.

The formatting is rather erratic it seems, with there being multiple blank entries between many countries, which have been cut from the numbering system above to make things easier to read. There are also a few countries out of alphabetical order, mainly Spain and Togo.

As for regions, with the responses my DS gives to depositing Pokemon, it seems as though they at least start in alphabetical order. Whether they stay that way for the whole region though is unknown, and it's impossible to do my method for countries with states due to the location filter only allowing you to specify country.

Gannio commented 3 years ago

Alright, went over the name of each country manually this time, for both Gen 4 and 5:

GeoNet Country ID's Gen IV.txt GeoNet Country ID's Gen IV (With Missingno).txt GeoNet Country ID's Gen V.txt GeoNet Country ID's Gen V (With Missingno).txt

A few of the changes between generations seem to involve renaming some areas to be more to the country than to the ruling authority (E.g. Republic of Korea->South Korea, Libyan Arab Jamhiriya to just Libya), though this isn't always the case (Russian Federation is the same, rather than just being Russia). Bizarrely, Hong Kong seems to have been removed from the list entirely.

mm201 commented 3 years ago

Thanks so much! I'll get on this.

Mythra commented 1 year ago

Here's a bunch of CSV files of the province IDs from Gen 4 (platinum to be specific).

NOTE: these region names were all translated from Japanese with Google Translate to be quick, and the original source had some typo's as well. You'll have to do some manual correction to get it in a correct name in some cases and their format can be quite weird from row to row. I've left it as is so you can choose what works best for you: plat-regions-translated.zip.

I've also got a backup link HERE just incase.