I would like to see an option added to go straight into a song by calling the FretsOnFire executable with a command line argument naming, for instance, the song folder.
For example, to run the tutorial I would write (from the FoF install dir):
FretsOnFire.exe /play "data\songs\tutorial"
Additional arguments could be added to select difficulty and to select lead/bass tracks. Without this info, the game would simply use the last played, as it usually does.
FretsOnFire.exe /play "data\songs\bangbang" /medium
(If for some reason the selected difficulty is not available for the chosen song it could just pick the nearest one, rounding up or down.)
Why do I want this? Because it would allow programming geeks like myself who don't care much for Python to write a "FoF launcher" that could do some cool stuff that FoF can't or won't do.
Also, this should be extremely simple to implement, as a mod or directly into the game.
Finally, if someone would explain to me how the high scores are encoded into the song.ini files, or point me at the right document, that would be cool.
Straight to song shortcut - No need for menus
Forum rules
- Before submitting a new idea please make sure it is not already in this thread: What ideas have already been pronounced here?
This topic is 18 years and 3 months old. Instead of replying, please begin a new topic, or search for another related topic that may be more suitable.
i think the high scores in the song.ini is encoded xml, but i could be wrong.
Last edited by omganinja on Wed Feb 28, 2007 4:17 pm, edited 1 time in total.
Well, the song.ini contains lines like:
scores = 63657265616c310a310a646963740a300a72300a
Which looks like hexadecimal code. If we convert it, we get:
c e r e a l 1
1
d i c t
0
r 0
For an empty high score. This is not XML. It looks rather like something apparently called Cerealizer. Could probably be reverse-engineered, but it would be much better if the FoF developers used an open format.
scores = 63657265616c310a310a646963740a300a72300a
Which looks like hexadecimal code. If we convert it, we get:
c e r e a l 1
1
d i c t
0
r 0
For an empty high score. This is not XML. It looks rather like something apparently called Cerealizer. Could probably be reverse-engineered, but it would be much better if the FoF developers used an open format.

-
- Member
- Posts: 162
- Joined: January 12th, 2007
- Location: Indaiatuba - SP - Brazil
- Reputation: 1
- Contact:
W2k wrote:Well, the song.ini contains lines like:
scores = 63657265616c310a310a646963740a300a72300a
Which looks like hexadecimal code. If we convert it, we get:
c e r e a l 1
1
d i c t
0
r 0
For an empty high score. This is not XML. It looks rather like something apparently called Cerealizer. Could probably be reverse-engineered, but it would be much better if the FoF developers used an open format.
wouldn't this afect the oficial score chart?
My Song Anti-Flag - The Press Corpse - NEW - a CD label for the mod users *cough pretty sweet i think cough*
Looking at the source code, you can see the comment
The encoding code is
So basicly, it is a dictionary of scores, cerealized and then translated from ASCII into hex.
The scores are quite easy to read, but do include hash checks - this means it should be quite easy to reverse engineer the output, but a bit more difficult (without access to the source) to create a working scores line in the ini.
EDIT: Oh, and btw I think the idea of adding command line arguments is a good one that shouldn't be too difficult for someone who knows their way around the source to implement.
Code: Select all
# Read highscores and verify their hashes.
# There ain't no security like security throught obscurity :)
The encoding code is
Code: Select all
def getObfuscatedScores(self):
  s = {}
  for difficulty in self.highScores.keys():
   s[difficulty.id] = [(score, stars, name, self.getScoreHash(difficulty, score, stars, name)) for score, stars, name in self.highScores[difficulty]]
  return binascii.hexlify(Cerealizer.dumps(s))
So basicly, it is a dictionary of scores, cerealized and then translated from ASCII into hex.
The scores are quite easy to read, but do include hash checks - this means it should be quite easy to reverse engineer the output, but a bit more difficult (without access to the source) to create a working scores line in the ini.
EDIT: Oh, and btw I think the idea of adding command line arguments is a good one that shouldn't be too difficult for someone who knows their way around the source to implement.
Last edited by ThatJon on Wed Feb 28, 2007 5:10 pm, edited 1 time in total.
The scores are quite easy to read, but do include hash checks - this means it should be quite easy to reverse engineer the output, but a bit more difficult (without access to the source) to create a working scores line in the ini.
The application I was thinking about would be more like a high score logger, not editor. So I wouldn't need to break the hash.
Command line starting has already been suggested and it's on my TODO list.
You're awesome. Can I suggest that the game will also exit after the song has been played and the high score recorded? Otherwise, the user would be required to manually exit to use the "launcher" again. Obviously, there could be a command line switch to enable/disable this function.
Last edited by W2k on Thu Mar 01, 2007 2:16 am, edited 1 time in total.
Who is online
Users browsing this forum: No registered users and 6 guests