-
-
Notifications
You must be signed in to change notification settings - Fork 272
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
SMAPI generates broken saves with bundle translations; when using mod translations #812
Comments
tl;dr: I'm tentatively targeting SMAPI 3.14.0 for a fix. See below for the details and why I'm not doing it in 3.12.9 or 3.13.0. ProblemThat's a fundamental issue with how the content pipeline works. The game expects to be able to do this: // read translated bundles from Data/Bundles.pt-BR.xnb
contentManager.Load<…>("Data/Bundles")
// read default bundles from Data/Bundles.xnb
contentManager.LoadBase<…>("Data/Bundles") The way that normally works is like this:
That works because in the second flow, That assumption breaks when a SMAPI mod (like Content Patcher) provided the asset in the first flow. In that case there's no distinction between
So when the game tries to load SolutionThe solution is for SMAPI to always cache assets based on the locale they were requested for in other languages. So if the game requests TimelineI'm tentatively targeting SMAPI 3.14.0 for this change, the first major update after the one for Stardew Valley 1.5.5. The content pipeline has a lot of moving parts that depend on this particular logic, so there's a solid chance of regressions and side-effects. With Stardew Valley 1.5.5 expected within weeks, it would be difficult to untangle whether a particular issue was caused by the game changes, the SMAPI changes for them, the mod changes for both of those, or the content pipeline change. |
Another option might be to intercept assets one step lower as part of the content API redesign (#766), so mods could intercept |
Thanks for the thorough explanation! That helps, a lot. So, it looks like as a temporary workaround for this case. We can at least use the Content Patcher token; |
The game sets the unlocalized bundles at two points: when creating the save and when loading it. So you'd need a condition that only becomes true after the save is loaded (maybe something like |
Not sure if this is related, but there is a crash happening in our game (steam beta version) we started a few days back very similar to what is described here: https://smapi.io/log/b88d9ef420f8454b806870779c168238 This happens, if any of the players (in the two-player game) tries to access a community center vault for the first time after Lewis opened the entrance. Originally the game had its language set to German and the mods as listed in the log above enabled. Hope it helps! |
I tried the Time token. It generated a working save, but the translations weren't properly applied. It looks like the But, still a good workaround for now.
Yea, seems to be the same core bug; with the same error. You're playing in German, and a mod also intercepted the Bundle data.
|
The content API rewrite needed to fix this is in progress, with the first changes coming in SMAPI 3.14.0. |
…#812) The game's content pipeline automatically loads localized variants if present. For example, it will try to load "Maps/cave.fr-FR", then "Maps/cave_international", then "Maps/cave". The old content API obfuscates this logic and treats them as interchangeable, which causes edge cases like bundle corruption (#812). This commit rewrites the loading logic to match the game logic when using the new content events, while maintaining the legacy behavior for the old IAssetLoader/IAssetEditor interfaces that'll be removed in SMAPI 4.0.0.
The new content API is feature-complete in the upcoming SMAPI 3.14.0. Once that's released, the upcoming Content Patcher 2.0.0 will migrate to the new content API, and then only a small change will be needed in affected content packs to fix this. |
This is now fixed in the upcoming Stardew Valley 1.6 too, which changes how bundle data is managed so the issue no longer happens. |
Sorry, same problem here (start sliding after clicking the gold scroll) in game( version 1.5.6) smapi's cmd line keeps repeating this log as follows BundlesBugs.txt |
@TheWeakCheer If you haven't completed any bundles yet, you can fix the save like this:
|
Describe the bug
Per the title, SMAPI is once again generating saves with bundle translations; when using modded translations.
And, it causes issues when reading the golden scrolls.
Discovered in this discussion: https://forums.stardewvalley.net/threads/translating-bundles-file.9708/
Dnksh, is creating a Polish translation mod that overwrites the Portuguese files via Content Patcher.
And, anytime you create a new save in the modded language; is where it appends the translations to the
<bundleData>
section of the savefile.The Polish translation mod, log, saves; and some code snippet examples are in the linked thread above.
To Reproduce
Exact steps which reproduce the bug.
<bundleData>
section of the save.Log file
Dnksh's log:
https://smapi.io/log/00f24201ebf34b02a698847772b349e0
The text was updated successfully, but these errors were encountered: