Game Data Protection Methods

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,271
Reaction score
2,329
First Language
Binary
Primarily Uses
RMMV
Lately I have been thinking about "Anti-Hack" methods and what would be the best method of writing methods that have a built in "Anti-hack" feature.

to elaborate on what i mean...

lets say you want to protect your game against things like cheat engine ( a popular begginer hack tool ) , a tool that lets you change values within your games

e.g i could change an actors level, exp required/total, hp, mp, tp, money, params, playtime, or anything else with a value.

all i can think of to do this is by making the values displayed in game completely different from the values defined in the coding. for example.

lets say an actors current hp ( in game ) is 50, it could be defined in the code that the actors real hp is 150 / 3 ( or more advanced formulas, placed in param_base or somewhere similar ) this would , in a round about way protect ( to an extent ) that actors hp being modified by changing the value.

The only problem with doing it this way isi would have to go through EVERYTHING with a value and come up with some elaborate way of displaying and gaining it ...

So...

Is there better ways to protect my game data ?

Is there already basic "Hack-Protection" type scripts available ?

Does anyone have any ideas or input as to better / more efficient methods of doing this ?

Is there even a point in thinking up anti-hack methods for rpg maker games ? ( i feel there is, but is the playing community large enough, and would they even want to cheat in an rpg maker styled game ?)

Anyone have any opinions / comments ?
 

Jesse - PVGames

Game and Graphics Developer
Veteran
Joined
Jun 23, 2012
Messages
1,738
Reaction score
2,734
First Language
English
Primarily Uses
To be honest, I don't really think there is a point in wasting time to protect against this type of hack. If someone is adamant enough to break into the game and fiddle with the numbers, then so be it, they will probably do it regardless. If this somehow enhances their enjoyment of the game, then just let them do it. Though I doubt this will be a particularly common occurance.
 

Robin

Veteran
Veteran
Joined
Mar 25, 2012
Messages
645
Reaction score
73
First Language
English
Primarily Uses
Is there even a point in thinking up anti-hack methods for rpg maker games ? ( i feel there is, but is the playing community large enough, and would they even want to cheat in an rpg maker styled game ?)
Why do you feel there is?
 

♥SOURCE♥

Too sexy for your party.
Member
Joined
Mar 14, 2012
Messages
693
Reaction score
410
Primarily Uses
I don't think this is necessary, games are being hacked all the time, some players enjoy it better by cheating, others don't. Both cases enjoy the game, and I think that's the point of a game.
 

Sailerius

Engineer
Veteran
Joined
Mar 17, 2012
Messages
606
Reaction score
142
First Language
English
Primarily Uses
It's a waste of time and energy. All the data is accessed in memory at some time when the game is being played and then it's unprotected. This is how most hacks work.

lets say an actors current hp ( in game ) is 50, it could be defined in the code that the actors real hp is 150 / 3 ( or more advanced formulas, placed in param_base or somewhere similar ) this would , in a round about way protect ( to an extent ) that actors hp being modified by changing the value.
150/3 just gets interpreted as 50. Even if this weren't true, couldn't they just change the 150 and get the same effect? The only thing you would accomplish is make your code really hard to use and maintain.
 

Kread-EX

You're all bakas
Veteran
Joined
Mar 16, 2012
Messages
863
Reaction score
81
First Language
French
Primarily Uses
all i can think of to do this is by making the values displayed in game completely different from the values defined in the coding. for example.

lets say an actors current hp ( in game ) is 50, it could be defined in the code that the actors real hp is 150 / 3 ( or more advanced formulas, placed in param_base or somewhere similar ) this would , in a round about way protect ( to an extent ) that actors hp being modified by changing the value.
Wouldn't change anything. The savefile stores the final value regardless of the calculation formula. I guess you could encrypt the savefile too, or at least obfuscate but it's still useless because you can just edit the values in memory.

And if people are motivated enough to use a hex editor to cheat, just let them do. It's not like it hurts your game.

EDIT: Ninja'd by Sai.
 
Last edited by a moderator:

Migkwa

Villager
Member
Joined
Dec 16, 2012
Messages
17
Reaction score
0
First Language
English
Primarily Uses
Would you rather spend time and effort making it harder for someone to be able to hack their copy and change their play experience or spend time creating a better experience for those that actually want to play your game?

If this was going to be a game that people played together then you have more concern over people doing things like that. As a single player game, anyone who is not playing it and cheating should not be part of your target audience and you should not even worry about what they do to have their "fun".
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,230
Reaction score
3,071
First Language
English
I am assuming you would at least need to modify the exe or run it inside some sort of sandbox. Not something that the executable would be doing like interpreting code?
 
