like the title say, i would like to know how save and load stuff actually works.
i read some stuff, about creating banks etc.. but what are these?
are they actual files?
my problem is the transport of heroes, items and other informations into another map, being able to save and load them from that other map etc.
also having access to a file and being able to backup it or something - is this possible?
the base idea of it is my stargate galaxies project.
it works like serval maps are "connected" as planets tthrough staargates, so you pla an RPG, and travel to another planet (map), probably collect something there and travel back home.
A bank is like.. well a huge storage where you put a crapload of stuff into it.
They become acutal files on your harddisk as soon as you save them (Bank - Save Bank). Until then they are somewhere in the game memory.
Once you save files they appear in Users/Starcraft II Beta/Banks/... (not 100% sure about the path, but it's about that).
Banks are basically XML files with a different termination.
There's no problem in moving information from one map to another with using banks. You can only save things like integers, strings, buttons, reals, etc in there however. So when you want to load a hero you need to have this hero in both maps in the data editor and use banks to load specific stuff like the hero's attributes, hero level etc.
Also note, a bank can be up to 1 MB in file size, and you can have up to 128 banks.
How did you find out the 1MB size max? Did you test it?
Because I did some research on it myself and at one point I made a bank which was almost 5MB big.. maybe it's been changed in some recent patch, but still..
Is a bank easily accessible? IE. Could someone go into it and screw around with the numbers to make themselves awesome in-game?
looks like it is.
i found the banks in my Banks folder, under documents.
there is the bank, easy to open with notepad and you can edit the values.
thats what suck right now, because i wanted to create a community around my project, with kinda globale databases, but if they are editable that easy, everyone would cheat.
hope there is any way to protect them or something, but i think its not :/
you can always encode the data. currently in wc3 people enter a certain character code for loading a "Hero". using that technique you get a single string for in the bank like:
"A@fd47jdfgeDFWyj55683"
or alike, which could represent something like:
a lvl 10 zealot hero with 3 lvl in skill A and 5 lvls in skill B and carrying items X and Y also has 120 minerals owned by a player with the name TestPlayer.
I have no knowledge on how they generate those codes though, but perhaps someone else can help you look further in that direction if you need to be secure of the data input.
I don't think you can make global databases unless you can make players upload their banks manually..
Anyway, information has to be encrypted of course! Even if the banks were locked I wouldn't trust Blizzard far enough to say that they were save.
Even an easy encryption can make information undecypherable, as long as we have a good way to keep others from opening and modifying the map itself. Blizz said they are working on a map encryption, but we'll see what they serve us in the end.
Anyway, in WC3 there were a lot of maps with save systems and all of them were hacked at some point. But thankfully most players either never hear of these hacked versions (because they usually don't get public) or play legally.
The big problem is that you cannot add a trading system in game. Let's say you find an item at one point, save your game and start with a different group and in this group there's someone who wants that item. You cannot allow that, because even an encryption will not stop people from just making a backup of the bank, give all their stuff to a friend, override the bank with their backup and thus dublicate all their items.
I have no knowledge on how they generate those codes though, but perhaps someone else can help you look further in that direction if you need to be secure of the data input.
There's different "stages" of code encryption. The most basic just switches letters with each other, so you basically make a second alphabeth and determine that, for example, every 'A' now becomes a 'X' and every 'B' becomes a '4' and so on.
More complex encryption turns letters into numbers, turns these numbers into hexadecimals and encrypts those. There's a lot of ways to encpryt information.
well to that global databse stuff.. this project would be some kind of a mod..
you would start starcraft2 with a loader, that uploads your bank files to a server and stuffl ike that...
this is doable, problem is the security of the file it self - and seriously, i dont wanna let people type "-load fosdjüpg8ozse78ftgosfdgfzw43h5tw4htg8hsi7twa74töoshröot78wa4eht6ölgrdhsö8" because that sucks. i played a lot of rpg´s in wc3 and this just sucked.
probably blizzard themselfes is giving some support for it adding some possibilities.. who knows..
this is doable, problem is the security of the file it self - and seriously, i dont wanna let people type "-load fosdjüpg8ozse78ftgosfdgfzw43h5tw4htg8hsi7twa74töoshröot78wa4eht6ölgrdhsö8" because that sucks. i played a lot of rpg´s in wc3 and this just sucked.
That's the idea of banks.. think of banks as a storage for your save codes. Usually a player would have to write them down and enter them again each game. That sucks of course. Now you just write them into the bank? The same security, then same pros n cons, just more convenient for the user.
In wc3 you had 3rd party tool to read from screen and write instead of you, so you dont have to type. Well at least I got one :) . And I made map that works with that tool.
Safest way would be, as someone above stated, uploading data on some server so nobody can edit it (cheat).
But blizzard cant provide server for that, overload :). Tho they could add option to add our own servers, or someone will do that later. Lets hope.
They use same system for WoW and Diablo games.
The no-trading thing is a big downer. Wonder if anyone is smart enough to figure out a way to get around people just backing their files up.
I've thought about this a lot, but there's basically no way. If you were able to secretly store a little bit of information that would be enough. But that's the problem. It's not possible without banks. And there we are at the problem of backing up again.
Would it be possible to simply flag items with a temporary integer in the map to solve this problem?
I.E.
Global Variable - NewGameItems (Integer Default: 0)
Global Variable - NewGameItem[X] (Item Array for new Items that game)
Global Variable - NewGameItemBound[X] (Integer array for New items in that game)
On New Loot Aquired (Boss loot, shop loot ect)
NewGameItems = NewGameItems +1 (Important to have this first or you will change the For Loop to 0 to NewGameItems in the following part.)
NewGameItem[NewGameItems] = Item Dropped
NewGameItemBound[NewGameItems] = 1 (Showing the item is aquired, but the status is not saved or loaded)
On Save Actions
For 1 to NewGameItems (loop)
Get NewGameItem[NewGameItems] (didn't look at the editor yet to see if this is possible, I presume it is)
If NewGameItem[NewGameItem] is Equal to 'Owned by Saving Player' Then
NewGameItemBound[NewGameItems] = 0 (marking the item as saved or loaded, thus cannot be traded/dropped anymore. Only removable by selling to a shop or deleting from the inventory)
Using this logic from my programming days off the top of my head, if there hasn't been any other work around maybe this could be put into the editor code by someone who has the time and knowledge of how to do the logic.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
hi.
like the title say, i would like to know how save and load stuff actually works.
i read some stuff, about creating banks etc.. but what are these?
are they actual files?
my problem is the transport of heroes, items and other informations into another map, being able to save and load them from that other map etc.
also having access to a file and being able to backup it or something - is this possible?
the base idea of it is my stargate galaxies project.
it works like serval maps are "connected" as planets tthrough staargates, so you pla an RPG, and travel to another planet (map), probably collect something there and travel back home.
A bank is like.. well a huge storage where you put a crapload of stuff into it.
They become acutal files on your harddisk as soon as you save them (Bank - Save Bank). Until then they are somewhere in the game memory.
Once you save files they appear in Users/Starcraft II Beta/Banks/... (not 100% sure about the path, but it's about that).
Banks are basically XML files with a different termination.
There's no problem in moving information from one map to another with using banks. You can only save things like integers, strings, buttons, reals, etc in there however. So when you want to load a hero you need to have this hero in both maps in the data editor and use banks to load specific stuff like the hero's attributes, hero level etc.
thanks for the info, this is just very nice.
this makes kinda database synchrionizing available.
Also note, a bank can be up to 1 MB in file size, and you can have up to 128 banks.
How did you find out the 1MB size max? Did you test it?
Because I did some research on it myself and at one point I made a bank which was almost 5MB big.. maybe it's been changed in some recent patch, but still..
Is a bank easily accessible? IE. Could someone go into it and screw around with the numbers to make themselves awesome in-game?
looks like it is.
i found the banks in my Banks folder, under documents.
there is the bank, easy to open with notepad and you can edit the values.
thats what suck right now, because i wanted to create a community around my project, with kinda globale databases, but if they are editable that easy, everyone would cheat.
hope there is any way to protect them or something, but i think its not :/
you can always encode the data. currently in wc3 people enter a certain character code for loading a "Hero". using that technique you get a single string for in the bank like:
"A@fd47jdfgeDFWyj55683"
or alike, which could represent something like:
a lvl 10 zealot hero with 3 lvl in skill A and 5 lvls in skill B and carrying items X and Y also has 120 minerals owned by a player with the name TestPlayer.
I have no knowledge on how they generate those codes though, but perhaps someone else can help you look further in that direction if you need to be secure of the data input.
I don't think you can make global databases unless you can make players upload their banks manually..
Anyway, information has to be encrypted of course! Even if the banks were locked I wouldn't trust Blizzard far enough to say that they were save.
Even an easy encryption can make information undecypherable, as long as we have a good way to keep others from opening and modifying the map itself. Blizz said they are working on a map encryption, but we'll see what they serve us in the end.
Anyway, in WC3 there were a lot of maps with save systems and all of them were hacked at some point. But thankfully most players either never hear of these hacked versions (because they usually don't get public) or play legally.
The big problem is that you cannot add a trading system in game. Let's say you find an item at one point, save your game and start with a different group and in this group there's someone who wants that item. You cannot allow that, because even an encryption will not stop people from just making a backup of the bank, give all their stuff to a friend, override the bank with their backup and thus dublicate all their items.
There's different "stages" of code encryption. The most basic just switches letters with each other, so you basically make a second alphabeth and determine that, for example, every 'A' now becomes a 'X' and every 'B' becomes a '4' and so on.
More complex encryption turns letters into numbers, turns these numbers into hexadecimals and encrypts those. There's a lot of ways to encpryt information.
well to that global databse stuff.. this project would be some kind of a mod..
you would start starcraft2 with a loader, that uploads your bank files to a server and stuffl ike that...
this is doable, problem is the security of the file it self - and seriously, i dont wanna let people type "-load fosdjüpg8ozse78ftgosfdgfzw43h5tw4htg8hsi7twa74töoshröot78wa4eht6ölgrdhsö8" because that sucks. i played a lot of rpg´s in wc3 and this just sucked.
probably blizzard themselfes is giving some support for it adding some possibilities.. who knows..
That's the idea of banks.. think of banks as a storage for your save codes. Usually a player would have to write them down and enter them again each game. That sucks of course. Now you just write them into the bank? The same security, then same pros n cons, just more convenient for the user.
In wc3 you had 3rd party tool to read from screen and write instead of you, so you dont have to type. Well at least I got one :) . And I made map that works with that tool.
Safest way would be, as someone above stated, uploading data on some server so nobody can edit it (cheat).
But blizzard cant provide server for that, overload :). Tho they could add option to add our own servers, or someone will do that later. Lets hope. They use same system for WoW and Diablo games.
even if you had a tool that can read it - this is starcraft 2 and not wc3 - there has to be another, easier and better way.
i guess i have to figure out a way that is easy to use but safe and globally possible, like a 3rd party tool that uploads the banks onto a server.
The no-trading thing is a big downer. Wonder if anyone is smart enough to figure out a way to get around people just backing their files up.
I've thought about this a lot, but there's basically no way. If you were able to secretly store a little bit of information that would be enough. But that's the problem. It's not possible without banks. And there we are at the problem of backing up again.
Would it be possible to simply flag items with a temporary integer in the map to solve this problem?
I.E. Global Variable - NewGameItems (Integer Default: 0) Global Variable - NewGameItem[X] (Item Array for new Items that game) Global Variable - NewGameItemBound[X] (Integer array for New items in that game)
On New Loot Aquired (Boss loot, shop loot ect) NewGameItems = NewGameItems +1 (Important to have this first or you will change the For Loop to 0 to NewGameItems in the following part.) NewGameItem[NewGameItems] = Item Dropped NewGameItemBound[NewGameItems] = 1 (Showing the item is aquired, but the status is not saved or loaded)
On Save Actions For 1 to NewGameItems (loop) Get NewGameItem[NewGameItems] (didn't look at the editor yet to see if this is possible, I presume it is) If NewGameItem[NewGameItem] is Equal to 'Owned by Saving Player' Then NewGameItemBound[NewGameItems] = 0 (marking the item as saved or loaded, thus cannot be traded/dropped anymore. Only removable by selling to a shop or deleting from the inventory)
Using this logic from my programming days off the top of my head, if there hasn't been any other work around maybe this could be put into the editor code by someone who has the time and knowledge of how to do the logic.