Fr33dan / GPSaveConverter

Utility to transfer save files between the games installed from the Xbox app and other storefronts. https://ko-fi.com/fr33dan
295 stars 33 forks source link

Forza Horizon 4 - No Non-Xbox Profile #5

Open ryangodburn opened 2 years ago

ryangodburn commented 2 years ago

Hi @Fr33dan! I am having an issue where I cannot transfer files for FH4 from the Microsoft to Steam location and it is giving me this error. I have set the save file location manually but I think it also needs a non-Xbox profile. Any help is appreciated. image

Fr33dan commented 2 years ago

You didn't do anything wrong, this is a bug. Even though you set the save location manually, the system is still checking against the database profile. I'll need to fix this, prehaps I'll get some time over this long weekend.

The other problem is that the database profile is incorrect which is why you needed to select the location manually at all. I copied it from FH5 but they are slightly different. The name are the same but FH5 has a folder for each Xbox profile whereas FH4 does not. I've just discovered as I'm attempting to attach it that github doesn't allow .json files as attachments so you'll have to download Forza Horizon 4.txt and rename it changing .txt to .json. Then use File > Load Game Profile within the converter.

Then the converter can find your steam game installs by selecting your profile instead of doing so manually, bypassing the bug getting you up and running for now. Plus it will confirm that this profile works so I can update the library for the next release.

ryangodburn commented 2 years ago

I tried the file and it worked. However, when I transferred over the files, it gave me this ui glitch where everything is doubled. Also when loading into Forza on steam it errored saying the Forza Horizon profile you are trying to load is no longer available. image

Fr33dan commented 2 years ago

That is strange as the UI should be listing the folder contents with no real changes but that would mean multiple files with the same name which doesn't make sense.

What does the steam save location look like in windows explorer?

ryangodburn commented 2 years ago

It looks like this: image

Fr33dan commented 2 years ago

Well this means the UI doubling is a bug I need to investigate, but doesn't explain why the does not like the converted files.

Two things stand out to me about the file listings.

  1. The Xbox versions lack a UserPurchasesTelemetry file. Since we can't conjure up one from nowhere try removing it entirely. If we are lucky it's incompatable as it is now, doing this will make game will rebuild it.
  2. The VersionFlags file still has the 4:27PM timestamp in explorer, it should now match the 4:54 of the xbox version. Change log level to Trace in the preferences and try copying just this file. If it does not update the timestamp please attach your log file here so I can determine why this file isn't getting updated.
ryangodburn commented 2 years ago

Ok. Made the change and tried it again and it worked. The double file bug in the ui is still present. Here is the structure before opening the game on steam now: image After launching the game, it gives me the same error. Here is the file structure after: image What's interesting is that the UserPurchasesTelemetry file still has the old date attached to it even though it was deleted. My guess is steam would be restoring the old file somehow. In the end, it is still giving me the account error when pressing start.

Fr33dan commented 2 years ago

You are right in that it is probably Steam restoring the file. Maybe you could disable Steam cloud saves in the game's properties menu within Steam?

If it's not this telemetry file then I'm afraid I'm out of ideas on what the problem could be with the game. :-(

ryangodburn commented 2 years ago

So I disabled steam cloud saves and deleted the file. Now loading into the game only the 4 other files are in the steam saves folder. Unfortunately, upon pressing start, the error is still there, and the game crashes. Looking back at the steam save folder, a new UserPurchasesTelemetry file was not generated.

Fr33dan commented 2 years ago

I'm sorry but I've exhausted all the ideas I have. The files seem to have been moved/converted correctly, so they must have some internal difference between them. Something one of the entries on this page seems to imply (there is no such entry for FH5 which is known to work)

If this the case then I'm afraid the converter will never work for this game.

I'll post an update here if I have any further ideas. If anyone stubbles across this and has some relevent info, please chime in.

ryangodburn commented 2 years ago

Alright. Thank you for your help.

ryangodburn commented 2 years ago

Hey @Fr33dan I think I found something. Looking at a completed game save file for steam, it looks like all the files from the Xbox save need to be transferred over, not just the user data folder. Here is the completed steam save file structure: image And this is what I get when I try to move all the files from xbox to steam: image This may be the key to why it was not working.

Fr33dan commented 2 years ago

This could be a factor. FH5 didn't need the Liveries/Car configurations to migrate the user profile (which is all that is supported for that game), but maybe FH4 chokes when they don't exist. I'd be shocked if this was the case though.

The error is because there is no file translations for those files. The file translation built into the library purposefully does not support these files because these would only work going from Xbox -> Steam and not from Steam -> Xbox because it would involve the creation of containers which is not supported at this time.

To test your theory try this game profile: Forza Horizon 4.txt. It has with a file translation that should work for all the files. You will need to remove the old file translations as the behavior is to merge translations when a profile is imported (which is intentional as I don't want someone mad their work on a translation disappeared because they tried to import a profile).

ryangodburn commented 2 years ago

I tried it and am getting a new error: image

Fr33dan commented 2 years ago

Your file translation should look like this (The name in the listbox may be different but the conents of the parameter table should match): File Translations matching profile from Forza.Horizon.4.txt

I think your log level is still set to trace from an earlier attempt. If so please attach the log file, otherwise set it to trace and then make the error occur before attaching it.

ryangodburn commented 2 years ago

Here it is: GPSaveConverter.log And these are the translations: image image image

Fr33dan commented 2 years ago

You need to remove all but the last one by using the minus button while they are selected.

ryangodburn commented 2 years ago

I tried and am getting the same error: image

ryangodburn commented 2 years ago

Here is the log file GPSaveConverter.log

Fr33dan commented 2 years ago

Oh butts, I made a stupid tiny mistake. Rather than attach a whole new profile, change the second Named regex (GroupNumber) to add an underscore: (?<GroupNumber>[\w]+) -> (?<GroupNumber>[\w_]+)

ryangodburn commented 2 years ago

Tried it and am still getting an error: image Something i noticed is that you put to change (?[\w]+) -> (?[\w]+) but the way it was in my file and the change i made was (?[\w]+) -> (?[\w]+) There is an extra slash. image Here are the logs too: GPSaveConverter.log

Fr33dan commented 2 years ago

I was thinking you would be editing it within the converter application, not the file. The extra slash is added when what is in the shown dialog is saved and is removed when the translation is imported. You can see that it is gone in the converter itself.

Ohh I'm a dumb dumb, this file extension includes an underscore, the FileExtension named group doesn't allow for this. Change that one to match. (?<FileExtension>[\w]+) -> (?<FileExtension>[\w_]+)

Fr33dan commented 2 years ago

A bit more of an explanation is that the null error is occuring because a file translation is not matched for that file. So far these have all been regex errors resulting in a match not occurring. (I'm not that fluent in regex, sorry but I'm figuring it out)

ryangodburn commented 2 years ago

Still getting the error: image Logs: GPSaveConverter.log

Fr33dan commented 2 years ago

Lets try a simpler regex pattern: Forza Horizon 4.txt

ryangodburn commented 2 years ago

Still not working: image Logs: GPSaveConverter.log

Fr33dan commented 2 years ago

So I dug into the code and realized there was a problem that was signifigant enough I patched it right away. I'm less confident about the game profile so I'm holding that back until we have something that is known to work so you will need to import that again.

Try the version just released.

ryangodburn commented 2 years ago

New error: image

Fr33dan commented 2 years ago

The text in that error looks like it's not using the most recent simplified file translation correctly as I replaced GroupName and GroupNumber with a unified Group item.

Are you sure you're using the right profile?

The fact that neither have been replaced seems a little odd.

ryangodburn commented 2 years ago

Thats the error I got without the last json you posted. When I use the last profile you made I get this error: image

Fr33dan commented 2 years ago

I don't know if I messed up that file or if it messed to loading it but I'm on my phone right now making it difficult to check but I can see in the screenshot it's not right. In the converter change the non - Xbox file name to ${Group}.${FileExtension}

ryangodburn commented 2 years ago

New error: image

Fr33dan commented 2 years ago

Not only is this a different error, it's a different file meaning some got done. I think this one is because the thumbnail files have periods in the BlobID/extension. Add a . to the allowed characters in the FileExtension named regex group making it (<FileExtension>[\w_.]+)

ryangodburn commented 2 years ago

Different error: image

Fr33dan commented 2 years ago

I made a typo a left out the '?' (Sorry, again still on phone): (?<FileExtension>[\w_.]+)

ryangodburn commented 2 years ago

Another one: image

Fr33dan commented 2 years ago

I don't understand where a slash is being introducted after "bigThumb".

Can you attempt to find this file on the Xbox Save File list so I can see it's entry there? And please expand the Container name columns so I can see them entirely, you may need to make the window larger.

ryangodburn commented 2 years ago

It wont let me expand the names so this is the best i can do: image image image

Fr33dan commented 2 years ago

You got it by the hover, and I got home right as you were posting it so I was able to use it in the debugger. The file name must be escaped to use it as a Regex search to match to any existing files. This escaping was mistakenly done at the begining of the process resulting in incorrect subsitutions giving the mess of a file you saw. Pushing another update to fix momentarily.

Try this newest version. I've also updated the default profile, but you'll need to use the "Reset All" button to use it. (The "Reload Default Game Library Data" doesn't seem to be working for me right now so that's another thing on the list to look into)

ryangodburn commented 2 years ago

No Errors! When I looked at the files after, I had to rename the 4 data files with my user id. image After changing that, I tried to load into the game but got the same error unfortunately.

Fr33dan commented 2 years ago

Dangit. I'm sorry I think we are back to the point of the files between the versions being different internally. :-(

ryangodburn commented 2 years ago

Damn. Sorry about wasting all this time for nothing.

Fr33dan commented 2 years ago

It wasn't totally wasted, we exposed and fixed some real bugs that will impact games that may not have this problem.

Thanks for the effort. If half the people who reported bugs were as diligent and responsive as you there wouldn't be bugs in anything.

SBRK commented 2 years ago

So before I try anything, does that mean FH4 is not supported for the moment ? :(

Fr33dan commented 2 years ago

@SBRK Unforunately so. Unless some new information comes to light, I do not think it will ever be supported as the save files seem to be intrinsically different somehow between versions.

M-Felipe commented 1 year ago

Any news from forza horizon 4 save?

Fr33dan commented 1 year ago

@M-Felipe I think if anything were to develop it would be in the form of someone else posting a discovery in this thread.

M-Felipe commented 1 year ago

@Fr33dan gave up trying to transfer to forza?

Fr33dan commented 1 year ago

@M-Felipe All this tool does is move files from one place to the other. As this thread covers, the files between FH4's Steam version have been transfered in a way that matches. The tool worked. If beyond that the files are not compatible that is beyond the scope of this tool and not something I was ever attempting to do.

It is the same way with the game Tunic where on the Xbox version they dump all the save data into a single file with a seperator and the steam version uses separate files. Some games are different between the versions and thus will never work with this tool. Unforunately, FH4 is one of those games.