Skip to content
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

Suggested addition for the tool #148

Open
LaClimSx opened this issue Feb 5, 2024 · 2 comments
Open

Suggested addition for the tool #148

LaClimSx opened this issue Feb 5, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@LaClimSx
Copy link

LaClimSx commented Feb 5, 2024

Hi, first of all I want to say this is a great tool and I thank you very much for your work. I see however that this tool cannot be used in the case of moving a Windows co-op save to another Windows co-op save. This scenario can happen for instance when two friends are playing on a co-op server (not dedicated server just the classical game mode), but the host wants to transfer the world to his friend for some reason (e.g. for performance issues or because the friend wants to be able to play without the current host). In that case, the host (let's call him player A and the friend player B) can't just send the folder the B and let him run it on his PC, because for the same reason as why this doesn't work on the other kinds of world transfer, the host has guid 0...1 and not his actual guid. This was my case, so I downloaded your tool but it can't really do this kind of operation. From my understanding, with your tool, if player B were to use the tool to get his character set as the host (so guid 0...1), it would erase the progress of player B, since his data was stored in the file with guid 0...1. I will try to make it work for myself by tweaking your python code, but I think adding it to your code yourself could be a nice addition because it can probably help a lot of people.

Note : This is how I plan to implement this functionality for myself, but since I am not very good in python, I sum it up here in case someone has remarks. I don't plan on doing the guild part since in my case I can just leave the guild beforehand to avoid any problems :
First, we need to get player A (the current host)'s actual guid by making join a server hosted by someone else. Once we have it, we can run the python program with 4 arguments (or 5 if we add the guild fix) : <uesave.exe> <save_path> <player_a_guid> <player_b_guid>.
Just like in your program, we will convert the files to JSON, but this time we do it for the level_save, the player_b save and the host_save (always 1 so not an input), which contains player A's info.
Then, we just edit the host_save's guid to set it to player_a_guid, the player_b_save's guid to set it to 0...1, and we do the same for the level_save using the instance id's. Then we rename the files to the corresponding guids and convert them back to .sav.
Do you think this will work ?

@LaClimSx
Copy link
Author

LaClimSx commented Feb 5, 2024

Update : I tried modifying the fix-host-save.py file to solve my problem, but even with that, the old host (player A) had to create a new character when he joined the world even though I thought I had transferred his character to his actual guid. Here's the code if someone wants to take a look (I apparently can't attach a python file so it's a .txt).
coop-to-coop-transfer.txt

Update of the update : I know why it didn't work thanks to this GitHub repository, so I tried their solution on my files and I'm pretty confident it will work but I can only try tomorrow so I will update this post then. However, if this works, it would be cool to turn it into a Python, because at the moment it is a manual (and slow) process, so automating it could be very useful, that's why I'm writing it here. I'll see if I have the time and/or skill to do it myself, but if not I encourage anyone reading this to try it themselves.

@xNul
Copy link
Owner

xNul commented Feb 19, 2024

Great point! I have some changes pending until I'm able to validate they don't break anything and I think they should enable you to do what you're looking for, in the way that you were trying to do it.

i.e. player a 00001 -> player a's actual guid and player b's actual guid -> player b 00001.

I'll add the instructions to my README when they come out as well

@xNul xNul added the enhancement New feature or request label Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants