• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Alternative of 2^x for Save Load

Status
Not open for further replies.
Level 5
Joined
May 17, 2007
Messages
106
I currently have problem with Save Load code with encode xxx value (Let's say, EXP Value) but without using Power 2. Because its value become too lengthy.
(80 Items in game = 2^80 = 1208925819614629174706176, which is too much for 72^5 that I used to decode.)

As the current system encode the value of items to code. by using 1+2+3+4+5+6+7+8+9+10+11...+n
Which seems to work well at first until player unlocked more than one item at a time.

Unlocked #3 and #7 (3+7 = 10) instead of #3 and #7 it goes to items #10.

What I have tried and fail. is to save number of held items. From formula above to including number of item saved.

#3 and 7# is 2 item saved (3+7) when load the system will look for (x+y = 10) which goes #9 and #1.

And a lot of formula with number of item saved included.


So is there any alternative formula for 2^x for Save Load stuff that able to compress to 5 letters, 72 charmap. supported up to #100 items? I just don't feel wanted to redesign save load for now.

If you confused, you can ask me for a test code for my map then try to unlock stuff then load.
 
Level 5
Joined
May 17, 2007
Messages
106
Well then, download the current version (in my sig) then change the name to WorldEdit then load. Try unlocking some Attachment or Title in page 1 or 2.
Save then reload after restart.

Code:
can't test in 0.95b

Edit: Seemingly I'll change how stuff unlocked instead of fix this mathematics then.
 
Last edited:
Level 5
Joined
May 17, 2007
Messages
106
Interesting, but I have tried it compression (using calculator though), which seems not quite compatible with my map.

Anyways, thanks for the link. But I have decided to change the main system anyway (for others reason).

So +rep for your time.
 
Level 5
Joined
May 17, 2007
Messages
106
Well, I kinda not sure from reading those information (for 7-8 times reread) anyways. For Example, saving 60 different items for 8 heroes (60 slot for each heroes) or more (60 different title).

PS: 1.24AM here, gotta go to bed.
 
Last edited:
Level 31
Joined
Jul 10, 2007
Messages
6,306
Well, I kinda not sure from reading those information (for 7-8 times reread) anyways. For Example, saving 60 different items for 8 heroes (60 slot for each heroes) or more (60 different title).

Encoder can save that just fine... that'd just be one hell of a long save/load code..

If you are just saving 60 items with 100 possible items, you are talking more than 60 characters for the code. If you are also saving the hero types, then you're looking at even more (given you are using Encoder).

Now, the range of save/load code sizes would also be massive if you save the inventories and heroes using some great techniques =).

Anyways, you're probably looking at an 80 or so char code.

edit
83.33 characters for all items alone.
 
Status
Not open for further replies.
Top