TUTORIAL - Gmax (version 1.2)  (for Trainz 2006, workable also for 2004)    Updated Sept. 15, 2008.    By Jytte Christrup.

Lesson 1 continued:

HOW TO MAKE A SIMPLE HOUSEStep by Step  (and how to make it usable for Trainz, including upload procedure)

[PART 2 - Trainz]

This is where TRS2006 and 2004 part ways. File management is different in the two version. As I only have 2006, I will explain how this is done here.
If you are thinking of making assets yourself, I must assume that you know enough about your Trainz version 2004, to be able to adjust this to to the way of doing things there.

However, when I make an asset, I make it in such a way that it can be used by both versions. It's the same work either way, and there's no sense in excluding half the Trainz community from your assets right off the bat. So, whether you are working in 2006 or 2004, if you make your file like this sample, it will work for both versions.

A special word for skandinavian users: You can use the vowels ,, in Surveyor, for instance naming buildings and signs (at least that's something), but DO NOT use them anywhere else, not in file names, and certainly not within config.txt. It can have some unexpected and unwanted consequenses, at times will render your file unusable.

Just in case you are very very new at this, let's get a few facts straight first:

When you look "inside" an asset (done in explorer, more about that later) - a regular scenery asset like a house, that is - you will see that it consists of 5 basic items (at least):

  -  config.txt                          This file is sometimes called a "script". It is a plain text file with information for Trainz about the file, and direction for Trainz on what to use and how to use it.

  -  somefile.im                       This is the file you just exported from Gmax. As you now know, it contains your basic structure, mapping for your texture, and also a reference to the next file.

  -  someskin.texture.txt          This was made by Gmax as well, when you exported your file. You will notice that it has the same "first name" (someskin) as the bmp file (skin) you used.
                                              As this file is referenced in your .im file, the name of this cannot be changed.
                                              This file is a plain text file, and contains only a reference to the next file (which you can change as needed).

  -  someskin.bmp                   This is the skin you just used to wrap your structure. It has to tag along with the .im file.
                                              You can change the name of this file, as long as you change the name in the reference of the texture.txt as well.
                                              You can exchange this file with another one. This is what is done when an asset is "reskinned".
                                               (You might see this in different formats, such as .tga or .jpg)

  -  somepicture.jpg                Every asset must have a "thumbnail". This is the little preview picture that shows up on DLS, and in your CMP (trainzobjectz for 2004).
                                             DLS will refuse your asset if you try to upload one without a thumbnail (nowadays anyways).
                                             This file is referenced in config.txt and there are some rules about this, that we will dig into later.                                   

Lets have a look in CMP.

We're going to have a look at a file I made earlier (a reskin):

In order to have a look "inside",

you right click on the file

then hold cursor over "edit",

then click "edit in explorer"

When the folder opens, you can see that the asset consists
of exactly the 5 basic files I was talking about.

That's all I needed to show you.

Close it again.

As you closed the folder, you may notice, that the file now has
a little "tool box" next to it.

That's because, whenever you go to "edit in explorer", the file will
also be "open for edit".

When a file is "open" it cannot be used in Trainz, this is why, when you go to launch Trainz
from within CMP, it will give you this warning >>>>

You can then commit your asset before you go to Trainz.
If you leave the "reopen assets" box ticked, your asset will be opened again when you leave
Trainz, and reenter CMP, which is handy, when you are working with and testing a new file.

You do not want to leave the asset (we just looked into) open, so

right click on the file,

hold over "edit",

and click on "commit"

The file is now closed and committed.

Now, let's make our own.

As you probably know, each and every asset has a unique kuid number.

In order to make a new asset, you need a new kuid number, and you also need a folder inside Trainz to put it in.
In 2006, CMP does both for you automatically, in either of 2 ways:

1) You can create a new asset in CCP (Content Creator Plus). As CCP is specific to 2006, and also rather slow and annoying to work with, we are not going to use that method.

2) You can clone an existing asset in CMP. As this is fast and easy, and suits our purpose just dandy, that's what we're going to do.

Pick a file, any file, it does not matter, as long as it's locallly on your computer
(downloaded or built-in).

Right click on the file (just like before), and click on "clone".

Once CMP tells you you have a clone, click "view in main list"

This is your new asset. It has a brand new kuid, YOUR kuid.

It will still have the same name as the asset you cloned from,
don't worry about that now.

