|  |
|  |
12-13-2005, 10:56 PM
|
#1 (permalink)
| BattleForums Member
Join Date: Nov 2005 Posts: 364
| Loadable Heroes I just played a game of Humans VS Orcs, and I was wondering, how can you do like give someone a code like "2h548f75ndf" and in another game if you type it you get the same hero you had, with the same level and the same stuff (in a multiplayer map of course)?
__________________  Is this the end of all we know - innocence lost so long ago;
Woven in dreams - the darkest of schemes now takes hold of our destiny...
Decades of greed, plague, famine and war - we can't go on like this anymore;
Living like fools - chaos will rule this eternal paradise... A Fool's Paradise - Symphony X :corn Join the Image Puzzle game ! :corn |
| | | | Sponsored Links |
12-14-2005, 01:39 AM
|
#2 (permalink)
| BattleForums Senior Member
Join Date: May 2003 Location: My house Posts: 2,048
| It's called a savecode, basically you save each attribute you want recoverable to a number/letter and then re-load them.
For example you could order all your heroes in an array, then give the player back a string with the position of their hero in the array, they would be able to re-load that hero later on by calling the number again. You just have to do this for everything you want savable.
__________________ : ) |
| |
12-14-2005, 06:32 PM
|
#3 (permalink)
| BattleForums Senior Member
Join Date: Feb 2003 Location: CA Age: 20 Posts: 3,420
| It's an incredibly long and comlicated code, it takes awhile, unless you steal it from other maps, which we don't support, so don't ask.
Besides, it requires a string that seems random, but contains certain numbers that refer to your exp, level, each stats, skill level, hero, it takes a long time to code =/ It throws in items too, so it's usually a long string, and would take forever to code. More or less you create arrays with cretain variables set as letters or numbers referring to each hero, then create arrays for the skills and levels for those heroes, and every item has it's own variable, so when the player types -save you need to have a trigger to analyze all those categories, match up variables, and spit out a code. Making it random is another complicated piece to the puzzle.
-Frank :cool:
__________________
All brawn and no brains and all those nice things
And you finally got what you want
Someone to look good with and light you cigarette
Is this what you really want?
I've figured out, what you're all about
And I don't think I like what I see, so
I hope I won't be there in the end when you come around
How long will he last before he's a creep in the past
And your alone once again
Will you pop up again and be my special friend
Till the end and when will that be
:halo Kurt Donald Cobain 1967 - 1994 R.I.P. :halo |
| |
12-14-2005, 09:43 PM
|
#4 (permalink)
| BattleForums Member
Join Date: Nov 2005 Posts: 364
| Woohoo... Finally I think I won't waste my time working on this  .
__________________  Is this the end of all we know - innocence lost so long ago;
Woven in dreams - the darkest of schemes now takes hold of our destiny...
Decades of greed, plague, famine and war - we can't go on like this anymore;
Living like fools - chaos will rule this eternal paradise... A Fool's Paradise - Symphony X :corn Join the Image Puzzle game ! :corn |
| |
12-15-2005, 01:56 AM
|
#5 (permalink)
| Aya Matsuura is awesome
Join Date: Nov 2002 Location: Trieste, Friuli-Venezia Giulia Age: 20 Posts: 15,282
| Quote: |
Originally Posted by IceDevil9 It's an incredibly long and comlicated code, it takes awhile, unless you steal it from other maps, which we don't support, so don't ask.
Besides, it requires a string that seems random, but contains certain numbers that refer to your exp, level, each stats, skill level, hero, it takes a long time to code =/ It throws in items too, so it's usually a long string, and would take forever to code. More or less you create arrays with cretain variables set as letters or numbers referring to each hero, then create arrays for the skills and levels for those heroes, and every item has it's own variable, so when the player types -save you need to have a trigger to analyze all those categories, match up variables, and spit out a code. Making it random is another complicated piece to the puzzle.
-Frank :cool: | It's not actually that difficult, as long as you figure out steps how to encode the string first. However, you cannot destroy the string (for example, changing characters to characters that already exist would destroy it), nor make it so easy to decode.*
__________________ * IM IN UR WIKI RVRTING UR EDITS |
| |
12-15-2005, 06:49 AM
|
#6 (permalink)
| [F-Zero Fanatic]
Join Date: May 2003 Location: Phantom Road Age: 22 Posts: 15,856
| The idea is that there is a trigger that will save data from a hero like type, spells etc. Then the user can upload the file and regenerate that hero, so long as the hero exists and the skills exist within the map he was loaded in.
However, as Icedevil said: It is very complex triggering, often crashing or unable to load the files if the load sequence is done incorrectly or the file becomes unreadable. |
| |
12-18-2005, 03:39 PM
|
#7 (permalink)
| BattleForums Newbie
Join Date: Nov 2005 Posts: 9
| The guy just needed a link to a tutorial, not a discouragement... Save/Load Code Tutorial
Someone has bothered explaining this in depth. If JASS supports the kind of arrays that C has then it would be easy. In fact you'll be able to make a user name & password type of loading where the user name is used as the encryption key. That way there'll be a minimal chance someone to reverse-engineer your code, beacuse the same hero with the same stuff will have totaly diffirent code, even if the encryption string used is the same (but I've no idea what kind of arrays JASS has...).
Last edited by PTS; 12-18-2005 at 03:45 PM.
|
| |
12-18-2005, 04:01 PM
|
#8 (permalink)
| BattleForums Member
Join Date: Nov 2005 Posts: 364
| That made me dizzy :fwink.
__________________  Is this the end of all we know - innocence lost so long ago;
Woven in dreams - the darkest of schemes now takes hold of our destiny...
Decades of greed, plague, famine and war - we can't go on like this anymore;
Living like fools - chaos will rule this eternal paradise... A Fool's Paradise - Symphony X :corn Join the Image Puzzle game ! :corn |
| |
12-19-2005, 04:15 AM
|
#9 (permalink)
| [F-Zero Fanatic]
Join Date: May 2003 Location: Phantom Road Age: 22 Posts: 15,856
| Well, if you understand the whole ideas of encrypting and arrays, it isn't. |
| | | |  | | Get rid of all these ads! Take 30 seconds to register. |