Is there any anti-cheat code

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Message
Author
User avatar
rayminator
Veteran
Posts: 444
Joined: Fri Feb 09, 2018 12:05 am
Projects: Redoing games to fix spelling mistakes other companys that don't care
Location: Canada
Contact:

Is there any anti-cheat code

#1 Post by rayminator » Sun Jul 28, 2019 9:05 am

Is there any anti-cheat code or anti-save-edit code for renpy i have look for it by google doesn't show anything and tried to search here it always show a white blink screen that says you have cheated game over
when I try to help someone I point them into 2 direction what's right and wrong so they can learn how to

User avatar
trooper6
Lemma-Class Veteran
Posts: 3710
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Is there any anti-cheat code

#2 Post by trooper6 » Sun Jul 28, 2019 11:09 am

If you want an anti-cheat code for your game, you’d have to make it yourself.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

User avatar
namastaii
Eileen-Class Veteran
Posts: 1340
Joined: Mon Feb 02, 2015 8:35 pm
Projects: Template Maker for Ren'Py, What Life
Github: lunalucid
Skype: Discord: lunalucid#1991
Soundcloud: LunaLucidMusic
itch: lunalucid
Location: USA
Contact:

Re: Is there any anti-cheat code

#3 Post by namastaii » Sun Jul 28, 2019 11:29 am

I'm not sure what you mean. How would the player cheat? Is this specific to your game or are you worried about players editing the script?

User avatar
rayminator
Veteran
Posts: 444
Joined: Fri Feb 09, 2018 12:05 am
Projects: Redoing games to fix spelling mistakes other companys that don't care
Location: Canada
Contact:

Re: Is there any anti-cheat code

#4 Post by rayminator » Fri May 29, 2020 10:50 pm

it's just that I want to learn how to do it that all it's just that I'm trying to learn how too that's all

and trooper6 that was kind of being rude I wasn't rude to you in anyway at all
when I try to help someone I point them into 2 direction what's right and wrong so they can learn how to

prestristan
Regular
Posts: 25
Joined: Sat Apr 11, 2020 1:28 pm
Contact:

Re: Is there any anti-cheat code

#5 Post by prestristan » Fri May 29, 2020 11:38 pm

Hmm.. now this is an intriguing question right here..
I too want to learn about it.

But when you say cheating, you mean, memory manipulation like what "Cheat engine" does?

There's got to be a way to compare if the values have changed.
I did a bit of searching myself and found this:

