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

Game language back to original after I ran Deceive. #190

Open
vovantin7411 opened this issue Sep 20, 2023 · 12 comments
Open

Game language back to original after I ran Deceive. #190

vovantin7411 opened this issue Sep 20, 2023 · 12 comments

Comments

@vovantin7411
Copy link

This hasn't happened before, it works fine until idk today? I changed my game language via LeagueClient > Properties > Shortcut > Target. Can still play in others language without Deceive.

@9999Problems
Copy link

Same happened to me, posted today at discord also. 😅

@Pipole26
Copy link

I believe this is happening every time you close RiotClientServices.exe, using Deceive or not. Riot did something.

So for example, you need to always use the shortcut with the locale change (e.g "C:\Riot Games\League of Legends\LeagueClient.exe" --locale=en_US) at least one time until you close the Riot services again (like restarting PC).

Deceive always closes Riot services before opening, so it's impossible to use right now.

Hopefully there's a fix or something, appreciate the work.

@MedievalSp
Copy link

Same here. I used the method of changing LeagueClientSettings.yaml and it worked flawlessly until yesterday. The only way I could think is if Deceive adds the locale argument while opening leagueclient.exe.

@molenzwiebel
Copy link
Owner

Deceive doesn't do anything to locale, so I suspect that this is some weird Riot Client-related issue.

You can pass the locale argument using Deceive instead: --riot-client-params="--locale en_US" or --game-params="--locale en_US" should work. Please try that and let me know if you see any success.

@MedievalSp
Copy link

Unfortunately, the Parameter option seems disabled now. It does not works for me calling LegueClient.exe with a parameter NOR using Deceive.exe parameters.

The only method that works for me is modifying the LeagueClientSettings.yaml locale.

   globals:
        locale: "en_US"
        region: "LA1"
...
        locales:
        - "en_US"

Then I must launch LeagueClient.exe without any parameters (Just doubleclick the exe) and the stupid game comes in English.

This setting persists across restarts, but as soon as I use Deceive, it reverts to Spanish 🤔

Can Deceive be instructed to launch LeagueClient.exe directly without any parameters at all to emulate the above?

Thanks!

@Pipole26
Copy link

Pipole26 commented Sep 21, 2023

Deceive doesn't do anything to locale, so I suspect that this is some weird Riot Client-related issue.

You can pass the locale argument using Deceive instead: --riot-client-params="--locale en_US" or --game-params="--locale en_US" should work. Please try that and let me know if you see any success.

Yes Riot changed something that resets the language settings every time Riot services are closed now (so you need to use the shortcut method again) and Deceive closes the Riot services before opening.

You mean like "C:\Riot Games\League of Legends\Deceive.exe" --riot-client-params="--locale en_US"?

It didn't work for both of them. The client opens, but in its native language.

@MedievalSp
Copy link

MedievalSp commented Sep 22, 2023

I found a workaround to make deceiver work and keep the language settings... It turns out that what forces the languages overrides in LeagueClientSettings.yaml is the dumb RiotClient.exe launching the LeagueClient.exe

So the idea is simple: let Deceive launch and hook to RiotClient.exe WITHOUT the game parameter, then the code launches a LeagueClient.exe instance. Not very stylish, but this works fine on my end.

From Line 135 in StartupHandler.cs:

        // Step 4: Launch Riot Client (+game)
        var startArgs = new ProcessStartInfo { FileName = riotClientPath, Arguments = $"--client-config-url=\"http://127.0.0.1:{proxyServer.ConfigPort}\"" };

        // *** Modification Starts *** //
        // This argument causes RiotClient to autostart LOL causing custom languages settings to get blown up.
        //if (launchProduct is not null)
        //    startArgs.Arguments += $" --launch-product={launchProduct} --launch-patchline={gamePatchline}";

        //Pass any custom params used in deceive.exe --riot-client-params=""
        if (riotClientParams is not null)
            startArgs.Arguments += $" {riotClientParams}";

        // Pass any custom params used in deceive.exe --game-params=""
        if (gameParams is not null)
            startArgs.Arguments += $" -- {gameParams}";

        Trace.WriteLine($"About to launch Riot Client with parameters:\n{startArgs.Arguments}");
        var riotClient = Process.Start(startArgs);

        // Get LeagueClient.exe path
        var LeagueClientPath = riotClientPath.Replace("Riot Client/RiotClientServices.exe", "League of Legends/LeagueClient.exe");

        // Nasty, but the only way I could get this to work was to wait for the actual Riot Client to complete bootstrapping
        await Task.Delay(2000);

        // Launch LeagueClient manually without any params. This method preserves the language settings in LeagueClientSettings.yaml
        Process.Start(LeagueClientPath);
        
        // *** Modification Ends *** //

        // Kill Deceive when Riot Client has exited, so no ghost Deceive exists.
        if (riotClient is not null)
        {
            ListenToRiotClientExit(riotClient);

        }

Proof of concept: this is LAN server with English language.

image

@Pipole26
Copy link

Pipole26 commented Sep 22, 2023

Can you make it available for download, please? I don't know how to compile.

@MedievalSp
Copy link

MedievalSp commented Sep 23, 2023

@Pipole26 https://drive.google.com/uc?id=1An6ICPxGdCFop-CFkDPbFe90ZoHyYpQD

Here is my fork https://github.com/MedievalSp/Deceive

Disclaimer: This is not officially supported by the owner of the project. Any patch of Deceive will overwrite this file.

Cheers,

@Pipole26
Copy link

@MedievalSp thanks a lot

@9999Problems
Copy link

@MedievalSp Thank you! 🤗

@aizuon
Copy link

aizuon commented Nov 16, 2023

@Pipole26 https://drive.google.com/uc?id=1An6ICPxGdCFop-CFkDPbFe90ZoHyYpQD

Here is my fork https://github.com/MedievalSp/Deceive

Disclaimer: This is not officially supported by the owner of the project. Any patch of Deceive will overwrite this file.

Cheers,

could you merge the latest version's commit to your fork?

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

6 participants