Maid Lain

Well-Known Member
Modder
Game Developer
Apr 4, 2018
1,888
16,428
So I looked into the game files a bit and I searched this thread and no one has mentioned any of this so it might be useful.

Just a heads up, this douche bag hides all of the downloaded game files outside of the actual game folder without telling you. Even if you delete the game folder, the files will still be taking up 1GB of space on your C: drive forever unless you delete it manually. It's at: "C:\Users\Name\AppData\LocalLow\Sandlust Games Ltd"

I'd assume he put the files there instead of the game folder so that people wouldn't be looking through the game folder to figure out how his game works. Some people have said that all the game's code is on his server but that's not true. All the game's code is in the scripts dll at: "\LocalLow\Sandlust Games Ltd\Glamour\scripts.dll" The game still sends requests and receives responses from his server for data, but all the code for how that works is in the scripts dll.


Setting whether or not the player is a patron and what tier they are is done in the LoginResponse class with the UpdatePlayerPrefs method.
Code:
[Serializable]public class LoginResponse
{
    public void UpdatePlayerPrefs()
    {
        PlayerPrefs.SetInt("patron", patron ? 1 : 0);
        PlayerPrefs.SetInt("pledge", pledge);
    }
}
Setting the "patreon" playerprefs setting to 1 and "pledge" to 50 or whatever the highest tier is would mean that you get the latest version/extra content. I think to recompile the dll you need to add references from the game folder, but I've lost interest in investigating it further.
 

Hlextor

Well-Known Member
May 6, 2017
1,674
5,073
So I looked into the game files a bit and I searched this thread and no one has mentioned any of this so it might be useful.

Just a heads up, this douche bag hides all of the downloaded game files outside of the actual game folder without telling you. Even if you delete the game folder, the files will still be taking up 1GB of space on your C: drive forever unless you delete it manually. It's at: "C:\Users\Name\AppData\LocalLow\Sandlust Games Ltd"

I'd assume he put the files there instead of the game folder so that people wouldn't be looking through the game folder to figure out how his game works. Some people have said that all the game's code is on his server but that's not true. All the game's code is in the scripts dll at: "\LocalLow\Sandlust Games Ltd\Glamour\scripts.dll" The game still sends requests and receives responses from his server for data, but all the code for how that works is in the scripts dll.


Setting whether or not the player is a patron and what tier they are is done in the LoginResponse class with the UpdatePlayerPrefs method.
Code:
[Serializable]public class LoginResponse
{
    public void UpdatePlayerPrefs()
    {
        PlayerPrefs.SetInt("patron", patron ? 1 : 0);
        PlayerPrefs.SetInt("pledge", pledge);
    }
}
Setting the "patreon" playerprefs setting to 1 and "pledge" to 50 or whatever the highest tier is would mean that you get the latest version/extra content. I think to recompile the dll you need to add references from the game folder, but I've lost interest in investigating it further.
Awesome news, Maim Lain. So you mean to change the settings into actually update and we get the current version of Glamour? Unbelievable but if it works ...
 

Maid Lain

Well-Known Member
Modder
Game Developer
Apr 4, 2018
1,888
16,428
Awesome news, Maim Lain. So you mean to change the settings into actually update and we get the current version of Glamour? Unbelievable but if it works ...
If someone is able to add the dependencies and recompile the dll, then yes those 2 lines should be the only thing that needs to be changed to get the latest version.
 
  • Like
Reactions: KaiserST

goobdoob

Conversation Conqueror
Modder
Respected User
Dec 17, 2017
7,426
9,688
So I looked into the game files a bit and I searched this thread and no one has mentioned any of this so it might be useful.

Just a heads up, this douche bag hides all of the downloaded game files outside of the actual game folder without telling you. Even if you delete the game folder, the files will still be taking up 1GB of space on your C: drive forever unless you delete it manually. It's at: "C:\Users\Name\AppData\LocalLow\Sandlust Games Ltd"

I'd assume he put the files there instead of the game folder so that people wouldn't be looking through the game folder to figure out how his game works. Some people have said that all the game's code is on his server but that's not true. All the game's code is in the scripts dll at: "\LocalLow\Sandlust Games Ltd\Glamour\scripts.dll" The game still sends requests and receives responses from his server for data, but all the code for how that works is in the scripts dll.


