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

Save-load system.

Status
Not open for further replies.

EdgeOfChaos

E

EdgeOfChaos

I need help with this. Yes, I know there are tons and tons of save load systems around, but there are none that do what I want.

Seems like all the save systems I've viewed require you to build a huge array of all the units, items, and abilities that can be saved in the map. This could be problematic if you get a ton of heroes, items, and abilities.

I want a save system that saves anything. You can make a new hero in the object editor, not change code, and it will save. Would anyone know a way to do this?
 
Good luck with that, enormous codes for one. Closest system for that would be Aceharts by the way.

Stop being lazy and just start on making your database for the saver.

You want a save/load system that does everything for you? You'll never find it.
save/load's are limited by the chat string limit so until http://www.hiveworkshop.com/forums/lab-715/warcom-multiplayer-mod-increase-player-limit-243313/ happens your out of luck.

http://www.hiveworkshop.com/forums/...y-v1-2-a-246945/?prev=search=save&d=list&r=20 will likely be for you, grab it before it's rejected as well http://www.hiveworkshop.com/forums/spells-569/codegen-1-0-1-a-177395/?prev=search=save&d=list&r=20 is better I think. So decide between the two or make your own.
 
I want a save system that saves anything. You can make a new hero in the object editor, not change code, and it will save. Would anyone know a way to do this?

You can technically save anything in any system without having to fill out an array, your codes will just be longer.

CodeGen can do it just fine. So can AceHart's. You just plug the unit type id or w/e into the system rather than the catalog id.

Codeless Save/Load has no catalogs because it saves/loads to/from a file. However, not using a catalog will low the synchronization speed as the code will be longer.


Given that you can just cnp from files now for codes that aren't codeless, the code size only matters in regards to space (the maximum information that you can save). As such, unless you have an inordinate amount of data (taking up the full string that a player can type in), you should be able to plug in your raw values just fine ;).


If you would like to learn more about save/load and why they use catalogs, please go through some of this tutorial -> http://www.hiveworkshop.com/forums/jass-ai-scripts-tutorials-280/saving-loading-192851/

It will show you the clear difference between a code that uses catalogs and a code that doesn't

I have written two DC quality save/load resources and a DC quality tutorial, so you can trust me =)


If you really care about the quality of your map, then you should use catalogs.
 

EdgeOfChaos

E

EdgeOfChaos

Thanks, nestharus.
 
Last edited by a moderator:
Wow that is epic TriggerHappy, I never thought you could use researches as a save/load. Them Russians....... Sad to say it beats Nes's system too UNLESS it is slow in an actual game with fullhouse otherwise yes it beats it because its the better codeless save/load, never thought I would see another multiplayer one though.

Thanks for that link. What syntax is it though VJass?
 
err, that save/load system uses tech instead of SetPlayerName

so it is better why?


Network is the fastest synchronization library that can possibly be built for warcraft 3. Nothing is going to beat it in speed.
Codeless save/load is very modular, working off of BitInt and supporting AES and MD5 out of the box.
Codeless save/load has a special library to minimize synchronizations. It reads the file out in blocks of 32 bits and synchronizes these in a very efficient network stream thingie.
Codeless save/load includes a special algorithm on top of AES that will apply AES-128 to an arbitrary number of bits in whatever grouping you like.


Now, does the target library only have the novelty of using tech instead of SetPlayerName, or does it include great algorithms to maximize synchronization speed like codeless save/load does? I can't view it since they didn't bother to post the code and this machine has no wc3.

Making the outright claim that it's better than codeless save/load is rather naive unless you actually know all of the algorithms behind both resources, and I sincerely doubt that it has an algorithm similar to Network or repackages the data into 32 bit blocks to minimize the number of synchronizations. I'm practically the only one in all of wc3 that codes optimal algorithms like that. I only say practically because I don't know of every person in the wc3 community, but I've never seen anyone else that has bothered to create good algorithms. Most people are very lazy and just do the minimal code to make it "work." This doesn't mean that it works well, it just works. Tons of crap goes into my stuff to make sure that it not only works, but it maximizes performance and modularity =). I do a balance between maintainability, readability, performance, and modularity. Before you claim that a library beats mine, you better know the algorithms and it better have something revolutionary in it : P.

I only say this because I used to have to deal with resources from other sites, and they typically suck (to say the least). Unless the person is really dedicated, free code = bad code. wc3c approved a get item gold cost library that leaked items... thehelper has a broken multiboard system. j4l's APIs and documentation are an absolute joke. AutoIndex is wtf insane overhead and the person didn't even care to see if there was a way to do deindexing without hooks. Stuff at xgm is no exception. THW only has the level of quality it has now because someone here forced people to get away from super packs and forced people to observe good coding practices and innovation. I'm not saying that most of the stuff at THW is good, rather most of it is as bad or worse than the stuff at any other site, but the JASS section here has the highest quality resources of any other site. Furthermore, for me, I only submit something to the Spells section when it's an even higher level of excellence than the JASS section, which is why all of my resources were DC (until I requested that the DC's be removed as people appeared to be upset about it).

For the future, please do your research before making a claim. I will admit that codeless save/load isn't currently in a usable state. Apparently, it drops a single bit (probably in the 32 bit packing, really not sure where) sometimes. File I/O is also only configured to work on the C drive. Also, decryption and validation is not done locally >.<. I'm writing a bunch of compilers first, then I promise to update codeless save/load :).

