top
  [Login]   [Forgot Pass?]   [Register]


Standard Replay Format






Please input variables to be converted to SRF format

Bound name:
Minutes:
Seconds:
Player1:
Player2:
Player3:
Player4:
Player5:
Player6:
Player7:



What is SRF?

SRF stands for Standard Replay Format.
It is used when uploading .rep files to the replay database on thie site, or for your own personal use.
It was created keep StarCraft replay files 1) organized, 2) as informative as possible, and 3) guarantee a maximum filename length of 31.

There are 3 important pieces of information that go into a filename:
1) Bound Name
2) Replay Time
3) The Players

So, the SRF is:

Boundname-Time-Players.rep

To date, there are over 1000 replays on this site.
This format grew out of necessity for structure of large systems.


How does it work?

The maximum filename length that StarCraft recognizes is 31 characters (including the 4 digit extension ".rep").
So that leaves 27 other characters to play around with.
First, the Time is formatted, seconds being 2 chars, minutes being 1 or 2 chars. Minutes' place can be "0". Minutes placed before seconds. (Assume there's no hours place!)
We have:

MMSS or MSS, then include hypens, for readability (in case boundname ends with a number or player name starts with a number)
-MMSS- or -MSS-

Then Player names are shortened, if necessary. They are kept as long as possible, while leaving enough room for the Bound Name.
The more players there are, the shorter each name has to be.
Currently this table is used in referring Player-name-length to Number-of-players:
# of playersmax length of name per player
1 player9 chars
2 players7 chars
3 players5 chars
4 players3 chars
5 players3 chars
6 players2 chars
7 players2 chars

Example:
Time of replay: 3:28
Player 1 = "Angelfarto"
Player 2 = "Snix"
Player 3 = "Sargey"

The SRF, excluding bound name, is: "-328-AngelSnixSarge"

The Bound Name gets a little more complicated.
Since we know it's a bound (that's what this whole site is about!), if the word "Bound" is found, it is removed. (Unless there is enougn room for it)
Next, the rest of the words in the bound name are condensed (spaces removed) and the length is checked to see if it fits with the Time and Players that were formatted previously.
If it is still too long, the longest word in the bound name is found, and one char is removed. Then the length is checked again.
This process is repeated until the target length is aquired.

Example:
Bound name = "Mod Recruiter Bound 2"
(and using the above example)
SRF = "ModRecr2-328-AngelSnixSarge.rep"

Lastly, any system-reserved chars are replaced with "_" (underscore).
SRF is a format for filenames, and must be compatible with file systems!


Known bugs

The information in the filename is not optimized completely.
Player names are formatted first, based on a hard-coded table. Then the Bound name is worked around the remaining length.
If there happens to be a very short bound name, the Player names are not re-checked to see if they could be expanded further.
There are no plans to create a work around for this.

If a bound name has a word with "bound" in it, but not exactly "bound", like "bounders" or "bounding", the algorithm could confuse this as "bound" if it gets shortened enough and then it gets removed.
The likelihood of a bound name having that many "Bound"-like names is rare.
Also, I have not encountered a bound name yet that this has caused a major problem.

If you find your own bugs, please notify me in the shoutbox!











© 2010 Angelfarto.com
Home Search Shout
Tools Tutorials
Bound Archive Upload Authors
Replay Archive Upload Ranks Latest