Setting whether or not the player is a patron and what tier they are is done in the LoginResponse class with the UpdatePlayerPrefs method.
Code:
[Serializable]public class LoginResponse
{
    public void UpdatePlayerPrefs()
    {
        PlayerPrefs.SetInt("patron", patron ? 1 : 0);
        PlayerPrefs.SetInt("pledge", pledge);
    }
}
Setting the "patreon" playerprefs setting to 1 and "pledge" to 50 or whatever the highest tier is would mean that you get the latest version/extra content. I think to recompile the dll you need to add references from the game folder, but I've lost interest in investigating it further.
How did you get that code from the dll?
 

Maid Lain

Well-Known Member
Modder
Game Developer
Apr 4, 2018
1,888
16,428
I find it interesting that it can get class and variable names. Does he ship glamour with the pdbs?
All of the game's code is viewable, all classes, members, etc. And idk I deleted the game lol.
 

goobdoob

Conversation Conqueror
Modder
Respected User
Dec 17, 2017
7,426
9,688
All of the game's code is viewable, all classes, members, etc. And idk I deleted the game lol.
What dll was the LoginResponse class in? scripts.dll?

The Mac data directory is in ~/Library/Application Support/com.Company.ProductName .

That last bit looks like the default name, which should be changed to the real company and product names, for example com.cdprojektred.TheWitcher .
 

Maid Lain

Well-Known Member
Modder
Game Developer
Apr 4, 2018
1,888
16,428
What dll was the LoginResponse class in? scripts.dll?

The Mac data directory is in ~/Library/Application Support/com.Company.ProductName .

That last bit looks like the default name, which should be changed to the real company and product names, for example com.cdprojektred.TheWitcher .
Yes all the code is in scripts.dll
The Company.ProductName is just how Unity does some directories and registry keys, it's not important.
 

Gok

Member
Jun 9, 2017
223
424
Well that's "fun" to find out.. in that folder that Lain referred I found other game files. For example starting from blizzard and ending to KsT game(the twist) and guess what, none of them exceeded 400kb :D that's fine, but for DS put 1gb~ of files there is a "bit" rude..
 

Maid Lain

Well-Known Member
Modder
Game Developer
Apr 4, 2018
1,888
16,428
Alright so since a lot of people seemed interested in and liked my first post, last night I decided to give hacking the game one more try. I did successfully recompile and changed the .dll to always set the player as the highest patron tier, that was really easy. The problem is that the game always checks for changes and rewrites the .dll file whenever you start the game, so the changes are lost. I set the file to read only but that will just throw a System.UnauthorizedAccessException and cause the game to be stuck loading on the main menu.

The solution is to stop the game from overwriting local files that don't match the files from the game server. The code that does this actually isn't in scripts.dll but in the normal Assembly-CSharp.dll in the game folder. However instead of stopping the overwriting thing for all files, I was able to just point the game to use my modified .dll with the changed code instead of his dll.

So it's possible to change any of the code now and prevent the game from overwriting any modified files. As for getting the latest version/extra content I have to reinstall the game first which sucks because getting the updates from his server is so fucking slow. Then I think I need to manually enable some other options which is a bit tedious so I'll try to upload a crack sometime soonish.

Not all heroes use capes. Thanks a lot @Maim Lain . But will it still need connection to DS server?
The game will still need to connect to the server to get the data for what dialog/scene/images to show, but that isn't that big of a deal.
 

Deleted member 12408

Active Member
Apr 3, 2017
654
2,089
I think you shouldn't give DS any hints about these crack details to prevent future fixes. But going through the ingame pictures i think this game doesn't worth your efforts really. Posing dolls everywhere. Soulless dolls.
 

Maid Lain

Well-Known Member
Modder
Game Developer
Apr 4, 2018
1,888
16,428
I think you shouldn't give DS any hints about these crack details to prevent future fixes.
I get your point but to be honest, this game was so easy to modify in the first place that anyone who said that this game was uncrackable doesn't know anything or never even tried. Someone who knows what they are doing could have had this cracked in 20 minutes probably. It's only taken me a lot longer because I've never even cracked anything before lol.

Once a crack is released it will be easy for DS to see how I did it just by looking at the files, so nothing I can really do about that. It would still take a while to re-code the game to make the crack not work though.
 
2.60 star(s) 184 Votes