Syncing games with each other

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?
Do those games have anything in common?
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.
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.
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!
It definitely is possible to do that with RGSS.

Be sure to version your saves/exports.
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.
@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.
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?
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...
@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..
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
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 ^_^
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.
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.
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?
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.
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.
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.
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

Original thread: https://forums.rpgmakerweb.com/threads/syncing-games-with-each-other.25126/