Sers,
some of you have maybe seen my previews of my inventory and interfacesystems. I'm thinking about adding a multiplayer mod of my RPG. And for that mod I'm thinking of a save/load system that uses a code. So far no problem. But because of the complexity of my RPG much data has to be stored. That means the code will become veeeeeeery long. The code is a string and will displayed to the player who wants to save. For now I don't think about encryption, cause my problem is the length of the code.
Things that have to be stored:
A hero can carry up to 90 items in his backpack, 5 in his belt and 13 in his equipment slots => up to 108 different items to store. Every item needs 2 digits for coding it's type and an additional one for coding the stacksize. In the worst case I'll have to store 108 different items and 95 of them are itemsstacks:
=> 95 * 3 + 13 * 2 = 311 digits for the items(worst case)
The hero lvl and his attributs will take 8 digits. Talentpoints won't be saved. They'll be given in depency of the herolvl. So you'll have to reskill your talents after loading your hero.
For the weapon/armourskills of the hero I have to store the progress of every skill, a number between 1 and 250 => 2 digits in hexadecimal (there are all about 28 skills)
=> 28 skills * 2 = 56 digits
That comes to an overall result of MAXIMAL(if your hero carries 108 different items and 95 of them are itemstacks) 375 digits*sigh*. A 375 digitscode will look like:
And my question is, is there a way to compress that code and reduce its size without losing data?
You can save the code by capturing it with a screenshot, but you'll have to enter it manually, as long you didn't save it in a *.txt-file and simply copy&paste in game(that's the way I would do it).
If anyone has an idea, plz answer
Thy
some of you have maybe seen my previews of my inventory and interfacesystems. I'm thinking about adding a multiplayer mod of my RPG. And for that mod I'm thinking of a save/load system that uses a code. So far no problem. But because of the complexity of my RPG much data has to be stored. That means the code will become veeeeeeery long. The code is a string and will displayed to the player who wants to save. For now I don't think about encryption, cause my problem is the length of the code.
Things that have to be stored:
A hero can carry up to 90 items in his backpack, 5 in his belt and 13 in his equipment slots => up to 108 different items to store. Every item needs 2 digits for coding it's type and an additional one for coding the stacksize. In the worst case I'll have to store 108 different items and 95 of them are itemsstacks:
=> 95 * 3 + 13 * 2 = 311 digits for the items(worst case)
The hero lvl and his attributs will take 8 digits. Talentpoints won't be saved. They'll be given in depency of the herolvl. So you'll have to reskill your talents after loading your hero.
For the weapon/armourskills of the hero I have to store the progress of every skill, a number between 1 and 250 => 2 digits in hexadecimal (there are all about 28 skills)
=> 28 skills * 2 = 56 digits
That comes to an overall result of MAXIMAL(if your hero carries 108 different items and 95 of them are itemstacks) 375 digits*sigh*. A 375 digitscode will look like:
And my question is, is there a way to compress that code and reduce its size without losing data?
You can save the code by capturing it with a screenshot, but you'll have to enter it manually, as long you didn't save it in a *.txt-file and simply copy&paste in game(that's the way I would do it).
If anyone has an idea, plz answer
Thy