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

There is a problem with Deserialization after the new steam client. #35

Open
calvan12 opened this issue Dec 5, 2022 · 5 comments
Open

Comments

@calvan12
Copy link

calvan12 commented Dec 5, 2022

Hello, i am trying to edit loginusers.vdf in steam files. But i found out that after the new steam client, they probably changed their vdf settings. (I am new at coding so i don't know the details but i make a lot tests and found out that something is changed.)

Before the new steam client, i was deserializing loginusers.vdf, change few settings and Serialize it. It was working nicely. But after the new steam client it was not working anymore. As example when i change something in the loginusers.vdf steam just hanging on connecting to account "account-name"...

After long days of testing, i found that before the Deserialization, loginusers.vdf looks like this;
"\"users\"\n{\n\t\"\"\n\t{\n\t\t\"AccountName\"\t\t\"\"\n\t\t\"PersonaName\"\t\t\"Dom\"\n\t\t\"RememberPassword\"\t\t\"0\"\n\t\t\"WantsOfflineMode\"\t\t\"0\"\n\t\t\"SkipOfflineModeWarning\"\t\t\"1\"\n\t\t\"AllowAutoLogin\"\t\t\"1\"\n\t\t\"MostRecent\"\t\t\"1\"\n\t\t\"Timestamp\"\t\t\"1670281542\"\n\t}\n}\n"

And after the Deserialization if you convert it to string, it looks like this;
"\"users\"\r\n{\r\n\t\"\"\r\n\t{\r\n\t\t\"AccountName\" \"\"\r\n\t\t\"PersonaName\" \"Dom\"\r\n\t\t\"RememberPassword\" \"0\"\r\n\t\t\"WantsOfflineMode\" \"0\"\r\n\t\t\"SkipOfflineModeWarning\" \"1\"\r\n\t\t\"AllowAutoLogin\" \"1\"\r\n\t\t\"MostRecent\" \"1\"\r\n\t\t\"Timestamp\" \"1670281542\"\r\n\t}\r\n}\r\n"

When you compare them, you see that steam only uses \n but after Deserialization they replaced to \r\n. I make a research and found out this.
\n is for Unix, \r is for Mac and \r\n is for Windows.

It seems like they using unix now. And deserialization doesnt work as usual. Is there any way to fix this problem ? I try to change vdfSerializerSettings but it didnt work.

@shravan2x
Copy link
Owner

After you modify loginusers.vdf, could you open the file in a text editor like Notepad++ and replace "\r\n" with "\n"? Does Steam open correctly?

@calvan12
Copy link
Author

calvan12 commented Dec 6, 2022

@shravan2x I try to open it with notepadd++ but it shows them as CR and LF, instead of "\r" and "\n" and they are not editable. Or i dont know maybe i am too noob for this things. 😭

2

@calvan12
Copy link
Author

calvan12 commented Dec 6, 2022

But when i change something in loginusers.vdf manually with notepad, steam opens correctly.

@shravan2x
Copy link
Owner

In Notepad++, you can use the "Find and Replace" tool to replace them.

@calvan12
Copy link
Author

calvan12 commented Dec 7, 2022

@shravan2x Ok, I try it but no its not fixing the problem. After deserialization and serialization there is something changing and this vdf file doesnt work anymore. Because as i said before, if i change the loginusers.vdf file manually by editing with notepad, Steam works fine. Otherwise it just hanging on this forever.

3

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

2 participants