Last edited by a moderator:

timk1980

Apprentice
Member
Joined
Mar 15, 2012
Messages
123
Reaction score
42
First Language
English
Primarily Uses
I agree with others, that there is really no point in making save files hack proof. If online play of some kind was a factor, and cheating might disrupt the experience for others, it would be a different story, but in the case of a typical RPG Maker game, there is really little point.

That said, if I were to put in a basic system, I would do add a new attribute to several of the objects that get saved, that could function as a checksum. Update the save methods so that checksums for each actor (for instance) are recalculated just before saving. Update the load methods so that checksums are confirmed after loading, and if a discrepancy is found, puke out a "invalid save file" error. Now, of course, this is far from hackproof, but it's pretty lightweight, doesn't require much change in code, and prevents someone from seeing their HP as 125, and searching for a 125 value in the savefile and updating it.

If I were in the hypothetical scenario I described where more security were called for, such as online play, I'd add a bit more fancy logic than just what I described, perhaps encrypting the checksum, or adding multiple such checksums, among other things.
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,271
Reaction score
2,329
First Language
Binary
Primarily Uses
RMMV
Why do you feel there is?
im not really sure, its just when i think "should others be able to hack my game" my automatic reaction is "Hell No!"

I don't think this is necessary, games are being hacked all the time, some players enjoy it better by cheating, others don't. Both cases enjoy the game, and I think that's the point of a game.
This is very true, i myself have used cheats and basic hacks in games before, things like "unlock xx" , move money , and other usual things.

that said, i do think games are more enjoyable when you cannot hack them, even the hacking process becomes more enjoyable when your trying to figure out what you can and cant modify.

It's a waste of time and energy. All the data is accessed in memory at some time when the game is being played and then it's unprotected. This is how most hacks work.

150/3 just gets interpreted as 50. Even if this weren't true, couldn't they just change the 150 and get the same effect? The only thing you would accomplish is make your code really hard to use and maintain.
This is very very true, also the value of 150 could only be changed if the person hacking knew that value, if its completely hidden from prying eyes then most people wouldnt think " well im trynig to find a value of 50, so i better look for a value of 150 instead" .

Would you rather spend time and effort making it harder for someone to be able to hack their copy and change their play experience or spend time creating a better experience for those that actually want to play your game?
Optiiion two please ^_^

I am assuming you would at least need to modify the exe or run it inside some sort of sandbox. Not something that the executable would be doing like interpreting code?
I assumed it could be done via code, e.g if your code is constantly re-assigning actors values depending on their formula, even if you changed one value, within a few minutes it would be reset.

At least thats what i first thought...

I agree with others, that there is really no point in making save files hack proof. If online play of some kind was a factor, and cheating might disrupt the experience for others, it would be a different story, but in the case of a typical RPG Maker game, there is really little point.

That said, if I were to put in a basic system, I would do add a new attribute to several of the objects that get saved, that could function as a checksum. Update the save methods so that checksums for each actor (for instance) are recalculated just before saving. Update the load methods so that checksums are confirmed after loading, and if a discrepancy is found, puke out a "invalid save file" error. Now, of course, this is far from hackproof, but it's pretty lightweight, doesn't require much change in code, and prevents someone from seeing their HP as 125, and searching for a 125 value in the savefile and updating it.

If I were in the hypothetical scenario I described where more security were called for, such as online play, I'd add a bit more fancy logic than just what I described, perhaps encrypting the checksum, or adding multiple such checksums, among other things.
This seems like a better method than what i was thinking, but overall it seems like the common opinion is that there is really no need for anti hack methods :(
 

ekomega

Villager
Member
Joined
Jun 1, 2012
Messages
20
Reaction score
1
Primarily Uses
People only do this kind of "hack" to improve their enjoyment of the game. It doesn't hurt you, so you should probably let them have it. The methods to prevent it are difficult, anyway.

The bigger question you should ask is, "If someone went through the trouble to hack my game to change their stats, levels, money, exp, etc., then did I design my game right?" The answer is probably no, otherwise, why would they bother to hack it?
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,271
Reaction score
2,329
First Language
Binary
Primarily Uses
RMMV
People only do this kind of "hack" to improve their enjoyment of the game. It doesn't hurt you, so you should probably let them have it. The methods to prevent it are difficult, anyway.

The bigger question you should ask is, "If someone went through the trouble to hack my game to change their stats, levels, money, exp, etc., then did I design my game right?" The answer is probably no, otherwise, why would they bother to hack it?
That is a very fair statement.

consider this...

Competitive games, things like x-box's gamer scores, competitiveness between friends to "be the best" lets say you could transfer data from one save file into another via an in game scene.

I think when things of that nature are taken into account it doesn't really matter if you made the game right or not. at the end of the day if someone doesn't like your game they will turn it off and move on with their life. but if someone does like the game and just isnt very good at it, or doesn't have the time to become as powerful as they want then hacking is a pretty obvious choice.

At least thats what i have always thought :p
 

ekomega

Villager
Member
Joined
Jun 1, 2012
Messages
20
Reaction score
1
Primarily Uses
Sure. I didn't mean that the bad design meant they didn't like the game. Obviously if they're going through the trouble to hack the game and cheat, they are interested in playing your game. But.. maybe that just means your design needed to be tweaked, rather than thrown out?

I don't know. Consumers are hard to deal with.
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,271
Reaction score
2,329
First Language
Binary
Primarily Uses
RMMV
Consumers are hard to deal with.
Indeed, anyway i was just wondering for future reference really, not like im making any kind of commercial game right now :p
 

Clord

Nya~
Veteran
Joined
Aug 5, 2012
Messages
2,376
Reaction score
394
Primarily Uses
There is public free tool available to decrypt RPG Maker series games and then edit it as if it was your own project. You would need encrypt game differently to stop that. Of course that would mean that game.exe would not even know how to read that data, which would make said better protection methods useless. Naturally this really sucks for us who are going to sell games commercially with RPG Maker series tools.
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,230
Reaction score
3,071
First Language
English
You do not need game.exe to read the data; you simply need to write your own file IO methods to read from your custom archive.

That's how white-flute does it with crypt-EX

Several games use that encryption method and people are constantly complaining about how they are unable to unpack the files and get the resources.
 
Last edited by a moderator:

Abi

Veteran
Veteran
Joined
Dec 3, 2012
Messages
191
Reaction score
10
First Language
English
Primarily Uses
Dang... too bad Crypt-EX documentation is entirely in Japanese. I somehow doubt babelfish or google translate will produce anything legible either. Oh well. Hopefully it's pretty much self-explanatory?
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,230
Reaction score
3,071
First Language
English
I have written a tutorial on how to use crypt-EX: http://www.rpgmakerv...ata-encryption/

Note that it does not support anything other than PNG format when it comes to images (took me a while to figure that out, though that might be noted in the readme). Maybe there is something else to use that will properly handle other image formats but I couldn't figure out what.

Honestly I would have preferred to use their rgss3a packer...if it took more than just png's...

There may be other issues as well.
 
Last edited by a moderator:

Kread-EX

You're all bakas
Veteran
Joined
Mar 16, 2012
Messages
863
Reaction score
81
First Language
French
Primarily Uses
Crypt-EX provides resource protection not game state protection, and savefiles aren't encrypted (you need to use Comp-SaveDataEX for that). Side note, Whiteflute mentions that some users reported cases of serious lag on projects using Crypt-EX. Seems rare, but it's something to keep in mind.

Aside from that, it stops current public decrypters without fail. Doesn't mean it'll always be like this though, considering there is a decrypter for his previous encryption method. I guess it'll depend on its popularity. Also, resources are still uncompressed and unencrypted in the RAM as long as they aren't disposed by the garbage collector. Not expecting RM average thief to actually manage to retrieve them but it's still handy to remember that.

The thread is more about game hacks than resource theft though.
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,271
Reaction score
2,329
First Language
Binary
Primarily Uses
RMMV
This is all very interesting. I wasnt even aware that any such tools where out there to hack vx ace encrypted archives... not properly hack them and make them your own project at least...

One thing im now wondering, how exactly did they define the "encrypt" feature ? i know its obviously hidden to deter people from hacking it as easily, but i would assume they coded it in rgss3 ? or does the rpg vx ace program encrypt using some other code ? like from the actual application.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

I really need to stop thinking there are new freebies just because someone made a new post in the freebies subforum lol.
AND just like that..... I got STEAM DLC up and working! YES!
Game making is like a marathon, except the last 1/4 is more like sprint... a very long and intense sprint.
Finally got to finish the demo for my project!
Another week has gone by. Maybe you made changes to your project/s. Maybe you didn't. Nonetheless, THAT IS NO EXCUSE TO NOT BACK THEM UP O_O!

Forum statistics

Threads
93,440
Messages
912,436
Members
122,965
Latest member
Karic31
Top