UltimateSonic Posted July 19, 2006 Report Share Posted July 19, 2006 Is it possible to encrypt an INI file? MMF only saves the INI file in the Windows directory right? So if someone knew that they can just mess with the INI save file for a game. Is it possible to encrypt it when saving it? Link to comment Share on other sites More sharing options...
Rael0505 Posted July 20, 2006 Report Share Posted July 20, 2006 Blue Frenzy renamed his INI files to DLL to fool stupid people. Try that? Link to comment Share on other sites More sharing options...
Andrew Posted July 20, 2006 Report Share Posted July 20, 2006 Better idea would be to use the Dynamic Array 2 object. Link to comment Share on other sites More sharing options...
PkR Posted July 20, 2006 Report Share Posted July 20, 2006 INI is quite old and insecure, it would be better if you moved to things like AssArray or something else. Link to comment Share on other sites More sharing options...
LarkSS Posted July 20, 2006 Report Share Posted July 20, 2006 Answer to question: http://www.clickteam.info/extensions/extview.php?id=78 And you can save inis anywhere, not just in the windows directory. Link to comment Share on other sites More sharing options...
UltimateSonic Posted July 20, 2006 Author Report Share Posted July 20, 2006 oh ok. I saw a tutorial on saving with arrays on the SFGHQ tuorial page but I didn't understand it. If arrays are safer, I'd like to do it that way. Can someone point me in the right direction to start? Link to comment Share on other sites More sharing options...
Rael0505 Posted July 20, 2006 Report Share Posted July 20, 2006 Check the tutorials on the main site. Link to comment Share on other sites More sharing options...
Mark the Echidna Posted July 20, 2006 Report Share Posted July 20, 2006 He said he checked them/it. Well, arrays are somehow like buildings, in which each floor stores a value. So, for example, if you have an array of 20 positions, you can store 20 values, one on each position. Be setting a standard of what position means in your array, you can store a save file. For example: Position 0 stores the number of lives, Position 1 stores the last level unlocked, Position 2 stores the player score. You set this values, then save your array file. When you load your array file again, you just have to look up for them, to see how was the game before saving. CNC Array files are safer than inis, because their content is in binary data, so people would need an Hex editor (and would have to reverse engineer the file format, to find what each byte does.) ----- But it's also possible to add a checking system to your INI files, so them cannot be edited (well, actually, they can still be edited, but editing them will render them invalid). It works like this: If your save game INI is like, this: [Saved_Game] Score=3272313 Lives=6 Level=2 You can make a calculation with this values, and create a checking value. So for example, you decide your checking formula is, for example: Score * Lives / Level so you get 3272313 * 6 / 2 = 9816939. That's your checking value [Saved_Game] Score=3272313 Lives=6 Level=2 Checking=9816939 When you load the values of the ini file, see if the checking value is equal to the calculated value (restoring first the other properties and applying the formula to them). If it its, you get the user to play, normally. If it's not, you close the game. Of course, you can make a harder to guess formula, for example involving powers, or trigonometric functions. Link to comment Share on other sites More sharing options...
Rael0505 Posted July 20, 2006 Report Share Posted July 20, 2006 He said he checked them/it. Somehow, I completely missed that. Oops. Link to comment Share on other sites More sharing options...
UltimateSonic Posted July 20, 2006 Author Report Share Posted July 20, 2006 There is a function to create arrays, Right? If so I should figure it out. Otherwise I'll post back here. Thanks I think I understand Edit: I think I got it. Can you use the Assarray extension? Link to comment Share on other sites More sharing options...
Andrew Posted July 21, 2006 Report Share Posted July 21, 2006 Yes. Link to comment Share on other sites More sharing options...
Serephim Posted July 23, 2006 Report Share Posted July 23, 2006 Mark has the simplest and smartest method. Just make a really, really, really, really, really, really, reallyreallyreally long Mathmatical equation that adds all the values together and puts together a specfic value with like 21 digits, so that solving the equation is next to impossible = not worth the time. Then if they change anything, they get a file Corruption message and it deletes their saved game. (p2nt, stupid INI editing cheaters!) Link to comment Share on other sites More sharing options...
Andrew Posted July 24, 2006 Report Share Posted July 24, 2006 Or solve the entire problem and just use AssArray's BUILT-IN encryption. Seraph: By simple, do you mean unnecessarily complicated? Link to comment Share on other sites More sharing options...
UltimateSonic Posted July 24, 2006 Author Report Share Posted July 24, 2006 Thats what I'll probably end up doing... Link to comment Share on other sites More sharing options...
Recommended Posts