Syncing games with each other

iRonan

Scrub
Member
Joined
Feb 26, 2014
Messages
152
Reaction score
14
First Language
Dutch
Primarily Uses
Hi guys,

I have a small question, are we able to "sync" save files to more games? Like we have "game1" and "game2", a player has played "game1" and starts playing "game2", he has the same amount of money and the same armour.

Is there a way to do this?
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Do those games have anything in common?
 
Last edited by a moderator:

iRonan

Scrub
Member
Joined
Feb 26, 2014
Messages
152
Reaction score
14
First Language
Dutch
Primarily Uses
Do those games have anything in common?
They do, I actually want to have money syncing but that's it. I think it's possible, by writing a file with the players' money and equipment and loading it when a player starts his game.
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,203
First Language
Binary
Primarily Uses
RMMZ
You could simply dump the gold value into a file and read the file from the second game.

Depending on how you implement it would depend on the issues you could encounter.
 

iRonan

Scrub
Member
Joined
Feb 26, 2014
Messages
152
Reaction score
14
First Language
Dutch
Primarily Uses
You could simply dump the gold value into a file and read the file from the second game.

Depending on how you implement it would depend on the issues you could encounter.
That's what I was thinking, but I wasn't sure it was possible with RGSS, I think that will work!
 

Zeriab

Huggins!
Veteran
Joined
Mar 20, 2012
Messages
1,268
Reaction score
1,422
First Language
English
Primarily Uses
RMXP
It definitely is possible to do that with RGSS.

Be sure to version your saves/exports.
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,203
First Language
Binary
Primarily Uses
RMMZ
Another thing to note is that the file MUST be encrypted in some sort of way.

By Marshal.dumping the value it will do this to some effect, but im pretty sure people can mess with marshalled data without corrupting it.

You might want to create some kind of simple encryption method...

maybe like this...

