• 🏆 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!

SC2 Bank Help

Status
Not open for further replies.
Level 14
Joined
Jan 5, 2009
Messages
1,127
I have some Questions on Banks.

Q 1. Do I open or Preload a bank first?
  • Bank - Open bank "Bank" for player 1
or
  • Bank - Preload and synchronize bank "Bank" for player 1
Q 2. Lets say I have a campaign, is the bank able to be used by all the maps?

Q 3. Can someone give me a list of what each Bank Function does?

Thanks ~Crazed_seal
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,190
1. You preload a bank and then open it. Preloading syncronizes it while opening it enables recalling the data.

2. Not sure about this. Yet to see a map that uses it.

3. They are prety self explanatory. They store / recall a certain type via 2 strings ( a cateogry and an element).
 
Level 12
Joined
Apr 15, 2008
Messages
1,063
1. The "Preload" function doesn't actually do anything, because it is not a function. (See the script, it is not translated into it). The only purpose of preload function is that the bank/player information is saved in BankList.xml file, and the banks are preloaded while the game starts.
So it doesn't matter at all where you put the preload function, they can be in a trigger that never fires and it would still work.

2. Yes, but be careful, the bank can be accessed by ANY map, so there is absolutely no safety.
 
Level 3
Joined
Apr 28, 2010
Messages
48
1. The "Preload" function doesn't actually do anything, because it is not a function. (See the script, it is not translated into it). The only purpose of preload function is that the bank/player information is saved in BankList.xml file, and the banks are preloaded while the game starts.
So it doesn't matter at all where you put the preload function, they can be in a trigger that never fires and it would still work.

2. Yes, but be careful, the bank can be accessed by ANY map, so there is absolutely no safety.

I have an action definition that is not turned on with preload. Does action definitions count as triggers?

I currently do not have preload in map int, and use open bank to track wins. I thought preload was just nothing. It works though.
 
Level 12
Joined
Apr 15, 2008
Messages
1,063
To check if the preload "functions" work properly, save the map, then check Import manager. Check the "Show reserved" field, and look for the BankList.xml file. You shoud be able to see your preload settings there.


This is from one of my maps:
attachment.php
 

Attachments

  • banklist.gif
    banklist.gif
    35 KB · Views: 2,918
Level 3
Joined
Apr 28, 2010
Messages
48
2. Yes, but be careful, the bank can be accessed by ANY map, so there is absolutely no safety.

Got any tips on preventing other maps from accessing the banks? I mean players can find the banks saved in SC2/Banks. Does that mean there is no protecting it?


Sigh, I don't know why Blizz just doesn't store them server side. Its like 1-2kb a pop, and people DL 3mb maps non stop.
 
Level 12
Joined
Apr 15, 2008
Messages
1,063
Well there is the new signature option. Before you save the bank, turn on signature (via "Set map option"), and then use Verify Bank option when you load the bank next game. If the players changed anything manually, the signature won't match.

This however won't work on other maps changing the bank (as far as I know), because the signature can be generated by them as well (I am not 100% sure, maybe the algorithm uses map name in the process...)

The best you can do is create your own hash-generation algorithm, generate a signature yourself, and then use some sort of code obfuscator to prevent anyone from reading the code. (But it it still not 100%, it can never be, as long as players have both banks and maps avaiable, it is not possible to create 100% safe banks)
 
Guys, banks can only be edited by the same user on multiplayer, It uses the person who published it's bnet code to store the banks.

In summary, you can edit banks on your harddrive because they're local, other maps published on battlenet that aren't by the same person who saved the original bank can't.

Single player banks are all stored in a single player folder so one map can edit the other's though.
 
Level 14
Joined
Jan 5, 2009
Messages
1,127
Crazed_seal2, this is SC2. Just turn on the security system for the bank and it is safer than any custom encryption algorthim as one can not just look up the map script to figure it out (one would have to reverse engineere part of SC2 for it).

Both combined would possibly offer the best protection.

Just I mean seriously, who would want to hack there own bank and risk actually corrupting it?
 
Status
Not open for further replies.
Top