HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

save / load system

04-13-2008, 11:09 AM#1
lepr
so, i started making an rpg but i would need a system that save the abilities i learned (trought books droped) but i can't find any... i'm searching for a save system kinda like the one in master crafters if you know the map...
04-13-2008, 07:21 PM#2
Furion
Here's a good tutorial on save/load codes. It does not mention abilities, though you could modify it to include abilities. For example, you could assign each ability a number and save the ability numbers as part of the save code. For example, if Mana Burn is ability 15, Immolation is 27, Evasion is 12, and Metamorphosis is 5, you could have an 8 digit segment where abilities go saved as 15271205. Then you could have another segment that saves their level, like if the hero was level 7, and had those spells at levels 2, 3, 1, and 1, you could have a segment in the code saying 2311. You would check for the level of abilities using an integer check, and the type of abilities by using an ability check.
04-13-2008, 07:38 PM#3
Gwypaas
To bad that wouldn't be safe and any person could probably change it get insane ability levels :P
04-13-2008, 10:50 PM#4
TheDamien
I am also curious. What is the best way to do a save load code?
04-13-2008, 11:16 PM#5
Ammorth
Converting the values up to a huge base (86+) and then storing them in 1 number at base 86 (multiply by max+1 and then add value). After you get your final number (all other numbers stored inside) perform a hash or crc to make sure no one tampers with the data, and stick it at the end. To bring everything back, take the giant number, take out the hash and rehash the rest, if the hashes match, the code should be unmodified. Now to extract the values backwards by dividing by max+1 and getting the remained. Convert the numbers back to base 10 and you are done.

Basically everything I said is used in this system by PipeDream