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

Support for non-English Pokémon versions #62

Open
Siphonay opened this issue Jun 1, 2022 · 12 comments
Open

Support for non-English Pokémon versions #62

Siphonay opened this issue Jun 1, 2022 · 12 comments
Labels
Feature Request A new feature idea

Comments

@Siphonay
Copy link

Siphonay commented Jun 1, 2022

Hi! I intend to strat streaming IronMon to my Fracophone audience, and as such I would like to be using the French version of the games. It would be even better if the tracker had translated Pokémon, abilities names…

I tried to edit the code to force the script to load with a French LeafGreen ROM, trying 1.0 and 1.1 variables, unfortunately the tracker does not work beyond detecting the Pokémon species and crashes the emulator in battle, so I assume memory addresses are different for every release.

Besides English, Pokémon FR, LG and E have been released in the following languages:

  • Japanese
  • French
  • German
  • Spanish
  • Italian

I looked around at the code and I think (this maybe wrong or incomplete) implementing multi-language support would entail f all required memory addresses for all revisions of every language release (according to TCRF, the Japanese version has V1.0 and V1.1 releases, while the European languages did not receive a revision)

If we also want to go the route of adding names of Pokémon, Abilities, Moves, Items, Natures, Statuses and types in several languages (note that Spanish and Italian use English Pokémon names), they would need to be added to the data files.

I would definitely be willing to contribute to this should you decide that this is within the scope’s project. Depending on the approach for doing the second part, I could try to write automated scripts with PokéAPI to add variables with names in other languages.

If you know how to find the memory addresses, adding them to the GameSettings.lua would be trivial if not a little time-consuming, but unfortunately at the moment I wouldn’t know where to look for to find the right addresses, but this is something I can learn.

Sorry, this is very wordy! As this is something I really want to see added to the tracker, I made sure to research the feasibility, and as I said I would be willing to contribute as much as possible to realize it. I think it would help the IronMon open up to broader audiences outside of the Anglophone streamers and players. I would understand if you would consider this too heavy to support though − in that case I would certainly do my own fork that supports at least French language games.

Thanks for reading!

@bdjeffyp
Copy link
Collaborator

bdjeffyp commented Jun 1, 2022

Multi-language support is definitely something that I'd love to see implemented at some point! I envision having a file that stores all of the Pokémon names and abilities in different languages so that the PokemonData.lua and MoveData.lua files could reference this file to get the correct name for the version of the ROM that is loaded.

The big blocking issue with this right now is the support for extended characters beyond the A-Z/a-z/0-9. The tracker/BizHawk already has problems rendering the é in Pokémon, such as for items like Poké Doll and Poké Flute, that we had to name them Poke Doll and Poke Flute in the code. I haven't had a chance to look at if the extended character issue stems from BizHawk, the tracker's font choice, or something else entirely.

You are correct about the memory values. Each game version across the various releases will have a lot of memory differences. I'm seeing that in implementing Ruby/Sapphire as well. When getting memory values, we use the symbol tables located here:

You can see that the first two don't have any other languages, though Ruby/Sapphire does have German. Ruby/Sapphire itself isn't as fully documented as FRLG and Emerald are. So adding other languages becomes a much larger issue than just adding the appropriate text and determining how to get the tracker to render extended characters. Finding these memory values outside of the symbol tables will be the largest endeavor in all of this.

If you are willing to support this effort, I would be happy to help in any way that I can. I am currently involved in a couple of projects at the moment (getting Ruby/Sapphire fully working, adjusting tracker settings in-game, and Desmume support for Gen 4), but if you need resources, tips, or have questions, I'm more that happy to give any info you need to get you started. Another resource that may potentially have figured out some of the memory addresses already is the RetroAchievements project. If you download their RALibretro emulator to load up a Pokémon ROM, you can see notes that various achievement developers have made on memory addresses. Perhaps they have discovered the memory locations we need already!

I apologize for my wordiness as well. Again, if you have any questions about how to get started, let me know!

@GB127
Copy link
Contributor

GB127 commented Jun 2, 2022

