Game Data Protection Methods

Discussion in 'RGSSx Script Support' started by ??????, Jan 4, 2013.

    Tags:
  1. ??????

    ?????? Diabolical Codemaster Veteran

    Messages:
    6,264
    Likes Received:
    2,313
    Location:
    Your OS
    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 ?
     
    #1
  2. Jesse - PVGames

    Jesse - PVGames Game and Graphics Developer Veteran

    Messages:
    1,729
    Likes Received:
    2,708
    Location:
    U.S.
    First Language:
    English
    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.
     
    #2
  3. Robin

    Robin Veteran Veteran

    Messages:
    645
    Likes Received:
    73
    Location:
    England
    First Language:
    English
    Why do you feel there is?
     
    #3
  4. ♥SOURCE♥

    ♥SOURCE♥ Too sexy for your party. Member

    Messages:
    693
    Likes Received:
    410
    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.
     
    #4
    Oriceles likes this.
  5. Sailerius

    Sailerius Engineer Veteran

    Messages:
    606
    Likes Received:
    142
    Location:
    Seattle, WA
    First Language:
    English
    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.
     
    #5
  6. Kread-EX

    Kread-EX You're all bakas Veteran

    Messages:
    863
    Likes Received:
    81
    First Language:
    French
    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: Jan 5, 2013
    #6
  7. Migkwa

    Migkwa Villager Member

    Messages:
    17
    Likes Received:
    0
    First Language:
    English
    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".
     
    #7
  8. Tsukihime

    Tsukihime Veteran Veteran

    Messages:
    8,230
    Likes Received:
    3,070
    Location:
    Toronto
    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: Jan 5, 2013
    #8
  9. timk1980

    timk1980 Apprentice Member

    Messages:
    123
    Likes Received:
    42
    Location:
    Boston
    First Language:
    English
    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.
     
    #9
  10. ??????

    ?????? Diabolical Codemaster Veteran

    Messages:
    6,264
    Likes Received:
    2,313
    Location:
    Your OS
    First Language:
    Binary
    Primarily Uses:
    RMMV
    im not really sure, its just when i think "should others be able to hack my game" my automatic reaction is "Hell No!"

    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.

    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" .

    Optiiion two please ^_^

    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...

    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 :(
     
    #10
  11. ekomega

    ekomega Villager Member

    Messages:
    20
    Likes Received:
    1
    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?
     
    #11
    petschko likes this.
  12. ??????

    ?????? Diabolical Codemaster Veteran

    Messages:
    6,264
    Likes Received:
    2,313
    Location:
    Your OS
    First Language:
    Binary
    Primarily Uses:
    RMMV
    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
     
    #12
  13. ekomega

    ekomega Villager Member

    Messages:
    20
    Likes Received:
    1
    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.
     
    #13
  14. ??????

    ?????? Diabolical Codemaster Veteran

    Messages:
    6,264
    Likes Received:
    2,313
    Location:
    Your OS
    First Language:
    Binary
    Primarily Uses:
    RMMV
    Indeed, anyway i was just wondering for future reference really, not like im making any kind of commercial game right now :p
     
    #14
  15. Clord

    Clord Nya~ Veteran

    Messages:
    2,376
    Likes Received:
    394
    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: Jan 10, 2013
    #15
  16. Tsukihime

    Tsukihime Veteran Veteran

    Messages:
    8,230
    Likes Received:
    3,070
    Location:
    Toronto
    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: Jan 10, 2013
    #16
    Acetonide likes this.
  17. Abi

    Abi Veteran Veteran

    Messages:
    191
    Likes Received:
    10
    Location:
    NW Ohio
    First Language:
    English
    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?
     
    #17
  18. Tsukihime

    Tsukihime Veteran Veteran

    Messages:
    8,230
    Likes Received:
    3,070
    Location:
    Toronto
    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: Jan 10, 2013
    #18
  19. Kread-EX

    Kread-EX You're all bakas Veteran

    Messages:
    863
    Likes Received:
    81
    First Language:
    French
    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.
     
    #19
  20. ??????

    ?????? Diabolical Codemaster Veteran

    Messages:
    6,264
    Likes Received:
    2,313
    Location:
    Your OS
    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.
     
    #20

Share This Page