mirror of
https://github.com/SuspiciousActivity/ValorantLanguageChanger.git
synced 2026-08-13 18:16:37 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
118671e09f | ||
|
|
23ba78c38a | ||
|
|
6cfdffb413 | ||
|
|
0c8df311f8 | ||
|
|
4d5977476c | ||
|
|
77e3fb614e | ||
|
|
175c6c9c65 |
No files matched your search
@@ -5,18 +5,15 @@ Want to hear those uwu-voices from japan but don't understand anything that is w
|
||||
|
||||
## Usage
|
||||
1. Change your ingame language to whatever you want the *voice* language to be.
|
||||
2. Download this repository (from the release tab) and put the contents into a folder.
|
||||
3. Right-click the vallc.ps1 file and "Run with PowerShell". A folder should open now. (If it doesn't, please go to `%localappdata%` and create a folder called `ValorantLangChanger`.)
|
||||
4. Put the vallc.ps1 file and the ManifestDownloader.exe into that folder.
|
||||
5. Open vallc.ps1 in your favorite text editor. Change the top 4 values accordingly and save it.
|
||||
6. Copy your Valorant shortcut, then right-click the copy and select Properties.
|
||||
7. In the target field, there should be something like this: `"D:\Riot Games\Riot Client\RiotClientServices.exe" --launch-product=valorant --launch-patchline=live`.
|
||||
8. Infront of that, put `powershell.exe -ExecutionPolicy Bypass -File "%localappdata%\ValorantLangChanger\vallc.ps1" `. Notice the space at the end.
|
||||
9. The full target should now look like this: `powershell.exe -ExecutionPolicy Bypass -File "%localappdata%\ValorantLangChanger\vallc.ps1" "D:\Riot Games\Riot Client\RiotClientServices.exe" --launch-product=valorant --launch-patchline=live`. Press Ok.
|
||||
10. You can now use this shortcut to launch Valorant with different languages.
|
||||
2. Download the latest vallc.ps1 file from [here](https://github.com/SuspiciousActivity/ValorantLanguageChanger/releases).
|
||||
3. Right click and choose "Run with PowerShell". (If the setup doesn't show up, try using the start.bat)
|
||||
4. Follow the setup and have fun!
|
||||
|
||||
## Is this a virus??
|
||||
No. If your antivirus has a problem with the exe file, it comes from [here](https://github.com/Morilli/ManifestDownloader). You can download the latest release there if you want. You can view the source of the ps1 script as well.
|
||||
No. This file downloads an additional exe file from [here (github.com)](https://github.com/Morilli/ManifestDownloader) which might be flagged as a virus.
|
||||
It is used to download the latest language files from the official Riot Games servers.
|
||||
You can have a look at the script's code and the exe's code as well.
|
||||
If your antivirus has a problem, you could try to exclude the folder `%localappdata%/ValorantLangChanger/` from your antivirus.
|
||||
|
||||
## Thanks to
|
||||
https://github.com/Morilli/ManifestDownloader this downloads the latest language files!
|
||||
|
||||
@@ -31,9 +31,11 @@ if (!(Test-Path $savePath)) {
|
||||
|
||||
try {
|
||||
Write-Host 'Fetching VALORANT config from Riot Games...' -ForegroundColor Green
|
||||
$patchConfigs = (ConvertFrom-Json (Invoke-WebRequest -Uri 'https://clientconfig.rpg.riotgames.com/api/v1/config/public?namespace=keystone.products.valorant.patchlines').Content).'keystone.products.valorant.patchlines.live'.platforms.win.configurations
|
||||
$patchConfigs = (ConvertFrom-Json (Invoke-WebRequest -UseBasicParsing -Uri 'https://clientconfig.rpg.riotgames.com/api/v1/config/public?namespace=keystone.products.valorant.patchlines').Content).'keystone.products.valorant.patchlines.live'.platforms.win.configurations
|
||||
} catch {
|
||||
Write-Host 'Error contacting Riot Games servers' -ForegroundColor Red
|
||||
Write-Host $_
|
||||
Read-Host
|
||||
Exit
|
||||
}
|
||||
|
||||
@@ -50,105 +52,135 @@ if (Test-Path $configPath) {
|
||||
}
|
||||
}
|
||||
|
||||
$modified = 0
|
||||
$tried = 0
|
||||
while (!$valid.regions.Contains($config.region)) {
|
||||
$modified = 1
|
||||
if ($tried -eq 1) {
|
||||
Write-Host 'That is not a valid region!' -ForegroundColor Red
|
||||
$outer = @{}
|
||||
|
||||
function Ensure-Config {
|
||||
$outer.modified = 0
|
||||
$tried = 0
|
||||
while (!$valid.regions.Contains($config.region)) {
|
||||
$outer.modified = 1
|
||||
if ($tried -eq 1) {
|
||||
Write-Host 'That is not a valid region!' -ForegroundColor Red
|
||||
}
|
||||
Write-Host 'Please enter your general region:' -ForegroundColor Yellow
|
||||
Write-Host (-join('(', [string]::Join(', ', $valid.regions), ')')) -ForegroundColor DarkGray
|
||||
$config.region = Read-Host
|
||||
$tried = 1
|
||||
}
|
||||
Write-Host 'Please enter your general region:' -ForegroundColor Yellow
|
||||
Write-Host (-join('(', [string]::Join(', ', $valid.regions), ')')) -ForegroundColor DarkGray
|
||||
$config.region = Read-Host
|
||||
$tried = 1
|
||||
}
|
||||
|
||||
$regionConfig = $patchConfigs | Where-Object 'id' -eq $config.region
|
||||
$valid.langs = $regionConfig | ForEach-Object {$_.locale_data.available_locales}
|
||||
$outer.regionConfig = $patchConfigs | Where-Object 'id' -eq $config.region
|
||||
$valid.langs = $outer.regionConfig | ForEach-Object {$_.locale_data.available_locales}
|
||||
|
||||
$tried = 0
|
||||
while (!$valid.langs.Contains($config.voiceLang)) {
|
||||
$modified = 1
|
||||
if ($tried -eq 1) {
|
||||
Write-Host 'That is not a valid language!' -ForegroundColor Red
|
||||
$tried = 0
|
||||
while (!$valid.langs.Contains($config.voiceLang)) {
|
||||
$outer.modified = 1
|
||||
if ($tried -eq 1) {
|
||||
Write-Host 'That is not a valid language!' -ForegroundColor Red
|
||||
}
|
||||
Write-Host 'Please enter your voice language:' -ForegroundColor Yellow
|
||||
Write-Host (-join('(', [string]::Join(', ', $valid.langs), ')')) -ForegroundColor DarkGray
|
||||
$config.voiceLang = Read-Host
|
||||
$tried = 1
|
||||
}
|
||||
Write-Host 'Please enter your voice language:' -ForegroundColor Yellow
|
||||
Write-Host (-join('(', [string]::Join(', ', $valid.langs), ')')) -ForegroundColor DarkGray
|
||||
$config.voiceLang = Read-Host
|
||||
$tried = 1
|
||||
}
|
||||
|
||||
$tried = 0
|
||||
while (!$valid.langs.Contains($config.textLang)) {
|
||||
$modified = 1
|
||||
if ($tried -eq 1) {
|
||||
Write-Host 'That is not a valid language!' -ForegroundColor Red
|
||||
$tried = 0
|
||||
while (!$valid.langs.Contains($config.textLang)) {
|
||||
$outer.modified = 1
|
||||
if ($tried -eq 1) {
|
||||
Write-Host 'That is not a valid language!' -ForegroundColor Red
|
||||
}
|
||||
Write-Host 'Please enter your text language:' -ForegroundColor Yellow
|
||||
Write-Host (-join('(', [string]::Join(', ', $valid.langs), ')')) -ForegroundColor DarkGray
|
||||
$config.textLang = Read-Host
|
||||
$tried = 1
|
||||
}
|
||||
Write-Host 'Please enter your text language:' -ForegroundColor Yellow
|
||||
Write-Host (-join('(', [string]::Join(', ', $valid.langs), ')')) -ForegroundColor DarkGray
|
||||
$config.textLang = Read-Host
|
||||
$tried = 1
|
||||
}
|
||||
|
||||
$tried = 0
|
||||
:out while (($null -eq $config.pakPath) -or (!$config.pakPath.EndsWith($savePakPath)) -or !(Test-Path $config.pakPath)) {
|
||||
$modified = 1
|
||||
if ($tried -eq 1) {
|
||||
Write-Host 'That is not the correct folder!' -ForegroundColor Red
|
||||
} else {
|
||||
Write-Host 'Trying to find VALORANT...' -ForegroundColor Green
|
||||
$tried = 0
|
||||
:out while (($null -eq $config.pakPath) -or (!$config.pakPath.EndsWith($savePakPath)) -or !(Test-Path $config.pakPath)) {
|
||||
$outer.modified = 1
|
||||
if ($tried -eq 1) {
|
||||
Write-Host 'That is not the correct folder!' -ForegroundColor Red
|
||||
} else {
|
||||
Write-Host 'Trying to find VALORANT...' -ForegroundColor Green
|
||||
|
||||
$drives = Get-PSDrive -PSProvider FileSystem | ForEach-Object {$_.Root}
|
||||
foreach ($drive in $drives) {
|
||||
$jsonPath = -join($drive, 'ProgramData\Riot Games\RiotClientInstalls.json')
|
||||
if (!(Test-Path $jsonPath)) {
|
||||
continue
|
||||
}
|
||||
$drives = Get-PSDrive -PSProvider FileSystem | ForEach-Object {$_.Root}
|
||||
foreach ($drive in $drives) {
|
||||
$jsonPath = -join($drive, 'ProgramData\Riot Games\RiotClientInstalls.json')
|
||||
if (!(Test-Path $jsonPath)) {
|
||||
continue
|
||||
}
|
||||
|
||||
$installs = Get-Content ($jsonPath) | ConvertFrom-Json
|
||||
$installPaths = $installs.associated_client.PSObject.Properties.Name
|
||||
foreach ($path in $installPaths) {
|
||||
$path = $path.Replace('\', '/')
|
||||
if ($path.EndsWith('VALORANT/live/')) {
|
||||
$config.pakPath = -join($path, $savePakPath)
|
||||
if (Test-Path $config.pakPath) {
|
||||
Write-Host 'Found it!' -ForegroundColor Green
|
||||
break out
|
||||
$installs = Get-Content ($jsonPath) | ConvertFrom-Json
|
||||
$installPaths = $installs.associated_client.PSObject.Properties.Name
|
||||
foreach ($path in $installPaths) {
|
||||
$path = $path.Replace('\', '/')
|
||||
if ($path.EndsWith('VALORANT/live/')) {
|
||||
$config.pakPath = -join($path, $savePakPath)
|
||||
if (Test-Path $config.pakPath) {
|
||||
Write-Host 'Found it!' -ForegroundColor Green
|
||||
break out
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (($null -eq $config.pakPath) -or !(Test-Path $config.pakPath)) {
|
||||
Write-Host 'Sorry, can''t find VALORANT.' -ForegroundColor Red
|
||||
}
|
||||
}
|
||||
if (!$FileBrowser) {
|
||||
Add-Type -AssemblyName System.Windows.Forms
|
||||
$FileBrowser = New-Object System.Windows.Forms.FolderBrowserDialog
|
||||
}
|
||||
|
||||
if (($null -eq $config.pakPath) -or !(Test-Path $config.pakPath)) {
|
||||
Write-Host 'Sorry, can''t find VALORANT.' -ForegroundColor Red
|
||||
Write-Host 'A window to select a folder will now open.' -ForegroundColor Yellow
|
||||
Write-Host 'Please go to your VALORANT installation folder.' -ForegroundColor Yellow
|
||||
Write-Host (-join('In that folder, please find "', $savePakPath, '" and press Open.')) -ForegroundColor Yellow
|
||||
|
||||
$status = $FileBrowser.ShowDialog()
|
||||
if ($status -eq 'OK') {
|
||||
$config.pakPath = $FileBrowser.SelectedPath.Replace('\', '/')
|
||||
if (!$config.pakPath.EndsWith('/')) {
|
||||
$config.pakPath = -join($config.pakPath, '/')
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!$FileBrowser) {
|
||||
Add-Type -AssemblyName System.Windows.Forms
|
||||
$FileBrowser = New-Object System.Windows.Forms.FolderBrowserDialog
|
||||
$tried = 1
|
||||
}
|
||||
|
||||
Write-Host 'A window to select a folder will now open.' -ForegroundColor Yellow
|
||||
Write-Host 'Please go to your VALORANT installation folder.' -ForegroundColor Yellow
|
||||
Write-Host (-join('In that folder, please find "', $savePakPath, '" and press Open.')) -ForegroundColor Yellow
|
||||
|
||||
$status = $FileBrowser.ShowDialog()
|
||||
if ($status -eq 'OK') {
|
||||
$config.pakPath = $FileBrowser.SelectedPath.Replace('\', '/')
|
||||
if (!$config.pakPath.EndsWith('/')) {
|
||||
$config.pakPath = -join($config.pakPath, '/')
|
||||
}
|
||||
# save the config
|
||||
if ($outer.modified -eq 1) {
|
||||
$config.GetEnumerator() | Select Key, Value | Export-Csv (-join($savePath, 'config.csv'))
|
||||
}
|
||||
$tried = 1
|
||||
}
|
||||
|
||||
# save the config
|
||||
if ($modified -eq 1) {
|
||||
$config.GetEnumerator() | Select Key, Value | Export-Csv (-join($savePath, 'config.csv'))
|
||||
}
|
||||
Ensure-Config
|
||||
|
||||
# continue setup
|
||||
if ($args.count -eq 0) {
|
||||
if ($outer.modified -eq 0) {
|
||||
$tried = 0
|
||||
while ($true) {
|
||||
if ($tried -eq 1) {
|
||||
Write-Host 'That is not a valid choice!' -ForegroundColor Red
|
||||
}
|
||||
Write-Host 'What do you want to do? (Please type the number of your choice)' -ForegroundColor Yellow
|
||||
Write-Host '1. Create a shortcut' -ForegroundColor Yellow
|
||||
Write-Host '2. Run setup from the start (change region, language, ...)' -ForegroundColor Yellow
|
||||
$choice = Read-Host
|
||||
if ($choice -eq "1") {
|
||||
break
|
||||
} elseif ($choice -eq "2") {
|
||||
$config = @{}
|
||||
Ensure-Config
|
||||
Write-Host 'Saved new config!' -ForegroundColor Green
|
||||
Write-Host 'Press enter to exit.' -ForegroundColor DarkGray
|
||||
Read-Host
|
||||
Exit
|
||||
}
|
||||
$tried = 1
|
||||
}
|
||||
}
|
||||
|
||||
$shell = New-Object -COM WScript.Shell
|
||||
|
||||
$tried = 0
|
||||
@@ -157,6 +189,7 @@ if ($args.count -eq 0) {
|
||||
Write-Host 'That is not a valid path to a shortcut!' -ForegroundColor Red
|
||||
}
|
||||
Write-Host 'Please drag your VALORANT shortcut into this window and press enter.' -ForegroundColor Yellow
|
||||
Write-Host '(The file which you double-click to start Valorant usually.)' -ForegroundColor DarkGray
|
||||
Write-Host '(The path to the shortcut should appear.)' -ForegroundColor DarkGray
|
||||
$shortcutPath = (Read-Host).Replace('"', '')
|
||||
$tried = 1
|
||||
@@ -173,10 +206,11 @@ if ($args.count -eq 0) {
|
||||
Write-Host 'Setting up all the files...' -ForegroundColor Green
|
||||
$psPath = $MyInvocation.MyCommand.Path
|
||||
Copy-Item $psPath (-join($savePath, 'vallc.ps1'))
|
||||
Invoke-WebRequest -Uri $manifestDownloaderUrl -OutFile (-join($savePath, $manifestDownloaderFile))
|
||||
Invoke-WebRequest -UseBasicParsing -Uri $manifestDownloaderUrl -OutFile (-join($savePath, $manifestDownloaderFile))
|
||||
|
||||
Write-Host 'Done! You can now close this window and start VALORANT from the new icon on your desktop!' -ForegroundColor Green
|
||||
Write-Host 'You can also delete this file now.' -ForegroundColor Green
|
||||
Write-Host 'You could delete this file now.' -ForegroundColor Green
|
||||
Write-Host 'If you want to change anything (like your language), just (download and) run this script again.' -ForegroundColor Green
|
||||
Read-Host
|
||||
Exit
|
||||
}
|
||||
@@ -193,25 +227,45 @@ if ($checkBefore) {
|
||||
Write-Host 'Checking for new language files...' -ForegroundColor DarkGray
|
||||
try {
|
||||
$lastPatchUrl = ''
|
||||
|
||||
# check if both lang files exist, if not download
|
||||
if (!(Test-Path (-join($savePath, $savePakPath, $config.textLang, '_Text-WindowsClient.pak'))) -or !(Test-Path (-join($savePath, $savePakPath, $config.voiceLang, '_Text-WindowsClient.pak')))) {
|
||||
Remove-Item (-join($savePath, 'url.txt'))
|
||||
}
|
||||
|
||||
if (Test-Path (-join($savePath, 'url.txt'))) {
|
||||
$lastPatchUrl = Get-Content -Path (-join($savePath, 'url.txt'))
|
||||
}
|
||||
|
||||
$patchUrl = $regionConfig.patch_url
|
||||
$patchUrl = $outer.regionConfig.patch_url
|
||||
|
||||
if ($patchUrl -ne $lastPatchUrl) {
|
||||
Write-Host 'Downloading new language files...' -ForegroundColor Green
|
||||
$patchUrl | Out-File -FilePath (-join($savePath, 'url.txt'))
|
||||
Start-Process -Wait -NoNewWindow -FilePath (-join($savePath, $manifestDownloaderFile)) -ArgumentList ($patchUrl,'-b','https://valorant.secure.dyn.riotcdn.net/channels/public/bundles','-l',$config.textLang,$config.voiceLang,'-o',$savePath,'-f','.+Text-WindowsClient.+')
|
||||
Write-Host 'Downloaded new language files!' -ForegroundColor Green
|
||||
$downloaderProcess = Start-Process -PassThru -Wait -NoNewWindow -FilePath (-join($savePath, $manifestDownloaderFile)) -ArgumentList ($patchUrl,'-b','https://valorant.secure.dyn.riotcdn.net/channels/public/bundles','-l',$config.textLang,$config.voiceLang,'-o',$savePath,'-f','.+Text-WindowsClient.+')
|
||||
if ($downloaderProcess.ExitCode -eq 0) {
|
||||
$patchUrl | Out-File -FilePath (-join($savePath, 'url.txt'))
|
||||
Write-Host 'Downloaded new language files!' -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host 'Error trying to download new language files!' -ForegroundColor Red
|
||||
Read-Host
|
||||
Exit
|
||||
}
|
||||
} else {
|
||||
Write-Host 'Up to date!' -ForegroundColor Green
|
||||
}
|
||||
} catch {
|
||||
Write-Error 'Can not check for new language files' -ForegroundColor Red
|
||||
Write-Host 'Can not check for new language files' -ForegroundColor Red
|
||||
Write-Host $_
|
||||
Read-Host
|
||||
Exit
|
||||
}
|
||||
|
||||
if (!(Test-Path (-join($config.pakPath, $config.voiceLang, '_Text-WindowsClient.pak')))) {
|
||||
Write-Host (-join('Please change your language *ingame* to ', $config.voiceLang, '!')) -ForegroundColor Red
|
||||
Write-Host 'Press enter to continue, after you changed your language, please restart Valorant.' -ForegroundColor Red
|
||||
Read-Host
|
||||
}
|
||||
|
||||
Write-Host 'Starting Valorant...' -ForegroundColor Green
|
||||
|
||||
# copy 'voice' text lang files to valorant (to fool the launcher)
|
||||
|
||||
Reference in new issue
Block a user