The Daily Click ::. Forums ::. Klik Coding Help ::. protecting INI files
 

Post Reply  Post Oekaki 
 

Posted By Message

gareth



Registered
  13/07/2002
Points
  1018
18th July, 2003 at 11:03:44 -

im making a game that uses a INI file to store information, so the player can load their game. but i have small probelm, the ini file can be opened by anyone and changed, ive seen in games like eternal daughter that no ini's are used, how else can i save info?? im using TGF by the way.

and another thing is there a search engine for the boards on DC, it would be really helpful

cheers
-gafy

 
n/a

gareth



Registered
  13/07/2002
Points
  1018
18th July, 2003 at 11:15:44 -

yes just found that search.

what i mean about the ini files is how do you save information like the what level the player is on, and then be able to load that level once the game has been exited and reopend, but without using an ini file as ini files can be easily changed.

 
n/a

Shen

Possibly Insane

Registered
  14/05/2002
Points
  3497
18th July, 2003 at 12:02:49 -

INI is the only way to go for TGF if you don't want to go complicated. I've written some articles on it tho, check profile.

 
gone fishin'

Jenswa

Possibly Insane

Registered
  26/08/2002
Points
  2723
18th July, 2003 at 15:40:25 -

Use the registry object and save your values in there.
Or make a complex algorithm so it's not easy to modify
your ini file.

But there may be a better way, but i haven't found it yet.

 
Image jenswa.neocities.org

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
18th July, 2003 at 18:12:22 -

You'll need to encrypt your ini file, search for "encrypt" in articles/whole DC.

-Andy

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

RapidFlash

Savior of the Universe

Registered
  14/05/2002
Points
  2712
19th July, 2003 at 11:37:09 -

Yeah, encrypt your ini (Encryption object) or just make your values odd e.g. value for level 1 is 32, for level 2 it's 97, level 3 56 etc.

 
http://www.klik-me.com

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
19th July, 2003 at 18:55:36 -

Another way of encryption is having a sum that all of your values must = and if they don't then you can reset the player's file. Eg.

Lives = 3
Level = 8
CheckSum = 11000

There the checksum is the binary of 24. So to check it is~

o start of frame
+ bin(valuefromgi("Lives") + valuefromgi("Level")) != valuefromgi("Checksum")

-Andy


 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Kris

Possibly Insane

Registered
  17/05/2002
Points
  2017
20th July, 2003 at 04:41:26 -

or make a CRC (Cyclic redundancy check) doodad.

 
"Say you're hanging from a huge cliff at the top of mt. everest and a guy comes along and says he'll save you, and proceeds to throw religious pamphlets at you while simultaniously giving a sermon." - Dustin G

RapidFlash

Savior of the Universe

Registered
  14/05/2002
Points
  2712
20th July, 2003 at 11:28:34 -

Eternal Daughter uses an array (I believe) to store data. I think yo can hack that with a hex editor.

 
http://www.klik-me.com

Jenswa

Possibly Insane

Registered
  26/08/2002
Points
  2723
21st July, 2003 at 16:01:41 -

There must be no logic in the encryption,
that way you can never 'hack' it,
unless you've played the game before

That binairy thing is a good one.

 
Image jenswa.neocities.org

Kris

Possibly Insane

Registered
  17/05/2002
Points
  2017
21st July, 2003 at 16:33:33 -

all encryption needs some form of logic or it won't be de-cryptable

 
"Say you're hanging from a huge cliff at the top of mt. everest and a guy comes along and says he'll save you, and proceeds to throw religious pamphlets at you while simultaniously giving a sermon." - Dustin G

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
22nd July, 2003 at 03:15:13 -

Lol. How can you hack something that doesn't do anything in the first place? If it was non-logical it wouldn't be de-cryptable as Kris A said. Therefore you couldn't de-crypt it to extract information for your app, and that means it becomes a usless ini file just sitting around.

-Andy


 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

DeadmanDines

Best Article Writer

Registered
  27/04/2006
Points
  4758
22nd July, 2003 at 04:31:19 -

Rapidflash: Yeah, the CNC Array Format can be editted in a hex editor as long as you know which bytes do what. I have a spec for it written down somewhere, if anyone wants it. You can also edit it through another Array Object, so you can create your own editors without needing to do any hex stuff if you want.

The advantage with the hex, though, is that you can get a bit more info (eg: is array global? is array numeric/text? is array 1-based?).

Surprisingly, though, Eternal Daughter seemed to have some other failsafe system that I have yet to decypher. Doesn't seem to be a checksum, but somehow even when editting the correct part of a Save Slot, it doesn't update when you load it, it just corrupts the save. Strange. (if anyone else has had more luck cracking ED's save slot system, give us a DC-mail).

Gareth: Get the binary object from www.3ee.com/docs/ and use blowfish encryption to enc/decrypt the ini.

 
191 / 9999 * 7 + 191 * 7

RapidFlash

Savior of the Universe

Registered
  14/05/2002
Points
  2712
22nd July, 2003 at 10:16:01 -

I think someone hacked the ED save file at the Blackeye Software forums (found it in a search once).

 
http://www.klik-me.com
   

Post Reply



 



Advertisement

Worth A Click