Extract Tracks from Replays

This is the place where you can find everything related to the dedicated server, control scripts and community tools.

Moderators: Pit Crew, TM-Patrol

matzi
happy cruiser
happy cruiser
Posts: 161
Joined: 20 Aug 2008 14:52
Owned TM-games: TMO TMN TMU TMF
Location: Austria
Contact:

Extract Tracks from Replays

Post by matzi » 13 May 2009 18:49

Hi
Does anyone of you know a way to get a "track.challenge.gbx " file out of a "track.replay.gbx" file?

User avatar
bloosniper
smooth traffic navigator
smooth traffic navigator
Posts: 221
Joined: 03 Apr 2007 17:51

Re: Extract Tracks from Replays

Post by bloosniper » 13 May 2009 18:50

hmm, is this possible? O_o
Image

matzi
happy cruiser
happy cruiser
Posts: 161
Joined: 20 Aug 2008 14:52
Owned TM-games: TMO TMN TMU TMF
Location: Austria
Contact:

Re: Extract Tracks from Replays

Post by matzi » 13 May 2009 18:58

it must be possible because you can choose the menu entry "play against" in the replay's menu. So the challenge has to be in the file. I have also looked into the replay files with a hexeditor and there are parts which are the same as in the challenge file but it is hard to say which parts belog to the challenge. (I want to write a program which does the extraction so this should be dynamically :? :? )

Nik
highway camper
highway camper
Posts: 1
Joined: 13 May 2009 19:02
Owned TM-games: TMNF

Re: Extract Tracks from Replays

Post by Nik » 13 May 2009 19:05

That's a good point!

:thumbsup:

Xymph
Pit Crew
Pit Crew
Posts: 5701
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: Extract Tracks from Replays

Post by Xymph » 13 May 2009 20:37

matzi wrote:it must be possible because you can choose the menu entry "play against" in the replay's menu. So the challenge has to be in the file. I have also looked into the replay files with a hexeditor and there are parts which are the same as in the challenge file but it is hard to say which parts belog to the challenge. (I want to write a program which does the extraction so this should be dynamically)
The track is contained within the replay's data block but the format isn't known. The GBX wiki describes all that is known about both the challenge and replay formats.
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

matzi
happy cruiser
happy cruiser
Posts: 161
Joined: 20 Aug 2008 14:52
Owned TM-games: TMO TMN TMU TMF
Location: Austria
Contact:

Re: Extract Tracks from Replays

Post by matzi » 14 May 2009 17:14

Thanks for the fast answer
I know that page already and just hoped that there's a kind of API which makes it easier to realise that task...

Xymph
Pit Crew
Pit Crew
Posts: 5701
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: Extract Tracks from Replays

Post by Xymph » 14 May 2009 18:57

matzi wrote:I know that page already and just hoped that there's a kind of API which makes it easier to realise that task...
The Wiki lists the known APIs. For replays there are two but they ignore the data block, which is logical considering the lack of info about that.

For challenges, there are Blockmix tools that can apparently manipulate the data block directly, but nothing like that exists for replays I think.
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

matzi
happy cruiser
happy cruiser
Posts: 161
Joined: 20 Aug 2008 14:52
Owned TM-games: TMO TMN TMU TMF
Location: Austria
Contact:

Re: Extract Tracks from Replays

Post by matzi » 14 May 2009 20:51

Xymph wrote: The Wiki lists the known APIs. For replays there are two but they ignore the data block, which is logical considering the lack of info about that.
yes, but most of them are written in PHP and not in Java.
But with the wiki's infos it should be possible to write it^^
but it's much work :shock: :shock:

Scordo
cyclist
cyclist
Posts: 46
Joined: 01 Feb 2009 00:22
Owned TM-games: TMU

Re: Extract Tracks from Replays

Post by Scordo » 18 May 2009 00:08

matzi wrote:
Xymph wrote: The Wiki lists the known APIs. For replays there are two but they ignore the data block, which is logical considering the lack of info about that.
yes, but most of them are written in PHP and not in Java.
But with the wiki's infos it should be possible to write it^^
but it's much work :shock: :shock:
Please send me the source when you've ported it to java, so I can port it to .Net - C# :)
Debuggers don't remove bugs, they only show them in slow motion

>> Help me and contribute to: TMSPS <<

User avatar
Electron
cyclist
cyclist
Posts: 38
Joined: 25 Jun 2010 18:20
Owned TM-games: TMUF, TM2
Manialink(s): GbxDump
Contact:

Re: Extract Tracks from Replays

Post by Electron » 23 Sep 2010 00:27

I've developed such an application to extract a challenge from a replay file.

It's very simple (no user interface). Drag the replay file in File Explorer and drop it on the executable file (ReplayToChallenge.exe). The challenge file will be stored in the same directory.

Please note: Only replays which were saved with TMU, TMUF or TMNF (replay version 5 and higher) contain a playable challenge. Replays from TMO, TMS and TMF (replay version 4 and older) don't have a header inside the challenge. Unfortunately, such a challenge can't be played alone (at least not with TMUF).

The source code is included. So you can improve the application yourself.
The program is licensed under the GPL. Please share the program always completely with all source files and the license.

Download: ReplayToChallenge (80 KB)
Image

jamie_macdonald
TM-Patrol
TM-Patrol
Posts: 1612
Joined: 10 Jul 2008 19:48
Owned TM-games: TMUF, TMNF, TMS
Manialink(s): ET
Location: London, UK
Contact:

Re: Extract Tracks from Replays

Post by jamie_macdonald » 23 Sep 2010 08:31

Electron wrote:I've developed such an application to extract a challenge from a replay file.

It's very simple (no user interface). Drag the replay file in File Explorer and drop it on the executable file (ReplayToChallenge.exe). The challenge file will be stored in the same directory.

Please note: Only replays which were saved with TMU, TMUF or TMNF (replay version 5 and higher) contain a playable challenge. Replays from TMO, TMS and TMF (replay version 4 and older) don't have a header inside the challenge. Unfortunately, such a challenge can't be played alone (at least not with TMUF).

The source code is included. So you can improve the application yourself.
The program is licensed under the GPL. Please share the program always completely with all source files and the license.

Download: ReplayToChallenge (80 KB)

Sounds pretty genius to me, i will try this out in a while :thumbsup: ...ty for sharing :D

Xymph
Pit Crew
Pit Crew
Posts: 5701
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: Extract Tracks from Replays

Post by Xymph » 23 Sep 2010 22:18

Electron wrote:I've developed such an application to extract a challenge from a replay file.
Interesting... were you also the one overhauling the GBX wiki?
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

User avatar
Electron
cyclist
cyclist
Posts: 38
Joined: 25 Jun 2010 18:20
Owned TM-games: TMUF, TM2
Manialink(s): GbxDump
Contact:

Re: Extract Tracks from Replays

Post by Electron » 24 Sep 2010 00:05

Xymph wrote:Interesting... were you also the one overhauling the GBX wiki?
No, but this information makes it possible to build such a tool.

Many internal infos there. It looks that the author comes from Nadeo. But some known information are absent..
Image

Xymph
Pit Crew
Pit Crew
Posts: 5701
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: Extract Tracks from Replays

Post by Xymph » 24 Sep 2010 10:14

Electron wrote:
Xymph wrote:Interesting... were you also the one overhauling the GBX wiki?
No, but this information makes it possible to build such a tool.

Many internal infos there. It looks that the author comes from Nadeo. But some known information are absent..
Maybe, although it's unlikely that Nadeo has time to update a community Wiki when they are working on three new games. And there are quite a number of 'unknown's in there, so more likely is that someone compiled all the known reverse-engineered info (some of which was already used by blockmix tools) into a new structure.

I added a link to the last version of the original description, and also links to your two Gbx tools.
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

User avatar
arc_
highway camper
highway camper
Posts: 1
Joined: 01 Oct 2010 10:26
Owned TM-games: TMU

Re: Extract Tracks from Replays

Post by arc_ » 02 Oct 2010 14:36

The gbx wiki update was done by me, along with two new articles on other file formats (.pak and packlist.dat). As far as I'm aware it's almost all new information - it's not a compilation of known information found elsewhere. And no, I'm not related to Nadeo in any way :)

I also made a tool for viewing and editing .pak files (open source!).
Last edited by arc_ on 02 Oct 2010 16:18, edited 1 time in total.

Post Reply