From d866f137fb6f738e9e2a34c18c53198924d4d5ca Mon Sep 17 00:00:00 2001 From: kanym Date: Wed, 30 Sep 2026 22:42:59 +0200 Subject: [PATCH] fix(package): the Thunderstore package keeps the mod under plugins/ Mod managers (r2modman, the Thunderstore Mod Manager, Gale) copy what is inside a top-level plugins/ folder into BepInEx/plugins// with its structure, and flatten folders they do not recognise. 1.5.1's Translations/English/items.json landed as a loose items.json beside the DLL, the Italian copy of each file overwrote the English one, and Jotunn found no translations. Reproduced in a clean r2modman profile; with the DLL and Translations under plugins/ the import keeps both language folders and the texts show. --- scripts/package.ps1 | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/scripts/package.ps1 b/scripts/package.ps1 index 8d20c8e..013f66f 100644 --- a/scripts/package.ps1 +++ b/scripts/package.ps1 @@ -50,13 +50,20 @@ $readmeText = [regex]::Replace($readmeText, '\[([^\]]+)\]\(#[^)]*\)', '$1') $packagedReadme = Join-Path ([System.IO.Path]::GetTempPath()) ("RacesOfValheim_README_" + [guid]::NewGuid().ToString('N') + ".md") [System.IO.File]::WriteAllText($packagedReadme, $readmeText, (New-Object System.Text.UTF8Encoding($false))) -# Thunderstore gives every package a folder of its own, so the texts sit at the zip root. +# The mod itself goes under plugins/, and that folder name is the whole fix for 1.5.1's missing +# texts. Mod managers (r2modman, the Thunderstore Mod Manager, Gale) copy what sits inside a +# top-level plugins/ folder into BepInEx/plugins// keeping its structure, but they +# flatten any folder they do not recognise: 1.5.1's Translations/English/items.json landed as a +# loose items.json beside the DLL, the Italian copy of each file overwrote the English one, and +# Jotunn - which only reads JSON whose grandparent folder is called Translations - found none. +# Reproduced in a clean r2modman profile. manifest.json, README.md and icon.png stay at the root, +# where Thunderstore requires them. $thunderstore = @( - [pscustomobject]@{ Source = $Dll; Name = 'RacesOfValheim.dll' } + [pscustomobject]@{ Source = $Dll; Name = 'plugins/RacesOfValheim.dll' } [pscustomobject]@{ Source = $Manifest; Name = 'manifest.json' } [pscustomobject]@{ Source = $packagedReadme; Name = 'README.md' } [pscustomobject]@{ Source = $Icon; Name = 'icon.png' } -) + ($texts | ForEach-Object { [pscustomobject]@{ Source = $_.Source; Name = "Translations/$($_.Rel)" } }) +) + ($texts | ForEach-Object { [pscustomobject]@{ Source = $_.Source; Name = "plugins/Translations/$($_.Rel)" } }) # Nexus users unzip straight into plugins, so the texts travel inside a RacesOfValheim folder. $nexus = @(