View Single Post
Old 23rd March 2018, 02:41 AM
HatCat's Avatar
HatCat HatCat is offline
Alpha Tester
Project Supporter
Senior Member
Join Date: Feb 2007
Location: In my hat.
Posts: 16,236

When I say that it's an easy fix, I mean that the commands are easy to paste in and run, without having to understand the save file format. The hard part was trying to get the save file to validate from JP over to US to begin with. That was the hard fix on my end...checksum bugs are no fun. But with that out of the way, adjusting the inventory item offsets with a few additional commands was straightforward.

Originally Posted by buckchow View Post
My perusal through the Wiki several days ago didn't get into many of the individual pages for items in the "game state reference" column, so I was completely unaware that conversion might be necessary for the inventory.
Yeah, converting save files between the old and new formats (particularly in cases where the user has an older (J) ROM with the save data) was not something I talked much about at all on the index of the Wiki. I kind of left discussion of the differences between the two formats down to just the "sectional allocation" part of the File Format wiki documenting whether owl statue saves play a part, as well as the offsets in item and mask ID codes in the item_register page for people who clicked on that specifically.

It's kind of one of those "bugs" (like seeing the Razor Sword or Fisherman's Pole instead of the Zora Mask or Great Fairy's Mask) that sometimes people intentionally want to happen just to make their save file more unique from common ones, or they're just curious about discovering beta goodies while testing. Take the Circus Leader's Mask for example...most useless out of all 24 masks IMHO, except you can cry while running with it on. I'd probably be fine with whatever replaced it due to taking the raw JP save and loading it on US.

But yeah, the option to fix the masks' IDs is definitely there for those that want/need it. (It's less of a problem when your game is relatively new and doesn't have that many masks to replace or just start over and re-collect again to fix the subscreen that way.) Certainly having your B-button icon set to an unusable item that will crash your game was no fun, but again sometimes people want to test low-level functionality of the game by breaking things on purpose.

Originally Posted by buckchow View Post
When I have more time I think I'll experiment with adding inventory conversion support to zs based on your item-register details. I have a second JP cart with two more saves on it that aren't mine but it would be fun to get those working in English anyway.
You're certainly welcome to give it a shot.

Automating the conversion between the old and new formats is something I have given a little thought to in the past. I have thought about it...has a few quirks that made me feel discouraged from decisively putting that feature in.

There are ways to reliably guesstimate whether a save was written by a JP ROM or not, but there is no definitive way to prove it was absolutely beyond the shadow of a doubt. Yes you can examine the Masks sub-screen, see if all the masks collected are 0x1C larger than the mask ID for US ROMs. This technically could be a coincidence, though...people can use the save editor to put any ID they want in any mask's position, even items like Bombchu or Fierce Deity Link's sword.

The most reliable estimation is probably by checksum location. Compute the checksum and see if it's stored at the JP ROM's preferred offset or the new format's offset. Although, it is possible to have both offsets store 2 correct checksums in an attempt to keep the save file bi-compatible with all ROM versions.... So again, no definitive logic here.

So yeah, you can automate the conversion of other things besides the checksum. Welcome to implement takes some being careful with though; I would be sure to have the automation optional in case the user wants to preserve custom (but inappropriate) IDs for mask and item positions they were testing with for beta study.

Also, I don't know for 100% sure that Link's game name and the Masks subscreen (Items too with certain bottled items, but Song of Time saves don't preserve those) are the only 2 things you'd need to implement in your automation of the JP-to-US conversion. They happen to be the only 2 things I've ever known about to be different in a JP ROM, but maybe in your testing you'll happen upon others. That's probably part of why I was too lazy to attempt a preliminary implementation of automating the save file conversion.
Reply With Quote