tm creative xfire grouptm creative xfire group
english francais deutsch nederlands 
newstutorialsspecialsforumsupportshoplinkscontactsearch
Mania Creative | Tutorial | Blockmix / Hex-Editing
welcome

Blockmixing / Hex editing

go to tutorial list
Author : NL_pwf , TStarGermany  
Translations : Natzor , -DexM-   eng fra ger ita ned por
Questions & Discussion : Discussion thread Last updated : August 25 2010

 

 

Introduction

 

What is blockmixing or hex editing ? Well…it's combining 2 or multiple parts that normally can’t be combined and placing blocks on places where they normally can't be placed.

 

The results are trackworks and scenery, which feature outstanding looks or functionality, not provided by the internal track editor.

 

Basic Blockmixing techniques are to be learned easily, but then again, more sophisticated Blockmixing requires lots of experience and abstraction... We'll see how far you can get :-)

 

Part 1 : Structure of a Trackfile (GBX)

 

Trackmania driving tracks are stored in the .GBX file format, Nadeo's own file format... A .GBX file contains lots of different data, written in "computer code", lots of them encrypted and/or compressed, so we need a "Hex-Editor" to look at the file's content (or change it) properly.

ingame browser

zoom

In the case of a track file, the GBX file roughly contains this information:

 

* general track information (like track name, author name , validation time, password etc.pp) * tile placement (all your roadworks)

* mediatracker content

* file dependencies (locations/URLs of signs, mods, music etc...)

* a thumbnail screenshot in JPG format

and others...

 

different parts are hightlighted with different colours in the picture on the left...

 

As you can see, every piece of information is displayed in hexadecimal code on the left..

 

 

Decimal and Hexa-decimal

 

decimal hexadecimal

Usually we don't think much about it, but the way the "write down" our numbers every day is pretty complicated!

 

In our "normal" decimal system, we count numbers from 0-9 ... if we want to continue counting, we add 1 "register" to the left, raise its value by "1" and continue counting on the right side again...

 

For example:

576 is actually 5|7|6 (100*5 + 10*7 + 1*6)

To be more precise:

102*5 + 101*7 + 100*6

 

The hexadecimal system does the same, except it does not only include 0-9 (like decimal), but 0-9 and A-F ... that means, 16 counting ciphers until it has to add 1 "register" on the left and start counting again...

What for ? In short terms, machine code basically consists of "0" and "1", two different electric signals, beeing on/off, a computer doesn't understand anything but this.

 

While "0" and "1" are called "bits", a hexadecimal cipher represents 24 bits .. a full "byte" is represented by 28 bits = 2 hexadecimal ciphers (=the possibility to set 256 values).

 

To edit the bytes in our track file, we must be able to read & write these bytes.

 

What if ?

 

If a value we want to set exceeds "256" ? Then you need an additional byte attached to the one byte you already have ... multi-byte values ... but don't worry, TM does not use multi-byte values :-)

 

What heximdal value represents what "real" character ?

 

The bytes / hex code on the left side is mostly represented by ASCII- characters on the right side. Not all bytes are displayable with ASCII, so sometimes you will find empty gaps on the right.

 

This was a pretty short introduction, but you should now have an idea what the hexadecimal values in the hex editor are expressing. Of course GBX files can also contain driving replays or 3D car models etc... but we will only talk about the track files here to teach you some mixing.

 

 

How tiles are placed and stored

 

ingame browser

zoom

In the case of the stadium, you have 32*32*32 cells to place your tiles. Each tile you place has a name, a coordinate (length, height and depth, going from value "0-31").

 

In case of the height (Y in the picture), the grass ground itself has value "0", everything above the ground starts with "1" ...

 

In addition to the tile's name and XYZ position, also its rotation and variation are stored in the track file (variations occur, wenn the same part has different shapes, e.g. when beeing connected to the floor or another tile next to it).

 

 

Part 2 : Manual Blockmixing

 

Not so long ago, people had to do blockmixing with the Hex-Editor. If you don't want to know about it (although you should), you can directly jump to Part 3.

 

To keep a track's filesize small, Nadeo's GBX file format compresses all information about what tile is placed where on the track, making it virtually impossible to find all necessary information for 1 single selected piece you wanted to change.

 

ingame browser

zoom

You place a grass checkpoint at X:17/ Y:1 / Z:17 ... right next to the turbo, on which you want to mix the checkpoint on...

 

So the task is to move the checkpoint from X:17 to X:16. Everything else can remain unchanged.

