What is an acceptable length for a Save/Load code?

Effane

Save/Load Code Tutorial
Reaction score
51
So I have come up against an issue.

I have a Save/Load system developed for my RPG. The issue though is for all feature sets its now sitting at 56 characters for a load code. Thats HUGE!

I could give the axe to alot of features, or I could limit the amount of stuff it will store. I am looking for more of a happy median though, and thats where everyone here comes into play.

Current things the Code stores. I am using a 36 character system. I bumped it up to 50, and for all the extra chars, I didnt save any space. So 3 hours of wasted time I went back to 36 chars.

-Deencryption info
-Hero Class
-Hero Level
-Hero Experience
-Hero Skills trained
-Gold
-Special Resource
-Two other special Items (They each are 1 char to store, but I may be able to get clever to save them in 1 char)
-6 Hero Items (mucho slots!)
-6 Bank Items (mucho slots!)
-Hero Total PVP kills
-Hero Modified PVP Score
-Check Sum (Cause everytime someone cheats online, I kill a kitten!)

First thing I would get rid of would be the Bank. Then goes the Score system to either something smaller or totally gone, in the end that would shorten the whole thing by up to 20 slots, making it below 40 chars long.

So, whats an acceptable amount of characters before it gets stupid?


**I tweaked the system a bit with what I have here, and I got it down to 54 chars. Doesnt seem like I am getting much more efficient and I hate to kill feature sets.**
 

dragonhord

Knowledge is true opinion. - Plato
Reaction score
82
Pff... if its anymore than 20 id just start the game over and over and over again from level 1.. in my opinion thats less work...
 

Effane

Save/Load Code Tutorial
Reaction score
51
LOL, couldnt get much more than a few things with 20, definetly no items will be saved as that is the number 1 reason I am getting too many chars (Almost half is chars for items)

***Edit in: looking for more ways to crunch this code size down. I dont want to use special characters though. As thats as bad as typing in a 56 char code for most people***
 

dragonhord

Knowledge is true opinion. - Plato
Reaction score
82
I dunno man... but 54... id just level the guy up to 20 again and again... better yet if its fun ill go buy a new cd for the key then leave the freaking game on all the time... same idea :p.
 

Effane

Save/Load Code Tutorial
Reaction score
51
I think I figured out another way. I can make TWO Save and Load engines that share resources (just to keep themselves in line).

One will be the full system. 56 characters.

The other will be a Quick Save/Load system. 20 chars on the nose.

You will lose... All your EXP for that level, cannot have anything in the bank, cannot have any surviving PVP score, and some other special things.

Hopefully this will be the best of both worlds. People who want to have more stuff, can save more stuff. People who want to just play for the sake of playing, can have less stuff to type, but it comes at a cost. If you think I should save EXP, I need 4 more chars.
 

dragonhord

Knowledge is true opinion. - Plato
Reaction score
82
Effane said:
I think I figured out another way. I can make TWO Save and Load engines that share resources (just to keep themselves in line).

One will be the full system. 56 characters.

The other will be a Quick Save/Load system. 20 chars on the nose.

You will lose... All your EXP for that level, cannot have anything in the bank, cannot have any surviving PVP score, and some other special things.

Hopefully this will be the best of both worlds. People who want to have more stuff, can save more stuff. People who want to just play for the sake of playing, can have less stuff to type, but it comes at a cost. If you think I should save EXP, I need 4 more chars.
Personally i think the xp is fine... the pvp stuff though... is that valuable? If it is it must be in there... Bank wouldnt be a problem :p
 

Effane

Save/Load Code Tutorial
Reaction score
51
PVP stuff is a pat on the back thing, its about ego.

I modified it again. The quicksave/load now is 29 chars.

I am happy with that. Its bigger than what I like for it, but I figure certain things have to be saved to make it stable enough to be playable.

Things saved

-Deencrypt
-AntiCheating Bastage code
-Hero Class
-6 Item slots
-Hero Level
-Player Gold
-Player Special Resource
-Hero Special Stat-Hero Skill Levels X 4

Ideally this is more designed for players already capped out in EXP just looking for some quick fun.
 

Chocobo

White-Flower
Reaction score
409
-Deencrypt
-AntiCheating Bastage code
-Hero Class -> 1 digit for 36 hero types
-6 Item slots -> 2 digits for 1296 item types
-Hero Level -> 2 digits for a level lesser than 1296, 3 digits for lesser than 46656.
-Player Gold -> 4 digits for a 100 gold accuracy
-Player Special Resource -> Whatever
-Hero Special Stat-Hero Skill Levels X 4 -> 2 digits per skill + 3 digits for Special Stat that can up to 46656 (or 2 digits for up to 1296)

1 + 12 + (2 or 3) + 4 + Whatever + 8 + (2 or 3) = 29 to +31
How did you enter them to only 29 digits?
 

Sooda

Diversity enchants
Reaction score
318
Chocobo said:
-Deencrypt
-AntiCheating Bastage code
-Hero Class -> 1 digit for 36 hero types
-6 Item slots -> 2 digits for 1296 item types
-Hero Level -> 2 digits for a level lesser than 1296, 3 digits for lesser than 46656.
-Player Gold -> 4 digits for a 100 gold accuracy
-Player Special Resource -> Whatever
-Hero Special Stat-Hero Skill Levels X 4 -> 2 digits per skill + 3 digits for Special Stat that can up to 46656 (or 2 digits for up to 1296)

1 + 12 + (2 or 3) + 4 + Whatever + 8 + (2 or 3) = 29 to +31
How did you enter them to only 29 digits?
Lol what a numbers ! :p Do you even have to have over 1000 items in game ?
Uff I think is that "save code" compressed ? If it is then wow. I personaly invent wheel again :banghead: but I like inventing them again and again. Typing over 20 or even 10 digits or letters makes me feeling bady to write down so much things. So I came up with idea "lets say supercompression" :)
after getting each sector digits it looks for maches what will compress into one digit ex: abc= a and deg=d so new digit combo will be ad, now are looked these digits and they are being compressed too ! like ad=a. In the end save code would be in my sweet dreams ex: afgh1. And thats it, I would mess alot with compression system to get better gameplay, really. What you all think ? Is it done already ?
 

SFilip

Gone but not forgotten
Reaction score
634
perhaps it would be wise to "optimize" the code by dividing every number with 2.
example (gold): 1000/2=500 <- one digit saved
yet it may cause problems
1001/2=500.5 <- dot added
but you can easily bypass this using convert real to formatted string and make
1001/2=500 <- digit saved...who cares about 1 gold anyway?

you can also try the same thing with 3, but you wont get any better results.
 

Chocobo

White-Flower
Reaction score
409
2 digits is required for more than 36 items (without case and without special char)

Hmm, there must be a way to compress greatly a code, like ASCII Code..

Note : With 29 digits you have a huge number of 4,4292268542362921407825091617016e+52 possibilities (Hehe). The best to do is to have a lesser number than the number of possibilities used digits but the closest too by calculating with the formula :
(Length of Code^Number of differants digits) - (Savable heroes x (Number of Items^6) x (Max Level) x (Max Gold Amount Savable) x (Max Lumber Amount Savable) x (Max Str Stats) x (Max Agi Stats) x (Max Int Stats) x (All Skills Max level multiplicated with other skills, example 2x2x2x2x1))
Replace by 1 the thing your code doesn't handle.

So an example you have 18 digits without case and spec. char., which saves 36 differants heroes, a max hero level of 46656, and 1296 items, it will result that.

(18^36) - (36 x (1296^6) x (46656) x (1) x (1) x (1) x (1) x (1) x (1))
(1,5481398284277605825294955248312e+45) - (7958661109946400884391936)
= 1,5481398284277605825215368637213e+45
The code has "1,5481398284277605825215368637213e+45" number of possibilities left, because nothing is associated. I don't know how to associate 2 digits on a one digit. An extreme association can result "ONLY" 5 digits (36 differants digits) for a base of 18 digits, 46656 max hero level, 1296 items, 36 heroes. (Hehe, "5^36" possibilities is greater than "7958661109946400884391936" (14551915228366851806640625 > 7958661109946400884391936), but 4^36 is lesser than "7958661109946400884391936" (4722366482869645213696 < 7958661109946400884391936))
 

Sooda

Diversity enchants
Reaction score
318
I thought to make it with string comparison. if it finds exact match it will set new value to one letter. And it has build in thingy to uncompress it. Man where you studied such complicated math ? I' m now envious :p Still is it possible then ? Lol didn' t get much what you told me( But I got some parts of it).
EDIT: Lets speek about numbers now lol.
There are 12 players, codes do not be unique, they even can' t.
6 item slots + maybe same (6) stored slots.
Hero level up to ex nice number is 25 like in DotA :rolleyes: but for ORPG games it should go up to 100?
Str with lets say cap of 100, we don' t need imba game with more str or so.
Lol thought about it it should go up to 999 still :(
Agi same as Str
Int same as Str
Hero race, it needs big number say 12?
HP? do we need to store it or is it calculated by attributes given to hero (with maching hero race) ?
MP same as with HP.
Abilities- with standard abilitie combinations 4 + stats levels up to 100? or lover.
Turn off- if we would like many special abilies for heroes these numbers would be highest.
Ok now can we somehow compress this ? Or how many digits it needs ? Yes upper and lover case would shrunk the space even more :) Like: AbJF5 would be so different from ABJF5 but it would make space for errors what would suck so ABJF5 sounds more bullet broof.
 
J

John_S

Guest
well this really isnt on topic but noone is replying to my posts on how to make the save code thing, i simply want it to save a custom value for experience (not hero experience for leveling) and just wanted to know if anyone could just show me the trigger code for doing this? If you can thank you so much i need this trigger for a map ive been woking on.
 

Effane

Save/Load Code Tutorial
Reaction score
51
Well here are some of the issues.

Cant do case sensitivity, thats just as bad as special characters.

I havent performed any compression on the codes, that looks like how I will need to do this, but its complicated to do that. Good news, compression = encryption, so if I pull that off, it means I have killed two birds with one stone.


Idea of what I am dealing with. No particular order, this is the full save code.

-1 char for encryption,
-2 for hero level (50 capped)
-2 slots for special resource
-1 slot for month born
-1 slot for owned house (I could probly compress this with the month born too)
-4 slots for skill level, but I may change that with a different compression scheme, this seems easiest to compress. I can get this to two chars I think
-3 slots for PVP kills
-5 Slots for PVP score (I could probly reduce this to 4 slots)
-4 Slots for EXP
-2X6 for Items carried by hero.
-2 for hero class (includes male/female, which I already built a table array to make the result smaller)
-4 Slots for Gold, capped at 1 mill (I could save a slot with making this save to nearest 100th gold)
-2X6 for banked items
-1 slot for a checksum

=54 slots now


Now the Quicksave version.

-1 slot Encryption
-2 slots hero type
-2 slots hero level
-4 slots hero skills
-4 slots gold
-2 slots special resource
-2X6 slots items
-1 slot checksum

=28

Everytime I crunch it again, I get a few more chars off. I can compress out of the larger code about another 2 chars with some weird routines. I need a system to compress the Alphanumerics though. I will look for an aggressive text compression routine.
 

Chocobo

White-Flower
Reaction score
409
well this really isnt on topic but noone is replying to my posts on how to make the save code thing, i simply want it to save a custom value for experience (not hero experience for leveling) and just wanted to know if anyone could just show me the trigger code for doing this? If you can thank you so much i need this trigger for a map ive been woking on.

I replied. It is directly from NOTD Aftermath forums.
 

Sooda

