Victoria 3

Victoria 3

Not enough ratings
Quase todos os mods em ingles, mas o jogo em português sem erros.
By PauloRaz3n
✅ Tutorial: Como Usar o Script de Localização para Mods no Victoria 3




📌 1. Por que usar este script?

Você joga Victoria 3 em português (PT-BR) e usa mods da Steam? Já viu erros visuais como:

law_federalism_law_federalism trait_generous_trait_generous

Esses erros acontecem quando o mod não tem suporte à tradução brasileira.
Este script resolve isso automaticamente, sem traduzir nada, apenas criando a estrutura necessária para que os textos em inglês sejam usados corretamente — e os erros desapareçam.




🛠️ 2. O que o script faz

  • Verifica todos os mods na pasta do Victoria 3
  • Para cada mod que tiver a pasta localization/english, ele:
    • Cria a pasta braz_por.
    • Copia todos os arquivos de tradução do inglês.
    • Renomeia os arquivos de _l_english para _l_braz_por.
    • Troca a primeira linha dos arquivos para l_braz_por.
  • Se o mod já tem a pasta braz_por, ele ignora.
  • Se o mod não tem localization/english, ele também ignora.




🚀 3. Como usar o script

  1. Abra o Bloco de Notas.
  2. Copie e cole o conteúdo do script abaixo:

    $basePath = "D:\SteamLibrary\steamapps\workshop\content\529340" $ids = Get-ChildItem -Path $basePath -Directory | Select-Object -ExpandProperty Name foreach ($id in $ids) { $modPath = Join-Path $basePath $id $localizationPath = Join-Path $modPath "localization" $englishPath = Join-Path $localizationPath "english" $brazPorPath = Join-Path $localizationPath "braz_por" if (Test-Path $brazPorPath) { Write-Host "✅ Mod $id já tem braz_por — ignorado" continue } if (-not (Test-Path $englishPath)) { Write-Host "⛔ Mod $id não tem localization\\english — ignorado" continue } New-Item -ItemType Directory -Path $brazPorPath -Force | Out-Null Get-ChildItem -Path $englishPath -Filter *.yml | ForEach-Object { $sourceFile = $_.FullName $newFileName = $_.Name -replace "_l_english", "_l_braz_por" $destFile = Join-Path $brazPorPath $newFileName Copy-Item $sourceFile $destFile -Force $lines = Get-Content $destFile if ($lines[0] -match "^l_english:") { $lines[0] = "l_braz_por:" Set-Content $destFile $lines } Write-Host "🔄 Modificado: $($_.Name) → $newFileName" } Write-Host "✅ Conversão concluída para o mod $id" } Write-Host "" Write-Host "🏁 Finalizado! Pressione qualquer tecla para sair..." $x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")

  3. Salve o arquivo como: converter.ps1
  4. Clique com o botão direito no arquivo e selecione: Executar com PowerShell
  5. Aguarde o script processar todos os mods




📎 4. Conclusão

Com esse script você evita erros visuais nos textos ao jogar em PT-BR mesmo usando mods que não suportam o idioma.
Você não precisa traduzir nada — o jogo apenas passa a reconhecer corretamente os textos em inglês, sem bug visual.

Se você for um modder, recomendo usar esse mesmo processo para gerar pastas de outras línguas também!




Dúvidas ou sugestões? Comente abaixo!
Feito por um jogador que odeia ver texto bugado.
foi o chat chatgpt msm que fez isso carai foi eu n, sei nem mecher com isso.












   
Award
Favorite
Favorited
Unfavorite
English
Tutorial to Create the "braz_por" Translation Folder in Victoria 3 Mods Using PowerShell

Why use this script?

In Victoria 3, when playing in Portuguese with mods that only have English localization, the game may display syntax errors and show texts like name_english_text instead of the correct translation. This script fixes that syntax problem by creating the necessary structure for Brazilian Portuguese, preventing the game from breaking or showing those tags.

This PowerShell script automates the creation of the braz_por (Brazilian Portuguese) translation folder inside Victoria 3 mods, copying files from the english folder, renaming the files, and adjusting the content to avoid syntax errors in the game.

What does the script do?

It automatically detects all mods inside the Victoria 3 workshop folder on your PC (default path D:\SteamLibrary\steamapps\workshop\content\529340 — you need to adjust this path to your environment).
For each mod:

Checks if the braz_por folder already exists — if so, it skips that mod.
If the english folder exists inside localization, it creates the braz_por folder and:

Copies all [.yml] files from the english folder to the braz_por folder.
Renames the copied files, replacing [_l_english] with [_l_braz_por] in the name.
Modifies the file content to replace the tag l_english: with l_braz_por:.

Important

This script does not translate the mod. It only prevents syntax errors that happen when playing Victoria 3 in Portuguese while mods are in English.

Mods that do not have an english folder (or localization) will not have functional translation.

Therefore, this only works for mods that have the english folder with localization files.

Step-by-step to use the script

Open a plain text editor (such as Notepad on Windows, or Notepad++).
Copy and paste the script below into the editor:

$basePath = "D:\SteamLibrary\steamapps\workshop\content\529340" $ids = Get-ChildItem -Path $basePath -Directory | Select-Object -ExpandProperty Name foreach ($id in $ids) { $modPath = Join-Path $basePath $id $localizationPath = Join-Path $modPath "localization" $englishPath = Join-Path $localizationPath "english" $brazPorPath = Join-Path $localizationPath "braz_por" if (Test-Path $brazPorPath) { Write-Host "✅ Mod $id já tem braz_por — ignorado" continue } if (-not (Test-Path $englishPath)) { Write-Host "⛔ Mod $id não tem localization\\english — ignorado" continue } New-Item -ItemType Directory -Path $brazPorPath -Force | Out-Null Get-ChildItem -Path $englishPath -Filter *.yml | ForEach-Object { $sourceFile = $_.FullName $newFileName = $_.Name -replace "_l_english", "_l_braz_por" $destFile = Join-Path $brazPorPath $newFileName Copy-Item $sourceFile $destFile -Force $lines = Get-Content $destFile if ($lines[0] -match "^l_english:") { $lines[0] = "l_braz_por:" Set-Content $destFile $lines } Write-Host "🔄 Modificado: $($_.Name) → $newFileName" } Write-Host "✅ Conversão concluída para o mod $id" } Write-Host "" Write-Host "🏁 Finalizado! Pressione qualquer tecla para sair..." $x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")


Change the variable $basePath to the path where your Victoria 3 mods are located.
Save the file with the .ps1 extension, for example: Victoria3_mod_brazpor.ps1
To run the script:

Right-click the [.ps1] file
Select "Run with PowerShell"
Wait for the script to process all mods — it will show messages indicating what is being done.

  • When it finishes, the script will ask you to press any key to exit.

    What will happen?

    For each mod that has an english folder and does not already have a braz_por folder:

    The braz_por folder will be created.
    The [.yml] files from the english folder will be copied into braz_por.
    The filenames and internal tags will be changed to the braz_por version.

    Mods that already have braz_por will be skipped.

    Why use this script?

    In Victoria 3, when playing in Portuguese with mods that only have English localization, the game may display syntax errors and show texts like name_english_text instead of the correct translation. This script fixes that syntax problem by creating the necessary structure for Brazilian Portuguese, preventing the game from breaking or showing those tags.
2 Comments
PauloRaz3n  [author] 30 Jun @ 9:44am 
@gordo

Tenho que ver aqui, vou dar uma olhada e se tiver eu faço e mando o link aqui.
gordo cuzao 30 Jun @ 12:38am 
MUITO OBRIGADO, CONSEGUE FAZER A VERSAO PRO HOI4? AGRADEÇO E ESPERO Q VC FAÇA :stimulation: