• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • It's time for the first HD Modeling Contest of 2025. Join the theme discussion for Hive's HD Modeling Contest #7! Click here to post your idea!

Save/Load System Question.

Status
Not open for further replies.
Level 14
Joined
Oct 18, 2013
Messages
713
**Most save/load systems I see perform in what I'll call for practicality Base36 (0 through 9 and A-Z) I'm not sure as to whether that is correct or not.**

You can write script that will export a string into a text document in your warcraft directory. For a map I witnessed do this, the document was created under 'Savegames'. What I find special about this is that no matter how similar two characters may look, you will still be able to use your load code since you can just copy/paste ^^ I am not sure if the reason most save codes operate in Base36 is for readability or not, which is why I'm asking. If the save code can be exported to a word document that can be copy and pasted, why not use every character on the keyboard? For a project I am currently working on, operating in higher than Base36 could be very useful. So, is there a reason the base couldn't be just like this?

"zZxXcCvVbBnNmM,<.>/?'";:lLkKjJhHgGfFdDsSaAqQwWeErRtTyYuUiIoOpP[{]}\|=+-_0)9(8*7&6^5%4$3#2@1!"
(This would be A-Z, a-z, 0-9, and all characters created by using the Shift Key, which basically works out to whatever else you have multiplied by 2.)

If I counted right, this would be Base92. Integers that must be saved that would never exceed 8464 could be saved using 2 characters. In Base36, this would requires 3. A difference of 1 isn't much. However, for a save code that saves only integers greater than 36 but less than 8464, the string length generated would be only 66% as long.


What I think is that perhaps this has not been implemented because the benefit of reduced string length is negated by poor readability of the save code. Is that correct?
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
I'll assume you're using the one by Nestharus.
The code shortening that comes from having a longer base is actually quite negligible. But sure, you can use it for a theoretical benefit.

Note that technically it's not exactly the same as a base. Each number is essentially loaded in a different base so that they would take less space.

Example:
You have an item that can have up to 19 stacks and an item that can have up to 5.
When saving them you first save the stacks, so it will be like:
save(current,max) for both of them.
How is it different from having the same base? Well, it allows using the same letter for storing multiple bits of information.
Imagine you have a 32-bit character. Inside it you can put an equal amount of information, but what if your pieces of information are smaller than that? If so, then each bit of information is allocated only a part of the space and thus, the resulting character depends on every piece of information stored in it.

Disclaimer: This is only my interpretation of how the thing works.
 
Level 24
Joined
Aug 1, 2013
Messages
4,658
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*()+-/=[]{};:'",./<>?`~"

now lets continue:

äáàâãåÄÁÀÂà ëéèêËÉÈÊ ïíìîÏÍÌÎ öóòõôÖÓÒÕÔ üúùûÜÚÙÛ ÿýÝ ÇçÆæ

pls don't let me start searching for alt codes :D
and don't even try to find some asian characters

base-its-over-9000 OP!!!
 
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*()+-/=[]{};:'",./<>?`~"

now lets continue:

äáàâãåÄÁÀÂà ëéèêËÉÈÊ ïíìîÏÍÌÎ öóòõôÖÓÒÕÔ üúùûÜÚÙÛ ÿýÝ ÇçÆæ

pls don't let me start searching for alt codes :D
and don't even try to find some asian characters

base-its-over-9000 OP!!!

Do remember some characters can't be typed.
 
Status
Not open for further replies.
Top