Glue Tutorial

First off you will need to obtain the glue program if you don't already have it. You can get it from the utilities section of this site. It is called rvtmod4.zip. If you have Glue version 3 then I would recommend getting Glue4 because it has some bug fixes as well as added features. This tutorial centers on Version 4 and none of the information found here will help much if any with Version 3.



Note Be sure you backup your folder before you make any changes to it. If you don't back it up and you perform a task wrong then you will have to start all over again.

The links below are to tutorials which use Glue to perform various other functions.
Removing Invisible Barriers




Section 1: What is Glue and what does it do?

Glue is a program written by Alexander Kröller (ali) and Christer Sundin. Please read all the documents provided with the zip file to obtain any copyright and legal information.

It allows editors of the game ReVolt to perform advanced functions on their creations or modify existing creations. By doing this it allows a vast array of ideas to be possible.

One of the main functions of Glue is just what its name suggests and that is gluing parts together. Imagine if you will, a large plastic model with a road on it. That will represent your world file. Now you have a bunch of small plastic models such as buildings and trees. These represent your instance file. Now you could just place all the trees and buildings in without using glue but you still have separate models. Now if you used glue to attach your small models to your large model you would end up with one large model. In simple terms that is what Glue does for the track maker. It allows you to make one large mesh out of the existing world file and the smaller instance files. The process is a little more complicated than that but that is the end result. One reason you may want to do this is because the instance file can only be so big. If you reach that size then you can no longer add any instances to your track. By using glue you can attach the full instance file to the world file and then start with a new empty fin file. This process can be repeated as many time as necessary but keep in mind that Re-Volt does have limitations so don't go overboard.
To get glue to perform these functions you have to create a command file and a batch file. First we will cover the command file.


Section 2: The Command file

The command file can be the most confusing aspect of using glue. In this section I will attempt to explain the command file in a clear and concise manner. I would recommend going to the Easy Glue website if you are still having problems understanding the command file. The URL is http://www.perror.de/rv/easyglue/. However there are some advanced features and precise functions that you will not be able to obtain from Easy Glue as it is set up for the first time user to aid he or she in their track creations.

OK first off what we need to do is write down a basic outline of what you want to achieve with glue. For the first example we will be working with a editor based track and perform the simpler tasks of glue such as adding the instance (.fin) file to the world (.w) file and changing the color of the ugly blue walls. So we have two steps that we need to write a command file for. The first step is gluing the instance (.fin) file to the world (.w) file. To do that you will first need to rename your current world (.w) file to editor.w and change the instance (.fin) file to editor.fin. The reason we do this is because glue will not read a file with the same name as the file it is attempting to create. Editor is just a word I like to use. You can use whatever you want but for the sake of the tutorial and until you get a better understanding lets stick with the word editor. After you change the names of the the files you will then need to open notepad and type out the first section of the command.txt file.
Image 2.1 at the right shows you what that first section should look like.

Each line in that file has a function.
Create (MyTrack) - tells glue what you want the output files to be named.
editor.w - tells glue that you want the current world file included in the gluing process.
editor.fin - tells glue that you want the current instance file included in the gluing process.

Now we will want to include the command for coloring the blue walls. To do that we need to use the legosplit function along with the colorize command. The blue walls are referred to in Glue as pwall so image 2.2 at the right shows what the command file should now look like.

All I did was take the previous file and add the lego split option.
legosplit - tells glue that you want to separate all the pieces of a editor based track and perform functions on them.
pwall - tells glue what section of the editor based track you want to customize, in this case it was the blue walls.
colorize - tells glue that you want to color the blue walls.
RGB Value - this is the color you want to use for your walls. In this case I chose 255 0 0 for my RGB which is bright red. RGB stands for the Red Green Blue value of the color. You can obtain this value by opening MS Paint or any other paint program you have and selecting a color you like. In Ms Paint the RGB is displayed by clicking on the colors drop down then edit colors. Once that window pops up you choose define custom colors and you will see a color selection area and the RGB listed on the lower right. You can also insert a name for your color. Glue supports 477 named colors. These colors are listed in the named colors section of the Glue Documents. Now what you do is save this document as command.txt.


Section 3: The Batch file

Once you have created the command file you can create the batch file required to run the command file. To do this open notepad and type in "rvglue command.txt".
Image 3.1 shows you what this should look like.
What that line does is once the batch file is clicked on it starts glue and tells it that your command file is named command.txt.

Now save this file as rvglue.txt.
Once you save it you will have to change it to a .bat file. This is done simply by locating the rvglue.txt file in you just saved and right clicking on it. Once you do that scroll down the pop up menu till you find rename and click on that. You will see the file name highlighted. Choose only the extension".txt" and change it to ".bat". Windows will ask you if you are sure just tell it yes. You should now see the icon of your rvglue.txt change to a icon with a gear on it.

What is that you say? You don't see any extension to change? Well that is easily fixed. Open a folder and go to the view drop down. Scroll down to folder options and select it. You will see a window pop up that has three tabs at the top. Select the view tab and look down under files and folders. Look for the "Hide file extensions for known file types" selection and remove the check from it. Image 3.2 shows a picture of the interface I mentioned. Once you do that click apply and you are done. You should now see the file extensions for each file in your folder. Then go through the above mentioned steps to create the batch file.


Section 4: Running Glue

First off we need to make sure that your rvglue.bat file and your command.txt file are within your track folder and that the rvglue.exe file is either in your windows/command folder or within your track folder. Also make sure that the required .dll files are in the Windows/system folder. Once you are sure all of the above steps have been completed then just locate the rvglue.bat file within your track folder and double click on it. You should see a small dos window pop up and confirmation that that glue is performing the required functions. Image 4.1 below shows what that dos window looks like. If you receive an error go through all of the above steps again and make sure all it as it should be. Then try running the rvglue.bat again.


Image 2.1


Image 2.2


Image 3.1



Image 3.2



Image 4.1


That's it you should now go in to check your level and make sure all it well. If it is you can delete the editor.w and editor.fin files as they are no longer needed. Glue will create 3 files for its output. a new world (.w) file, and new collision (.ncp) file and a file only glue uses which the .i-w file. This file and its functions will be covered in later tutorials as well as some more complex examples of how to use glue.


This Tutorial is but one of many that will be hitting the site. Keep checking back here for more tutorials on the more complex functions of RVGlue.