From reddit:LordAlfredo:
Explanation: When you cross certain points in the game, the game generates a value called "anticheat" and stores it to the Ren'py "persistent" save file. It will also store this value to any saves you create. If you try to load a save where the anticheat value does not match the persistent file's (eg, you try to load someone else's save or one of your previous runs), you will get this scene. At the end of this scene, you're dumped back to the title screen.

This works regardless of whether the "cheating" save's player name matches the current save's. If they don't match, the last screen will show the current save's name - the "cheating" save's name is never shown. This also works for a brand new install - you can try to load a save before you even set your character name. If you do so, your name will be blank.

*white flag*

User avatar
uyjulian
Regular
Posts: 95
Joined: Sun Mar 08, 2015 1:40 pm
Github: uyjulian
Contact:

Re: Is there any anti-cheat code

#6 Post by uyjulian » Fri May 29, 2020 11:39 pm

What is your use case?
How would the player "cheat", and what are you trying to prevent?

User avatar
rayminator
Veteran
Posts: 444
Joined: Fri Feb 09, 2018 12:05 am
Projects: Redoing games to fix spelling mistakes other companys that don't care
Location: Canada
Contact:

Re: Is there any anti-cheat code

#7 Post by rayminator » Sat May 30, 2020 12:56 am

Well think about it about it money or love something like that how to stop people from changing the variable what they want to do so if they change it.. it changes back to the original where they started at to say they started to love at 10 if they change it to 20 it will go back to 10 or it will cancel the game
when I try to help someone I point them into 2 direction what's right and wrong so they can learn how to

User avatar
rayminator
Veteran
Posts: 444
Joined: Fri Feb 09, 2018 12:05 am
Projects: Redoing games to fix spelling mistakes other companys that don't care
Location: Canada
Contact:

Re: Is there any anti-cheat code

#8 Post by rayminator » Sat May 30, 2020 1:07 am

what I want to do is that If anybody change the veritable will end up in a very bad ending like death

so if love is at 50 and someone change it to 100 the game will fail

I'm am learning how to do thing on me own but I 'll do need help on thing I need help on but I'm just for a example on how to
when I try to help someone I point them into 2 direction what's right and wrong so they can learn how to

User avatar
Per K Grok
Miko-Class Veteran
Posts: 728
Joined: Fri May 18, 2018 1:02 am
Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1 & 2
itch: per-k-grok
Location: Sverige
Contact:

Re: Is there any anti-cheat code

#9 Post by Per K Grok » Sat May 30, 2020 2:49 am

rayminator wrote:
Sun Jul 28, 2019 9:05 am
Is there any anti-cheat code or anti-save-edit code for renpy i have look for it by google doesn't show anything and tried to search here it always show a white blink screen that says you have cheated game over
If what you want to achieve is to prevent a player from going into the script files and change variables in the script, another way to go is to archive the script-files in the build options.

build.classify('game/**.rpy', 'archive')
build.classify('game/**.rpyc', 'archive')

It makes it harder for the user to make that kind of changes (but not impossible).

https://www.renpy.org/doc/html/build.html#archives

User avatar
akio93
Newbie
Posts: 5
Joined: Thu Apr 04, 2019 11:18 pm
Contact:

Re: Is there any anti-cheat code

#10 Post by akio93 » Sat May 30, 2020 4:21 am

I agree to above me. The only solution you can do is to archive the files if you don't want players to access your game script.

But if you really want something like you're describing, i think 'Save the date' is a good example when a player open the game files then changes something on the script. They get a fake happy ending instead of really saving your date.
There's also '[redacted] life' that uses the same tactic but opposite. You have to 'hacked' the game to win the game. I think doki doki game also do that but I never played the game so I'm not sure.

User avatar
isobellesophia
Miko-Class Veteran
Posts: 976
Joined: Mon Jan 07, 2019 2:55 am
Completed: None
Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
Organization: Friendly Teachers series
Deviantart: SophBelle
itch: Child Creation
Location: Philippines, Mindanao
Contact:

Re: Is there any anti-cheat code

#11 Post by isobellesophia » Sat May 30, 2020 4:34 am

Similar to DDLC, can be cheated however, only when you restore the deleted files by the character Monika, and after when the player loads a save, the character will be prevented on continuing the game and it will be pushed back to the main menu or forced to quit the game completely, its kinda hard i would imagine.
I am a friendly user, please respect and have a good day.


Image

Image


User avatar
rayminator
Veteran
Posts: 444
Joined: Fri Feb 09, 2018 12:05 am
Projects: Redoing games to fix spelling mistakes other companys that don't care
Location: Canada
Contact:

Re: Is there any anti-cheat code

#12 Post by rayminator » Sat May 30, 2020 10:33 am

I know all that but look at bright past
https://www.patreon.com/kosmosgames

he or she figured out how to do it courage if someone changes the number it resets back where it was
when I try to help someone I point them into 2 direction what's right and wrong so they can learn how to

User avatar
uyjulian
Regular
Posts: 95
Joined: Sun Mar 08, 2015 1:40 pm
Github: uyjulian
Contact:

Re: Is there any anti-cheat code

#13 Post by uyjulian » Sat May 30, 2020 10:54 am

One way to do that is to store a calculated variable.
Example (if original variable is a):

b = a * 2

Where a is used, you can do this instead:

b / 2

This means that it is more difficult to change the variable when you don't know how it is calculated.

User avatar
rayminator
Veteran
Posts: 444
Joined: Fri Feb 09, 2018 12:05 am
Projects: Redoing games to fix spelling mistakes other companys that don't care
Location: Canada
Contact:

Re: Is there any anti-cheat code

#14 Post by rayminator » Wed Jun 10, 2020 8:40 pm

it just that I want to learn how to do this that's all I just need a example of it that all
when I try to help someone I point them into 2 direction what's right and wrong so they can learn how to

rames44
Veteran
Posts: 231
Joined: Sun May 29, 2016 4:38 pm
Contact:

Re: Is there any anti-cheat code

#15 Post by rames44 » Thu Jun 11, 2020 12:49 pm

Essentially, you can make this harder for the casual player by being tricky about how you store your data, having multiple copies, using checksums and the like, but, at the end of the day, you can’t completely prevent it. People can recover your Ren’py code with decompilers that are out there, analyze what you’re doing, and then either just call your functions from the console, or recreate what you did, or disable your checks, etc. This is similar to DRM - everything is in their hands, so you can’t totally prevent it, just give them more hoops to jump through.

Ren’py isn’t unique in this respect, by the way. Unity has the same issue, since it’s possible to decompile C# with relative ease. My advice? Don’t worry about it. If they want to cheat, they’ll cheat. Not your problem. Give them something they’ll enjoy (whether by cheating or not) and your job is done.

Post Reply

Who is online

Users browsing this forum: dGameBoy101b