Codeless save/load is even more constricted by data size than regular save/load is because of synchronization. The less a resource cares about data size, the more constricted it will be. The library you linked is likely constricted to just 2-3 integer values. Codeless save/load can handle a lot more before it runs into a wall with full house games.
 
Last edited:
Wow that is epic TriggerHappy, I never thought you could use researches as a save/load. Them Russians....... Sad to say it beats Nes's system too *UNLESS* it is slow in an actual game with fullhouse otherwise yes it beats it because its the better codeless save/load, never thought I would see another multiplayer one though.

Thanks for that link. What syntax is it though VJass?

Besides I understood that system easily while yours I have no clue how it works. I currently don't know who's is better, whichever one works faster would be the best so get on a machine that has wc3 to find out if your really that interested. I would compare the speeds but sadly I can't make a working example with your stuff. Though yours is likely faster, its great to see someone else make something unique too.

Though yeah I don't want to bother doing useless research either. I said it wrong I admit but still that is quite the comment so I didn't get to read it all. I suggest applying some method to make it seem like less a wall of text.
 
Level 15
Joined
Aug 7, 2013
Messages
1,338
@OP

There's no magic behind save/load systems. In my understanding you are just coming up with a mapping from some values (integer) which you assign (arbitrarily) a semantic denotation in your map, e.g. when you recover the value of the string "A," you get the integer "40," which say denotes the Paladin hero (again completely arbitrary).

There is no way to avoid this. You could, however, define what objects are saveable as a function of their rawcode, point value, or some other value that you create incrementally for each new object. All saving would do is, take this unique identifier and encode it into some representation. When you load, you do the inverse of the encoding and decode the representation to recover the unique identifier. With this method, you wouldn't need to create an array of hero ids. Essentially you are still imposing some kind of arrayed structure, since your rawcodes (or whatever values) would have to have a bijection to the natural numbers (meaning you can count them in order).

Such a method could also be dangerous if someone comes up with a string which is a valid encoding, but the entity or value that it would be denoted by doesn't exist (suppose you had 100 heroes, but someone entered a string for what would be the 101st hero)--because you wanted to make your save work regardless of the hero, they could attempt to load something that doesn't yet exist. Of course you could limit the range based on how far you went. I think though this does not crash games or cause noticeable negative effects (I've tried abusing loading systems before, and if I tried a valid encoding which reference a non-existent custom object, I usually get an invisible hero with the green icon of death as its image, but no crash).

Otherwise there's no alternative short of modding the game but again you can't recover information out of nothing, and the encoding used to save the information is arbitrary in the sense it requires a very specific semantics to make any sense (beyond some pattern of strings/numbers).

@Nestharus

Not trying to thread-jack but you raised two points I am *confused* about.

1. Catalogs - I thought these existed in sc2 mapping. Never heard of them outside of that domain.

2. I hope I interpreted this wrong, but you claim that your codeless save is not in a usable state? What exactly does this mean? Is there a class of data (e.g. can't handle some arbitrary set of negative reals) or problem size which breaks it (number of players loading data or number of variables being saved)?

For the future, please do your research before making a claim. I will admit that codeless save/load isn't currently in a usable state. Apparently, it drops a single bit (probably in the 32 bit packing, really not sure where) sometimes. File I/O is also only configured to work on the C drive. Also, decryption and validation is not done locally >.<. I'm writing a bunch of compilers first, then I promise to update codeless save/load :).

Codeless save/load is even more constricted by data size than regular save/load is because of synchronization. The less a resource cares about data size, the more constricted it will be. The library you linked is likely constricted to just 2-3 integer values. Codeless save/load can handle a lot more before it runs into a wall with full house games.

I thought I read it was fully functional and the only issue was speed (it could take several minutes for every1 to synch and load their stuff). It drops a single bit? How is this possible? Can you reproduce this?

And how much data is a wall? How much "information" for say n players before we hit this wall in a full house (I guess you have this measured in bits or bytes?)?
 
I thought I read it was fully functional and the only issue was speed (it could take several minutes for every1 to synch and load their stuff). It drops a single bit? How is this possible? Can you reproduce this?

Someone did report a bug a long time ago in which the first bit was dropped (the smallest order bit). It can be reproduced.

The speed issues can be resolved to a point :).

And how much data is a wall? How much "information" for say n players before we hit this wall in a full house (I guess you have this measured in bits or bytes?)?

This depends on the host connection.

Catalogs - I thought these existed in sc2 mapping. Never heard of them outside of that domain.

Look in my signature under jass\data structures if you want to learn about catalogs. They are a way to compress information :). It's a Warcraft 3 thing.
 
Status
Not open for further replies.
Top