JannikBirn / palworld-host-save-fix

A variation of the Palworld Host Save Fix from xNul with additional bug fixes. This script can be used in a similar way to convert co-op games to dedicated server and vice versa.
Other
84 stars 6 forks source link

My character only hit one time on long press #6

Closed N0rvel closed 5 months ago

N0rvel commented 5 months ago

All seems to work fine, but my character only hits once on a long press which is very annoying, I have to spam click to mine, fight, etc

N0rvel commented 5 months ago

I can't load a bow or grappling hook as a result

JannikBirn commented 5 months ago

Have you tried the following?

[Left Click bug] Details: After applying the fix, some players experience a bug where you can't hold your left mouse button to attack. It seems like this only happens if you didn't do the [Guild bug] workaround but I'm not sure. Workaround: If you leave the guild and rejoin, it goes away. Thanks /u/skalibran!

JannikBirn commented 5 months ago

I pushed a potential fix. I had the same issue. The problem was that the player guid inside the group "individual_character_handle_ids" wasn't updated. If you can't use my script again, because you can't or don't wont to process the old save file again, you need to do it manually rn.

  1. Use the palworld-save-tools to convert your player .sav file to json.
  2. Search for InstanceId and copy the guid at the "value" property. (i.e. e09853b4-4553-4dbc-a0ff-07af1fd53597)
  3. Convert the Level.sav to json
  4. Search for the copied instance guid, you should find exactly 2 occurrences.
  5. Go to the one that looks like this:
    "key": {
    "PlayerUId": {
      "struct_type": "Guid",
      "struct_id": "00000000-0000-0000-0000-000000000000",
      "id": null,
      "value": "1384af9b-0000-0000-0000-000000000000",
      "type": "StructProperty"
    },
    "InstanceId": {
      "struct_type": "Guid",
      "struct_id": "00000000-0000-0000-0000-000000000000",
      "id": null,
      "value": "e09853b4-4553-4dbc-a0ff-07af1fd53597",
      "type": "StructProperty"
    },
    "DebugName": {
      "id": null,
      "value": "",
      "type": "StrProperty"
    }
    },

    Copy the player guid under the "PlayerUId", in this case its 1384af9b-0000-0000-0000-000000000000

  6. Got to the second occurrence. That should look like this
    {
    "guid": "00000000-0000-0000-0000-000000000001",
    "instance_id": "e09853b4-4553-4dbc-a0ff-07af1fd53597"
    },

    It should be under the "individual_character_handle_ids" property. Replace the "guid" with the one copied in the previous step. So in this case the result should be:

    {
    "guid": "1384af9b-0000-0000-0000-000000000000",
    "instance_id": "e09853b4-4553-4dbc-a0ff-07af1fd53597"
    },
  7. Save the .json and convert it back to a .sav using the same tool palworld-save-tools
N0rvel commented 5 months ago

Have you tried the following?

[Left Click bug] Details: After applying the fix, some players experience a bug where you can't hold your left mouse button to attack. It seems like this only happens if you didn't do the [Guild bug] workaround but I'm not sure. Workaround: If you leave the guild and rejoin, it goes away. Thanks /u/skalibran!

Oh I didn't see it. I'm alone in my guild, I'll try to find someone

N0rvel commented 5 months ago

I pushed a potential fix. I had the same issue. The problem was that the player guid inside the group "individual_character_handle_ids" wasn't updated. If you can't use my script again, because you can't or don't wont to process the old save file again, you need to do it manually rn.

  1. Use the palworld-save-tools to convert your player .sav file to json.
  2. Search for InstanceId and copy the guid at the "value" property. (i.e. e09853b4-4553-4dbc-a0ff-07af1fd53597)
  3. Convert the Level.sav to json
  4. Search for the copied instance guid, you should find exactly 2 occurrences.
  5. Go to the one that looks like this:
"key": {
  "PlayerUId": {
    "struct_type": "Guid",
    "struct_id": "00000000-0000-0000-0000-000000000000",
    "id": null,
    "value": "1384af9b-0000-0000-0000-000000000000",
    "type": "StructProperty"
  },
  "InstanceId": {
    "struct_type": "Guid",
    "struct_id": "00000000-0000-0000-0000-000000000000",
    "id": null,
    "value": "e09853b4-4553-4dbc-a0ff-07af1fd53597",
    "type": "StructProperty"
  },
  "DebugName": {
    "id": null,
    "value": "",
    "type": "StrProperty"
  }
},

Copy the player guid under the "PlayerUId", in this case its 1384af9b-0000-0000-0000-000000000000 6. Got to the second occurrence. That should look like this

{
"guid": "00000000-0000-0000-0000-000000000001",
"instance_id": "e09853b4-4553-4dbc-a0ff-07af1fd53597"
},

It should be under the "individual_character_handle_ids" property. Replace the "guid" with the one copied in the previous step. So in this case the result should be:

{
"guid": "1384af9b-0000-0000-0000-000000000000",
"instance_id": "e09853b4-4553-4dbc-a0ff-07af1fd53597"
},
  1. Save the .json and convert it back to a .sav using the same tool palworld-save-tools

oh thanks I'll try it ! Can I start the process again ?

JannikBirn commented 5 months ago

oh thanks I'll try it ! Can I start the process again ?

You should use the save state before you run the script. If the script was previously executed on that save file rerunning the new version of the script is currently not supported, sorry for the inconvenience, I might take a look at that in the future. Please take a version of that save file before the script was executed.

N0rvel commented 5 months ago

it works !! Well done :)

JannikBirn commented 5 months ago

Nice, please try a few different game mechanics before you decide to stay at that server, since the script is still WIP and let me know if you find more bugs. FIY: There are still some occurrences in the save file with old player guids that I'm currently not replacing because if I do I'll receive other bugs (like losing all pals). But keeping these old guids feels somewhat wrong.

ch3573r commented 5 months ago

Nice, please try a few different game mechanics before you decide to stay at that server, since the script is still WIP and let me know if you find more bugs. FIY: There are still some occurrences in the save file with old player guids that I'm currently not replacing because if I do I'll receive other bugs (like losing all pals). But keeping these old guids feels somewhat wrong.

I applied your latest fix on a coop game and imported it to a linux palworld server docker containers. Thus far everything seems good, also for my buddy.