What save/load system does this map use? I don't really want to type out a code that's more than 2x longer than it needs to be ; ).
edit
ew omg, it uses CodeGen...
yea, def never going to play this map... =D
oh well, gj I guess with the rest
Some info
Code:
storing values of
501 out of a max of 1000000
1938 out of a max of 1000000
5821 out of a max of 28392
1 out of a max of 1 (bool)
0 out of a max of 1 (bool)
11 out of a max of 11
19 out of a max of 1000
12 out of a max of 16
The data can be encoded with 7 characters with 0 security.
iGen does it in 17 w/ security (prob 15-16 w/o)
CodeGen does it in 16 w/o security
PipeDream's Optimal Save System does it in 7 chars w/ 0 security (ideal output)
So yea, you're save/load code is more than 2x longer than it needs to be.
Here's some info on save/load
http://www.hiveworkshop.com/forums/jass-ai-scripts-tutorials-280/saving-loading-192851/
I want to play your map, but I don't want to deal with another horribly long save/load code resulting from a horrible save/load system.
edit
cuz I want to play this map, I'm going to put
http://www.hiveworkshop.com/forums/spells-569/encoder-2-0-2-0-a-189883/?prev=mmr=6 into it for you ;o. I'll have the upload up in a few.
You're welcome : )
edit
What extra features do you want saved? Encoder can handle anything, including item charges for specific items (if you have any charged items in your game or you want any in your game, you can now save them properly). You could also do hero specific abilities, hero specific items, etc... if you have any hero specific items, let me know so that I can form up your catalogs for an even smaller save/load code.
I'll be removing your save restriction and doing two types of save/load codes instead, that way your code is a bit smaller. I'll also be adding hero %xp so that the code is smaller (xp max would otherwise be a massive number)
Your map better be good
. Yours will be the first one I know of to have Encoder implemented into it.
If your map is good (I enjoy playing it), I can help you out more by making all of the code vjass and optimizing it. I optimized a very simple hero line war map and removed 50 kb of code w/ me adding tons of extra features =). Then again, even if your map is good, I might not ^)^. Only putting Encoder in it cuz I got nothing better to do atm and your map looks interesting : D.
edit
Updated your coloring since I couldn't read it >.>. Using the Encoder demo map coloring.
Here is how big your save/load code is now
from (original)
B7Fa-bBHc-cccc-cc5A-A0ba-b5Fa-b5Ga-b5gE-Ub
34 chars
to (on encoder)
40ih-zxVa-pHDj-Dj9n-zhmj-Ibe
23 chars
To be able to edit your map, you will need to initialize Lua file header and install 2 other lua scripts
http://www.hiveworkshop.com/forums/jass-functions-413/snippet-lua_file_header-186775/
http://www.hiveworkshop.com/forums/jass-functions-413/snippet-lua_object_id-176943/
http://www.hiveworkshop.com/forums/jass-functions-413/snippet-lua_get_var_object-185944/
Read the mini tut on that first link to properly initialize, then install the other 2 scripts.
Afterwards, you'll need to initialize UnitStatePercent
http://www.hiveworkshop.com/forums/jass-functions-413/snippet-unit-state-percent-189943/
I believe your shorter save/load code + ability to properly save item charges is worth it, don't you? : )
I know I'd rather type a 23 char code than a 34 char one : P
Also, if you have already made changes to the map, you can rip Encoder out of this one and paste it into your new one, deleting CodeGen in the process. From there, you'll need to follow the steps above to get Lua and UnitStatePercent into it : ).
If you'd prefer to save actual xp rather than xp% (something I don't suggest), you can retrieve the maximum xp a hero can have by setting a hero to its max level (20) and looking at how much xp it has. From there, you modify the xp code range to be from 0 to that max xp, remove level code range, and just save the hero xp. If you do this, you also won't need Lua file header or UnitStatePercent, but it will lengthen your code.
If you want any other help on this map, I charge by the hour. I only did this so that I could play it cuz I didn't want to type in a huge save/load code : P.
Also, save/load now works for single player and multi player and you only need to be solo in single player. It also saves as multiplayer when you're solo but in a LAN game or online. Single player save/load codes are different from multiplayer ones, and a single player save/load code will not work in a multiplayer game. A multiplayer save/load code currently doesn't work in a single player game, but I could do a little bit of editing to make it work : ), but again, that'd be an extra feature, so I'd be charging by the hour.
edit
this map has insane memory leaks...
I think it would be worth your time to hire me to get your map up to snuff ;p
cuz yea, wc3 totally crashed when I changed my class first time at lvl 5 and wc3 was using nearly 1 gig of memory. Since I lost my char, right now I'm giving myself my char back >.>...
edit
apparently, I need to add some stuff to the load portion since you do some stuff when you create the hero. I can also remove the enum stuff since I found your heroes array : P.
Also, I see some issues with your loading. Lumber would always reset on load. Do you really want that? Also, what if a player loads while their hero is in a dungeon. You don't reset the in dungeon flag. I'm keeping as is since I'm not sure what you want... ;p
edit
Will have a new version up. Your GUI nonsense fudged all of the array reads up.
And it's pretty easy to dupe items >.>.
And here are two save/load codes. The difference between these 2 codes is like 7 gold, lol... this is to show you that the security on this is pretty decent.
Alvh-61U9-FowU-PGEp-tItD-XaK
Awxo-2ejN-sfSC-FtHC-JmLg-6K1
Exact same code as first with a dif nick
AR94-zWCj-mQBj-BYoB-KkqM-0fc
edit
so yea, latest version up btw