Page 2 of 2

Re: Is there any anti-cheat code

Posted: Sun Jun 14, 2020 12:25 pm
by seanthiar
Hi,

don't know, but the easiest way I think is to disable the developer tools. I found them enabled in many games/novels and that way you can easy change variables while playing, for example give yourself a ridiculous amount of money. I'm just a beginner with renpy , but I found if the phyton init got config.developer = False as a statement I couldn't open the developer tools ingame any more. That way cheating needs much more work.

Re: Is there any anti-cheat code

Posted: Sun Jun 14, 2020 5:01 pm
by Imperf3kt
Config.developer has been automatic for years, there is no need to manually disable it.

Re: Is there any anti-cheat code

Posted: Mon Jun 22, 2020 6:31 pm
by rayminator
Imperf3kt wrote:
Sun Jun 14, 2020 5:01 pm
Config.developer has been automatic for years, there is no need to manually disable it.
you right about that and I know no matter what you do people will find a way to cheat

but I'm going to repeat myself again

I just want a simple code that I can learn from how many time do I have to repeat myself 100 times or 10,000 times

I am not asking for someone to make me one I just to learn how to has to at least 10 line that I can read and learn from and to work with

Re: Is there any anti-cheat code

Posted: Mon Jun 22, 2020 8:00 pm
by rayminator
okay here some information

if lust hit one hundred the ends in bad income so I want to make sure if someone that changes lust to 100 it will automatically go back to where it was before it goes to the bad ending that what I'm tying to prevent of happening so if you change it to a hundred it will go back to 50,55,60,65 so on so if you change it will go back to that when you click or enter

so this is what I have so far

Code: Select all

if lust < 99:
        jump start
    elif lust == 100:
        jump rape

Re: Is there any anti-cheat code

Posted: Mon Jun 22, 2020 10:07 pm
by Imperf3kt
What people are trying to say is there isn't really an answer. Ordinarily players cannot edit the variables unless they're doing some kind of hackery - in which case if they've gone that far then they're just going to disable whatever anti-cheat script you add while they're at it.

However for sake of answering your question, use two variables. Increment them together. Check if they match or not before doing whatever they do. If they don't match someone has tampered with something.
Not foolproof, but better than "nothing"

Maybe record the time the variable changed? Check that.
Check the players current position in the dialogue - is it even possible for them to have that many points yet?

Coming up with these checks is pretty easy to think of, just browse the documentation and you'll see dozens of things that could be used like this, many of which have usage examples.

Re: Is there any anti-cheat code

Posted: Mon Jun 22, 2020 10:47 pm
by rayminator
Imperf3kt wrote:
Mon Jun 22, 2020 10:07 pm
What people are trying to say is there isn't really an answer. Ordinarily players cannot edit the variables unless they're doing some kind of hackery - in which case if they've gone that far then they're just going to disable whatever anti-cheat script you add while they're at it.

However for sake of answering your question, use two variables. Increment them together. Check if they match or not before doing whatever they do. If they don't match someone has tampered with something.
Not foolproof, but better than "nothing"

Maybe record the time the variable changed? Check that.
Check the players current position in the dialogue - is it even possible for them to have that many points yet?

Coming up with these checks is pretty easy to think of, just browse the documentation and you'll see dozens of things that could be used like this, many of which have usage examples.
yes I do understand that but there is one game that if you change to courage it will rest no matter what you change it too that is Bright Past try putting this into the game


$ allsmel= 100

better you will go back where it was

the game was bright past

here is the game if you want to try it I do have a mod for it as well
https://f95zone.to/threads/bright-past- ... mes.10622/

Re: Is there any anti-cheat code

Posted: Mon Jun 22, 2020 10:50 pm
by Imperf3kt
Note that the above link is NSFW and should be posted differently (not linked)

Re: Is there any anti-cheat code

Posted: Mon Jun 22, 2020 11:02 pm
by rayminator
Imperf3kt wrote:
Mon Jun 22, 2020 10:50 pm
Note that the above link is NSFW and should be posted differently (not linked)
yes your right you need to be registered to the site
https://mega.nz/file/7CgVSSQb#84EwqBG20 ... oPFqPUe-LQ
https://www.patreon.com/kosmosgames

what I'm try to do is to see if anyone that changes the lust to 100 meaning $ lust = 100 so it will go back so say it was 25 if the player change it to 100 it will automatically go back to 25 this way it will not go to bad ending
this is the reason why i ask how to reset a variable if someone change lust to 100 it automatically goes back down were it was before the game ends cause he would be charge for rape

yes I know what I asked for but someone could of show something that I can learn something by it instead of repeating myserlf

I know that you tried to help me before with the gallery but you have forgot one important thing I needed to know

hey there... there was one thing was missing

there is only a couple of ways I can learn if someone shows me how to or show video that's detail to detail that the only way I can learn
hope you do understand I might have a learning disorder but my IQ is extremely high

it's this code here

something like this

Code: Select all

$ persistent.unlock_62 = True
and here is mod I made bright past
https://mega.nz/#!HTJkXIwD!-vX52ku3-9cw ... b9BMi8Dp2A

Re: Is there any anti-cheat code

Posted: Thu Jul 02, 2020 9:19 pm
by rayminator
okay I do understand you all but you don't understand how I learn

I learn by someone showing me how to to do things or watching videos (but sometime watching videos doesn't help) so I need a sample code so I can play around with itthat all

Re: Is there any anti-cheat code

Posted: Sat Aug 15, 2020 4:05 pm
by ichfly
There are some ways to do that. However they can all be bypassed. The easiest way should be to save the variable in a separate File. Something like

import pickle
with open('<path>', 'wb') as f:
pickle.dump(var, f)

with open('<path>', 'rb') as f:
var = pickle.load(f)

Another thing I have seen is to encrypt the critical value and only decrypt it if you need it or if you need to change it. something like val ^= <key> (xor the good thing here is you can use the same function for encrypting and decrypting)

val ^= <key>
if val < 99:
#do stuff
val ^= <key>

I have also seen this: duplicate the variable encrypt one and at certain points check if they are still equal.

If you are worried about people injecting code into renpy you can set renpy/config.py force_archives to True.
Also You can change the obfuscation key for the Archives in loader.py in "def index_archives():" around "key = int(l[25:33], 16)"
Same in the creator tools/archiver.py around "def archive(prefix, files):" "key = random.randint(0, 0x7ffffffe)" or
launcher/game/archiver.rpy "self.key = 0x42424242" "self.f.write(b"RPA-3.0 %016x %08x\n" % (indexoff, self.key))" this prevents people from extracting data from the Files.

however everything here is easily bypassed if you know what you are doing.

If you want to bind the save to a CPU you can use the CPUID or
import getpass
getpass.getuser()
to generate the key