These problems can be more or less solved, but you would probably need to use an external file with codes, loaded by Python code, and use some code obfuscation methods with asymmetric cryptography and Python exception interceptions. Then there still would be a few problems, like the need to check for different codes for different users, and the need to hide the label like premium_content from people who would read your script. (That's how they keep your passwords more or less secure: they store checksums, not the password itself). If you want to hide your code better, consider comparing not the code but its hash created by SHA256 or at least MD5. But it's possible to make breaking your secrets hard enough so that only real fanatics would do that. Even large companies that invest millions in cryptography fail to achieve that. Of course it's not possible to protect data with 100% security. That would make it harder to look into your script and see the secret code. rpyc files in archives and do not include. Then when you build distributions of the game pack its. So those who entered the correct code would go to label premium_content, the others to label free_content. Later in the script if you want to check the code the simplest way is: if de = "put_here_your_secret_code": Then if the player entered the code it will be stored in de. Textbutton "Submit" action SetField(persistent, "code", xcode) Find screen main_menu in file screens.rpy and put this before it: define xcode_input = VariableInputValue(variable = "xcode", returnable = True)Īnd inside it, after the line use navigation, add another script like this: use navigation Everyone invents their own tricks.īasically if you want to limit access to a part of your game, you can do something like changing your screen main_menu, adding there an input for the code. There is no universal recipe in data protection.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |