HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Need Help!: Saving/Loading Units

02-07-2004, 08:47 PM#1
GoldenWind
I need a tutorial, or an example, of how to save and load units using a code.

For example:
I have a level 5 Mountain King, with the items "Clarity Potion", "Healing Slave", "Claws of Attack +6" and "Book of the Dead".

I type "-save".

What I want it to do is to give me a code like "234879-2378-23478" or something (Pretend the example I just gave is the code).

Now, if I quit the game, and play it with different people, the next day, and type "-load 234879-2378-23478", I want it to give me a level 5 Mountain King, with the items mentioned above. Sure, I could do it for that example, but there is no way that I could do it for every possibility, manually. There are over 150 unit possibilities, over 200 items and maximum level is 100.

Also, I want it encoded somehow so it's not like "009-01...", for a level 9, and just change 009 to 008 to be level 8. This makes it to easy to "hack" the code, so I need a tutorial or example which encodes it.
02-07-2004, 08:55 PM#2
Shark
well, i think no-one has really made a tutorial based on it...we all know "how it works" but ....maybe someone HAS made a cool little sistem that u can import into the map....but i guess u'll have to code it by yourself....
02-07-2004, 08:59 PM#3
GoldenWind
I have a map that I downloaded... it's an open RPG... that uses this system. I also did some math, and, assuming I did it right, found that I'd need somewhere over a billion triggers to do this... there has to be another way.

Here's the map that I saw it in:
02-07-2004, 09:15 PM#4
ph33rb0
I have one for my map. It's not easy to explain.

It's one of those things you have to figure out for yourself. Very deep thinking process.
02-07-2004, 09:16 PM#5
GoldenWind
Ya. I read another article on this forum and found out how substrings work. I think I can possibly do it right using substrings...
02-07-2004, 09:23 PM#6
ph33rb0
That's the only way to do it.