Skip to content

Preserve saved map names and Wolf Link UIDs during conversion - #30

Merged
DeltaJordan merged 1 commit into
DeltaJordan:masterfrom
saranshjain29:fix/preserve-save-location-strings
Nov 2, 2026
Merged

DeltaJordan merged 1 commit into
DeltaJordan:masterfrom
saranshjain29:fix/preserve-save-location-strings

Conversation

@saranshjain29

Copy link
Copy Markdown
Contributor

Converting between Wii U and Switch currently reverses the UTF-8 values of PlayerSavePosMapName and WolfLink_TodayFirstDetectedUID, because their field IDs are missing from the string-hash list. For example, the synthetic map name Z-9 changes from 5A 2D 39 00 to 00 39 2D 5A. Converting back reverses the damage again, so a round-trip check alone misses the corruption.

Add both field IDs in both byte orders so their identifiers are converted while their string values are preserved. This uses the existing conversion path and requires no game files or additional runtime dependencies.

Add six synthetic regression cases covering both conversion directions for the two affected fields and an existing horse-name field. They compare the first conversion with independently constructed destination bytes, check adjacent numeric fields and headers, confirm the source and JPEG data are unchanged, and also check a round trip. The test project is included in the solution and runs in a GitHub Actions workflow.

Validation on macOS ARM64 with .NET SDK 6.0.428:

  • Before the fix: 4 new cases failed; 2 existing-field cases passed.
  • After the fix: all 6 cases pass with dotnet test BotwSaveManager.Core.Tests/BotwSaveManager.Core.Tests.csproj --configuration Release.
  • The console project builds with no warnings or errors.
  • As a private integration check, the patched console's output matched an independently implemented, game-schema-based conversion byte for byte across 35 local files, including 16 .sav files. That equivalent conversion was loaded and saved successfully in a native Switch BOTW runtime.

All committed fixtures are generated by the tests. No player saves, game assets, keys, or extracted game schemas are included.

@DeltaJordan

Copy link
Copy Markdown
Owner

Looks good, thanks for the contribution! I'll make a release once I have time to go through the structure of the app since it needs a big overhaul.

@DeltaJordan
DeltaJordan merged commit 1d97a32 into DeltaJordan:master Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants