Trainz/AM&C/anatomy of assets-1 general

logo
Fundamentals for Trainz Trainees

Introductory Trainz — page by page instruction
TOC | BeginningsFun | AM&C | Creation | InBook Refs ORP Refs:  • Index • Containers • Kinds • Tags | Appendixes  • Vers
 Glossary
 HKeys-CM
 HKeys-DVR
 HKeys-SUR
 HKeys-WIN
 Mouse use
 Notations



Examining common asset elements

edit

In this page we're going to present the TrainzBaseSpec elements within example assets you are likely to encounter in downloading content and having to correct faults from data model evolution. Further, we're intending to present past and present forms and conventions so that you can see how to upgrade an element should you have to crack an asset open to repair. Remember, What happens in the Boxcar, stays in the Boxcar—if you fix it up, dress it up pretty, and customize it on your system, so long as you don't upload it, veteran Trainzer's will applaud you.

Daring Experimenters lead to content creation, leading to skilled new enthusiastic content creators which lead to new goodies for all. Knock yourself out experimenting —it's how most of the essential parts— and even the best parts (some might say)—of the Trainz Experience was built!

You might say, Trainz is set up to allow experiments, for in truth it safeguards a lot of your installation against breakage. A backups folder system and ability to Clone (copy) a asset to alter are built-in to Content Manager. Want to try something with a regular built-in asset, then use this common procedure to "Safe the Asset"—open the asset for editing, run PEVtools and copy the folder to another directory as a manual backup—then fiddle as you desire. Trainz input validation will let you know if most things are out of kilter with your experiment.

Newer Trainz also has a 'Revert' and a 'Revert to Original' feature in the [ALT]-[E] edit drop down menu. That manual copy can then be used to re-import the asset with suitable version or name alteration or kuid changes, and both versions can be on your installation at once.

Our first asset

edit

This is a flatcar knockoff of a deepwell flatcar by the inimitable PhilC of World of Trainz (now sadly defunct, he's retired in 2014) and bigger fame as a diesel-electric digital modeler. (Name search in CM 'L SD70' for one you likely have built-in!)

When we refer to this as a knock-off we mean no denigration, only that the asset is actually a clone with new textures as opposed to a reskined asset using the alias tag and an existing base asset's kuid to give a mesh for us to put new textures on asset. An old technique dating back to Trainz 1.3, the use of mesh and texture libraries in today's assets is similar by providing data by reference, instead of a stand-alone part. The distinction is based on where the meshes reside on your hard drive. This 'clone' is an asset that can be ported onto a install and does not need the source asset to be present for rendering because it has a copy of the mesh. A reskin, whether manually or via the now depreciated Auran Paintshed application, does need the source asset or the asset is broken until the dependency is satisfied. New assets have a similar dependency need when a library asset is needed that is not yet downloaded to a local install.



An amusing example of the distinction
When the excellent and famous narrowgauge route 'Northbay County' was first published in TRS2006-SP0, there was a little switcher engine that had no trucks—the bogeys kuid got left out of the CDROM release. It seemed to float on air like it was some kind of hovercraft! The switching engine worked, and so long as you were in the loco cab, you'd never know the difference. The truck sub-asset was clearly non-essential.

A wart in Trainz: Sometimes the company doesn't play by the same rules as we experience interacting with CM and the DLS. The anecdote is a case on point. The engine asset, route, and session all depended on that truck, but because the kuid's were in the releases' compiled data base (see JA files and CAB files) it was outside of normal error checking.

  • Clone's of quite a few of Auran/N3V railcars still to this day lack (less important) data required in more recently created data, and that shortfall even applies to assets that were newly reworked for TS12! [They're now working on it (compliance with the very demands forced onto the user community)—but it took a user to point out the missing factors. The interaction between N3V and the Trainz forums is very important, and while not acknowledged usually, things happen and get fixed when they see the light of day in forum posts!]
  • In a similar inconsistency, it was revealed in the fall of 2014 by versions manager James Moody that N3V routinely strips out image data required of the user community when preparing an asset to be incorporated into the built-in content data cabinet JA files

.

In a reskin, the mesh reference to the traincar to be re-colorized is essential, as is the existence of the kuid defining that car and all of it's unchanged parts[note 1], or the kuid is so much useless code. In a clone or knock-off, like a specially built asset, it's complete data set is self-contained--though may of course have other dependencies--common parts like trucks (bogeys) cab interiors, bells, cow catchers, and other elements which have commonality between models.

Some such are found in a library—this has become increasingly common, and actually simplifies things for the content creator and users alike--only one library asset needs be 'attached', found, and possessed to enable many others, and they can be used by other content creators to expand the menu of options (goodies) for us all. This even extends to the body of many traincars--Auran established a series of base model types and many rolling stock assets use those meshes. Meshes or mesh libraries, textures and texture libraries can be individual KUID assets, and once so entered in the data base, become available for others. Neat, Huh!?
company                                 "Santa Fe"
origin                                  "USA"
mesh-table {
  default {
    mesh               "depcenflat_body\depcenflat_body.im"
    auto-create        1
  }
  shadow {
    mesh               "shadow.im"
  }
}
bogeys {
  0 {
    reversed           0
    bogey              <kuid:86105:50059>
  }
  1 {
    reversed           0
    bogey              <kuid:86105:50059>
  }
}
engine                                  0
kind                                    "traincar"
trainz-build                            2.2
username                                "Flatcar DepCen 6 Axle,empty-aRms"
enginespec                              <kuid:-1:42004201>
kuid                                    <kuid2:124585:15120:0>
mass                                    49215
name                                    "Flatcar DepCen 6 Axle,empty-aRms"
description                             "username = 'Flatcar DepCen 6 Axle,empty-aRms'
former username: 'Flatcar 6_Axle Depressed Center Empty'
-- 6 axle depressed center flat car. Capacity 250000 lbs (113398 kgs).
-- Email fordtruc@norex.com.au for repaint requests.
Reskinned by MaDDoG1221 with permission.

--------- --------- --------- --------- --------- 
Rev-A 2014-0507 by Fabartus -- cleaned up three faults, PM2IM, shadows, etc. w/PEVtools, tacked '-aRu' suffix on username, and incremented v2.0 to v2.2 -- but no other changes.
Also replaced with containers so removed:
bogey                                   <kuid:86105:50059>
bogey-1                                 <kuid:86105:50059>

REV B - 2014-0612 by Fabartus - Reordered folder names and annotations.
To make my version, try a test to use this for trucks <kuid:46162:50005> in v2.6 Trainz-build.
----------

Asset foldername: kuid2 124585 15120 0;V2-2;Flatcar DepCen 6 axle;Flatcar DepCen 6 Axle,empty-aRms
Original formerly: 2-0Ru Flatcar 6_Axle Depressed Center Empty-a (kuid2 124585 15120 0)
*****************************************************************************************************
  "
asset-filename                          "DepCenFlat"
category-class                          "XFD"
category-region                         "CA;US;MX"
category-era                            "1970s;1980s;1990s;2000s;2010s"

thumbnails {
	A {
	image				"$screenshot$.jpg"
	height 180
	width  240
	}
}
author                                  "Matt (MaDDoG1221)"
organisation                            "N/A"
contact-email                           "Matt@niclan.homeip.net"
contact-website                         "http://www.matt.dynalias.com"
license                                 "Copyright 2004"

kuid-table
{
  0                                     <kuid:86105:50059>
  1                                     <kuid:-1:42004201>
}