Can't get Gmax into Trainz 2006 "Help"

BThompson

New member
I can't seem to get gmax into trainz 2006, I made a simple brick_box exported it like the tutorial said did everything like it said I even viewed it in Object Explorer "TOE", I found a thread A Simple Tutorial--Gmax to Trains followed the Instructions so I opened CMP clicked new file filled in the information the best I new how, saved the file closed the wizard opened it for edit, edit in explorer, copied the files gmax made into the folder closed the folder committed it, I noticed a explantion mark on the asset check for errors and it said (.tga failed to load) so then I went to Surveyor and found the object Brick Box listed but it did not show it spinning around, so I did some more research and found I needed to uncompress the .tga file so I did, I even deleted the whole project from CMP and made another brick_box and did the same as above and made a new config.txt from CMP .tga file still uncompressed and still could not see it in Surveyor, but I see it listed, I aslo seen where someone said to make the box an editable mesh so I made another box and did the same thing over again and then you could not see it in Object Explorer "TOE" on the left side it said (texture did not load) my .tga size is 128X128, but in CMP the exclamation does not show faulty after I made it an editable mesh there is no error now but still don't see it in Surveyor I also found how to put thumbnail in the config.txt and I see the picture on the asset in CMP, I thought that would fix it but I still don't see it in Surveyor, I just can't seem to get this to work any suggestion I don't know what I'm doing wrong I have seach the forum for almost 16 hrs for 2 days and need some help out there, Here's is what is in my folder:

brick_box.im
screenshot.jpg "for thumbnail"
brick.tga "uncompressed"
brick.texture.txt "Primary=brick.tga Tile=st"
config.txt (inside config.txt below)

kuid <kuid:424483:1041>
trainz-build 2.5
category-class "AE"
category-region "US"
category-era "2000s"
username "brick_box"
kind "scenery"
region "Custom"
asset-filename "brick_box"
thumbnails {
0 {
image "screenshot.jpg"
width 240
height 180
}
}

Thanks BThompson "Brett" :'(
 
I'm fairly new here and could be wrong.

Try placing this in your config,txt

mesh-table {
default {
mesh "brick_box.im"
auto-create 1
}
}


Hope this gets you going,
Lenny
 
I'm fairly new here and could be wrong.

Try placing this in your config,txt

mesh-table {
default {
mesh "brick_box.im"
auto-create 1
}
}

Hope this gets you going,
Lenny

As Lenny says it seems that you omitted the all-important tag "Auto-create 1". An object will not appear without this. It's intended for things that should only appear when controlled by a script (I assume). A good way to learn this stuff is to look at the config files of assets that are working correctly.
I'm sure you'll be kicking yourself for a while but hey, that's Trainz!:D
Mick Berg.
 
Last edited:
Out of curiosity, can I ask a related question?

Are the mesh table lines essential because it's a trainz build 2.5 (TR2006) asset? For lower build numbers the mesh lines haven't been essential (unless there's something else going on).

Paul
 
@BThompson: I'm glad you now have what you want. I know how excited I was when I had my very first homemade, ugly as sin, asset showing up to place on the map :) Try a spline wall or road next, more fun stuff. By the way, what I do is name them "AAA Brickwall" or whatever (only for testing purposes), so they show up at the top of the "object list" and there is no need to hunt for it. Have fun, as my sig suggests.

@paulzmay: I dont have an answer to your question. I'm still learning, 2 months noobie :) , and mostly have worked in 2004 (I do have 2006 and 2009 as well now). When assets I created didn't work I gleaned bits and pieces from other assets config file (from DLS) or online tutorials and incorporated then into mine to get mine to show up.

@Mick_Berg: Are you saying the "auto-create 0" could be used for script based assets to toggle them into view based on some "trigger"?

Regards, (and thanks)
Lenny
 
Last edited:
I'm probably wrong but I thought that the mesh-table container was only necessary in the config.txt file if:
the mesh filename was not the same as the asset-filename or you have animations or effects meshes.

Bob
 
@rweber95:
Perhaps you are correct, but I have the mesh-table working in my assets. I incorporated it with LOD, without LOD and with a spline as well. Maybe what I have is a bit of overkill and adds slightly to the load time and memory usage but it does seem to work.

I guess I will give them the supreme test once I get my 2009 installed and toss my testing assets into the beast and await smoke plumes to come from CM2.

I would like them to be lean and mean in the end though, so maybe one of the more experienced creators will step in and lead us in the best direction.

Regards and the BEST of New Years wishes to you all,:wave:
Lenny

==============
mesh-table{
default
{
mesh tutorial_body/mytest.lm
auto-create 1
}
}
=============
mesh-table {
default {
mesh "road.im"
auto-create 1
}
}
============
 
fuzzies;381774 @Mick_Berg: said:
Are you saying the "auto-create 0" could be used for script based assets to toggle them into view based on some "trigger"?

Regards, (and thanks)
Lenny
I'm sorry, I really don't know, but I would think so. I just can't imagine any other reason why an object would be made to be invisible. You are crediting me with much more Trainz know-how than I actually have.:eek: Hopefully a Knowledgeable Person will answer the question for us.
Mick Berg.
 
A perfect example of auto-create 0 is Pencil42's 36NG 25' flatcar. The side and end stakes only show when it's loaded. Same with the 30ng flatcar I modified for Col Klink.
Norm
 
I found something interesting while creating new objects with 2009. It creates the config.txt with the following, and it has omitted the auto-create. So maybe my thoughts about this way being less then optimal are incorrect.

Note: I did have to add the "auto-create 1" manually to get it to show.

mesh-table
{
default
{
mesh "road.im"
}
}



@nwhitney: Thanks for pointing me towards something else to play with, scripts :)

For any others interested in my findings I have enclosed a few snippets

Config.txt below with auto-create 0 which does await a "trigger" from a gs script file.
=============
side_stakes {
mesh "flatcar_body/side_stakes.im"
auto-create 0
use-parent-bounds 1
=============

and the "trigger" from the gs script below which appears to put the sides and ends up (make them visible) when the cordword queue is more then 0
=================
cordwoodQueue = GetQueue("cordwoodq");
if (cordwoodQueue.GetQueueCount() > 0 )
{
SetMeshVisible("side_stakes",false,0.0);
SetMeshVisible("end_stakes",true,0.0);

}
else
{
SetMeshVisible("side_stakes",true,0.0);
SetMeshVisible("end_stakes",false,0.0);
}
=================

Regards,
Lenny
 
Back
Top