It is also open for edit,
and you can tell from the icon with a black and
white box, that it is a clone (don't worry about that either).

Now, like you did with the other file, go to "edit in explorer" (for this file)

Depending on which asset you cloned, there might be anything in there, it does not matter.

What is certain is, that it will be called "new asset" and there will be a "config.txt' in there.

Now I want you to delete everything in there, except the config.txt file.

Make sure you end up with this, nothing but the config.txt file

Now you need to fill it up again with your own files.

With windows explorer, open the folder you created earlier, which has your Gmax files in it.

Copy "myhouse.im" and "myskin.texture.txt" into the new asset folder  (do not move them, you might need them again).

Also move up to the TUTHOUSE folder, and copy "myskin.bmp" into the new asset folder as well.
(This is where we had the mixup in the previous lesson, should have had all the files in the same folder, but all of this does not matter, as long as you know where to find the files you need.)

So now you have 4 of the 5 basic files you need.

We will deal with the thumbnail picture later.

For now, close the folder.

Before we continue, we need to look at the setup of a config file.

The names you see to the left, "username", "kind" etc, are called "tags".

Some tags are required for a file to work, some are optional.

I will not explain everything in detail, if you want to know more about this, the "Content Creation Guide" for 2004 and 2006 respectively, will provide details on all manner of tags and their uses. They also have appendixes with all the codes you may need when you make your own assets. (Links for downloads below.)

Like I mentioned before, we want to make a user-friendly file, one that can be used by both '04 and '06.

For a house, such as the one you just created, this config here, is what you need to do just that, no more no less.

The green texts are the ones that you can change.
You don't need to for this exercise, and I suggest you leave it for now.

Just a few things I want to point out:

username is the name of your asset.  "xxx myhouse" is fine for this sample
But when you create a "real" asset, put some thought into the naming. I've seen names like "BX742" on DLS (don't know if there is such a thing, this is just an example). Who knows what that is? A name like "JVC grass green spline" on the other hand is multi informative, you know instantly what it is, who it's from, and it's easy to search for. This with initials up front is also a way to "bunch" your own stuff together in dependency lists etc. Easy to keep track of.

asset-filename should be the same as username, so when you change username, change this as well.

trainz-build  is set to 2.4, DO NOT CHANGE that. This will make the file show up on DLS as a "2004" asset. That's fine. If this was set to 2.5 (default for 2006) the file would not work in 2004.

height-range is for the benefit of 2004. In 2006 the ability to height-adjust a scenery object is default.

description is where you enter a general description of your file. Please do enter one. Apart from explaining what your asset is, it would be a good place to add the line (in a prominent place) "for TRS2004 and 2006". Since so very many older assets are faulty for 2006, and this file will show up on DLS as a "2004" file, this is a nice way of telling the users, that this file is A-OK for both. This is also the place to put proper credit to an original author if you happen to be reskinning somebody else's asset. As you see, you can have line-shifts here, which it makes it easier to read.

mesh is a reference to what image file to use (your Gmax file), and obviously has to have the exact same name as the file you made in Gmax, so if you named that one something other than "myhouse.im" that has to be changed in here as well.

license is optional. If you don't mind or care what people do with your file, leave "freeware" in there. If you feel like imposing restrictions on what people can or cannot do with your file, this is the place to do so.

refers to an image file, which we don't have yet, I will explain that in more detail later.

Now let's get back to your clone

go to "edit in explorer"

Open the config.txt file

Just click on it, as it is a text document,
it will automatically open up in notepad.

Depending on what file you cloned,
there could be all manner of things in here.
It does not matter.

The only interesting item is the very last line
it will say "kuid" and the new kuid for your clone

Delete everything except the last line with the kuid

all the text you see here to the right >>>>