I believe the best would be to not use an api while running this. Some users have noticed some lags after logging a couple of notes. So we want to reduce the CPU power to a minimum while running the game.

@bdjeffyp
Copy link
Collaborator

bdjeffyp commented Jun 2, 2022

Oh yes, we absolutely will not use APIs to fetch data. All data must be stored within our *Data script files.

@Siphonay
Copy link
Author

Siphonay commented Jun 2, 2022

Oh yeah definitely @GB127, sorry I didn't make this clear enough, I wanted to mean that I'd use an API in a separate one-shot script I'd write to add the multilingual data to the files instead of doing it manually, but that wouldn't be shipped with the tracker

@Siphonay
Copy link
Author

Siphonay commented Jun 2, 2022

@bdjeffyp I completely forgot to reply, but I'm very glad to hear that you were already considering this! I hope you manage to find a solution for non-ASCII characters, in the meantime I'll try what you suggested to see if I can find the right memory addresses for several releases. Thank you!

@bdjeffyp bdjeffyp mentioned this issue Jun 4, 2022
@bdjeffyp
Copy link
Collaborator

bdjeffyp commented Jun 4, 2022

I forgot that the RetroAchievements site has each games' code notes available to view on the website rather than only via the emulator. Here is where the notes for FireRed are. It doesn't look like they ever got support for other languages off the ground, but it is still a potential resource.

@bdjeffyp bdjeffyp added the Enhancement A change to an existing feature label Jun 4, 2022
@Siphonay
Copy link
Author

Hi there, it seems RetroAchievements only support US releases if available, so I don’t think I can really get other languages’ addresses working from there. I think I’m just going to have to hunt with an emulator’s memory search feature.

Also, I’m sorry I haven’t looked into this since, I’ve been busy with a few things in my life, but I hope I can get working on this soon!

@bdjeffyp
Copy link
Collaborator

Please, no apologies needed. This is a fan project. Life comes first, so enjoy it! 🥰

@UTDZac
Copy link
Collaborator

UTDZac commented Aug 6, 2022

Just chiming in here, as of today v0.6.0 has support for the following languages of FireRed:

  • French
  • German
  • Spanish
  • Italian

This includes being able to run the game with the Tracker loaded, as well as localization of text on the tracker screen to match the game's language. Huge shoutout to @thisisatest1900 for their great work on getting these added.

As for Japanese, unsure how possible that one is because of the character script used that isn't supported by Bizhawk text drawing (I think).

@thisisatest1900
Copy link
Contributor

a bit more info about the why we can't draw japanese
the current api to drawtext we have from bizhawk passes a lua string and draw that string
lua strings are array of bytes so each char has value of 0-255
c# strings are utf16
so the current way to draw the other languages is by luck the chars that needed to be drawn are in the range of 0-255
so i build lua string to have the utf16 value
japanese chars in utf16 start at value of 0x3041 which is way above 255
i couldnt find a way to bypass that problem
so i see less reason to add japanese becuase i think it wouldn't be useful without the move name localization

@Fellshadow Fellshadow pinned this issue Aug 11, 2022
@UTDZac UTDZac added Feature Request A new feature idea and removed Enhancement A change to an existing feature labels Aug 14, 2022
@besteon besteon unpinned this issue Nov 8, 2022
@besteon besteon pinned this issue Nov 8, 2022
@Mo892DD
Copy link

Mo892DD commented Jan 22, 2023

Multilingualism is indeed a difficult project, and as a native Japanese speaker, I still look forward to the day when it supports Japanese

@UTDZac
Copy link
Collaborator

UTDZac commented Apr 21, 2023

After quite a long delay, Bizhawk 2.9 finally offers support for displaying Japanese characters. I've worked with a few different Tracker devs today to get a stable, compatible Tracker built for playing the Japanese version of Pokemon FireRed (J) 1.0.

It mostly just displays the Pokemon names, the move names, ability names, and item names in Japanese, similar to the language support offered with the other four languages.

image

This will be releasing soon, but if you would let to help test it, it's available on the dev branch through the Tracker's built-in updater.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request A new feature idea
Projects
None yet
Development

No branches or pull requests

6 participants