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

Underlying mechanism for "Windows<>Linux" incompatibility with UID generation #160

Open
cheahjs opened this issue Feb 19, 2024 · 4 comments

Comments

@cheahjs
Copy link

cheahjs commented Feb 19, 2024

The underlying mechanism for UIDs being generated differently on Windows and Linux is actually not OS related, but related to how Palworld handles conversion of a FUniqueNetId (in the case of Steam clients, the client's 64-bit SteamID) to 32-bit PlayerUid.

In the event that the Steam online subsystem is not available, Palworld uses a different algorithm for converting the Steam IDs. The Steam online subsystem could be unavailable if the -nosteam CLI argument was used, or if the Steamworks SDK failed to initialise (for example if no Steam client was installed).

I've built a tool for performing these conversions so that people can check if their existing save is using the standard conversion or the no Steam conversion, and take action accordingly.

@xNul
Copy link
Owner

xNul commented Feb 20, 2024

You sir are a genius! I've been looking for this information since I first made the script!

I really appreciate you opening the issue and I'll be adding it to my script asap!

@cheahjs
Copy link
Author

cheahjs commented Feb 20, 2024

Automatic conversion is non-trivial, as generation involves a one-way hash. Ideally you would ask the user for the players' Steam IDs. My tool provides the ability to bruteforce convert all 2^32 possible Steam IDs (a 64-bit SteamID consists of a 32-bit account ID and 32-bits of static information for public accounts) to all UIDs to attempt to search for Steam IDs that match a specific UID. However, as it is hashing a number with 32-bits of information into a 32-bit hash, for example the UID 7715B8D6 is generated for 6(!) different Steam IDs.
image

@xNul
Copy link
Owner

xNul commented Feb 20, 2024

I understand it's not a perfect solution, but it should be able to help a lot. I was thinking about providing two options: an automatic option for bruteforcing the Steam IDs and a manual option for letting the user provide the Steam IDs. In the automatic option, if there are multiple Steam IDs which result in the same hash and each belongs to a valid account, I'd provide the user with the option to choose between the different usernames of those corresponding Steam IDs.

Also, can we reduce the search space by leveraging the fact there is no Steam ID greater than 1.3 billion?

@asdf4w3t5
Copy link

Also, can we reduce the search space by leveraging the fact there is no Steam ID greater than 1.3 billion?

yea the data is almost 1/3rd the size then. No sense in going to ~4.3 bill

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants