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
 

Tonks

New Member
Reaction score
160
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.
 
L

Lors

Guest
So shouldn't the code be huge? And is there any save / load theard that is better for noob then AceHart's is?

Thanks.
 

Tonks

New Member
Reaction score
160
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.
 
L

Lors

Guest
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?
 
L

Lors

Guest
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...
 

Sooda

Diversity enchants
Reaction score
318
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.).
 
L

Lors

Guest
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....
 

quraji

zap
Reaction score
144
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 =]
 

Sooda

Diversity enchants
Reaction score
318
> 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.
 

Evote

New Member
Reaction score
4
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
 

swe_suffer

New Member
Reaction score
20
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.
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/
  • The Helper The Helper:
    I think we need to add something to the bottom of the front page that shows the Headline News forum that has a link to go to the News Forum Index so people can see there is more news. Do you guys see what I am saying, lets say you read all the articles on the front page and you get to the end and it just ends, no kind of link for MOAR!
  • The Helper The Helper:
    Happy Wednesday!
    +1
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    Sticking with the desserts for now the latest recipe is Fried Apple Pies - https://www.thehelper.net/threads/recipe-fried-apple-pies.194297/
  • The Helper The Helper:
    Finally finding about some of the bots that are flooding the users online - bytespider apparently is a huge offender here - ignores robots.txt and comes in from a ton of different IPs

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top