Save / Load code

L

Lors

Guest
No, this is not another theard "give me save / load code linkz zomg", I have read AceHart's theard so I don't need a link however I'm having diffuclity undertanding this: How can you possibly trasfer the information from one map to the other? I mean let's I start playing my map and save my hero with is items ability blah blah. Then I get out of my map and start a new game few hours later on, how does the game I just started remembers my latest save? How is the information trasfered? Variables reset from a game to game!

Many thanks,
nkk / lors / natekilledkenny
 
It's not transferring the information.

Basically, what you have, is a custom script that defines everything in letters in numbers. When you save, it generates a code depending on your units, items, gold, etc.. When you load, you use that same code, creating those units, items, gold, etc..

So really all it's doing is converting some letters and numbers that you typed in into the rawcode used to label the units, items, gold and whatever else you have.
 
So shouldn't the code be huge? And is there any save / load theard that is better for noob then AceHart's is?

Thanks.
 
No, there really isn't. The rest of them are basically a ton of posted triggers that don't help much (No offense to the writers, they're good at explaining, just not easy for beginners).

The code is as short as it is because you don't save everything in the game. You only save what you have, your hero, your gold, your kills.
 
Ok say I want to store this:

Unit-type, all it's items and number of charges in each item, and all it's abilities and thier levels. About how long would the code be?
 
Maybe test it ? AceHart save/ load code is capable doing it and it is optimized as much as it can because Ace knows what to do and how to do, trust him.

I have re-readed AceHart's tutorial but I somply can't understand it...
 
What you don' t understand there exactly ?
EDIT:
> Code should be huge ?
He is using actual unit raw codes (What are really numbers) and abilities raw codes. They are labled by Blizzard you don' t have to relable them. That' s why is JASS good you can use info directly. They are constant and don' t change in time (Between maps, footman always stays footman.).
 
1) This line: Custom script: set udg_Code = SaveLoad_Encode() what does it do?
2) I don't get SaveCount at all...
3) set udg_Validate = SaveLoad_Decode( udg_Code ), huh?

Those are the most urgent things I didn't get....
 
To "save" info and to "load" it from one game to another is extremely simple. You just hand out a player a string, and the player gives it back in another game. The difficult part, which really has nothing to do with "saving" or "loading" itself, is the encryption and decryption of these strings. Wrap your head around that first, and I think the whole thing will be easier to understand =]
 
> This line: Custom script: set udg_Code = SaveLoad_Encode() what does it do?
Which one does which :rolleyes: One encrypts code (Will change letters and does tricks to protect code from people simply writing randomly numbers and getting back randomly generated character with gold & lumber or whatever it recreates from "reading" input chat string.
Sets udg_Code (I asume it is string.) to protected save/ load code what people use to restore later their character.
2) I don't get SaveCount at all...
It is sum of all variables what you are going to save. It counts how many variables you want to save (It would be integer, you count variables like sheeps.) Then this integer count would be stored within your save code what is shown to player. So after player wants to load trigger (Ok system) knows when to break lines and where ends one variable data and starts other variable data what was stored.
3) set udg_Validate = SaveLoad_Decode( udg_Code ), huh?
Takes protected code, loops through decrypter (Similar like encrypter but only does everything backwards to restore string without protection.)
It could be vise versa but point is same.
 
First off Hay AceHart and tonks lol i remember u guys from way bak anyway if any u want my all gui and no jazz trigger give me a buzz (btw it's not quite finished)
:D
 
Code:
set udg_Code = SaveLoad_Encode()
Look at the top in the trigger editor, wich should say "AceHarts Save/Load" or something. The function is called function SaveLoad_Encode takes..
See if you can understand it..
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top