mirror of
https://github.com/SuspiciousActivity/ValorantLanguageChanger.git
synced 2026-08-13 18:16:37 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7f87059a4f | ||
|
|
3cfec102d4 | ||
|
|
fe6017240d | ||
|
|
314cc2f3b5 | ||
|
|
e073802c5a | ||
|
|
118671e09f | ||
|
|
23ba78c38a | ||
|
|
6cfdffb413 | ||
|
|
0c8df311f8 | ||
|
|
4d5977476c |
No files matched your search
@@ -5,9 +5,10 @@ Want to hear those uwu-voices from japan but don't understand anything that is w
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
1. Change your ingame language to whatever you want the *voice* language to be.
|
1. Change your ingame language to whatever you want the *voice* language to be.
|
||||||
2. Download the latest vallc.ps1 file from [here](https://github.com/SuspiciousActivity/ValorantLanguageChanger/releases).
|
2. Download the latest VLC.zip file from [here](https://github.com/SuspiciousActivity/ValorantLanguageChanger/releases/latest/download/VLC.zip) and unpack it somewhere.
|
||||||
3. Right click and choose "Run with PowerShell".
|
3. Run the start.bat file.
|
||||||
4. Follow the setup and have fun!
|
4. Follow the setup and have fun!
|
||||||
|
5. You can delete the zip and the unpacked files afterwards.
|
||||||
|
|
||||||
## Is this a virus??
|
## Is this a virus??
|
||||||
No. This file downloads an additional exe file from [here (github.com)](https://github.com/Morilli/ManifestDownloader) which might be flagged as a virus.
|
No. This file downloads an additional exe file from [here (github.com)](https://github.com/Morilli/ManifestDownloader) which might be flagged as a virus.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
$savePath = "$($env:LOCALAPPDATA)/ValorantLangChanger/"
|
$savePath = "$($env:LOCALAPPDATA)/ValorantLangChanger/"
|
||||||
$configPath = -join($savePath, 'config.csv')
|
$configPath = -join($savePath, 'config.csv')
|
||||||
$savePakPath = 'ShooterGame/Content/Paks/'
|
$savePakPath = 'ShooterGame/Content/Paks/'
|
||||||
$manifestDownloaderUrl = 'https://github.com/Morilli/ManifestDownloader/releases/download/v1.8_fix1/ManifestDownloader.exe'
|
$manifestDownloaderUrl = 'https://github.com/Morilli/ManifestDownloader/releases/download/v2.0_fix1/ManifestDownloader.exe'
|
||||||
|
|
||||||
function Get-Hash([string]$textToHash) {
|
function Get-Hash([string]$textToHash) {
|
||||||
$hasher = new-object System.Security.Cryptography.MD5CryptoServiceProvider
|
$hasher = new-object System.Security.Cryptography.MD5CryptoServiceProvider
|
||||||
@@ -31,7 +31,7 @@ if (!(Test-Path $savePath)) {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
Write-Host 'Fetching VALORANT config from Riot Games...' -ForegroundColor Green
|
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 {
|
} catch {
|
||||||
Write-Host 'Error contacting Riot Games servers' -ForegroundColor Red
|
Write-Host 'Error contacting Riot Games servers' -ForegroundColor Red
|
||||||
Write-Host $_
|
Write-Host $_
|
||||||
@@ -52,10 +52,13 @@ if (Test-Path $configPath) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$modified = 0
|
$outer = @{}
|
||||||
$tried = 0
|
|
||||||
while (!$valid.regions.Contains($config.region)) {
|
function Ensure-Config {
|
||||||
$modified = 1
|
$outer.modified = 0
|
||||||
|
$tried = 0
|
||||||
|
while (!$valid.regions.Contains($config.region)) {
|
||||||
|
$outer.modified = 1
|
||||||
if ($tried -eq 1) {
|
if ($tried -eq 1) {
|
||||||
Write-Host 'That is not a valid region!' -ForegroundColor Red
|
Write-Host 'That is not a valid region!' -ForegroundColor Red
|
||||||
}
|
}
|
||||||
@@ -63,14 +66,14 @@ while (!$valid.regions.Contains($config.region)) {
|
|||||||
Write-Host (-join('(', [string]::Join(', ', $valid.regions), ')')) -ForegroundColor DarkGray
|
Write-Host (-join('(', [string]::Join(', ', $valid.regions), ')')) -ForegroundColor DarkGray
|
||||||
$config.region = Read-Host
|
$config.region = Read-Host
|
||||||
$tried = 1
|
$tried = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
$regionConfig = $patchConfigs | Where-Object 'id' -eq $config.region
|
$outer.regionConfig = $patchConfigs | Where-Object 'id' -eq $config.region
|
||||||
$valid.langs = $regionConfig | ForEach-Object {$_.locale_data.available_locales}
|
$valid.langs = $outer.regionConfig | ForEach-Object {$_.locale_data.available_locales}
|
||||||
|
|
||||||
$tried = 0
|
$tried = 0
|
||||||
while (!$valid.langs.Contains($config.voiceLang)) {
|
while (!$valid.langs.Contains($config.voiceLang)) {
|
||||||
$modified = 1
|
$outer.modified = 1
|
||||||
if ($tried -eq 1) {
|
if ($tried -eq 1) {
|
||||||
Write-Host 'That is not a valid language!' -ForegroundColor Red
|
Write-Host 'That is not a valid language!' -ForegroundColor Red
|
||||||
}
|
}
|
||||||
@@ -78,11 +81,11 @@ while (!$valid.langs.Contains($config.voiceLang)) {
|
|||||||
Write-Host (-join('(', [string]::Join(', ', $valid.langs), ')')) -ForegroundColor DarkGray
|
Write-Host (-join('(', [string]::Join(', ', $valid.langs), ')')) -ForegroundColor DarkGray
|
||||||
$config.voiceLang = Read-Host
|
$config.voiceLang = Read-Host
|
||||||
$tried = 1
|
$tried = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
$tried = 0
|
$tried = 0
|
||||||
while (!$valid.langs.Contains($config.textLang)) {
|
while (!$valid.langs.Contains($config.textLang)) {
|
||||||
$modified = 1
|
$outer.modified = 1
|
||||||
if ($tried -eq 1) {
|
if ($tried -eq 1) {
|
||||||
Write-Host 'That is not a valid language!' -ForegroundColor Red
|
Write-Host 'That is not a valid language!' -ForegroundColor Red
|
||||||
}
|
}
|
||||||
@@ -90,11 +93,11 @@ while (!$valid.langs.Contains($config.textLang)) {
|
|||||||
Write-Host (-join('(', [string]::Join(', ', $valid.langs), ')')) -ForegroundColor DarkGray
|
Write-Host (-join('(', [string]::Join(', ', $valid.langs), ')')) -ForegroundColor DarkGray
|
||||||
$config.textLang = Read-Host
|
$config.textLang = Read-Host
|
||||||
$tried = 1
|
$tried = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
$tried = 0
|
$tried = 0
|
||||||
:out while (($null -eq $config.pakPath) -or (!$config.pakPath.EndsWith($savePakPath)) -or !(Test-Path $config.pakPath)) {
|
:out while (($null -eq $config.pakPath) -or (!$config.pakPath.EndsWith($savePakPath)) -or !(Test-Path $config.pakPath)) {
|
||||||
$modified = 1
|
$outer.modified = 1
|
||||||
if ($tried -eq 1) {
|
if ($tried -eq 1) {
|
||||||
Write-Host 'That is not the correct folder!' -ForegroundColor Red
|
Write-Host 'That is not the correct folder!' -ForegroundColor Red
|
||||||
} else {
|
} else {
|
||||||
@@ -142,15 +145,42 @@ $tried = 0
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$tried = 1
|
$tried = 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# save the config
|
||||||
|
if ($outer.modified -eq 1) {
|
||||||
|
$config.GetEnumerator() | Select Key, Value | Export-Csv (-join($savePath, 'config.csv'))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# save the config
|
Ensure-Config
|
||||||
if ($modified -eq 1) {
|
|
||||||
$config.GetEnumerator() | Select Key, Value | Export-Csv (-join($savePath, 'config.csv'))
|
|
||||||
}
|
|
||||||
|
|
||||||
# continue setup
|
# continue setup
|
||||||
if ($args.count -eq 0) {
|
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
|
$shell = New-Object -COM WScript.Shell
|
||||||
|
|
||||||
$tried = 0
|
$tried = 0
|
||||||
@@ -159,6 +189,7 @@ if ($args.count -eq 0) {
|
|||||||
Write-Host 'That is not a valid path to a shortcut!' -ForegroundColor Red
|
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 '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
|
Write-Host '(The path to the shortcut should appear.)' -ForegroundColor DarkGray
|
||||||
$shortcutPath = (Read-Host).Replace('"', '')
|
$shortcutPath = (Read-Host).Replace('"', '')
|
||||||
$tried = 1
|
$tried = 1
|
||||||
@@ -175,10 +206,11 @@ if ($args.count -eq 0) {
|
|||||||
Write-Host 'Setting up all the files...' -ForegroundColor Green
|
Write-Host 'Setting up all the files...' -ForegroundColor Green
|
||||||
$psPath = $MyInvocation.MyCommand.Path
|
$psPath = $MyInvocation.MyCommand.Path
|
||||||
Copy-Item $psPath (-join($savePath, 'vallc.ps1'))
|
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 '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
|
Read-Host
|
||||||
Exit
|
Exit
|
||||||
}
|
}
|
||||||
@@ -195,11 +227,17 @@ if ($checkBefore) {
|
|||||||
Write-Host 'Checking for new language files...' -ForegroundColor DarkGray
|
Write-Host 'Checking for new language files...' -ForegroundColor DarkGray
|
||||||
try {
|
try {
|
||||||
$lastPatchUrl = ''
|
$lastPatchUrl = ''
|
||||||
|
|
||||||
|
# check if both lang files exist, if not download
|
||||||
|
if ((Test-Path (-join($savePath, 'url.txt'))) -and (!(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'))) {
|
if (Test-Path (-join($savePath, 'url.txt'))) {
|
||||||
$lastPatchUrl = Get-Content -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) {
|
if ($patchUrl -ne $lastPatchUrl) {
|
||||||
Write-Host 'Downloading new language files...' -ForegroundColor Green
|
Write-Host 'Downloading new language files...' -ForegroundColor Green
|
||||||
@@ -216,11 +254,18 @@ try {
|
|||||||
Write-Host 'Up to date!' -ForegroundColor Green
|
Write-Host 'Up to date!' -ForegroundColor Green
|
||||||
}
|
}
|
||||||
} catch {
|
} 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
|
Read-Host
|
||||||
Exit
|
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
|
Write-Host 'Starting Valorant...' -ForegroundColor Green
|
||||||
|
|
||||||
# copy 'voice' text lang files to valorant (to fool the launcher)
|
# copy 'voice' text lang files to valorant (to fool the launcher)
|
||||||
|
|||||||
Reference in new issue
Block a user