Author Topic: .ash files - what you need to know about them  (Read 28578 times)

ViRUS

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3421
    • MSN Messenger - newvirus@live.com.ar
    • View Profile
    • Email
.ash files - what you need to know about them
« on: June 08, 2009, 08:21:32 pm »
1. What are the .ash files?:

An .ash file is a kind of file used specifically by Audiosurf to store some information about the song you just loaded. The first time you load a song, the game analyses its information (such as length, the ride it generates, points needed for each medal, etc.) so the next time you load it, Audiosurf just loads what it wrote on the file the first time, making the process much faster.

An .ash file generally has the following structure on its name:

  • The first two numbers refer to the filetype of the original song file. For example, lossless files (like .wav or .flac) always begin with 11 (also .ogg), and lossy formats like .wma and .mp3 always begin with 10. Number 12 is .w4a
  • The next numbers tell how many centiseconds the song is. For example, a 13:37 track is 81713 centiseconds, which converts back to exactly 13.6188333 minutes, or 13 minutes and 37,129998 seconds
  • The filename of the original song file
  • The file extension in plain text
  • .ash

so a regular .ash file would look like this:



By looking at its name, we know that the song was encoded in MP3, it lasts 4 minutes 2 seconds and that its filename is "Last day alive".

2. More information regarding .ash files:

.ash files' size varies depending exclusively on the length of a song and how many blocks per minute it has (since it stores where each block is located), being their average size from 20KB to 40KB more or less.

.ash files are located inside this folder:

*Steam path*\steamapps\common\audiosurf\engine\AudiosurfHC

and it doesn't matter how many .ash files you have inside that folder (some people reached 300 .ash files at once, and they had no problems playing the game) since Audiosurf uses those random numbers to generate them, it also doesn't matter if you play two different songs with the same filename and extension, the game will detect that that specific song doesn't have any .ash file in particular since their lengths, size in MBs or the song "per se" won't be the same.

3. What are they useful for apart from loading songs faster?:

.ash files provide a secure environment for players wanting to hold a competition on a specific song, since one of the players can load the song with Audiosurf, letting it create the correct .ash file and then he/she can send the .ash file with the song file to his/her rival, making sure they will have the exact same ride, with the same blocks placed on the same place, both will have a corkscrew or not, etc.

Remember though that for this competition mechanism to work correctly, the song file both players load must be the exact same, or else Audiosurf will generate a completely new .ash file, as stated on point number 2.

4. Cheating, hacking, etc. using .ash files:

Some players are highly concerned about the scoreboards being "hacked" by modifying .ash files to add more blocks, make uphill sections downhill, etc., and let's face it, they're mid-right.

Why are they right? Because this is a game for the PC, and on the PC you have access to all your files, including game files, and while .ash files are saved using some kind of codification that no one else than Dylan and maybe lebeth know, some people are just desperate enough to use their "hacking abilities" to find the way they're codified and make the modifications they want.

Hacking .ash files isn't completely bad though, some players (like Lu Tze, a player on this very same forum) use their knowledge not to hack the files in order to cheat on the scoreboards, but to bring new exciting and (sometimes) harder ways of playing Audiosurf to players, just like using the [as-] tags but in a way which they have more control about what will happen with on the track.

It's up to the "hacker" to use his/her knowledge for the good or the bad. But you don't have to worry too much anyway, since if a "hacker" chooses to go the bad way, you can always use the "Report" button on the scoreboard.

5. Final thoughts on .ash files:

So that's what you pretty much have to know about .ash files, but here are some tips regarding them:

You can copy .ash files to whatever computer you want, so you don't have to (for example) wait for your netbook to create the .ash files for the same 30 songs you already played on your desktop PC.

You can delete all of your .ash files to recover some space from your HDD anytime you want, Audiosurf will just create the .ash file you deleted the next time you load that specific song.

Sharing .ash files does not break any DRM or any rules your song file may have, since you can't get the actual song from it, it's completely legal to share them between players.

There are no viruses known that affect .ash files, so (and forgive me if I'm a bit repetitive) you can share your .ash files with anybody since you won't send them a virus if your PC is infected nor you will get malicious software from downloading .ash files.



And that's it, have fun with the game, play safe and rest assured that you now know everything you need to deal with those now-not-so-strange .ash files :D

Also, thanks to jez for his recent research on .ash files, which surely helped this thread to be much more accurate!
« Last Edit: December 06, 2011, 09:05:12 am by ViRUS »


dschallert

  • Hero Member
  • *****
  • Posts: 545
  • grab the snitch!
    • View Profile
    • Email
Re: .ash files - what you need to know about them
« Reply #1 on: June 08, 2009, 11:21:15 pm »
+1

This was long overdue... Great work, ViRUS!
Walk in to the club I'm like "what up, I got big queue"

Summa mah serfs: http://www.youtube.com/user/Sherbrick

Lavos^

  • Hero Member
  • *****
  • Posts: 2253
    • View Profile
    • Email
Re: .ash files - what you need to know about them
« Reply #2 on: June 09, 2009, 02:36:35 am »
Just FYI, the numbers at the start of the filename aren't random. The numbers correlate to the song length, a short song will have low numbers, long ones will have long numbers. It *should* be possible to get the length of the song, and strip those numbers from the filename by scanning the file, but not much work has been done.

Purely speculation, but since you can only have 1 block in 1 lane at a time, you can think of the whole AS track as a grid itself, so possibly the ASH file contains structured information for each "cell" in each lane,  OR, it uses some kind of incremental time element. But it contains information for all modes as well, so... I'd have thought the files would have been bigger.
« Last Edit: June 09, 2009, 02:39:12 am by Lavos^ »

Lu Tze

  • Sr. Member
  • ****
  • Posts: 287
    • View Profile
Re: .ash files - what you need to know about them
« Reply #3 on: June 09, 2009, 04:17:20 am »
Haha nice, also thanks for mentioning me  ;)

Btw., the reason I didn't share any of my knowledge of ash-files is simply to avoid cheating. But by now many people seem to already know what they do, yet there has been no cheating that I know (there are simpler methods, after all...), and sharing them is very useful to keep the competition fair (TTFAF being a good example).

Gamergull

  • Jr. Member
  • **
  • Posts: 62
  • Cool Canadian
    • View Profile
    • Email
Re: .ash files - what you need to know about them
« Reply #4 on: June 09, 2009, 08:05:35 am »
Good post, ViRUS. I used to delete my .ash files every few months :-\ .

Laserrobotics

  • Robot Overlord
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3616
  • Beep boop everyone.
    • View Profile
    • Steam ID
Re: .ash files - what you need to know about them
« Reply #5 on: June 09, 2009, 01:18:22 pm »
Very thorough.  Stickied.

ViRUS

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3421
    • MSN Messenger - newvirus@live.com.ar
    • View Profile
    • Email
Re: .ash files - what you need to know about them
« Reply #6 on: June 09, 2009, 01:57:46 pm »
Thank you for all your comments ^_^


0VERS33R

  • Sr. Member
  • ****
  • Posts: 393
    • View Profile
    • Email
Re: .ash files - what you need to know about them
« Reply #7 on: January 28, 2010, 10:37:44 pm »
Thanks, ViRUS. I've got a tiny problem with this. By using ash file comparisons (and you can use a program as simple as notepad for this) I've been able to modify tracks ever so slightly. You mention how this is a problem with hackers and how you can always just click report. But a smart person will modify it simply not to have a red block in the middle of many other blocks, and this slight modification of putting red blocks together could make a HUGE difference to the scoreboard while changing the track insignificantly. Although the post here is great, I don't think this information should be so freely devulged to the public...
Audiosurf is like a mix of tetris, need for speed and pot... Look at all the colours, dude!

blue_h3x

  • Hero Member
  • *****
  • Posts: 5165
    • View Profile
    • AS Tournament
Re: .ash files - what you need to know about them
« Reply #8 on: January 30, 2010, 06:49:10 am »
If you've been able to decode how the ash is formed, instead of removing random chunks and adding in/replacing chunks, then your skills are quite amazing.
Australia is kinda awesome, but it's no Yorkshire.

0VERS33R

  • Sr. Member
  • ****
  • Posts: 393
    • View Profile
    • Email
Re: .ash files - what you need to know about them
« Reply #9 on: January 30, 2010, 09:07:43 pm »
I agree, h3x. My skills would be fairly amazing if I had done that. It hasn't helped my sniggling problem though.
Audiosurf is like a mix of tetris, need for speed and pot... Look at all the colours, dude!

blue_h3x

  • Hero Member
  • *****
  • Posts: 5165
    • View Profile
    • AS Tournament
Re: .ash files - what you need to know about them
« Reply #10 on: February 02, 2010, 04:24:27 pm »
It hasn't helped my sniggling problem though.

That people ash hack?
Australia is kinda awesome, but it's no Yorkshire.

jez

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Re: .ash files - what you need to know about them
« Reply #11 on: November 25, 2011, 06:34:39 am »
There is a bug in the .ash-file generation. I don't know what causes it, but sometimes when I play a song again, it creates a new .ash-file. One example is The Flower Kings' album Back in the World of Adventures.

Here are my duplicate .ash-files AudioSurf has created.

112276305 - Oblivion Road.flac.ash 39 kb
112276405 - Oblivion Road.flac.ash 39 kb

118147910 - Big Puzzle.flac.ash 138 kb
118148010 - Big Puzzle.flac.ash 138 kb

114672303 - Go West Judas.flac.ash 79 kb
114672403 - Go West Judas.flac.ash 79 kb

The files have always been in the same folder and I haven't changed the filename or any of the tags. For some unknown reason AS creates a new .ash-file, which is identical to the previous one in content. Only the numbering changes slightly. And opposed to what ViRUS said about the numbering in there, it's not just random every time as we can see. The duplicates numbering is too alike to the original one to be random. If we actually knew how the game generates the first numbers, maybe I could dig up the source of this problem. Now I can't think of anything else other than it must be a bug. And it's annoying because previously I could easily notice which tracks I have played before just by looking at the songs loading speed.

I bolded the parts in the number that aren't part of the filename.
« Last Edit: November 25, 2011, 06:38:00 am by jez »

Sensei Le Roof

  • Hero Member
  • *****
  • Posts: 643
  • Never trust a spirit guardian with a turbo engine!
    • View Profile
Re: .ash files - what you need to know about them
« Reply #12 on: November 25, 2011, 08:35:22 am »
I've figured it out. The number at the start of the filename is "10", then the number of hundredths of seconds in the track.
No witty, memetic, or mangled quotes about me here.
No display of my latest rides or YouTube links here.
I also don't take orders from anyone who was banned.
Nothing to see here.

Move along already.

jez

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Re: .ash files - what you need to know about them
« Reply #13 on: November 26, 2011, 02:52:06 am »
I've figured it out. The number at the start of the filename is "10", then the number of hundredths of seconds in the track.

But I have 220 files and they all start with "11".

Sensei Le Roof

  • Hero Member
  • *****
  • Posts: 643
  • Never trust a spirit guardian with a turbo engine!
    • View Profile
Re: .ash files - what you need to know about them
« Reply #14 on: November 26, 2011, 10:01:48 am »
I've figured it out. The number at the start of the filename is "10", then the number of hundredths of seconds in the track.

But I have 220 files and they all start with "11".
DEEP HURTING
No witty, memetic, or mangled quotes about me here.
No display of my latest rides or YouTube links here.
I also don't take orders from anyone who was banned.
Nothing to see here.

Move along already.