ingame browser

zoom

A tool called "ReCompressor" is able to de-compress this information, save the file again in a deflated version and list all available blocks with the Hex adressing, where they can be found.
ingame browser

zoom

Now you could open the decompressed track with your Hex Editor:

 

1) You went to the Hex adress 00001760 (which you know from the ReCompressor listing), symbolised by a red square.

 

2) To the right side, you can see where the "StadiumGrassCheckPoint" (yellow) actually begins.

 

3) After the part description, you have multiple bytes, responsible for the part's rotation, location and variation. See picture for explanation which byte is responsible for what.

 

4) Because we wanted to move the checkpoint from X:17 -> X:16, we will change exactly this byte in the Hex Editor (dark blue circle) from Hex value "11" -> "10" (representing the "real" values "17" -> "16", our coordinates). Now we can save the file here and return to TM.

ingame browser

zoom

When opening the track again in TM, we will see, that the checkpoint has moved 1 cell, directly onto the turbo part :-)

 

Now we can continue building.

 

Luckily, TM will use its space saving compression method, as soon as we save the track file again.

This is roughly, how manual block mixing works. Before the ReCompressor tool was released, things would become much more complicated as soon as the GBX compression algorithm began to group, hide and just leave out bytes for certain tiles.

 

Even today, you shouldn't use ReCompressor anymore, if you wanted to do manual Hex-Editing, because it had some errors while processing the files.

 

Today, you should use the ChallengeEdit tool for decompressing, described in the next chapter.

 

 

Part 3 : Modern Blockmixing

 

Luckily, Blockmixing has become very fashionable, so today we have some easier methods to mix our tiles.

 

The french guys from TM-Hexa forum have provided us good tools, ChallengeEdit (Load) among them, which can decompress a track file, list all tiles, do the Hex editing all by itself and save the file again: A superb multi-functional tool do all necessary work for blockmixing.

 

ChallengeEdit can only edit tracks, which have been made with one of the local online profiles on your harddisk. So, before you can edit our example files, you must load them once in your track editor and save them again, so "you" become the author of the file.

 

 

Placing parts in the TM editor

 

Download Click the icon to load the "TMC-Blockmix-Example1" and put it in your "Tracks/Challenges" folder. Load+Save it once in the Trackmania editor, so it's useable for Challengedit.

 

ingame browser

zoom

Open it in the TM editor. We want to create a real narrow curvy road.

 

Place the start ramp, some small edgy road and the finish line.

 

Now select the first availabe curve tile (2/1/2). To not interfere with the other road pieces or the finish top, we must place it 2 pieces above the ground (=at Y:3) Save the track !

 

 

Using ChallengeEdit

 

ingame browser

zoom

Start ChallengeEdit and Load the track.

 

Step1) "StadiumRoadMainGTCurve2" is the one we want to lower down to the ground, so select it with the mouse.

 

Step2) At the bottom you can now see all important values for the selected tile. Change the "Z" value from "3" to "1" (lowering it down by 2 cells), with the help of the arrows on the right (or with direct keyboard entry).

 

Note: ChallengeEdit uses XZY as coordinates (instead of XYZ) but that is not important...

Look HERE for a detailed explanation why the values are exchanged)

 

Step3) Now press the "Save block modification..." button.

 

Step4) Press the "Save track" button.

The Hex editing is already done, go back to TM and load the track into the editor again.

 

 

The "healing" process

 

ingame browser

zoom

Back in the TM editor, we have a problem. We actually moved a "curve ain the air" down to the ground and now we have an air hole in the ground ;-)

 

It's time to start a "healing process", using the TM editor to repair our broken mix.

 

Click the "Erase" button and select the curve piece.

ingame browser

zoom

As soon as the curve piece is deleted, the floor is there again, but everything looks a bit scrambled...

 

Press the "UNDO" button and TM will try to re-install the curve piece, but with some intelligence, which means, that TM will now install the curve tile in a way, that it is properly connected to all tiles around it, also the floor...

 

 

Finishing the Mix

 

ingame browser

zoom

Now we can draw one more road piece (2/1/1) to connect the curve to the other road pieces on the left...

ingame browser

zoom

And now our narrow curve construction is finished successfully !

 

This was a very simple example of "modern" blockmixing / hex-editing and basically, most mixing actions work like this...

 

Download Click the icon to load the "TMC-Blockmix-Example1-Mixed" ... this is how the mixed track looks like, you just need to heal it, like described above.

 

 

Part 4 : General hints

 

There are some general things, you should know about....

 

Finding single tiles in ChallengeEdit

 

Usually, the last tile inserted in the TM editor before saving, will be the last block you will find in the ChallengeEdit block listing...

 

Nevertheless, it's much better to actually KNOW a tile's XYZ position from inserting/finding it in the TM editor.. it may take some practice, but only then you'll always be able to find every single tile in the ChallengeEdit block listing, especially when dealing with tracks, which already contain LOTS of tiles.

 

 

Always keep Backups

 

ChallengeEdit is a pretty good tool, but nevertheless you should always keep multiple backups of any track you make. Sometimes it might be necessary to return to an earlier step version, because some blockmixing you did earlier (which can't be undone) now makes it impossible for you to continue..

 

 

The "healing" process itself

 

Blockmixing means, that you move a block out of its "natural" state, the way it was placed and connected to its surrounding by the TM editor. Not only connections to other tiles are stored in the track file (and then moved by you with ChallengeEdit), but also what surface a tile was placed on.

 

When trying to lure TM into "fixing" this for you by pressing ERASE+UNDO, TM might encounter a situation which it cannot handle properly. TM will shutdown. If that happens and you can't find any way to eliminate this flaw in a proper way, you might consider using an earlier backup of your track and continue building there.

 

Please activate Javascript & ActiveX do display movies!

Besides this, it is sometimes desireable not to "heal" a mixed part. The video shows this:

 

The left lane is normally placed. At the end of the lane, you have a typical road edge piece.

 

The right lane was vertically mixed down by 1 cell, not healed (therefor hasn't got the road edge piece), but afterwards connected to the lane piece above it...

Right before jumping down, the car on the normal lane hits the road edge piece and starts to tip over. If the speed had been higher, the car would've surely had a big crash...

 

The car on the mixed/non-healed lane can smoothly jump down with no impact on the driving... So in this case, a non-healed tile could be more productive for the track's driving...

 

 

What tiles are not to be mixed ?

 

Please activate Javascript & ActiveX do display movies!

When you e.g. mix a turbo and a checkpoint together, Trackmania tries to show you both blocks at the same time. Unfortunately, both blocks have different texture surface graphics, so TM will show you some flickering mix between both textures, depending on your camera position.

 

Mixes like these are ugly.

 

What tiles are NEVER to be mixed ?

 

Do not combine 2 normal road checkpoints. And never combine a start, finish and a checkpoint together !

 

This can cause people to get banned from the server they play the track on, since most servers are protected against cheating and driving through multiple CPs / Starts / Finishes at the same time is considered "cheating" for the anti-cheat recognition mechanisms.

 

It's (very :-) funny for all spectators, but not funny for the players who get banned from a server, because a track author has done some bad blockmixing.

 

 

Part 5 : Advanced ChallengeEdit functions

 

ingame browser

zoom

Imagine you built a platform with the "StadiumPlatformRoad" tiles, but you don't like them, because they're somehow too unelegant or maybe you want to build something right below it and you can't because the platform part is too thick...

ingame browser

zoom

Load the track in ChallengeEdit...

 

Before the "StadiumPlatformRoad" you cansee a "-P" ..this means it's a "primary" block, the "leading" block of this group...

 

The blocks below this have an "-@" after the hex adress, that means that they're depending on the "P"rimary block.

 

Select the Primary block and then click on the "Unlock" button at the bottom (yellow circle)...After a confirmation popup, you can now use the dropdown list to CHANGE the primary block type...

ingame browser

zoom

Select "StadiumInflatableSupport" from the dropdown list and press the "Save block modifications..:" button...

 

The primary block and all @ blocks have now changed to another type... now save the track and reopen the track in TM.

 

Notes:

*** You can also change the type of single @ blocks (limitation: only as long as there is already 1 existing P-rimary block of your desired choice in the tile listing !).

 

*** Usually, the name of a block will already tell you, what kind of tile it is, but in order to get a complete overview, it takes lots of practice and experience.

 

*** In some environments, there are "hidden" blocks, not shown in the internal TM editor, but available in this listing. Inserting them into a track is pretty flashy :-)

ingame browser

zoom

Et voilà !

 

Now you have some super thin platform, which is usually only available on the top of the red inflatables... and because the usual red bulgs at the side are missing, you can now use several road transition pieces on the platform edges...

 

Future versions of ChallengeEdit will include functions like "multi block movement" and more...

 

 

Part 6 : Special objects + tasks

 

Here are the descriptions of special tasks or objects, which shall give you some understanding of blockmixing workflow...

 

 

Inflatables

 

Inflatables have the most codes/blocks, so they are the hardest to modify, but its only a matter of how long you search for a single block :-)

 