Diversity enchants
Reaction score
318
Lol I' m in good mood lately, but it may change :eek: So I thought about my one letter per attributes (Str, Agi, Int) that I could make cap of them to 99? if I use my 57 sign system. It would count Higer and lower letters and numbers from 1 to 9 (lol is there many more to count?) Now two digits number would be divided to two separated numbers first for 10, 20, 30, k, 90
and second for 1, 2, 3, 4, 5, 6, 7, 8, 9 That would let set max level to 57 with one letter. Lol I read alphabet from my memory and skiped my country letters Õ, Ä, Ö, Ü :p Did I missed something ? One step at the time.
Uff I mixed stats and lv but level can be made same way or lv can store that way but stats not.
When I read it I had idea I could duplicate them for stats ( Str, Agi, Int) now I have already per two digits number one letter so stats would be ex: abc, but finding to them one letter mach would give changes howmany ( And I got only 57 signs :( ) ?
 

Effane

Save/Load Code Tutorial
Reaction score
51
Case isnt easy to do with WC3, it doesnt like thinking that way. And the extra chars are really nice. but comparatively, with 100 chars versus 36 chars I only save 5 char slots for all the extra complications of players and the unusual keys.

I dont think people really want to type this in.

Code:
A-04*-3001-00&%-00F$-0000-*663-&^<>-+=]{-":''-0YH0-0137-+

When what I am using right now looks like this.

Code:
A-A119-9872-3AH9-YHA7-UJ87-92OK-7856-28UU-2JIT-83HG-JOER-HO45-YOTA-A

I think the extra chars in a simpler format is better, while they would be nice to get rid of another 20 chars, I cant do it for free.
The symbols and special characters arent good for the average player, which is what we should be aiming for.

If you are wondering, yes that top code is what it would become. I built my Save/Load code so I can modify its numerics size when I want with just 2 changes. Then the rest just scales to fit the new size.

I did the math with several ideas. Compression techniques, more and less chars for the numerics, binary stacking even which actually was the best success. In the end after 4 days, I came back to the start with only a few small changes to what I started with. All the fancy and more powerful stuff, just wont survive the average persons keyboard.
 

Chocobo

White-Flower
Reaction score
409
100 chars are hard for who doesn't know how to do a special char, like writing :

16 digits
Code:
-load A1ra5r]~-a3&)+)°;!

It confuses extremly who reads it. And here is what it looks without spec

24 digits
Code:
-load a1rAlMpN-a3T6yTs5-A01IOP3D

And now with lower case.

32 digits
Code:
g0a3g6t8-c0h3aq2g-x1azs3g5-x0vhs6hm
 

Effane

Save/Load Code Tutorial
Reaction score
51
I thought about upper and lower case, but WC3 REALLY doesnt like it. You have to almost double the amount of code to get case to behave properly, and once again, were dealing with average players.

Also, your digits dont take into account alot of things. Optimal size for small pieces of imformation for example.

If you are storing a bunch of things that are 100-400 numbers and you dont do any kind of digit stacking then 26 chars is as effective as 100.

Lets look at it this way. Lets track 6 things about a hero.

Level, HeroClass, Which Skills are trained(4 items)

Now Level in a 100 base system will be 1 char. Hero class will likely be 1 char as well. Now skills will also each be 1 char each.

Now in the 36 base system. Level will be 2 chars, Hero class will most likely be 2 chars, and skills will each be 1 char. So while your raw brute numbers show larger possible combinations, you didnt take into account that the information itself may not be optimal for that number system and that you will end up with lots of extra unused space for all that complexity.

Now one thing about a larger number system is the ability to stack numbers. Lets say two items. But with 10000 combinations you can fit 14 binary digits making only 2 stacks of 7.
With the 36 char system you can make two stacks of 5 inside it. Either way neither will be efficient enoguh to work in a small scale. So still no benifit for using the more complex system.

In the end if we were text dumping this stuff to a file I would pull out the extended ASCII for this. But we arent. Instead its something that has to be End User replicatable, which is why I chose the 36 character, non-case sensitive system.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top