(you will notice it's the same as we went through above, except the kuid line)

then paste that into your config file

(above or below your kuid line, it does not matter)

Click "file", then "save", then exit notepad

username                                              "xxx myhouse"
trainz-build                                           2.4
kind                                                      "scenery"
category-region-0                                 "US"
category-era-0                                    "1960s"
category-class                                      "BH"
region                                                   "USA"
type                                                      "Residential"
asset-filename                                       "xxx myhouse"
height-range                                          -10,100
mesh-table {
            default {
                        mesh                            "myhouse.im"
                        auto-create                   1
description                                            "My first house sample.
For TRS 2004 and 2006"
license                                                  "Freeware"
thumbnails {
            0 {
                        image                           "$screenshot$.jpg"
                        width                            240
                        height                           180

Just one more thing I need to show you.

Open up the "myskin.texture.txt" file (just click on it and it opens in notepad)

See how this file has a reference to your skin file?

If you change the name of your skin file, you also need to change the name inside this file.
(but only the name)

Now exit the folder.

Back in CMP, right click on the file, hold over "edit", and click on "commit"

Now your file has it's new name

Now it's time to check out your new house in Surveyor,
and also take a picture of it for a thumbnail image.

Go into Trainz, in Surveyor and look up your
new asset name.

Place your house on the board,
and take a nice picture of it.

The easiest way to do this is to hit
"print screen" in Trainz when your house
is lined up nicely, then exit Trainz,

go into your imaging software,
then copy (or CTRL-C) the picture into that.

Just in case you do not have imaging software,
I made a picture for you to use for this exercise.
It has already been renamed.
Download it here: $screenshot$.jpg

Once you have a nice picture of your house, you need to resize it to exactly 240 x 180 pixels, then save it.
This file has to be 240x180, and the lines in config as well, or it will not work.

Go back to CMP and open your file in explorer, then copy the picture you just made into the folder.

Then right click the picture file, click "rename", and change it's name to "$screenshot$.jpg"

TRS2006 does not care what name your thumbnail is (as long as it is the same as the reference in config),
but those using 2004 and TrainzObjectz will not be able to see it, unless is has this name.

So now you have all of your basic 5 files.

Right click, edit, and commit again.

You should be able to see all the file information in "asset detail" now, including picture.

You could call it done now, or you might want to save it as a cdp on your harddrive (make a folder just for your own assets).

If so, right click on the file, click "save to cdp", type in the file name, and save.

If you save it to cdp, then delete it in CMP, then import it from the cdp again, the "clone status" will be gone.
In order to get it back into CMP, all you need to do is go to the folder you saved it in, double click on the file,
and it pops right up in CMP again (it will be open for edit and needs to be committed).

If this was a "real" asset of your own, and you have double checked that everything is in order, you would now be ready to upload it.

For later use, I want to show you the uploading procedure:

Uploading an asset to DLS is easy in 2006.

Make sure your asset is committed.

In CMP, right click on the asset,

then click "upload"

You will see the "upload" panel pop up to the left,
and also a new window.

In the window, click "check none", then "accept"

After the window disappears, you click on "upload" in
the upload panel.

(No picture here, I did not want to upload this for real,
and you shouldn't either. Wait untill you have an asset
of your own.)

As soon as your file has been uploaded, you browser will open,
and you will be in your Profile area on Auran (you may be asked to log in).

Click on "Your content"

now click on "unprocessed"

(Since I haven't uploaded anything today, no more pictures)

In the new window, you will see a file,

it will not have your file name, just "upload",
but it will have a time and date stamp
It will also give you the option of cancelling the processing.

This comes in handy at times.
Let's just say that you uploaded 3 files.
Then you discover a problem of something you forgot on one of them
You now you can cancel the processing (it will be in this area till the next day),
but which asset to cancel?? You might have to cancel all three and then upload again.
I always have a little list of the kuids I upload, and note the time stamp on each.
Then if I need to, I know exactly which one to cancel.

(Been there, done that, making notes DO help.)

This is also why i upload one asset at a time.
You can put several files in the upload panel, and upload them in one scoop.
But they will all be in the same "upload package"

Your file will be processed automatically overnight.

That is if was OK. Should there be a problem in the file,
you will receive an email in the morning (Australia time),
that your asset was denied. You will then have to fix the problem
(email should tell you what it is), and upload again.

Let's assume you did this right, no problems.
You will receive no message.

The next morning you will then go back into your profile page
and this time you will click on the "preview area"

This area will have your newly uploaded file listed,
by name and kuid number.

You will need to click on the file (each of them if there is more),
That will bring up a new page that will have your asset with details, picture etc.
Make sure everything is OK, the click "approve".

You have to approve yourself all files that you upload in this fashion.
(Why this says "optional" I do not know)

Once you have approved your file, it goes into the waiting area.
It will sit here till Auran approves it.
This may be later the same day (often is), or could be days later, that depends
(on what I don't know).

Once your file has been approved by Auran, you will receive an email
(one for each file uploaded), stating that it is approved, and will be on DLS
in 6 hours or so.

So, after the magic 6 hours has passed (or a little more), you can go to DLS,
make a search on the file name, or your username, and admire your new asset.

That's it.

  Congratulation! You have a brand new asset.

  But please, do NOT upload this sample. First of all, we don't want to clutter up DLS with a bunch of sample-houses, secondly we don't want to hear giggling in the corners of forum.
  If you must share your newfound success with somebody, send the cdp to a friend, and let him/her admire it.

  Now it's time to go practice, and make your own stuff.
  Hope you have fun.

     DOWNLOAD LINKS: (from Auran)

     2004 Content Creation Guide

     2006 Content Creation Guide

      The Content Creation Guide (at least 2006) has a nice chapter on Gmax modelling and guidelines as well.

     If you want to get into making new assets or reskinning other assets, You really need good imaging software.
     If you're trying your hand in Gmax, I suspect you alrady have one, but if not, you will need one.
     Unfortunately there aren't any good free ones.
     I can only speak of Jasc Paint Shop Pro (from Corel), since that's what I have. It's pretty good, and it's not the most expensive out there.
     When you buy a new computer, a trial version of this usually comes with it (dig into your PC and see if it's there).
     This trial gives you 30 days of playing (not much), after which you must buy it. I did this recently, and it was $60.
     It's more expensive to buy the versions you find on the net, allthough they might be newer. You will have to investigate to see what suits you best.
     Most software will allow for a trial download, so you can see if it's for you before you buy it.