The codes for a platform represent every single part in the platform.

The first code will be the first height of the platform, the one that’s on the ground.

The further you go in the codes, the higher you get in the platform.

 

The codes for each platform are separated. So when you build one inflatable, it will be separated in the hex editor from every other inflatable.

 

Warning : When you modified a platform and the platform has not its original shape anymore, an attempt to press the "UNDO" button in the TM editor will probably crash TM.

 

 

Grass floating in the air

 

Method 1) Put a block on the ground and move it up. As the block is attached to the grass, the grass will move up too.

The best is to use poles (but you can also use other parts, like turns, as long as they contain a small strip of grass at the side), they are very small so give more space to race on.

Also be careful, when you delete floating grass, it wont come back when you press undo.

Also dirt can be moved up, but you don’t need to put anything on it.

 

Method 2) Build a platform in the air and use ChallengeEdit to change it to "StadiumGrass"; disadvantage: you will have holes in the ground where the grass would usually be :-)

 

 

Invisible roads

 

This is the most difficult mix. It requires a lot of patience, so here's how it goes :

 

1) First you create a swimming pool on the ground, at the horizontal coordinates, where you want to have an invisible ground.

 

2) Now move up the "water" blocks with ChallengeEdit. (only the water, not the swimming pool edges)

 

3) Under the water there is a floor. Although, when you move it up you wont see it. Which creates the illusion of an invisible road.

 

4) Now here comes the nasty part. You can not mix anything through the invisible road, you can not build anything on the invisible road and you can not building anything under the invisible road. It's also a bit higher then the regular road, so you will need a platform jump (the black one) which has the exact same height to get on it.

 

5) When you move water up it will leave a big hole in the ground which looks very ugly.

To cover this up you can move something on it.

For example: A platform.

Make sure you calculate its coordinates very exactly. If you miss, you have to do the whole platform all over again. Also, you can only move up the water once ! So when you make an mistake and need to add/remove invisible road you first have to move the water back down, then you can expand your swimming pool.

 

Now you should have a basic idea of how blockmixing in Trackmania actually works... In order to create great mixes, you will need LOTS of experience ... if you have questions, visit the forum thread...

english

MANIA CREATIVE offers online games, electronic computer hardware and of course internet programming services, like for example free music (HiFi luxury) for mobile phones or graphics software. 2D/3D texture models and buying dvds and bluray are supported,too.

francais

MANIA CREATIVE offre créatrice de jeux en ligne, du matériel informatique électronique et de services Internet du cours de programmation, comme par exemple la musique libre (deluxe HiFi) pour les téléphones mobiles ou de logiciels graphiques. 2D/3D texture de modélisation et d'acheter des DVD et BluRay sont aussi supportées.

nederlands

MANIA CREATIVE biedt online spelletjes, elektronische computer hardware en natuurlijk Internet programmeren diensten, zoals bijvoorbeeld gratis muziek (hifi luxe) voor mobiele telefoons of grafische software. 2D/3D textuur modellering en het kopen van DVD's en BluRay worden ondersteund, ook.

deutsch

MANIA CREATIVE bietet Online-Spiele, elektronische Computer-Hardware und natürlich Internet-Programmierung Dienstleistungen, wie zum Beispiel freie Musik (HiFi Luxus) für Mobiltelefone oder Grafiksoftware. 2D/3D Textur Modelle und Kauf-DVDs und Blu-Ray werden auch unterstützt.

italiano

TM offre una creativa giochi online, hardware elettronico e di servizi internet corso di programmazione, come ad esempio la musica gratis (di lusso HiFi) per i telefoni cellulari o software di grafica. Texture 2D/3D modellizzazione e di acquistare DVD e BluRay sono supportati, anche.

türkce

tm yaratici sunan online oyunlar, elektronik bilgisayar donanim ve ders internet programlama hizmetleri, ücretsiz müzik cep telefonu veya grafik yazilimi (HiFi lüks) örnegin gibi. 2D/3D doku modelleme ve DVD satin alma ve bluray de desteklenmektedir.
user panel
Name
Pass
Register | Forgot pass? | Activation mail
user panel
contact us
user panel
pop rock soul
hiphop jazz lounge
house electro drum and bass
reggae punk alternative
experimental instrumental ambient
click to play random song of a genre