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

overwirte config "acc_loc" after generate new gtoken #6

Closed
paul-sama opened this issue Sep 10, 2022 · 6 comments
Closed

overwirte config "acc_loc" after generate new gtoken #6

paul-sama opened this issue Sep 10, 2022 · 6 comments

Comments

@paul-sama
Copy link

I edit conf.txt "acc_loc": "zh-CN|JP"
after generate new gtoken, it change back to "acc_loc": "en-US|JP"

@frozenpandaman
Copy link
Owner

frozenpandaman commented Sep 10, 2022

That value in config.txt is actually based on your Nintendo Account – so, it seems you have en-US set as the language for your account, since that value is just being pulled directly from Nintendo when you log in. Not really a thing you can "configure", so it's a bit of a misnomer…

In the future, gtoken, bullettoken and acc_loc may all be removed from config.txt since the tokens expire every 2 hours anyway, so it's a bit silly to keep them stored…

Can I ask why you edited/changed it? I don't think changing it should affect anything in the script (again, it's just used to send requests properly when getting battle info, etc.) If you want to access SplatNet 3 in Chinese in your browser, though, just go to https://api.lp1.av5ja.srv.nintendo.net/?lang=zh-CN :)

@paul-sama
Copy link
Author

the battle result info will be different.

"awards": [
        {
          "name": "对战 No.1",
          "rank": "GOLD"
        },
        {
          "name": "助攻数 No.1",
          "rank": "GOLD"
        },
        {
          "name": "真格蛤蜊拦截 No.1",
          "rank": "SILVER"
        }
      ]
"awards": [
        {
          "name": "#1 Overall Splatter",
          "rank": "GOLD"
        },
        {
          "name": "#1 Splat Assister",
          "rank": "GOLD"
        },
        {
          "name": "#1 Clam Stopper",
          "rank": "SILVER"
        }
      ]

@frozenpandaman
Copy link
Owner

I see! Makes sense. Just for information gathering's sake, can you tell me:

  • What your "Country/region of residence" is listed as at https://accounts.nintendo.com/?
  • What your language is set to on your Switch itself, under System Settings > System > Language?
  • What your region is set to on your Switch itself, under System Settings > System > Region?

I don't think this'll matter in the end since the stats will eventually be uploaded to stat.ink the same anyway, e.g. we don't do identification based on stage/weapon/etc. names (which are language-specific), we do it based on ID number, so it works with all game languages.

@paul-sama
Copy link
Author

  • What your "Country/region of residence" is listed as at https://accounts.nintendo.com/?
    Japan
  • What your language is set to on your Switch itself, under System Settings > System > Language?
    简体中文
  • What your region is set to on your Switch itself, under System Settings > System > Region?
    日本

@frozenpandaman
Copy link
Owner

Huh, have no clue why it's returning en-US for you then. It might just do that for everyone. Sorry!

I get wanting to save your results in your local language, but I also don't think this really affects anything re: functionality that the script is "supposed" to have and what it's really built for. Saving JSONs locally was never really "meant" to be a thing (it's even hidden from the --help menu and such) and most users, except those using the script literally right now at launch, will never even use the option… it's just a stopgap & a way to help people not lose data until stat.ink adds support for uploading & displaying Splatoon 3 battles. 😅

If you really want your JSONs to use Chinese text, I think changing this line should do it. Feel free to replace this instance of USER_LANG with "zh-CN" in the headbutt() function, in your downloaded version of s3s.py:

s3s/s3s.py

Line 74 in b3f68ce

'Accept-Language': USER_LANG,

@frozenpandaman
Copy link
Owner

Behavior will be changed going forward, see #52 for more discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants