From Wikibooks, open books for an open world
Jump to navigation Jump to search
Trainz Asset Maintenance and Creation

Introduction to Content Creation by Asset Modification
TOC | BeginningsFun | AM&C | Creation | InBook Refs ORP Refs:  • Index • Containers • Kinds • Tags | Appendixes  • Vers
Loupe light.svg
 Mouse use

Basics of reskinning[edit]

Trainz has three basic parts to a model or asset.
 • The first is the mesh or shape,
 • the second is the texture file (.bmp or .tga), and
 • the third part comprises text documents, such as config.txt and scripts. You can modify the texture files and connecting text files fairly easily to change the appearance of the asset, a process known as re-skinning, the goal of this tutorial. Re-skinning is a fairly easy way to get started in asset creation for your layout. Be aware you need to respect copyright laws and you will need the mesh creator's permission before distributing the new asset (i.e., uploading to the DLS).

  • Also, understand that different types of texture files have slight differences; some file types have more options than others. Some assets have a greater impact on Trainz performance than others. Since we can select which asset to reskin, as a beginner select assets with a single .bmp or .tga texture file.
  • This tutorial will take you through the steps to do a simple reskin. The tutorial uses TRS2009 CM2 because this version of Trainz does a lot more error checking than previous versions and this will help you to avoid errors, and it's data types and organization is the basis for the following two versions of Trainz as is documented in the N3V TrainzOnline Wiki technical references.
P train grey.png
* The re-skinning process is similar in previous versions of Trainz, so if you have TRS2004, TRS2006 or TC3 you will be able to follow this tutorial.
  • In Trainz12 (TS12), much of this following manual cloning process has been automated, so you can optionally skip ahead at this point to the next section and use CCP.

Step 1 - Clone the asset[edit]

To begin, you need something to work on or with. Which ever version of Trainz you are working with, and whatever graphics and text editor software you may prefer, the steps in the dance are the same.

P train grey.png
Different tool software applications each have their strengths and weaknesses, and some operations are simpler and easier in one or another than one of it's alternatives, so you are encouraged to experiment and try several common tasks so in the long run (where time demands pile up in the multiples!) you can best fit the tool to the job which does the job easiest and fastest. While a little heavier in up front time invested in becoming comfortable with learning curves for each, the long term payback will likely be tremendous time savings and resultant increased productivity and quality. That way lies satisfaction and happiness!
At this stage you may want to download the excellent freeware photo/graphics editing software GIMP if you don't already have it. Download from here. However, many other paint programs (such as Photoshop,, XNview) may work equally well.

Trainz to TRS2004[edit]

The file storage methods in Trainz, UTC, and even the highly popular TR04 was structured on an assets root file folder being named after the asset's kuid (excepting map files which were by the name of the route— e.g. a real example: C:\Auran\TRS2004\World\Custom\profiles\kuid -2 14476891 a session on the map: C:\Auran\TRS2004\World\Custom\maps\HVI-2014-1011m0).

Added content will be found in the ..\World\Custom folder hierarchy and will have to be sought out using the Windows search capabilities. Once the folder is located, it must be copied to a working location, which is easy to remember and keep straight; we suggest the installs root directory or set up an ..\editing folder under that installs root folder like the TR06TS09-SP3's folder hierarchy. TS09-SP4–TS12-SP2 have the editing folder built in under the ..\UserData folder off the root.

At that point you will need to both rename the (kuid based) folder name and edit the kuid to your identification and sequence number you wish to assign the asset (i.e. A unique kuid for the asset you are cloning by finishing this step).  

TRS2006 to TS2012[edit]

To clone an asset in '06 or TC3 use CMP in a similar manner to the TS2009 description, in TRS2004 access the asset folder (Auran/TRS2004/World/Dispatcher/downloads/asset kuid) and copy the folder. Open the copied folder, open the config.txt file and change the assets kuid number to one with your own ID prefix. Be sure not to duplicate an existing kuid number of yours. Open the config. file and change as appropriate the description, author, licence, e-mail address and web address. Be careful not to change any other data. Save and close the config.txt. file. Now edit the asset folder's kuid number to the one you used in the config.txt. file.

In TRS12 you need only select the asset by right-clicking on it in Content Manager. Select 'edit' from the drop down menu, then 'Edit in Content Creator Plus'. This brings up an editable form that will save a new config.txt file for you. You may alter the fields in the form as appropriate. Note that some fields are determined by changes you make in the editable fields, making it easy to complete this step without mistakes (errors and warnings appear in the bottom panel).  

Step 1 Clone the Asset in CM[edit]

Step one is to clone the asset in Content Manager.

We'll start with a simple sign that uses a .bmp texture file: <kuid:86627:1182> and step one is to clone the asset in Content Manager. Note this asset, a simple sign (classed as kind scenery is trainz-build (TB); so it doesn't require any more complicated features of other Kinds or the adjustments needed to make the asset compatible with some of the later TB versions of Trainz.   Right click the asset and click on clone. (For TRS 2004 see above, second paragraph; meaning what??? in TC3 through Trainz12 you'll see an error message informing you that the asset uses an obsolete trainz-build number (numbers below 2.7 are not supported. However, TS09-SP4 up through the TS12's will correctly overcome this programmer's nag limitation when you commit your new asset).

Step 3- edit in corrections[edit]

Edit in explorer.jpg

Having cloned the asset we now need to edit it. Go to the Open for Edit tab, right click. (TRS 2004 users, open cloned folder). In Trainz12, right click on the new asset (note a new kuid has been assigned with your ID prefix). Then RMBHd+click on 'Edit' and select 'Edit in Content Creator Plus'.

Image:Edit in explorer[edit]

This opens up a Windows folder containing the asset. We now want to edit the .bmp file using GIMP

Image:Edit with GIMP[edit]

Note the two panels one for the image and one containing the tools.

Note the two panels one for the image and one containing the tools.

Image:Edit with GIMP1[edit]

Just below the image is the scale, for ease of use raise this to 400% and increase the window size of the panel. Use the eye dropper tool to pick up the background colour then the paint brush to remove the existing lettering.

Image:Edit with GIMP2[edit]

GIMP is particularly strong in adding lettering.

GIMP is particularly strong in adding lettering. Note the background / foreground colour squares click on the curved arrow to reverse these to get white lettering. Click on the lettering tool, the letter "A" and select a font, "Gill Sans MT Bold" is fairly useful.

P train grey.png
Like most Windows apps, it is possible to add fonts to GIMP. You can adjust the font size directly in GIMP, especially when the the font is any True Type (autoscaling) font type.

Image:Edit with GIMP3[edit]

Left click with the mouse at the top left hand corner then enter the desired text. It is possible to change the font size before clicking on close.

Left click with the mouse at the top left hand corner then enter the desired text. It is possible to change the font size before clicking on close.

Image:Edit with Gimp4[edit]

To position the text type "M" then click on "Move the active layer"
  • To position the text type "M" then click on "Move the active layer"

Image:Edit with Gimp5[edit]

Save the file (after reading through the below first!), but don't close it's window nor quit the Graphics program.

Checks and Caveats on Saved images[edit]

Then when you save ensure that RLE compression is unchecked.

If you started with a .tga file then the saving process is slightly different. First note the file size of the original .tga file. Then when you save ensure that RLE compression is unchecked.  


Compare the file sizes between the original and the new texture file.

  • If your new edited file is smaller then you need to double check you have RLE compression off.
  • If your edited file is roughly 33% larger than the original you need to verify you do not have an alpha channel.
Correct this by re-editing the file, then delete any alpha masks from the copy by clicking Layer, Mask, and Delete Layer Mask, then save again.

Image:Edit with Gimp6[edit]

Edit with Gimp6.jpg

Go to your text editor and now edit the config.txt file.

Now edit the config.txt file in a basic text editor such as Notepad++. (See introductory paragraph on cloning in TRS2004 for details on editing the config.txt file)

Warning icon.svg
Warning:  Do not use word processor applications of any kind—these add invisible control and command characters which will confuse Trainz and just give you a mess you will much prefer to NOT deal with.
  • If new to Windows and Trainz as a last resort, use the Windows dumb text editor Notepad.ext (Should be linked in your start menu under accessories like MS Paint.exe.)

Click to select in CM2 and commit (Ctrl+M) (TRS 2004 users simply make sure that the config.txt file is saved, close the asset folder and back out of the Trainz folder.)

Lastly, Test it[edit]

Bring up in Surveyor. Place your new asset on a map somewhere and give it a critical look over from every angle. Use ALT+Y to enter walk-around mode and give it a close inspection from the ground level.

Warning icon.svg
Warning:  Note, this mode is very touchy in TS10–TS12-SP1 (Or perhaps only on advanced modern 64 bit computers! Either way, a known bug hopefully slated to be fixed by the promised TS12-SP2) so move your mouse carefully ONLY left and right in slow careful creeping motions. If the display starts spinning, just minimize your mouse motions and gradually level the picture until you get a feel for controlling the view. Then slowly rotate the view back to where you thought you were aimed. You may be beyond where you thought the camera was positioned. Use the downarrow &dnar; to back up, the uparrow &upar; to move forward and the left and right arrow keys (+ to slide side to side.