-
Notifications
You must be signed in to change notification settings - Fork 74
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
Add change host method in Co-op game #50
base: main
Are you sure you want to change the base?
Conversation
"GUID": "6E80B1A6000000000000000000000000", | ||
"name": "Arthur" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I modified the script and dumped .sav to .json, then I found there's no player name inside the save file. How do I identify which player owns the save file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This "name" serves an internal purpose within the script, primarily to simplify the command for running the script and make it more memorable. The exported JSON files still rely on the GUID to distinguish players.
if i use multi-byte characters in the player name, will this function properly ? |
fix_host_save.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're renaming this file but I don't see changes to the README to update the usage examples.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I forgot this.
How does this work? Its not entirely clear. Edit: I understand how to fill it in (I think) but I am still getting tons of errors no matter what I do. If I validate the
|
As long as the name doesn't conflict with another player's GUID, the script should operate correctly. |
|
The principle behind changing the host is quite straightforward: since the GUID of the original host is anomalously set to '00...01', all that's required is to assign a standard GUID to the former host and then set the new host's GUID to this '00...01' value. This can be accomplished by simply running the fix_host_save.py script twice. |
The official releases patch v0.1.3.0 yesterday and it seems they fixed that bug where the game was showing fewer days than it should've. Could be the reason for what we're seeing. |
You are an absolute godsend. Thank you. |
I'm glad I could be of help : ) |
I'm not familiar with python, and I'm having some trouble. Could someone clear this up for me? I've imported change_coop_host.py to my scripts folder, configured the config.json file to contain the user GUIDs and the names, and then put the config file in a folder. What I don't understand is how to make it so the script can find the config folder and execute the commands. I just get a syntax error when I try to run the script: python change_coop_host.py Cla_Tronix |
Have you edited this script? It seems that you add this command to the code. |
No, this is what happens when I try to run "python change_coop_host.py Name" in the Python cmd window. I haven't edited the script at all, only the config.json file. |
Is the config file and the python file in the same directory? |
Yes. It looks like the syntax error is directed towards the "change_coop_host" part of the command. It might be because I haven't configured Python correctly and that it can't find the script I'm trying to run. I store my data on two drives, so that might be the problem. Edit: I'm dumb and was running the commands in the python interpreter, and not cmd/powershell. I've managed to get the 'pop from an empty set' error and will try fixing it by following what was said above about the error. |
I just wanted to say that your script worked perfectly for me. Had a few syntax errors at the beginning, but I was able to resolve them with ChatGPT. :) Swapped two players and haven't been able to find any bugs so far. |
Mine worked too but there was one small bug where all of our pals weren't correctly registering to our guild. Therefore we couldn't pick them up when they were working. The fix was to just put all pals in the base and your palbox into your inventory, drop them on the ground, then put them back in. |
I found fatal bug is that cause of my bad procedure? |
Pick up the pal, drop in on the ground (the actual item), then pick it back up. It will fix it then. Make sure to do this with ALL pals in your base, team, and palbox. |
Yes, this script has the same Pal bug with what is mentioned in README. |
that works! thank you so much |
Hi! I've added a feature to your codebase that enables changing the host in 4-player Co-op game.
Recently, I encountered a rather frustrating issue where, as the host, I invited friends to play in my world for a few days. However, sometimes when I'm unavailable to play but they are, they can't access our saved progress since it's all stored on my end. This led me to ponder the possibility of transferring host privileges to them. Fortunately, I stumbled upon your code that fixes save files, and noticed that running it twice could effectively facilitate a host transfer.
To make this process more convenient, I decided to integrate your code and wrote a new script called change_coop_host.py. One thing worth noting is that due to Python's module naming conventions which disallow hyphens ("-") in module names, I had to rename your file to fix_host_save.py.