module Test_Encrypt  ENC = {  0 => 1,  1 => 2,  2 => 3,  3 => 4,  4 => 5,  5 => 6,  6 => 7,  7 => 8,  8 => 9,  9 => 0,  }   def self.enc(data)    new_data = ""    data.to_s.split(//).each do |i|      new_data += ENC[i.to_i].to_s    end    new_data  end endp Test_Encrypt.enc(999)Edit:

This would avoid people from simply editing the file to give their char ridiculous gold

Edit 2:

The point of this would be to encrypt data BEFORE you dump it. and AFTER you load it.
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
@Dekita - if you do that, then encrypt the save file of the game too. It's too easy to edit RM save files, so unless you encrypt both of the files, there's not much point in it since if you only encrypt one, I can simply choose to edit the other.
 
Last edited by a moderator:

Mouser

Veteran
Veteran
Joined
Aug 19, 2012
Messages
1,245
Reaction score
264
First Language
English
Primarily Uses
Another thing to note is that the file MUST be encrypted in some sort of way.
Is that an EULA requirement or just a best practices thing?
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
it's definitely not a MUST and as I said above, if you only do it for the gold file to be loaded, then it's kind of useless since the player can just load the file first, then save their new game, then edit the resulting save file...
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,203
First Language
Binary
Primarily Uses
RMMZ
@mouser,

Its just a personal preference really.

I mean, if the file to store the data is simply called 'Player Gold' and when you open it, it has a vale of 908, you are probably going to be able to deduce that by increasing this value, you will gain more gold.

@Adiktuzmiko

You are correct in stating that it's not a 'MUST', but realistically, if you are doing thins kind of thing ( to allow information to be transferred between games) its best to ensure that your data is going to be as safe as possible.

Also, the encryption method has to be ALOT more advanced if you want to encrypt all save file data before its dumped. you have to take into account every possible character that a script could include. Correct line breaks. Correct translation of text into variables etc..
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
You should encrypt all save data if you encrypt the gold one... since as I said, if it's only the gold one that is encrypted, then nothing is stopping me from simply just loading it first, then saving the game and modify the new save file instead (which is non encrypted)...


anyway, using marshal.dump won't make the value that shows on the file as 908 directly. so at least it's kind of not too easy to modify using text files, but won't stop an RM user from easily modifying that. For non-RM users, I guess the marshal.dump might be enough to keep normal players from modifying the file. And you can always keep the file on a hidden location just in case


Plus if the argument is that these people can alter the marshal.dumped file without corrupting it, then all the more reason that both files must be encrypted... because again, they can just modify the normal save file which also utilizes marshal.dump, effectively making encrypting only the gold file as useless
 
Last edited by a moderator:

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,203
First Language
Binary
Primarily Uses
RMMZ
Yea, but dumping it via marshal is an encryption method. And a well known one at that.

Really, there are many ways you could achieve such a feature and additional encryption isnt really a requirement. Just a personal preference.

The last time I tried to make a full encryption method, I encountered various issues with reloading the data :/

Mainly due to having the variables correctly reinitialized from a text file :(

Dont think I even have that project any more ^_^
 

iRonan

Scrub
Member
Joined
Feb 26, 2014
Messages
152
Reaction score
14
First Language
Dutch
Primarily Uses
I think I found it out a bit, now I'm wondering if it's possible to store this data on a server so players can't edit it? Saves me a lot of time creating the encrypt script.
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,203
First Language
Binary
Primarily Uses
RMMZ
I think I found it out a bit, now I'm wondering if it's possible to store this data on a server so players can't edit it? Saves me a lot of time creating the encrypt script.
Yes, it is.
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,042
First Language
French
Primarily Uses
RMMV
you can always put the position of the Marshal file  in the System folder who when you encrypte the game it hide the system folder ...it is a good way to make you file protect rigth?
 

iRonan

Scrub
Member
Joined
Feb 26, 2014
Messages
152
Reaction score
14
First Language
Dutch
Primarily Uses
you can always put the position of the Marshal file  in the System folder who when you encrypte the game it hide the system folder ...it is a good way to make you file protect rigth?
It's not, it's easy to get inside a hidden folder. A server is better and ALMOST impossible to cheat on, nobody would attack/hack a server just to change their money.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
I don't understand why you guys are talking about encryption, servers, or even creating new files.


Aren't you just reading data from a save file and transferring it to a new game?

Saves me a lot of time creating the encrypt script.
Yes, but now you have a different problem. Possibly several new problems.
 
Last edited by a moderator:

Mouser

Veteran
Veteran
Joined
Aug 19, 2012
Messages
1,245
Reaction score
264
First Language
English
Primarily Uses
It's not, it's easy to get inside a hidden folder. A server is better and ALMOST impossible to cheat on, nobody would attack/hack a server just to change their money.
It's a single player game. Who cares?

Cheaters gonna cheat.

In all seriousness, while you CAN do some of the things suggested in this thread, the amount of time and effort that it would take is time and effort that could be spent improving the game. You've got so much time to give, is keeping people from 'cheating' really worth a large chunk of it? Just doing a simple Marshall dump and reload is going to keep most of your players (who probably don't know Ruby from a sapphire) out of your data.
 

iRonan

Scrub
Member
Joined
Feb 26, 2014
Messages
152
Reaction score
14
First Language
Dutch
Primarily Uses
It's a single player game. Who cares?

Cheaters gonna cheat.

In all seriousness, while you CAN do some of the things suggested in this thread, the amount of time and effort that it would take is time and effort that could be spent improving the game. You've got so much time to give, is keeping people from 'cheating' really worth a large chunk of it? Just doing a simple Marshall dump and reload is going to keep most of your players (who probably don't know Ruby from a sapphire) out of your data.
I actually care because I want it to be played fair, although it's not really important to encrypt it, and put the data on a server instead and load it. I actually care about the cheaters, because I hate cheaters and prefer playing a game fair, so I want this played fair too, as it will be used on other games and on the forums from those games. It's more like a game network
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,574
Latest member
nikisknight
Top