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

Untranslated Met At location #495

Open
issuebotaudinowho bot opened this issue Sep 23, 2024 · 2 comments
Open

Untranslated Met At location #495

issuebotaudinowho bot opened this issue Sep 23, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@issuebotaudinowho
Copy link

Discord: suguivy#0 <@625819986195382292>

Seems that the "Met at" location always uses the language you were playing at the time. I got this Crobat when playing in Spanish and now that I'm playing in English, the "Met at" location keeps being in Spanish
image

@issuebotaudinowho issuebotaudinowho bot added the bug Something isn't working label Sep 23, 2024
@audinowho
Copy link
Owner

The history behind this is the fact that location names are stored directly as strings and could not be stored as the actual location ID because that would require loading the entire zone plus generating the entire floor to figure out what the name is.
However, recently I've been thinking if it's possible for location data to be saved as the string key rather than the full string
together with the parameters
such that it can be looked up each time on reference.
doing this will wipe all existing location name data though.
unless we do some awkward parsing I guess

@audinowho
Copy link
Owner

Points of interest:
BattleEvent.cs ln19628: This is where MetAt gets assigned the current location string on recruit
Map.cs ln42: This is the actual place that the current location's string data is stored. It's a LocalText, which means it contains just a text key and the parameters. If you call ToLocal() on a localtext it will localize to YOUR current language.
So, you must change MetAt to a LocalText and then assign the Name value of the current map to it on recruitment.
You will get some downstream errors, one of which is the character.MetAt assign during the start, where it gets assigned Text.FormatKey("MET_AT_START"). What you will need to do is take every translation of MET_AT_START and create a LocalText that contains all of those strings. And then assign it to the MetAt. The same goes for MENU_TEAM_MET_AT, which is for Met-At data for pokemon that were traded.
You can do this for FaintedAt too.

These are more or less the steps to fixing this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant