• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Save/load system with more than one hero

Status
Not open for further replies.
Level 10
Joined
Jun 7, 2008
Messages
420
theshire.jpg


Hi, I need a save load system that works for more than one hero (for 9 players, roughly 1000 items on release but just 30 now).

I want it to save the hero and his 5 mules. If that is hard/not possible, then just the hero and his mule. The mule is basically just a hidden unit that has infinite pickup and give range and will only be selectable in game using the hero icons to the left.

Thanks, will credit + rep. This is the only thing I need before the map can be released.

Allright heres what I need

-6 saving integer variables for 4 different materials, pvp kill count and pve kill count
-Lumber saving and gold saving
-hero exp and level for at least 2 heroes (preferably 6 - main hero and 5 mules)
-Items

Igen seems to be the best candidate, but a GUI one will work even better I suppose.

http://www.hiveworkshop.com/forums/spells-569/igen-140399/
 
Last edited:

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,191
Sorry I fail to see any request here. You just use a bog standard save / load library and then get it to save all the data you want. Encode hero type, encode hero items and then encode the items on each mule. The maximum size as an estimation would be 1 character for hero type, 8-10 for gold and exp, and 2 per item if you use a base 64 character set. You then add on about 2 checksum digits to it to name protect and prevent tampering with the code. A good save library will have a scramble to make the code look more random that it is.

The whole thing comes down to saving your hero type, stats (like exp and any others), gold and then each item. Like wise you reverse the process when loading.
 
Level 6
Joined
May 20, 2010
Messages
274
Acehart's save system only supports 4 players... and I don't know how to make it support more than 1 hero. Or more than 4 players for that matter.

and i think if you want to add more players...you should add the events with the other players because in the map there is only 4 players until purple player only :)
 
Level 14
Joined
Jan 15, 2007
Messages
349
Well the "SNL test script" is basicly an example script how to use the iGen correct. But it's also a help for GUI user who have no clue how vJASS/JASS is working. How I already explained in the resource thread of my iGen.

1.) Create a array where you save all those unittypes of the heroes you want to save. (Remember to one empty value in your unittype array.)
2.) Add a loop to the save trigger [..] (In the demo map should be enough examples how to do that)

It should be easy enough to set up your own save/load trigger since there are enough examples how to do it in the demo map. Just remember the iGen saves integers and no handles (like units/heroes, items etc.). But every handle can be converted to an integer value if you know how.
 
Status
Not open for further replies.
Top