![[image loading]](http://imgur.com/x18MV.jpg)
remember?
But wait... why would we want a customladder?
>To implent community maps
>We don't have the annoyingness of the bonus pool bothering us
The idea behind this is to use SC2Banks to communicate between SC2 and an external program (and a server).
Maps can store information in .SC2Bank files, likely located in (C\User\Username\Documents\StarcraftII\Accounts\AccNr\AccNrAgain\Banks\OneOfThoseFolders). An expamle for this is Marine Arena, it stores stats like total kills and games played in a bank and display it ingame on the leaderboard.
This is how a hypothetical customladder could work:
>Registers at some site and download a program.
>Use your login information to access the program. It will create a SC2Bank file with your Nickname stored in it (one file for each map in the pool).
>The program also shows your current rank and stats.
>Now you're ready to go. Go to the join custom game menu in SC2 and set the filter to "Tug of War" (This is because there are very few Tug of War overall games so the customladder maps wont be burried).
![[image loading]](http://imgur.com/Ul40d.jpg)
The Tug of War section is a wasteland
>Join a map according to your rank. Expample: "Metalopolis - Custom ladder rank D".
>Depending on the outcome of the game the map will save something along the lines of <ID Joe123 wins against ID Adam456> in the SC2Bank file.
>The program notices when the game is finished, reads out the result of the game from the SC2Bank and sends it to the server where your stats and your rank will be updated accordingly and send back to the program.
Problems with this method:
>Obviously won't work if both parties don't have the program running, but this can be easily detected so that you can leave the current game and join anotherone without ruining your stats.
>Cheating: SC2Banks can be edited with notepad to fake results. This too can be prevented. The easiest method would be to let the map create a hash file for the result and let the server validate it. This can be done with STARCODE (1)
This is how far i got on my own:
(Note that this is NOT an already working customladder, its just a basic attempt)
Created a map: "Metalopolis - Custom Ladder" (EU), it can be found by putting the filter on 'Tug of War'. It's unlocked so you can freely steal code.
Filefront link:
http://www.filefront.com/17745285/Metalopolis-test-backup.SC2Map/
Difference between this map and normal Metalopolis:
>The stuff i did in the triggers
>Changed some stuff arround in Map>Game Variants
>You can only spawn cross or close-air position
Created a program (with my shitty pascal programming skillz) to perform simple tasks with the SC2Bank.
Filefront link:
http://www.filefront.com/17745468/customladder.exe
Link of the Source:
http://www.filefront.com/17745477/reader.zip
Code:
+ Show Spoiler +
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
ExtCtrls, StdCtrls, Menus;
type
{ TBcopyresults }
TBcopyresults = class(TForm)
bcopyresults: TButton;
bnewid: TButton;
Edit1: TEdit;
procedure bcopyresultsClick(Sender: TObject);
procedure bnewidClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
Bcopyresults: TBcopyresults;
implementation
{ TBcopyresults }
procedure TBcopyresults.bcopyresultsClick(Sender: TObject);
var f,g,q:textfile; store:array[1..100] of string ; s,text1:string; u,i:integer;
begin
assignfile(f,'.\info.SC2Bank');
assignfile(g,'results.txt');
assignfile(q,'importantpartofresults.txt');
Reset(f);
i:=1;
while not eof(f) do begin
Readln(f,store[i]);
text1:=text1+store;
i:=i+1;
end;
edit1.text:=text1;
rewrite(g);
for u:=1 to i-1 do begin
write(g,store[u]);
writeln(g);
end;
rewrite(q);
write(q,store[5]);
writeln(q);
write(q,store[10]);
closefile(q);
closefile(g);
closefile(f);
end;
procedure TBcopyresults.bnewidClick(Sender: TObject);
var f:textfile; r:integer;
begin
r:=random(9999);
assignfile(f,'info.SC2Bank');
Rewrite(f);
write(f,'<?xml version="1.0" encoding="utf-8"?>');
writeln(f);
write(f,'<Bank version="1">');
writeln(f);
write(f,' <Section name="ID">');
writeln(f);
write(f,' <Key name="of player">');
writeln(f);
write(f,' <Value string="'+inttostr(r)+'78917"/>');
writeln(f);
write(f,' </Key>');
writeln(f);
write(f,' </Section>');
writeln(f);
write(f,'</Bank>');
closefile(f);
end;
procedure TBcopyresults.FormCreate(Sender: TObject);
begin
randomize;
end;
initialization
{$I unit1.lrs}
end.
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
ExtCtrls, StdCtrls, Menus;
type
{ TBcopyresults }
TBcopyresults = class(TForm)
bcopyresults: TButton;
bnewid: TButton;
Edit1: TEdit;
procedure bcopyresultsClick(Sender: TObject);
procedure bnewidClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
Bcopyresults: TBcopyresults;
implementation
{ TBcopyresults }
procedure TBcopyresults.bcopyresultsClick(Sender: TObject);
var f,g,q:textfile; store:array[1..100] of string ; s,text1:string; u,i:integer;
begin
assignfile(f,'.\info.SC2Bank');
assignfile(g,'results.txt');
assignfile(q,'importantpartofresults.txt');
Reset(f);
i:=1;
while not eof(f) do begin
Readln(f,store[i]);
text1:=text1+store;
i:=i+1;
end;
edit1.text:=text1;
rewrite(g);
for u:=1 to i-1 do begin
write(g,store[u]);
writeln(g);
end;
rewrite(q);
write(q,store[5]);
writeln(q);
write(q,store[10]);
closefile(q);
closefile(g);
closefile(f);
end;
procedure TBcopyresults.bnewidClick(Sender: TObject);
var f:textfile; r:integer;
begin
r:=random(9999);
assignfile(f,'info.SC2Bank');
Rewrite(f);
write(f,'<?xml version="1.0" encoding="utf-8"?>');
writeln(f);
write(f,'<Bank version="1">');
writeln(f);
write(f,' <Section name="ID">');
writeln(f);
write(f,' <Key name="of player">');
writeln(f);
write(f,' <Value string="'+inttostr(r)+'78917"/>');
writeln(f);
write(f,' </Key>');
writeln(f);
write(f,' </Section>');
writeln(f);
write(f,'</Bank>');
closefile(f);
end;
procedure TBcopyresults.FormCreate(Sender: TObject);
begin
randomize;
end;
initialization
{$I unit1.lrs}
end.
How it works:
Run the map one time on Bnet against an AI.
Go to the banks directory and search for the folder with the bank "Thisbankhelpsyoufindthefolder.SC2Bank" in it.
Copy the program in it. Run it. Click "Create new ID". A Bank file with a random ID is created.
Play the map again. If you play against an AI the warning "This game is not ranked" will appear (ignore it). When you win the result will be saved in the Bank. Click "Copy result" in the program. 2 Textfiles will be created. One contains a replica of the content of info.SC2Bank, the other one only the result and a low security hash line.
![[image loading]](http://imgur.com/4YtbU.png)
[i]The content of your bank folder should now look like this
Hopefully someone (who knows more than pascal lol) will pick up on the idea and can make something useful happen.
(1): STARCODE can be found here:
http://forums.sc2mapster.com/resources/trigger-libraries/5091-library-starcode-v1-4/
Credits go to the mapster guys
Edit #1:
Feel free to post this on the US Blizzard forums (the EU ones are abandoned afaik) or somewhere else Blizzard will notice it, but i don't think they'll have a problem with it since there is 0 code injection happening.
You could basically construct the whole thing in a way that the program would just copy the SC2Bank and then screw arround in the copy and doesn't change a thing in the SC2 directory.
Example:
At the end of the match the result is saved in the SC2Bank. This will increase it's size. The program notices that and copys the bank. When you start a new map the previous results will be deleted from the bank during the Melee initialization process.
Thats the equivalent of you copying a Replay to your desktop, opening it with notepad and screwing arround in it and then never let it get in contact with SC2 again.
And:
On January 04 2011 06:59 dementrio wrote:
the point of a ladder would be that players are ranked and you play people who are around your skill level. you can't do that with how the custom game lobby works; you have to create and invite people, or play whoever decides to join the map otherwise. a bot that hears you saying "i want to play" and answers "random guy around your level is waiting for a game" would help.
One that creates games itself and invites players would be better but if the chat channels work under some known protocol a channel bot would be much easier to script.
the point of a ladder would be that players are ranked and you play people who are around your skill level. you can't do that with how the custom game lobby works; you have to create and invite people, or play whoever decides to join the map otherwise. a bot that hears you saying "i want to play" and answers "random guy around your level is waiting for a game" would help.
One that creates games itself and invites players would be better but if the chat channels work under some known protocol a channel bot would be much easier to script.
I had also thought about a chatlobby based ladder first. The system could work similar to the one i posted only that there is just 1 version of the map floating arround instead of one for each rank and people arrange games in the appropriate channels. Much like here:
![[image loading]](http://imgur.com/cmr5Z.jpg)
Edit #2:
Contacted ICCup.diamond and the Blizzard copyright department (since they don't seem to have a department for Third Party software).
Edit #3:
No response from Blizzard yet (8 days after i wrote them).
+
On January 12 2011 13:25 Lakai wrote:
A good point of reference for the client would be ESEA. You might even be able to try contacting lpkane and get a hold of the dev team behind ESEA if you are so inclined.
I've thought a bit about this and everything besides the editable sc2banks(which are just xml files which is awesome) seems good.
I'd like to clean up your ideas and add some of mine:
- Customs maps with a simple trigger to create a temporary sc2bank which stores the winner (I did this in 30 seconds without ever using the sc2editor)
- Client that would let you see the online players and their respective custom ladder ranking
- For now you would probably use the client to find the player/id and contact them through bnet
- Set up match in the client by entering the opponents name.
- The client sends the match request to the server and then to the opponents client
- Opponent accepts request and the match is ready.
- Create the custom game on the custom map and play.
- Once done both users click finish on the client
- The client then opens the tempBank.sc2bank and parses the XML, encrypts it and sends the results to the server and deletes the temp bank. There could be a 15 minute period to click finish until the server nullifies the match. Once the server receives both results and if they match up we are done.
- If they don't match the match would be marked as 'invalid' and would require the winner to upload a replay on the site and have an admin confirm the win.
This seems legit and as far as the editable banks go we have replays for confirmation and it's very easy to ban abusers. Just a minor annoying for the admins.
Here what my 30 seconds sc2bank looked like:
<?xml version="1.0" encoding="utf-8"?>
<Bank version="1">
<Section name="gameData">
<Key name="winner">
<Value int="2"/>
</Key>
</Section>
</Bank>
A good point of reference for the client would be ESEA. You might even be able to try contacting lpkane and get a hold of the dev team behind ESEA if you are so inclined.
I've thought a bit about this and everything besides the editable sc2banks(which are just xml files which is awesome) seems good.
I'd like to clean up your ideas and add some of mine:
- Customs maps with a simple trigger to create a temporary sc2bank which stores the winner (I did this in 30 seconds without ever using the sc2editor)
- Client that would let you see the online players and their respective custom ladder ranking
- For now you would probably use the client to find the player/id and contact them through bnet
- Set up match in the client by entering the opponents name.
- The client sends the match request to the server and then to the opponents client
- Opponent accepts request and the match is ready.
- Create the custom game on the custom map and play.
- Once done both users click finish on the client
- The client then opens the tempBank.sc2bank and parses the XML, encrypts it and sends the results to the server and deletes the temp bank. There could be a 15 minute period to click finish until the server nullifies the match. Once the server receives both results and if they match up we are done.
- If they don't match the match would be marked as 'invalid' and would require the winner to upload a replay on the site and have an admin confirm the win.
This seems legit and as far as the editable banks go we have replays for confirmation and it's very easy to ban abusers. Just a minor annoying for the admins.
Here what my 30 seconds sc2bank looked like:
<?xml version="1.0" encoding="utf-8"?>
<Bank version="1">
<Section name="gameData">
<Key name="winner">
<Value int="2"/>
</Key>
</Section>
</Bank>