<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.trainzsimulator.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Gdennish</id>
	<title>TrainzOnline - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.trainzsimulator.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Gdennish"/>
	<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/wiki/Special:Contributions/Gdennish"/>
	<updated>2026-11-05T06:50:59Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Category-class&amp;diff=29708</id>
		<title>Category-class</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Category-class&amp;diff=29708"/>
		<updated>2021-06-21T20:31:17Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: /* Class T: TRACK */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORP-top}}&lt;br /&gt;
==Category-class Tags==&lt;br /&gt;
The &#039;&#039;&#039;&amp;quot;category-class&amp;quot; tag&#039;&#039;&#039; of the [[KIND_TrainzBaseSpec|TrainzBaseSpec]] is the &#039;&#039;key searching parameter&#039;&#039; defining what or how the human content creator meant for the new asset &#039;&#039;to be used and thought about.&#039;&#039; This should not be confused with the [[Category List]], which is a related but distinct topic.&lt;br /&gt;
{{UserTip|width=50%|This is a sometimes nebulous and confusing parameter requiring a new user to develop a degree of mental agility, for example, &#039;&#039;&#039;a &#039;house&#039; asset&#039;&#039;&#039; might be classified (Coded by some asset creator) as scenery, building, industry, or even  something as wildly inappropriate as &#039;fauna&#039;.}}&lt;br /&gt;
&lt;br /&gt;
The [[KIND]] specification defines which other ({{wp|data type}}) entries&#039;&#039; are needed&#039;&#039; in that particular asset&#039;s config.txt file. It is the entry which defines the asset&#039;s  type, scope, and needs and the very important parameter that tells TRAINZ how to process and render the specific asset item correctly, error check against the standard for the category-class, and render it into {{wp|Three-dimensional space|3D graphics}} models. &lt;br /&gt;
&lt;br /&gt;
Each Trainz asset&#039;s category-class tag helps describe the &#039;intent&#039; of the Asset in the game, as opposed to the internal structure of the Asset. The Content Creators&#039; Guide for Trainz Classics said these classes represent a standardized system for referring to the various types of Locos, Rolling stock, Scenery, Spline and Industry assets.  The Category-class classification codes become important to all Trainzers when searching and/or filtering for suitable assets to make into content in a session or route (layout).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;font color=&amp;quot;blue&amp;quot; size=&amp;quot;-1&amp;quot;&amp;gt;Trainz Base Specification &lt;br /&gt;
:(all config.txt files can contain all these entries){{TBS}}&lt;br /&gt;
::&#039;&#039;&#039;&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;&amp;lt;u&amp;gt;Figure: 1 TrainzBaseSpec for quick reference&amp;lt;/u&amp;gt;&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Category-class code notes==&lt;br /&gt;
New users should be aware that these codes listed below are not the direct ContentManager.exe category sort by classifications as a simple comparison of lists will reveal, but they do affect what is displayed within such a sort filter selection. &lt;br /&gt;
:For example: Set a search filter for &#039;&#039;&#039;&#039;&#039;&#039;Location&amp;gt;Local + Category&amp;gt;Flora&#039;&#039;&#039;&#039;&#039;&#039;.&lt;br /&gt;
: In the base installed content of TRS2006-SP0 this search will yield diverse assets such as the set of  {&#039;&#039;&#039;Flora&#039;&#039;&#039; types: SOME few trees, Betonbridge (1,2,&amp;amp;3 tracks), crop splines, sidewalks, road types} &lt;br /&gt;
:but the sort will also list a much larger type group, the set of {Scenery: retaining wall splines (Arkaden...), LOADS of trees and Shrubs including Laubbaum with birds (and sound), grasses (textures?), Logs} and so forth. &lt;br /&gt;
In that search you will also find electrified railroad centenary parts and the occasional animal. The result of such a search will be no better in new Trainz versions, which means the new Trainzer needs to cultivate a certain mental agility when searching for suitable content. No one has the man-power, deep pockets, nor copyright authority to systematically fix such foibles. You as a user, can clone such items and change the classification to something more sensible to yourself. That however, is not an asset you can upload to the Download Station without a copyright clearance from the original asset creator. The Trainz community is severe in policing copyrights violations! &lt;br /&gt;
{{TrainzTip|These codes when applied by the content creator were in many cases cut and pasted into a new similar asset, in others, the way he or she was using the asset in their current project. In short, they are not definitive, but are indicative... even if it is only of the mental state of the creator at the time of donation to the DLS, or as happens in many cases, a case of translation from a native tounge with a different way of thinking than that of English.}} Rejoice in the positive, they are essentially free and cost you nothing but a bit of puzzlement. Free is good! Having them is better.&lt;br /&gt;
 &lt;br /&gt;
==The Category Classes are:==&lt;br /&gt;
 Class &amp;quot;A&amp;quot;        Motive Power&lt;br /&gt;
 Class &amp;quot;B&amp;quot;        Buildings and Structures&lt;br /&gt;
 Class &amp;quot;C&amp;quot;        Cabeese&lt;br /&gt;
 Class &amp;quot;D&amp;quot;        Defence&lt;br /&gt;
 Class &amp;quot;E&amp;quot;        Environment&lt;br /&gt;
 Class &amp;quot;F&amp;quot;        Foliage&lt;br /&gt;
 Class &amp;quot;G&amp;quot;        Ground&lt;br /&gt;
 Class &amp;quot;H&amp;quot;        Mesh&lt;br /&gt;
 Class &amp;quot;I&amp;quot;        Product&lt;br /&gt;
 Class &amp;quot;J&amp;quot;        Texture&lt;br /&gt;
 Class &amp;quot;L&amp;quot;        Light Rail &amp;amp; Monorail&lt;br /&gt;
 Class &amp;quot;M&amp;quot;        Maintenance Of Way&lt;br /&gt;
 Class &amp;quot;O&amp;quot;        Organism&lt;br /&gt;
 Class &amp;quot;P&amp;quot;        Passenger &amp;amp; Mail Cars&lt;br /&gt;
 Class &amp;quot;R&amp;quot;        Railcars &amp;amp; Multiple Unit Sets&lt;br /&gt;
 Class &amp;quot;S&amp;quot;        Splines&lt;br /&gt;
 Class &amp;quot;T&amp;quot;        Track&lt;br /&gt;
 Class &amp;quot;V&amp;quot;        Vehicles&lt;br /&gt;
 Class &amp;quot;W&amp;quot;        Wayside&lt;br /&gt;
 Class &amp;quot;X&amp;quot;        Freight Cars&lt;br /&gt;
 Class &amp;quot;Y&amp;quot;        Maps and Scenarios&lt;br /&gt;
 Class &amp;quot;Z&amp;quot;        Train Parts&lt;br /&gt;
::&amp;lt;font color=&amp;quot;blue&amp;quot; size=&amp;quot;+1&amp;quot;&amp;gt;&#039;&#039;&#039;&amp;lt;u&amp;gt;Figure 02: Base category-class prefixes&amp;lt;/u&amp;gt;&#039;&#039;&#039;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each Category Class may have a number of subcategories as listed below. Please choose the most appropriate Category Class for your item. Select the Class from the [[Content Creator Plus]] drop down menu box - only one class may be selected for an asset.&lt;br /&gt;
&lt;br /&gt;
Selecting a correct Category Class is important since Trainz will allow users to use the Category Class as a sort and selection criteria.&lt;br /&gt;
&lt;br /&gt;
{|&amp;lt;!-- careful, table --&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&amp;lt;!-- careful, table --&amp;gt;&lt;br /&gt;
===Class A: MOTIVE POWER===&lt;br /&gt;
*AA Electric Multi-current&lt;br /&gt;
*AC AC Electric&lt;br /&gt;
*AD DC Electric&lt;br /&gt;
*AE Experimental or Special&lt;br /&gt;
*AG Gas Turbine&lt;br /&gt;
*AH Diesel Hydraulic&lt;br /&gt;
*AL Diesel &amp;amp; Diesel Electric&lt;br /&gt;
*AM Mammal&lt;br /&gt;
*AS Steam Loco &amp;amp; Tender&lt;br /&gt;
*AT Steam Tank&lt;br /&gt;
&lt;br /&gt;
===Class B: BUILDINGS &amp;amp; STRUCTURES===&lt;br /&gt;
*BB Buildable (Kind Buildable)&lt;br /&gt;
*BC Commercial (scenery non-functional)&lt;br /&gt;
*BI Industrial (scenery non-functional)&lt;br /&gt;
**BIN Industry asset with product processing functionality&lt;br /&gt;
*BH Home &amp;amp; Residential (scenery non-functional)&lt;br /&gt;
*&#039;&#039;Subclass BP: Passenger Station&#039;&#039;&lt;br /&gt;
**BPF Passenger Station with passenger processing functionality&lt;br /&gt;
**BPN Passenger Station (non-functional)&lt;br /&gt;
*BR Railway (scenery non-functional)&lt;br /&gt;
*BS Special (e.g. military) (scenery non-functional)&lt;br /&gt;
*BT Traffic &amp;amp; Streetscape (scenery non-functional)&lt;br /&gt;
*BU Utility (incl. Civil buildings) (scenery non-functional)&lt;br /&gt;
&lt;br /&gt;
===Class C: CABEESE / CONSIST / EFFECTS===&lt;br /&gt;
*CB Brake van&lt;br /&gt;
*CC Caboose&lt;br /&gt;
*CLUT Clutter Effect&lt;br /&gt;
*CN Consist&lt;br /&gt;
*CS ControlSet&lt;br /&gt;
&lt;br /&gt;
===Class D: DEFENCE===&lt;br /&gt;
*DA Military motive power&lt;br /&gt;
*DE Military experimental &amp;amp; special vehicles&lt;br /&gt;
*DP Military equipment - lab &amp;amp; personnel vehicles&lt;br /&gt;
*DX Military equipment - freight&lt;br /&gt;
&lt;br /&gt;
===Class E: ENVIRONMENT===&lt;br /&gt;
*ES Sky&lt;br /&gt;
*EW Water&lt;br /&gt;
&lt;br /&gt;
===Class F: FOLIAGE===&lt;br /&gt;
*FC Cactii&lt;br /&gt;
*FF Flowers&lt;br /&gt;
*FO Orchards &amp;amp; Crops&lt;br /&gt;
*FS Shrub&lt;br /&gt;
*FT Trees&lt;br /&gt;
&lt;br /&gt;
===Class G: GROUND===&lt;br /&gt;
*GA Arid&lt;br /&gt;
*GL Lush&lt;br /&gt;
*GS Seasonal&lt;br /&gt;
&lt;br /&gt;
===Class H: MESHES===&lt;br /&gt;
*HM Mesh&lt;br /&gt;
&lt;br /&gt;
===Class I: PRODUCT===&lt;br /&gt;
*IC Container Category&lt;br /&gt;
*IP Passenger Category&lt;br /&gt;
*IB Bulkload Category&lt;br /&gt;
*IL Liquid Category&lt;br /&gt;
&lt;br /&gt;
===Class J: TEXTURES===&lt;br /&gt;
*JC Corona&lt;br /&gt;
*JI Icon&lt;br /&gt;
*JP Particle Effects Texture&lt;br /&gt;
*JO Other Texture&lt;br /&gt;
&lt;br /&gt;
===Class L: LIGHT RAIL &amp;amp; MONORAIL===&lt;br /&gt;
*LS Articulated train sets&lt;br /&gt;
*LT Trolleys, trams &amp;amp; streetcars&lt;br /&gt;
*LM Monorail vehicles&lt;br /&gt;
&lt;br /&gt;
===Class M: MAINTENANCE of WAY===&lt;br /&gt;
*MA Camp vehicles&lt;br /&gt;
*MB Ballast cars&lt;br /&gt;
*MC Cranes/lifting&lt;br /&gt;
*MD Diagnostic vehicles (e.g. dynamometer)&lt;br /&gt;
*ME Instructional vehicles&lt;br /&gt;
*MF Fire vehicles&lt;br /&gt;
*MI Inspection vehicles&lt;br /&gt;
*MT Track vehicles (e.g. tamper)&lt;br /&gt;
*MP Snow ploughs&lt;br /&gt;
*MS Section cars (e.g. fairmont)&lt;br /&gt;
*MX Freight equipment (for MoW traffic)&lt;br /&gt;
*MW Weed spray&lt;br /&gt;
&lt;br /&gt;
===Class O: ORGANISM===&lt;br /&gt;
*OA Animal Kingdom&lt;br /&gt;
*OH Human&lt;br /&gt;
**OHD Locomotive Driver&lt;br /&gt;
&lt;br /&gt;
===Class P: PASSENGER &amp;amp; MAIL CARS===&lt;br /&gt;
*PA Suburban/short haul (no W.C.)&lt;br /&gt;
*PB Baggage cars&lt;br /&gt;
*PC Coach/chair cars&lt;br /&gt;
*PD Dome cars&lt;br /&gt;
*PH Bar/cafeteria cars&lt;br /&gt;
*PL Lounge cars&lt;br /&gt;
*PM Mail cars&lt;br /&gt;
*PO Observation cars&lt;br /&gt;
*PP Power cars&lt;br /&gt;
*PR Buffet/dining/restaurant cars&lt;br /&gt;
*PS Sleeping cars&lt;br /&gt;
*PU Special cars (e.g. Gaming Cars)&lt;br /&gt;
*PV Private cars&lt;br /&gt;
*PX Composite passenger cars&lt;br /&gt;
&lt;br /&gt;
|&amp;lt;!-- careful, table --&amp;gt;&lt;br /&gt;
===Class R: RAILCARS &amp;amp; MULTIPLE UNIT SETS===&lt;br /&gt;
*RA AC electric&lt;br /&gt;
*RC DC electric&lt;br /&gt;
*RD Diesel &amp;amp; diesel electric&lt;br /&gt;
*RH Diesel hydraulic&lt;br /&gt;
*RP Petrol&lt;br /&gt;
*RS Steam&lt;br /&gt;
&lt;br /&gt;
===Class S: SPLINES===&lt;br /&gt;
*SF Fences&lt;br /&gt;
*SR Roads&lt;br /&gt;
*SP Platforms&lt;br /&gt;
*SS Structure&lt;br /&gt;
*SV Vegetation&lt;br /&gt;
&lt;br /&gt;
===Class T: TRACK===&lt;br /&gt;
*TB Bridge&lt;br /&gt;
*TC TestTrack Course&lt;br /&gt;
*TR Rails&lt;br /&gt;
*TT Tunnel&lt;br /&gt;
*TURF Turf Effect&lt;br /&gt;
*TF Fixed Track&lt;br /&gt;
&lt;br /&gt;
===Class V: VEHICLES===&lt;br /&gt;
*VA Air&lt;br /&gt;
*VL Land&lt;br /&gt;
*VS Sea&lt;br /&gt;
&lt;br /&gt;
===Class W: WAYSIDE===&lt;br /&gt;
*WA Signalling&lt;br /&gt;
*WS Trackside signage&lt;br /&gt;
*WX Accessories&lt;br /&gt;
 &lt;br /&gt;
===Class X: FREIGHT CARS===&lt;br /&gt;
*XA Auto transporter&lt;br /&gt;
**XAA Open sides&lt;br /&gt;
**XAB Auto box car&lt;br /&gt;
*XB Box car/covered van&lt;br /&gt;
**XBD Dangerous goods&lt;br /&gt;
**XBG General service&lt;br /&gt;
**XBI Insulated&lt;br /&gt;
*XF Flat&lt;br /&gt;
**XFA Articulated&lt;br /&gt;
**XFC Intermodal&lt;br /&gt;
**XFD Depressed center&lt;br /&gt;
**XFH Heavy duty&lt;br /&gt;
**XFM General service&lt;br /&gt;
*XG Gondola/open wagon&lt;br /&gt;
**XGB Bottom dumping&lt;br /&gt;
**XGC Combination bottom/end/side dumping&lt;br /&gt;
**XGE End dumping&lt;br /&gt;
**XGR Rotary dumping&lt;br /&gt;
**XGS Side dumping&lt;br /&gt;
**XGT Covered&lt;br /&gt;
*XH Hopper&lt;br /&gt;
**XHB Bottom dumping&lt;br /&gt;
**XHC Combination bottom/end/side dumping&lt;br /&gt;
**XHE End dumping&lt;br /&gt;
**XHR Rotary dumping&lt;br /&gt;
**XHS Side dumping&lt;br /&gt;
**XHT Covered&lt;br /&gt;
*XI Foundry&lt;br /&gt;
**XIB Bottle/torpedo cars&lt;br /&gt;
**XIT Tipper/slag cars&lt;br /&gt;
*XL Livestock&lt;br /&gt;
**XLA Single deck&lt;br /&gt;
**XLC Multiple deck and convertible&lt;br /&gt;
**XLH Horse box&lt;br /&gt;
*XR Refrigerated&lt;br /&gt;
**XRI Ice chilled&lt;br /&gt;
**XRM Mechanically chilled&lt;br /&gt;
*XS Special&lt;br /&gt;
**XSN Novelty&lt;br /&gt;
**XSU Unclassified&lt;br /&gt;
*XT Tanker&lt;br /&gt;
**XTA Domeless&lt;br /&gt;
**XTS Single dome&lt;br /&gt;
**XTM Multiple dome&lt;br /&gt;
*XV Ventilated car/louvred van&lt;br /&gt;
**XVG General service&lt;br /&gt;
**XVP Produce service&lt;br /&gt;
&lt;br /&gt;
===Class Y: MAPS &amp;amp; SCENARIOS===&lt;br /&gt;
*YM Map&lt;br /&gt;
*YS Scenario&lt;br /&gt;
*YP Profile/Session&lt;br /&gt;
*YT Tutorial&lt;br /&gt;
*YR Rule&lt;br /&gt;
*YD Driver Command&lt;br /&gt;
*YH HTML-Asset&lt;br /&gt;
*YX Region&lt;br /&gt;
&lt;br /&gt;
===Class Z: TRAIN PARTS===&lt;br /&gt;
*ZB Bogie/Truck&lt;br /&gt;
*ZE Enginespec&lt;br /&gt;
*ZH Hornsound&lt;br /&gt;
*ZI Interior&lt;br /&gt;
*ZP Pantographs&lt;br /&gt;
*ZS Enginesound&lt;br /&gt;
*ZX Displacement Map (PaintShed-Template Obsolete)&lt;br /&gt;
*ZY (Paintshed-Skin Obsolete)&lt;br /&gt;
|}&amp;lt;!-- careful, table --&amp;gt;&lt;br /&gt;
[[Category:Config Tag|category-class tag]]&lt;br /&gt;
{{ORP-bot|category-class tag}}&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Category-class&amp;diff=29707</id>
		<title>Category-class</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Category-class&amp;diff=29707"/>
		<updated>2021-06-21T20:30:03Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: /* Class C: CABEESE */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORP-top}}&lt;br /&gt;
==Category-class Tags==&lt;br /&gt;
The &#039;&#039;&#039;&amp;quot;category-class&amp;quot; tag&#039;&#039;&#039; of the [[KIND_TrainzBaseSpec|TrainzBaseSpec]] is the &#039;&#039;key searching parameter&#039;&#039; defining what or how the human content creator meant for the new asset &#039;&#039;to be used and thought about.&#039;&#039; This should not be confused with the [[Category List]], which is a related but distinct topic.&lt;br /&gt;
{{UserTip|width=50%|This is a sometimes nebulous and confusing parameter requiring a new user to develop a degree of mental agility, for example, &#039;&#039;&#039;a &#039;house&#039; asset&#039;&#039;&#039; might be classified (Coded by some asset creator) as scenery, building, industry, or even  something as wildly inappropriate as &#039;fauna&#039;.}}&lt;br /&gt;
&lt;br /&gt;
The [[KIND]] specification defines which other ({{wp|data type}}) entries&#039;&#039; are needed&#039;&#039; in that particular asset&#039;s config.txt file. It is the entry which defines the asset&#039;s  type, scope, and needs and the very important parameter that tells TRAINZ how to process and render the specific asset item correctly, error check against the standard for the category-class, and render it into {{wp|Three-dimensional space|3D graphics}} models. &lt;br /&gt;
&lt;br /&gt;
Each Trainz asset&#039;s category-class tag helps describe the &#039;intent&#039; of the Asset in the game, as opposed to the internal structure of the Asset. The Content Creators&#039; Guide for Trainz Classics said these classes represent a standardized system for referring to the various types of Locos, Rolling stock, Scenery, Spline and Industry assets.  The Category-class classification codes become important to all Trainzers when searching and/or filtering for suitable assets to make into content in a session or route (layout).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;font color=&amp;quot;blue&amp;quot; size=&amp;quot;-1&amp;quot;&amp;gt;Trainz Base Specification &lt;br /&gt;
:(all config.txt files can contain all these entries){{TBS}}&lt;br /&gt;
::&#039;&#039;&#039;&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;&amp;lt;u&amp;gt;Figure: 1 TrainzBaseSpec for quick reference&amp;lt;/u&amp;gt;&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Category-class code notes==&lt;br /&gt;
New users should be aware that these codes listed below are not the direct ContentManager.exe category sort by classifications as a simple comparison of lists will reveal, but they do affect what is displayed within such a sort filter selection. &lt;br /&gt;
:For example: Set a search filter for &#039;&#039;&#039;&#039;&#039;&#039;Location&amp;gt;Local + Category&amp;gt;Flora&#039;&#039;&#039;&#039;&#039;&#039;.&lt;br /&gt;
: In the base installed content of TRS2006-SP0 this search will yield diverse assets such as the set of  {&#039;&#039;&#039;Flora&#039;&#039;&#039; types: SOME few trees, Betonbridge (1,2,&amp;amp;3 tracks), crop splines, sidewalks, road types} &lt;br /&gt;
:but the sort will also list a much larger type group, the set of {Scenery: retaining wall splines (Arkaden...), LOADS of trees and Shrubs including Laubbaum with birds (and sound), grasses (textures?), Logs} and so forth. &lt;br /&gt;
In that search you will also find electrified railroad centenary parts and the occasional animal. The result of such a search will be no better in new Trainz versions, which means the new Trainzer needs to cultivate a certain mental agility when searching for suitable content. No one has the man-power, deep pockets, nor copyright authority to systematically fix such foibles. You as a user, can clone such items and change the classification to something more sensible to yourself. That however, is not an asset you can upload to the Download Station without a copyright clearance from the original asset creator. The Trainz community is severe in policing copyrights violations! &lt;br /&gt;
{{TrainzTip|These codes when applied by the content creator were in many cases cut and pasted into a new similar asset, in others, the way he or she was using the asset in their current project. In short, they are not definitive, but are indicative... even if it is only of the mental state of the creator at the time of donation to the DLS, or as happens in many cases, a case of translation from a native tounge with a different way of thinking than that of English.}} Rejoice in the positive, they are essentially free and cost you nothing but a bit of puzzlement. Free is good! Having them is better.&lt;br /&gt;
 &lt;br /&gt;
==The Category Classes are:==&lt;br /&gt;
 Class &amp;quot;A&amp;quot;        Motive Power&lt;br /&gt;
 Class &amp;quot;B&amp;quot;        Buildings and Structures&lt;br /&gt;
 Class &amp;quot;C&amp;quot;        Cabeese&lt;br /&gt;
 Class &amp;quot;D&amp;quot;        Defence&lt;br /&gt;
 Class &amp;quot;E&amp;quot;        Environment&lt;br /&gt;
 Class &amp;quot;F&amp;quot;        Foliage&lt;br /&gt;
 Class &amp;quot;G&amp;quot;        Ground&lt;br /&gt;
 Class &amp;quot;H&amp;quot;        Mesh&lt;br /&gt;
 Class &amp;quot;I&amp;quot;        Product&lt;br /&gt;
 Class &amp;quot;J&amp;quot;        Texture&lt;br /&gt;
 Class &amp;quot;L&amp;quot;        Light Rail &amp;amp; Monorail&lt;br /&gt;
 Class &amp;quot;M&amp;quot;        Maintenance Of Way&lt;br /&gt;
 Class &amp;quot;O&amp;quot;        Organism&lt;br /&gt;
 Class &amp;quot;P&amp;quot;        Passenger &amp;amp; Mail Cars&lt;br /&gt;
 Class &amp;quot;R&amp;quot;        Railcars &amp;amp; Multiple Unit Sets&lt;br /&gt;
 Class &amp;quot;S&amp;quot;        Splines&lt;br /&gt;
 Class &amp;quot;T&amp;quot;        Track&lt;br /&gt;
 Class &amp;quot;V&amp;quot;        Vehicles&lt;br /&gt;
 Class &amp;quot;W&amp;quot;        Wayside&lt;br /&gt;
 Class &amp;quot;X&amp;quot;        Freight Cars&lt;br /&gt;
 Class &amp;quot;Y&amp;quot;        Maps and Scenarios&lt;br /&gt;
 Class &amp;quot;Z&amp;quot;        Train Parts&lt;br /&gt;
::&amp;lt;font color=&amp;quot;blue&amp;quot; size=&amp;quot;+1&amp;quot;&amp;gt;&#039;&#039;&#039;&amp;lt;u&amp;gt;Figure 02: Base category-class prefixes&amp;lt;/u&amp;gt;&#039;&#039;&#039;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each Category Class may have a number of subcategories as listed below. Please choose the most appropriate Category Class for your item. Select the Class from the [[Content Creator Plus]] drop down menu box - only one class may be selected for an asset.&lt;br /&gt;
&lt;br /&gt;
Selecting a correct Category Class is important since Trainz will allow users to use the Category Class as a sort and selection criteria.&lt;br /&gt;
&lt;br /&gt;
{|&amp;lt;!-- careful, table --&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&amp;lt;!-- careful, table --&amp;gt;&lt;br /&gt;
===Class A: MOTIVE POWER===&lt;br /&gt;
*AA Electric Multi-current&lt;br /&gt;
*AC AC Electric&lt;br /&gt;
*AD DC Electric&lt;br /&gt;
*AE Experimental or Special&lt;br /&gt;
*AG Gas Turbine&lt;br /&gt;
*AH Diesel Hydraulic&lt;br /&gt;
*AL Diesel &amp;amp; Diesel Electric&lt;br /&gt;
*AM Mammal&lt;br /&gt;
*AS Steam Loco &amp;amp; Tender&lt;br /&gt;
*AT Steam Tank&lt;br /&gt;
&lt;br /&gt;
===Class B: BUILDINGS &amp;amp; STRUCTURES===&lt;br /&gt;
*BB Buildable (Kind Buildable)&lt;br /&gt;
*BC Commercial (scenery non-functional)&lt;br /&gt;
*BI Industrial (scenery non-functional)&lt;br /&gt;
**BIN Industry asset with product processing functionality&lt;br /&gt;
*BH Home &amp;amp; Residential (scenery non-functional)&lt;br /&gt;
*&#039;&#039;Subclass BP: Passenger Station&#039;&#039;&lt;br /&gt;
**BPF Passenger Station with passenger processing functionality&lt;br /&gt;
**BPN Passenger Station (non-functional)&lt;br /&gt;
*BR Railway (scenery non-functional)&lt;br /&gt;
*BS Special (e.g. military) (scenery non-functional)&lt;br /&gt;
*BT Traffic &amp;amp; Streetscape (scenery non-functional)&lt;br /&gt;
*BU Utility (incl. Civil buildings) (scenery non-functional)&lt;br /&gt;
&lt;br /&gt;
===Class C: CABEESE / CONSIST / EFFECTS===&lt;br /&gt;
*CB Brake van&lt;br /&gt;
*CC Caboose&lt;br /&gt;
*CLUT Clutter Effect&lt;br /&gt;
*CN Consist&lt;br /&gt;
*CS ControlSet&lt;br /&gt;
&lt;br /&gt;
===Class D: DEFENCE===&lt;br /&gt;
*DA Military motive power&lt;br /&gt;
*DE Military experimental &amp;amp; special vehicles&lt;br /&gt;
*DP Military equipment - lab &amp;amp; personnel vehicles&lt;br /&gt;
*DX Military equipment - freight&lt;br /&gt;
&lt;br /&gt;
===Class E: ENVIRONMENT===&lt;br /&gt;
*ES Sky&lt;br /&gt;
*EW Water&lt;br /&gt;
&lt;br /&gt;
===Class F: FOLIAGE===&lt;br /&gt;
*FC Cactii&lt;br /&gt;
*FF Flowers&lt;br /&gt;
*FO Orchards &amp;amp; Crops&lt;br /&gt;
*FS Shrub&lt;br /&gt;
*FT Trees&lt;br /&gt;
&lt;br /&gt;
===Class G: GROUND===&lt;br /&gt;
*GA Arid&lt;br /&gt;
*GL Lush&lt;br /&gt;
*GS Seasonal&lt;br /&gt;
&lt;br /&gt;
===Class H: MESHES===&lt;br /&gt;
*HM Mesh&lt;br /&gt;
&lt;br /&gt;
===Class I: PRODUCT===&lt;br /&gt;
*IC Container Category&lt;br /&gt;
*IP Passenger Category&lt;br /&gt;
*IB Bulkload Category&lt;br /&gt;
*IL Liquid Category&lt;br /&gt;
&lt;br /&gt;
===Class J: TEXTURES===&lt;br /&gt;
*JC Corona&lt;br /&gt;
*JI Icon&lt;br /&gt;
*JP Particle Effects Texture&lt;br /&gt;
*JO Other Texture&lt;br /&gt;
&lt;br /&gt;
===Class L: LIGHT RAIL &amp;amp; MONORAIL===&lt;br /&gt;
*LS Articulated train sets&lt;br /&gt;
*LT Trolleys, trams &amp;amp; streetcars&lt;br /&gt;
*LM Monorail vehicles&lt;br /&gt;
&lt;br /&gt;
===Class M: MAINTENANCE of WAY===&lt;br /&gt;
*MA Camp vehicles&lt;br /&gt;
*MB Ballast cars&lt;br /&gt;
*MC Cranes/lifting&lt;br /&gt;
*MD Diagnostic vehicles (e.g. dynamometer)&lt;br /&gt;
*ME Instructional vehicles&lt;br /&gt;
*MF Fire vehicles&lt;br /&gt;
*MI Inspection vehicles&lt;br /&gt;
*MT Track vehicles (e.g. tamper)&lt;br /&gt;
*MP Snow ploughs&lt;br /&gt;
*MS Section cars (e.g. fairmont)&lt;br /&gt;
*MX Freight equipment (for MoW traffic)&lt;br /&gt;
*MW Weed spray&lt;br /&gt;
&lt;br /&gt;
===Class O: ORGANISM===&lt;br /&gt;
*OA Animal Kingdom&lt;br /&gt;
*OH Human&lt;br /&gt;
**OHD Locomotive Driver&lt;br /&gt;
&lt;br /&gt;
===Class P: PASSENGER &amp;amp; MAIL CARS===&lt;br /&gt;
*PA Suburban/short haul (no W.C.)&lt;br /&gt;
*PB Baggage cars&lt;br /&gt;
*PC Coach/chair cars&lt;br /&gt;
*PD Dome cars&lt;br /&gt;
*PH Bar/cafeteria cars&lt;br /&gt;
*PL Lounge cars&lt;br /&gt;
*PM Mail cars&lt;br /&gt;
*PO Observation cars&lt;br /&gt;
*PP Power cars&lt;br /&gt;
*PR Buffet/dining/restaurant cars&lt;br /&gt;
*PS Sleeping cars&lt;br /&gt;
*PU Special cars (e.g. Gaming Cars)&lt;br /&gt;
*PV Private cars&lt;br /&gt;
*PX Composite passenger cars&lt;br /&gt;
&lt;br /&gt;
|&amp;lt;!-- careful, table --&amp;gt;&lt;br /&gt;
===Class R: RAILCARS &amp;amp; MULTIPLE UNIT SETS===&lt;br /&gt;
*RA AC electric&lt;br /&gt;
*RC DC electric&lt;br /&gt;
*RD Diesel &amp;amp; diesel electric&lt;br /&gt;
*RH Diesel hydraulic&lt;br /&gt;
*RP Petrol&lt;br /&gt;
*RS Steam&lt;br /&gt;
&lt;br /&gt;
===Class S: SPLINES===&lt;br /&gt;
*SF Fences&lt;br /&gt;
*SR Roads&lt;br /&gt;
*SP Platforms&lt;br /&gt;
*SS Structure&lt;br /&gt;
*SV Vegetation&lt;br /&gt;
&lt;br /&gt;
===Class T: TRACK===&lt;br /&gt;
*TB Bridge&lt;br /&gt;
*TR Rails&lt;br /&gt;
*TT Tunnel&lt;br /&gt;
*TF Fixed Track&lt;br /&gt;
&lt;br /&gt;
===Class V: VEHICLES===&lt;br /&gt;
*VA Air&lt;br /&gt;
*VL Land&lt;br /&gt;
*VS Sea&lt;br /&gt;
&lt;br /&gt;
===Class W: WAYSIDE===&lt;br /&gt;
*WA Signalling&lt;br /&gt;
*WS Trackside signage&lt;br /&gt;
*WX Accessories&lt;br /&gt;
 &lt;br /&gt;
===Class X: FREIGHT CARS===&lt;br /&gt;
*XA Auto transporter&lt;br /&gt;
**XAA Open sides&lt;br /&gt;
**XAB Auto box car&lt;br /&gt;
*XB Box car/covered van&lt;br /&gt;
**XBD Dangerous goods&lt;br /&gt;
**XBG General service&lt;br /&gt;
**XBI Insulated&lt;br /&gt;
*XF Flat&lt;br /&gt;
**XFA Articulated&lt;br /&gt;
**XFC Intermodal&lt;br /&gt;
**XFD Depressed center&lt;br /&gt;
**XFH Heavy duty&lt;br /&gt;
**XFM General service&lt;br /&gt;
*XG Gondola/open wagon&lt;br /&gt;
**XGB Bottom dumping&lt;br /&gt;
**XGC Combination bottom/end/side dumping&lt;br /&gt;
**XGE End dumping&lt;br /&gt;
**XGR Rotary dumping&lt;br /&gt;
**XGS Side dumping&lt;br /&gt;
**XGT Covered&lt;br /&gt;
*XH Hopper&lt;br /&gt;
**XHB Bottom dumping&lt;br /&gt;
**XHC Combination bottom/end/side dumping&lt;br /&gt;
**XHE End dumping&lt;br /&gt;
**XHR Rotary dumping&lt;br /&gt;
**XHS Side dumping&lt;br /&gt;
**XHT Covered&lt;br /&gt;
*XI Foundry&lt;br /&gt;
**XIB Bottle/torpedo cars&lt;br /&gt;
**XIT Tipper/slag cars&lt;br /&gt;
*XL Livestock&lt;br /&gt;
**XLA Single deck&lt;br /&gt;
**XLC Multiple deck and convertible&lt;br /&gt;
**XLH Horse box&lt;br /&gt;
*XR Refrigerated&lt;br /&gt;
**XRI Ice chilled&lt;br /&gt;
**XRM Mechanically chilled&lt;br /&gt;
*XS Special&lt;br /&gt;
**XSN Novelty&lt;br /&gt;
**XSU Unclassified&lt;br /&gt;
*XT Tanker&lt;br /&gt;
**XTA Domeless&lt;br /&gt;
**XTS Single dome&lt;br /&gt;
**XTM Multiple dome&lt;br /&gt;
*XV Ventilated car/louvred van&lt;br /&gt;
**XVG General service&lt;br /&gt;
**XVP Produce service&lt;br /&gt;
&lt;br /&gt;
===Class Y: MAPS &amp;amp; SCENARIOS===&lt;br /&gt;
*YM Map&lt;br /&gt;
*YS Scenario&lt;br /&gt;
*YP Profile/Session&lt;br /&gt;
*YT Tutorial&lt;br /&gt;
*YR Rule&lt;br /&gt;
*YD Driver Command&lt;br /&gt;
*YH HTML-Asset&lt;br /&gt;
*YX Region&lt;br /&gt;
&lt;br /&gt;
===Class Z: TRAIN PARTS===&lt;br /&gt;
*ZB Bogie/Truck&lt;br /&gt;
*ZE Enginespec&lt;br /&gt;
*ZH Hornsound&lt;br /&gt;
*ZI Interior&lt;br /&gt;
*ZP Pantographs&lt;br /&gt;
*ZS Enginesound&lt;br /&gt;
*ZX Displacement Map (PaintShed-Template Obsolete)&lt;br /&gt;
*ZY (Paintshed-Skin Obsolete)&lt;br /&gt;
|}&amp;lt;!-- careful, table --&amp;gt;&lt;br /&gt;
[[Category:Config Tag|category-class tag]]&lt;br /&gt;
{{ORP-bot|category-class tag}}&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Category-class&amp;diff=29706</id>
		<title>Category-class</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Category-class&amp;diff=29706"/>
		<updated>2021-06-21T20:28:22Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: /* Class C: CABEESE */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORP-top}}&lt;br /&gt;
==Category-class Tags==&lt;br /&gt;
The &#039;&#039;&#039;&amp;quot;category-class&amp;quot; tag&#039;&#039;&#039; of the [[KIND_TrainzBaseSpec|TrainzBaseSpec]] is the &#039;&#039;key searching parameter&#039;&#039; defining what or how the human content creator meant for the new asset &#039;&#039;to be used and thought about.&#039;&#039; This should not be confused with the [[Category List]], which is a related but distinct topic.&lt;br /&gt;
{{UserTip|width=50%|This is a sometimes nebulous and confusing parameter requiring a new user to develop a degree of mental agility, for example, &#039;&#039;&#039;a &#039;house&#039; asset&#039;&#039;&#039; might be classified (Coded by some asset creator) as scenery, building, industry, or even  something as wildly inappropriate as &#039;fauna&#039;.}}&lt;br /&gt;
&lt;br /&gt;
The [[KIND]] specification defines which other ({{wp|data type}}) entries&#039;&#039; are needed&#039;&#039; in that particular asset&#039;s config.txt file. It is the entry which defines the asset&#039;s  type, scope, and needs and the very important parameter that tells TRAINZ how to process and render the specific asset item correctly, error check against the standard for the category-class, and render it into {{wp|Three-dimensional space|3D graphics}} models. &lt;br /&gt;
&lt;br /&gt;
Each Trainz asset&#039;s category-class tag helps describe the &#039;intent&#039; of the Asset in the game, as opposed to the internal structure of the Asset. The Content Creators&#039; Guide for Trainz Classics said these classes represent a standardized system for referring to the various types of Locos, Rolling stock, Scenery, Spline and Industry assets.  The Category-class classification codes become important to all Trainzers when searching and/or filtering for suitable assets to make into content in a session or route (layout).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;font color=&amp;quot;blue&amp;quot; size=&amp;quot;-1&amp;quot;&amp;gt;Trainz Base Specification &lt;br /&gt;
:(all config.txt files can contain all these entries){{TBS}}&lt;br /&gt;
::&#039;&#039;&#039;&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;&amp;lt;u&amp;gt;Figure: 1 TrainzBaseSpec for quick reference&amp;lt;/u&amp;gt;&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Category-class code notes==&lt;br /&gt;
New users should be aware that these codes listed below are not the direct ContentManager.exe category sort by classifications as a simple comparison of lists will reveal, but they do affect what is displayed within such a sort filter selection. &lt;br /&gt;
:For example: Set a search filter for &#039;&#039;&#039;&#039;&#039;&#039;Location&amp;gt;Local + Category&amp;gt;Flora&#039;&#039;&#039;&#039;&#039;&#039;.&lt;br /&gt;
: In the base installed content of TRS2006-SP0 this search will yield diverse assets such as the set of  {&#039;&#039;&#039;Flora&#039;&#039;&#039; types: SOME few trees, Betonbridge (1,2,&amp;amp;3 tracks), crop splines, sidewalks, road types} &lt;br /&gt;
:but the sort will also list a much larger type group, the set of {Scenery: retaining wall splines (Arkaden...), LOADS of trees and Shrubs including Laubbaum with birds (and sound), grasses (textures?), Logs} and so forth. &lt;br /&gt;
In that search you will also find electrified railroad centenary parts and the occasional animal. The result of such a search will be no better in new Trainz versions, which means the new Trainzer needs to cultivate a certain mental agility when searching for suitable content. No one has the man-power, deep pockets, nor copyright authority to systematically fix such foibles. You as a user, can clone such items and change the classification to something more sensible to yourself. That however, is not an asset you can upload to the Download Station without a copyright clearance from the original asset creator. The Trainz community is severe in policing copyrights violations! &lt;br /&gt;
{{TrainzTip|These codes when applied by the content creator were in many cases cut and pasted into a new similar asset, in others, the way he or she was using the asset in their current project. In short, they are not definitive, but are indicative... even if it is only of the mental state of the creator at the time of donation to the DLS, or as happens in many cases, a case of translation from a native tounge with a different way of thinking than that of English.}} Rejoice in the positive, they are essentially free and cost you nothing but a bit of puzzlement. Free is good! Having them is better.&lt;br /&gt;
 &lt;br /&gt;
==The Category Classes are:==&lt;br /&gt;
 Class &amp;quot;A&amp;quot;        Motive Power&lt;br /&gt;
 Class &amp;quot;B&amp;quot;        Buildings and Structures&lt;br /&gt;
 Class &amp;quot;C&amp;quot;        Cabeese&lt;br /&gt;
 Class &amp;quot;D&amp;quot;        Defence&lt;br /&gt;
 Class &amp;quot;E&amp;quot;        Environment&lt;br /&gt;
 Class &amp;quot;F&amp;quot;        Foliage&lt;br /&gt;
 Class &amp;quot;G&amp;quot;        Ground&lt;br /&gt;
 Class &amp;quot;H&amp;quot;        Mesh&lt;br /&gt;
 Class &amp;quot;I&amp;quot;        Product&lt;br /&gt;
 Class &amp;quot;J&amp;quot;        Texture&lt;br /&gt;
 Class &amp;quot;L&amp;quot;        Light Rail &amp;amp; Monorail&lt;br /&gt;
 Class &amp;quot;M&amp;quot;        Maintenance Of Way&lt;br /&gt;
 Class &amp;quot;O&amp;quot;        Organism&lt;br /&gt;
 Class &amp;quot;P&amp;quot;        Passenger &amp;amp; Mail Cars&lt;br /&gt;
 Class &amp;quot;R&amp;quot;        Railcars &amp;amp; Multiple Unit Sets&lt;br /&gt;
 Class &amp;quot;S&amp;quot;        Splines&lt;br /&gt;
 Class &amp;quot;T&amp;quot;        Track&lt;br /&gt;
 Class &amp;quot;V&amp;quot;        Vehicles&lt;br /&gt;
 Class &amp;quot;W&amp;quot;        Wayside&lt;br /&gt;
 Class &amp;quot;X&amp;quot;        Freight Cars&lt;br /&gt;
 Class &amp;quot;Y&amp;quot;        Maps and Scenarios&lt;br /&gt;
 Class &amp;quot;Z&amp;quot;        Train Parts&lt;br /&gt;
::&amp;lt;font color=&amp;quot;blue&amp;quot; size=&amp;quot;+1&amp;quot;&amp;gt;&#039;&#039;&#039;&amp;lt;u&amp;gt;Figure 02: Base category-class prefixes&amp;lt;/u&amp;gt;&#039;&#039;&#039;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each Category Class may have a number of subcategories as listed below. Please choose the most appropriate Category Class for your item. Select the Class from the [[Content Creator Plus]] drop down menu box - only one class may be selected for an asset.&lt;br /&gt;
&lt;br /&gt;
Selecting a correct Category Class is important since Trainz will allow users to use the Category Class as a sort and selection criteria.&lt;br /&gt;
&lt;br /&gt;
{|&amp;lt;!-- careful, table --&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&amp;lt;!-- careful, table --&amp;gt;&lt;br /&gt;
===Class A: MOTIVE POWER===&lt;br /&gt;
*AA Electric Multi-current&lt;br /&gt;
*AC AC Electric&lt;br /&gt;
*AD DC Electric&lt;br /&gt;
*AE Experimental or Special&lt;br /&gt;
*AG Gas Turbine&lt;br /&gt;
*AH Diesel Hydraulic&lt;br /&gt;
*AL Diesel &amp;amp; Diesel Electric&lt;br /&gt;
*AM Mammal&lt;br /&gt;
*AS Steam Loco &amp;amp; Tender&lt;br /&gt;
*AT Steam Tank&lt;br /&gt;
&lt;br /&gt;
===Class B: BUILDINGS &amp;amp; STRUCTURES===&lt;br /&gt;
*BB Buildable (Kind Buildable)&lt;br /&gt;
*BC Commercial (scenery non-functional)&lt;br /&gt;
*BI Industrial (scenery non-functional)&lt;br /&gt;
**BIN Industry asset with product processing functionality&lt;br /&gt;
*BH Home &amp;amp; Residential (scenery non-functional)&lt;br /&gt;
*&#039;&#039;Subclass BP: Passenger Station&#039;&#039;&lt;br /&gt;
**BPF Passenger Station with passenger processing functionality&lt;br /&gt;
**BPN Passenger Station (non-functional)&lt;br /&gt;
*BR Railway (scenery non-functional)&lt;br /&gt;
*BS Special (e.g. military) (scenery non-functional)&lt;br /&gt;
*BT Traffic &amp;amp; Streetscape (scenery non-functional)&lt;br /&gt;
*BU Utility (incl. Civil buildings) (scenery non-functional)&lt;br /&gt;
&lt;br /&gt;
===Class C: CABEESE===&lt;br /&gt;
*CB Brake van&lt;br /&gt;
*CC Caboose&lt;br /&gt;
*CN Consist&lt;br /&gt;
&lt;br /&gt;
===Class D: DEFENCE===&lt;br /&gt;
*DA Military motive power&lt;br /&gt;
*DE Military experimental &amp;amp; special vehicles&lt;br /&gt;
*DP Military equipment - lab &amp;amp; personnel vehicles&lt;br /&gt;
*DX Military equipment - freight&lt;br /&gt;
&lt;br /&gt;
===Class E: ENVIRONMENT===&lt;br /&gt;
*ES Sky&lt;br /&gt;
*EW Water&lt;br /&gt;
&lt;br /&gt;
===Class F: FOLIAGE===&lt;br /&gt;
*FC Cactii&lt;br /&gt;
*FF Flowers&lt;br /&gt;
*FO Orchards &amp;amp; Crops&lt;br /&gt;
*FS Shrub&lt;br /&gt;
*FT Trees&lt;br /&gt;
&lt;br /&gt;
===Class G: GROUND===&lt;br /&gt;
*GA Arid&lt;br /&gt;
*GL Lush&lt;br /&gt;
*GS Seasonal&lt;br /&gt;
&lt;br /&gt;
===Class H: MESHES===&lt;br /&gt;
*HM Mesh&lt;br /&gt;
&lt;br /&gt;
===Class I: PRODUCT===&lt;br /&gt;
*IC Container Category&lt;br /&gt;
*IP Passenger Category&lt;br /&gt;
*IB Bulkload Category&lt;br /&gt;
*IL Liquid Category&lt;br /&gt;
&lt;br /&gt;
===Class J: TEXTURES===&lt;br /&gt;
*JC Corona&lt;br /&gt;
*JI Icon&lt;br /&gt;
*JP Particle Effects Texture&lt;br /&gt;
*JO Other Texture&lt;br /&gt;
&lt;br /&gt;
===Class L: LIGHT RAIL &amp;amp; MONORAIL===&lt;br /&gt;
*LS Articulated train sets&lt;br /&gt;
*LT Trolleys, trams &amp;amp; streetcars&lt;br /&gt;
*LM Monorail vehicles&lt;br /&gt;
&lt;br /&gt;
===Class M: MAINTENANCE of WAY===&lt;br /&gt;
*MA Camp vehicles&lt;br /&gt;
*MB Ballast cars&lt;br /&gt;
*MC Cranes/lifting&lt;br /&gt;
*MD Diagnostic vehicles (e.g. dynamometer)&lt;br /&gt;
*ME Instructional vehicles&lt;br /&gt;
*MF Fire vehicles&lt;br /&gt;
*MI Inspection vehicles&lt;br /&gt;
*MT Track vehicles (e.g. tamper)&lt;br /&gt;
*MP Snow ploughs&lt;br /&gt;
*MS Section cars (e.g. fairmont)&lt;br /&gt;
*MX Freight equipment (for MoW traffic)&lt;br /&gt;
*MW Weed spray&lt;br /&gt;
&lt;br /&gt;
===Class O: ORGANISM===&lt;br /&gt;
*OA Animal Kingdom&lt;br /&gt;
*OH Human&lt;br /&gt;
**OHD Locomotive Driver&lt;br /&gt;
&lt;br /&gt;
===Class P: PASSENGER &amp;amp; MAIL CARS===&lt;br /&gt;
*PA Suburban/short haul (no W.C.)&lt;br /&gt;
*PB Baggage cars&lt;br /&gt;
*PC Coach/chair cars&lt;br /&gt;
*PD Dome cars&lt;br /&gt;
*PH Bar/cafeteria cars&lt;br /&gt;
*PL Lounge cars&lt;br /&gt;
*PM Mail cars&lt;br /&gt;
*PO Observation cars&lt;br /&gt;
*PP Power cars&lt;br /&gt;
*PR Buffet/dining/restaurant cars&lt;br /&gt;
*PS Sleeping cars&lt;br /&gt;
*PU Special cars (e.g. Gaming Cars)&lt;br /&gt;
*PV Private cars&lt;br /&gt;
*PX Composite passenger cars&lt;br /&gt;
&lt;br /&gt;
|&amp;lt;!-- careful, table --&amp;gt;&lt;br /&gt;
===Class R: RAILCARS &amp;amp; MULTIPLE UNIT SETS===&lt;br /&gt;
*RA AC electric&lt;br /&gt;
*RC DC electric&lt;br /&gt;
*RD Diesel &amp;amp; diesel electric&lt;br /&gt;
*RH Diesel hydraulic&lt;br /&gt;
*RP Petrol&lt;br /&gt;
*RS Steam&lt;br /&gt;
&lt;br /&gt;
===Class S: SPLINES===&lt;br /&gt;
*SF Fences&lt;br /&gt;
*SR Roads&lt;br /&gt;
*SP Platforms&lt;br /&gt;
*SS Structure&lt;br /&gt;
*SV Vegetation&lt;br /&gt;
&lt;br /&gt;
===Class T: TRACK===&lt;br /&gt;
*TB Bridge&lt;br /&gt;
*TR Rails&lt;br /&gt;
*TT Tunnel&lt;br /&gt;
*TF Fixed Track&lt;br /&gt;
&lt;br /&gt;
===Class V: VEHICLES===&lt;br /&gt;
*VA Air&lt;br /&gt;
*VL Land&lt;br /&gt;
*VS Sea&lt;br /&gt;
&lt;br /&gt;
===Class W: WAYSIDE===&lt;br /&gt;
*WA Signalling&lt;br /&gt;
*WS Trackside signage&lt;br /&gt;
*WX Accessories&lt;br /&gt;
 &lt;br /&gt;
===Class X: FREIGHT CARS===&lt;br /&gt;
*XA Auto transporter&lt;br /&gt;
**XAA Open sides&lt;br /&gt;
**XAB Auto box car&lt;br /&gt;
*XB Box car/covered van&lt;br /&gt;
**XBD Dangerous goods&lt;br /&gt;
**XBG General service&lt;br /&gt;
**XBI Insulated&lt;br /&gt;
*XF Flat&lt;br /&gt;
**XFA Articulated&lt;br /&gt;
**XFC Intermodal&lt;br /&gt;
**XFD Depressed center&lt;br /&gt;
**XFH Heavy duty&lt;br /&gt;
**XFM General service&lt;br /&gt;
*XG Gondola/open wagon&lt;br /&gt;
**XGB Bottom dumping&lt;br /&gt;
**XGC Combination bottom/end/side dumping&lt;br /&gt;
**XGE End dumping&lt;br /&gt;
**XGR Rotary dumping&lt;br /&gt;
**XGS Side dumping&lt;br /&gt;
**XGT Covered&lt;br /&gt;
*XH Hopper&lt;br /&gt;
**XHB Bottom dumping&lt;br /&gt;
**XHC Combination bottom/end/side dumping&lt;br /&gt;
**XHE End dumping&lt;br /&gt;
**XHR Rotary dumping&lt;br /&gt;
**XHS Side dumping&lt;br /&gt;
**XHT Covered&lt;br /&gt;
*XI Foundry&lt;br /&gt;
**XIB Bottle/torpedo cars&lt;br /&gt;
**XIT Tipper/slag cars&lt;br /&gt;
*XL Livestock&lt;br /&gt;
**XLA Single deck&lt;br /&gt;
**XLC Multiple deck and convertible&lt;br /&gt;
**XLH Horse box&lt;br /&gt;
*XR Refrigerated&lt;br /&gt;
**XRI Ice chilled&lt;br /&gt;
**XRM Mechanically chilled&lt;br /&gt;
*XS Special&lt;br /&gt;
**XSN Novelty&lt;br /&gt;
**XSU Unclassified&lt;br /&gt;
*XT Tanker&lt;br /&gt;
**XTA Domeless&lt;br /&gt;
**XTS Single dome&lt;br /&gt;
**XTM Multiple dome&lt;br /&gt;
*XV Ventilated car/louvred van&lt;br /&gt;
**XVG General service&lt;br /&gt;
**XVP Produce service&lt;br /&gt;
&lt;br /&gt;
===Class Y: MAPS &amp;amp; SCENARIOS===&lt;br /&gt;
*YM Map&lt;br /&gt;
*YS Scenario&lt;br /&gt;
*YP Profile/Session&lt;br /&gt;
*YT Tutorial&lt;br /&gt;
*YR Rule&lt;br /&gt;
*YD Driver Command&lt;br /&gt;
*YH HTML-Asset&lt;br /&gt;
*YX Region&lt;br /&gt;
&lt;br /&gt;
===Class Z: TRAIN PARTS===&lt;br /&gt;
*ZB Bogie/Truck&lt;br /&gt;
*ZE Enginespec&lt;br /&gt;
*ZH Hornsound&lt;br /&gt;
*ZI Interior&lt;br /&gt;
*ZP Pantographs&lt;br /&gt;
*ZS Enginesound&lt;br /&gt;
*ZX Displacement Map (PaintShed-Template Obsolete)&lt;br /&gt;
*ZY (Paintshed-Skin Obsolete)&lt;br /&gt;
|}&amp;lt;!-- careful, table --&amp;gt;&lt;br /&gt;
[[Category:Config Tag|category-class tag]]&lt;br /&gt;
{{ORP-bot|category-class tag}}&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=HowTo/Build_a_cab_interior&amp;diff=29704</id>
		<title>HowTo/Build a cab interior</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=HowTo/Build_a_cab_interior&amp;diff=29704"/>
		<updated>2021-06-17T04:54:00Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Trainz uses an [[KIND_Interior|interior]] object to represent a locomotive cab, or view from another vehicle, e.g. a passenger coach, brake van or caboose. Interiors can also be attached to some non-train assets. For this howto, I am going to assume that we are creating a traincar interior, and focus primarily on a cab interior for a diesel or electric locomotive.&lt;br /&gt;
&lt;br /&gt;
=Basic structure=&lt;br /&gt;
&lt;br /&gt;
The basic structure of a cab is quite similar to a number of different assets. You will have a main mesh with a number of attached sub-meshes, which are arranged using a [[%22mesh-table%22_container_(interior_version)|mesh-table]].&lt;br /&gt;
&lt;br /&gt;
The main cab mesh typically consists of the interior walls, roof and floor of the cab, the control desk or stand, all furniture or other static objects visible inside the cab, and also all parts of the locomotive exterior that are visible from inside the cab - e.g. the top of any projecting nose below the cab windows. Remember to consider the sightlines out of rear windows too for visible bodywork panels - the user can move around the cab and rotate the camera to any angle. Users are not restricted to looking forward out of the front windows only.&lt;br /&gt;
&lt;br /&gt;
=Artwork considerations=&lt;br /&gt;
&lt;br /&gt;
There are some differences in style between the construction of an interior object and a typical trainz object.&lt;br /&gt;
&lt;br /&gt;
Except in very specific circumstances, there will not be more than one interior object in existence at any time, and that interior is always viewed from very close range - the user is inside it. Because of this, interiors are typically modelled with a high polygon count and with high resolution textures, to give an impressive visual feel. LOD is not used, as the user never gets far enough away from the interior for LOD techniques to have worthwhile benefit. However, LOD techniques may be ideal in a case of a passenger wagon with high polygon chair models. &lt;br /&gt;
&lt;br /&gt;
Trainz lights interior objects differently to map objects like buildings and other scenery - the main illumination is ambient, not directional. (A steam loco does have a directional light coming from the firebox, but a diesel or electric cab typically has no directional light inside, and relies entirely on ambient illumination).&lt;br /&gt;
&lt;br /&gt;
With ambient illumination, effects such as normal and specular mapping do not have much (if any) effect. Because of this, more effort needs to be put into the diffuse texture for a cab interior than would normally be applied to Trainz objects. Drawing or baking shadows and other effects into the diffuse textures is required to produce a nice looking cab interior.&lt;br /&gt;
&lt;br /&gt;
An example cab would be the [[File:PB_interior.rar]]&lt;br /&gt;
&lt;br /&gt;
=A basic config file=&lt;br /&gt;
&lt;br /&gt;
The minimal required config for an interior to show in-game is:&lt;br /&gt;
&lt;br /&gt;
 kind                                    interior&lt;br /&gt;
 kuid                                    &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&amp;lt;kuid2:YOUR:KUID:HERE&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
 trainz-build                            2.9&lt;br /&gt;
 username                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Your interior name here&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
 category-class                          ZI&lt;br /&gt;
 &lt;br /&gt;
 mesh-table&lt;br /&gt;
 {&lt;br /&gt;
   default&lt;br /&gt;
   {&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;your_interior_mesh_name.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Note: There are also other base tags that should be added that are common to all asset types - e.g. the download station will require a valid thumbnails container before the asset can be uploaded. See the documentation for [[KIND TrainzBaseSpec]] for details of tags which apply to all trainz assets. Depending on which Trainz version you have and which trainz-build number you have specified, some of these may be required - content manager will tell you what is required, listing missing tags as errors.&lt;br /&gt;
&lt;br /&gt;
==camera positions==&lt;br /&gt;
&lt;br /&gt;
If we load a cab up with that config file, we will note that the view is not particularly appealing. Chances are we&#039;re right down near the floor. To fix this, we need to define some default positions for camera views. This is done with the [[%22cameralist%22_Container|cameralist container]] and the [[KIND_Interior#cameradefault|cameradefault]] tag.&lt;br /&gt;
Add the following to your config.txt file:&lt;br /&gt;
&lt;br /&gt;
 cameralist&lt;br /&gt;
 {&lt;br /&gt;
   camera0                               0,0,2,0,0&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 cameradefault                           0&lt;br /&gt;
&lt;br /&gt;
The cameralist container can contain any number of cameras, but they must be numbered sequentially and start at zero.&lt;br /&gt;
&lt;br /&gt;
The five numbers are the X, Y and Z coordinates of the camera in metres relative to the 0,0,0 point of the interior mesh, and the Yaw and Pitch in radians. Luckily you don&#039;t have to work these values out from scratch - add the line &amp;quot;-freeintcam&amp;quot; to your trainzoptions.txt file, and you can move the camera about in the cab with the mouse and keyboard, and the precise position will be displayed in the bottom right corner.&lt;br /&gt;
&lt;br /&gt;
When you have found a position you like, write the numbers down. When you&#039;ve got a good selection of positions recorded, add them to the cameralist container.&lt;br /&gt;
&lt;br /&gt;
You may wish to return to this and tweak the values later once all the controls are in place - but it&#039;s handy to have a good starting position for the camera while testing.&lt;br /&gt;
&lt;br /&gt;
=Cab controls=&lt;br /&gt;
&lt;br /&gt;
A locomotive cab interior needs working cab controls. What fun would sitting in the drivers seat be without being able to pull on the levers, change the switches, and watch the gauges and dials move?&lt;br /&gt;
&lt;br /&gt;
The moving part of each lever, switch, gauge or dial is created as a separate mesh, which is then attached to the cab with an attachment point. (The static part, e.g. guide rails for levers, should be part of the cab mesh itself).&lt;br /&gt;
&lt;br /&gt;
==Lever==&lt;br /&gt;
&lt;br /&gt;
The lever is the basic input device in a cab. It is based on rotational movement, and any object that requires rotational movement (e.g. a wheel or ring) can be implemented as a lever.&lt;br /&gt;
&lt;br /&gt;
If you actually want linear movement, you can still use a lever - just move the attachment point a long way away - e.g. 10 or 20 metres away from the control. The resulting small arc will not be noticable over the length of movement. As an example, sliding windows in Trainz cabs have been implemented as levers &amp;quot;attached&amp;quot; something like 10 or 20 metres out to the side of the vehicle for a long time. (The exception to this is a horn pull rope - trainz provides a control specifically for this purpose).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will need to create the lever in your modelling program aligned correctly - the rotation needs to be around the Z axis, and main part of the object will point along the Y axis.&lt;br /&gt;
&lt;br /&gt;
When adding the attachment point to the main mesh, align it so the Z axis is the axis of rotation. It is common to point the Y axis at the default position - e.g. levers in the &#039;off&#039; or &#039;neutral&#039; position, and needles pointing to zero. This is not strictly required, as the range of movement can be adjusted at both ends, but it provides a handy reference when creating the config file.&lt;br /&gt;
&lt;br /&gt;
[[File:BasicLeverSetup.png|350px|thumb|An example of a lever being used as a signboard cover.]]&lt;br /&gt;
&lt;br /&gt;
It is worth noting that you can reuse a mesh for multiple attachments. This is particularly useful for switches, as identical appearance switches are often used repeatedly in a cab for different purposes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Throttle Lever===&lt;br /&gt;
&lt;br /&gt;
A good example of a standard lever in use is a locomotive throttle control. A typical US diesel throttle has 9 notched positions (from 0 to 8 inclusive).&lt;br /&gt;
&lt;br /&gt;
As noted above, the lever is created in the modelling package so it points along the Y axis and the axis of rotation is along the Z axis. The attachment point is added to the cab interior mesh at the correct position, and rotated so the Z axis is aligned with the axis of rotation, and the Y axis points to the default position.&lt;br /&gt;
&lt;br /&gt;
Now we need to add an entry to the config file to add our throttle lever.&lt;br /&gt;
&lt;br /&gt;
Into the mesh table, add an entry like this:&lt;br /&gt;
&lt;br /&gt;
   throttle_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;throttle_lever.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.throttle_lever&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,8&lt;br /&gt;
     angles                              0,1.57&lt;br /&gt;
     notches                             0,0.125,0.25,0.375,0.5,0.625,0.75,0.875,1&lt;br /&gt;
     notchheight                         1,2,2,2,2,2,2,2,1&lt;br /&gt;
     radius                              0.35&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
... remember to set your attachment point and mesh name correctly.&lt;br /&gt;
&lt;br /&gt;
The &#039;angles&#039; line defines how far the control rotates. It is in radians - there are 2 x Pi (6.28) radians in a complete circle. My default of 1.57 will give you about 90 degrees of rotation, in the positive direction. Adjust this number to get the control to rotate the correct amount. You should be able to work out the number you need in your modelling program by using the rotate tool on the attachment point, and recording the amount of rotation required to move to the intended maximum location. It should not require significant trial and error.&lt;br /&gt;
&lt;br /&gt;
The &#039;radius&#039; line defines the position of the notch position overlay and the text label. It is in metres. If the overlay is too close in, increase this number. If it is too far out, decrease it.&lt;br /&gt;
&lt;br /&gt;
If the lever is the wrong way round (notch 8 is at the wrong end), swap the numbers in the &#039;angles&#039; tag over, so the higher one is first.&lt;br /&gt;
&lt;br /&gt;
If the lever moves the wrong way when you drag it with the mouse (i.e. it goes left in response to a right drag), add the line:&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
This will invert the mouse movement.&lt;br /&gt;
&lt;br /&gt;
The fact we called this lever &amp;quot;throttle_lever&amp;quot; means it will be used to control the throttle by the default cab script.&lt;br /&gt;
&lt;br /&gt;
So what happens if we wanted a different number of notches? Below is an example of a throttle which has 22 notches. The second value in the &#039;limits&#039; tag has been edited to return up to notch 22, and more entries have been added to the &#039;notches&#039; and &#039;notchheight&#039; tags:&lt;br /&gt;
&lt;br /&gt;
   throttle_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;throttle_lever.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.throttle_lever&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,22&lt;br /&gt;
     angles                              0,0.94&lt;br /&gt;
     notches                             0,0.045,0.091,0.136,0.182,0.227,0.273,0.318,0.364,0.409,0.455,0.5,0.545,0.591,0.636,0.682,0.727,0.773,0.818,0.864,0.909,0.955,1&lt;br /&gt;
     notchheight                         1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1&lt;br /&gt;
     radius                              0.35&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Reverser Lever===&lt;br /&gt;
&lt;br /&gt;
The reverser lever is created in a similar manner to throttle lever. The mesh table entry for this will look like:&lt;br /&gt;
&lt;br /&gt;
   reverser_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;reverser_lever.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.reverser_lever&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,2&lt;br /&gt;
     angles                              -0.79,0.79&lt;br /&gt;
     notches                             0,0.5,1&lt;br /&gt;
     notchheight                         1,1,1&lt;br /&gt;
     radius                              0.25&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
In this case, because the &#039;angles&#039; entry has a range both positive and negative, the lever can move in both directions relative to the attachment point. The game will set the default position to neutral (1), so if you&#039;ve lined up your attachment point at one end, don&#039;t worry - you can use angles which range from zero if you need to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Train Air Brake Lever===&lt;br /&gt;
&lt;br /&gt;
There are two types of train air brake lever. A given locomotive only has one type - the brakes are either require manual lapping or are self-lapping. Use the appropriate name and configuration for the loco you are modelling.&lt;br /&gt;
&lt;br /&gt;
====Manual Lapped Brakes====&lt;br /&gt;
&lt;br /&gt;
The manual train brake lever has five positions numbered from zero to four, each one representing a different function. Those functions are Release, Lap, Application, Emergency and Handle Off respectively.&lt;br /&gt;
&lt;br /&gt;
A lever for a manual lap train air brake is defined as follows:&lt;br /&gt;
&lt;br /&gt;
   trainbrakelap_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;train_brake_lap_lever.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.train_brake_lap_lever&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,4&lt;br /&gt;
     angles                              0,0.94&lt;br /&gt;
     notches                             0,0.25,0.5,0.75,1&lt;br /&gt;
     notchheight                         1,1,1,1,1&lt;br /&gt;
     radius                              0.25&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
In this case, the attachment for the lever has been created in the &#039;release&#039; position. If it had been created in the &#039;handle off&#039; position, the angle tag would have been more like:&lt;br /&gt;
&lt;br /&gt;
     angles                             -0.94,0&lt;br /&gt;
&lt;br /&gt;
====Self Lapping Brakes====&lt;br /&gt;
&lt;br /&gt;
A self lapping trainbrake lever has a number of primary notches similar to the manual lap train brake lever. However, instead of a &#039;lap&#039; and &#039;apply&#039; position, it has a grade of application between the &#039;initial&#039; and &#039;full application&#039; positions. An example of a self-lapping brake handle is this one:&lt;br /&gt;
&lt;br /&gt;
   trainbrake_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;train_brake_lever.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.train_brake_lever&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,4&lt;br /&gt;
     angles                              0,0.94&lt;br /&gt;
     notches                             0,0.25,0.27,0.29,0.31,0.33,0.35,0.37,0.39,0.41,0.43,0.45,0.47,0.49,0.5,0.75,1&lt;br /&gt;
     notchheight                         1,1,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1&lt;br /&gt;
     radius                              0.25&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
In this case, there are 14 possible levels of brake application - initial at 0.25, 12 intermediate levels, and full application at 0.5. There is no restriction on the number of intermediate levels - if you are modelling a prototype brake handle with a specific number, you may create precisely that number of notches and arrange them between 0.25 and 0.5 as required.&lt;br /&gt;
&lt;br /&gt;
===Combined throttle brake lever===&lt;br /&gt;
&lt;br /&gt;
There is also another control option - a combined throttle brake lever. This type of control is often found on multiple unit trains. This control is split into two halves. The first half of the movement is an inverted throttle - i.e. max power at zero, no power at 0.5. The second half is an auto lapped train brake application, with 0.5 as release, and 1.0 as emergency.  An example of how to configure a combined throttle and brake lever is below:&lt;br /&gt;
&lt;br /&gt;
   throttle_brake_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;throttle_brake_handle.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.throttle_brake_handle&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,16&lt;br /&gt;
     angles                              0.94,-0.94&lt;br /&gt;
     notches                             0,0.0625,0.125,0.1875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.8125,0.75,0.875,0.9375,1&lt;br /&gt;
     notchheight                         1,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,1&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
     radius                              0.12&lt;br /&gt;
     invert                              1&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
Unfortunately, trains that use this type of control generally use blended and/or EP brakes, and this control uses the standard Trainz air brake, which operates in a distinctly different manner, and as a result, can feel very wrong for this control type. (See the section on scripting controls for how a better combined brake and throttle lever may be implemented).&lt;br /&gt;
&lt;br /&gt;
==Pull lever==&lt;br /&gt;
&lt;br /&gt;
This is a sprung lever. You pull on this lever to activate it, and when you let it go, it returns to the original position. This kind of action is commonly associated with a locomotive horn, and this is what I am using as an example:&lt;br /&gt;
&lt;br /&gt;
   horn&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;pulllever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;horn.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.horn&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     angles                              0,-0.55&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     radius                              -0.02&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0,0&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
==Switch==&lt;br /&gt;
&lt;br /&gt;
A switch is a lever that does not require the user to &#039;drag&#039; it with the mouse - it operates on a click only. This is used for smaller controls that are &#039;on&#039; or &#039;off&#039;, and do not have intermediate positions. Parameters are much like they are for a &#039;lever&#039;, only a switch should only have two notches - on and off.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, some things you&#039;d normally associate with being a &#039;switch&#039; (e.g. the headlight switch control) require mulitple positions, and will need to remain as a &#039;lever&#039; in order to allow the player to set the correct position for the control.&lt;br /&gt;
&lt;br /&gt;
An example of a switch would be:&lt;br /&gt;
&lt;br /&gt;
   switch1&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;switch&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;switch.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.switch1&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     angles                              1.4,0&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0,0&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
As &#039;switch&#039; was introduced in TS2009 SP2, interiors that use kind &#039;switch&#039; controls should be marked trainz-build 3.1 or later in the config.txt.&lt;br /&gt;
&lt;br /&gt;
==button==&lt;br /&gt;
&lt;br /&gt;
A button is a momentary contact press-and-hold button. This is a brand new control added for TS12 patch 2, released end of june 2011. Content using this feature should have trainz-build 3.6 or later in the config.txt.&lt;br /&gt;
&lt;br /&gt;
Finally this brings Trainz the &amp;quot;click to press&amp;quot;, &amp;quot;hold to hold pressed&amp;quot;, &amp;quot;let go to release&amp;quot; style momentary pushbutton. &lt;br /&gt;
&lt;br /&gt;
   button1&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;button&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;switch.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.switch1&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     angles                              0,0.1&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0,0&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Pull rope==&lt;br /&gt;
&lt;br /&gt;
This is a linear pull rope control. Unlike the rotating controls discussed previously, this control type moves the mesh linearly along the Z axis of the attachment. It behaves as you would expect from a suspended rope - click and drag to pull, let go to release. It will spring back to it&#039;s initial position in the same manner as kind &#039;pulllever&#039;.&lt;br /&gt;
&lt;br /&gt;
[[File:Pullropetype.png|800px]]&lt;br /&gt;
&lt;br /&gt;
   horn&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;pullrope&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;horn_rope.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.horn&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     angles                              0.1,0&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0,0&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
==needle==&lt;br /&gt;
&lt;br /&gt;
A needle is the standard Trainz output device. Like the lever, it is based on rotational movement, and any gauge, dial, or other output device based on rotational movement can be implemented. Any static part of the gauge should be modelled as part of the cab, and only the moving part as part of the needle. Like the lever, the rotation will be around the Z axis of the needle, and it is common practice to point the point of the needle along the Y axis. Cabs often have a number of similar gauges, and re-using the same needle repeatedly in each gauge is a lot easier if this setup is done consistently.&lt;br /&gt;
&lt;br /&gt;
As an example of a needle, here is a basic speedometer:&lt;br /&gt;
&lt;br /&gt;
   speedo_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;speedo_needle.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.speedo_needle&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,67.056&lt;br /&gt;
     angles                              0,4.712&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
The default cab script knows to move the &amp;quot;speedo_needle&amp;quot; object as the train speed changes, so simply by naming this control &amp;quot;speedo_needle&amp;quot;, it has become a speedometer.&lt;br /&gt;
&lt;br /&gt;
For a speedo, the &#039;limits&#039; values will be the minimum and maximum reportable speed in m/s.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Creating other rotational gauges is similar - refer to the [[%22mesh-table%22_container_(interior_version)|mesh-table (interior version)]] documentation to see all the different values that Trainz can show by default.&lt;br /&gt;
&lt;br /&gt;
==light==&lt;br /&gt;
&lt;br /&gt;
Another common type of control is a light. This is created simply as a textured plane, which is either hidden or shown to represent light off or light on. It is attached as any other standard mesh attachment would be - there is no rotation to worry about here.&lt;br /&gt;
&lt;br /&gt;
   wheelslip_light&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;light&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;wheelslip_light.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.wheelslip_light&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
This light will be used to show wheelslip in a default cab. &lt;br /&gt;
&lt;br /&gt;
==animated-lever==&lt;br /&gt;
&lt;br /&gt;
If you want more complex movement than simple rotation, you have the option of animating the lever and using kind &#039;animated-lever&#039;. This will use an animation you create in your modelling program to move the control about. An example of this is visible in the MN ACMU cab. (I&#039;ve reduced the number of notches here for readability - the real one has 32, not 16).&lt;br /&gt;
&lt;br /&gt;
   throttle_lever&lt;br /&gt;
   {&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;throttlehandle.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     anim                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;throttlehandle.kin&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.throttlelever&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,16&lt;br /&gt;
     notches                             0,0.0625,0.125,0.1875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.8125,0.75,0.875,0.9375,1&lt;br /&gt;
     notchheight                         1,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,1&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
     kind                                &amp;quot;animated-lever&amp;quot;&lt;br /&gt;
     test-collisions                     0&lt;br /&gt;
     mousespeed                          1&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
Where the standard lever is rotated between it&#039;s angles to move from notch to notch, the animated-lever has it&#039;s animation played to the corresponding frame.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===collision-proxy===&lt;br /&gt;
&lt;br /&gt;
Animated levers can be hard to grab hold of compared to normal levers. To get around this, an invisible mesh is used to show the game the range of movement the control has, and to allow the user to grab the lever more easily. This example again comes from the MN ACMU cab:&lt;br /&gt;
&lt;br /&gt;
   throttle-collision-box&lt;br /&gt;
   {&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;throttlehandleselection.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att-parent                          &amp;quot;throttle_lever&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.selection_box&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     kind                                &amp;quot;collision-proxy&amp;quot;&lt;br /&gt;
     opacity                             0&lt;br /&gt;
     collision-parent                    &amp;quot;throttle_lever&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
==animated-dial==&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve been paying attention to levers, needles and animated levers, I think you can guess where we are going with this one. This is an animated needle. Instead of rotating between the angles specified, it plays it&#039;s animation to the relevant frame to show the value. Use this when what you want to achieve can&#039;t be done with simple rotational movement.&lt;br /&gt;
&lt;br /&gt;
(Example usage for this control to follow).&lt;br /&gt;
&lt;br /&gt;
==digital-dial==&lt;br /&gt;
&lt;br /&gt;
Some locomotives use a digital readout rather than analogue dials.&lt;br /&gt;
&lt;br /&gt;
Trainz has two control kinds to support digital displays - one for speed units, and one for pressure units. Instead of angles of movement, these both have some font specific options to configure how the digits appear. In both cases, the Y axis of the attachment point should be pointing upward to signify the up direction of the font. &lt;br /&gt;
&lt;br /&gt;
&amp;quot;font&amp;quot; defines the typeface. For a list of valid typefaces, see the [[%22mesh-table%22_container_(interior_version)#font|mesh-table (interior version)]] documentation. Generally this follows closely with a number of default windows font names.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;fontsize&amp;quot; defines the size of the font. The default value for this is 0.02, and this is a pretty respectable size display.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;fontcolor&amp;quot; defines the RGB color of the text. Each value is a floating point number between 0.0 and 1.0.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;mesh&amp;quot; normally would display the mesh used for the needle. In the case of digital dials, they are not used, but the tag is still required. Any mesh can be used here; using an existing needle mesh would be fine.&lt;br /&gt;
&lt;br /&gt;
===digital-dial-spd===&lt;br /&gt;
&lt;br /&gt;
For a speedometer (or any other gauge that shows units in speed, e.g. a speed limit display), use kind &#039;digital-dial-spd&#039;.&lt;br /&gt;
&lt;br /&gt;
An example speedometer using this kind would be declared as:&lt;br /&gt;
&lt;br /&gt;
  speedo_needle2&lt;br /&gt;
  {&lt;br /&gt;
    kind                                &amp;quot;digital-dial-spd&amp;quot;&lt;br /&gt;
    mesh                                &amp;quot;brake_needle.im&amp;quot;&lt;br /&gt;
    att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.digispeedo&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
    limits                              0,55&lt;br /&gt;
    font                                &amp;quot;arial&amp;quot;&lt;br /&gt;
    fontsize                            0.01&lt;br /&gt;
    fontcolor                           196,196,246&lt;br /&gt;
    auto-create                         1&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
===digital-dial-prs===&lt;br /&gt;
&lt;br /&gt;
For a display using pressure units, use digital-dial-prs. This is a digital brake pipe pressure gauge:&lt;br /&gt;
&lt;br /&gt;
   bptrainbrakepipe_needle2&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;digital-dial-prs&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brake_needle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.trainpipe_pressure&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,55&lt;br /&gt;
     font                                &amp;quot;arial&amp;quot;&lt;br /&gt;
     fontsize                            0.01&lt;br /&gt;
     fontcolor                           0.0,1.0,0.0&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
[[File:Digispeedoreference.png|An example of digital needles being used for pressure and speed.]]&lt;br /&gt;
&lt;br /&gt;
==firebox==&lt;br /&gt;
&lt;br /&gt;
The firebox control is a special kind to implement the fire of a steam locomotive.&lt;br /&gt;
&lt;br /&gt;
(Further information about this specific control to follow).&lt;br /&gt;
&lt;br /&gt;
Note:  Some steam cab interior models use the firebox, fireglow and burning coal effects found in the Auran PB15 cab interior.  This can cause quite severe flickering effects in some models  The intensity of flickering varies on the textures used and can be attenuated by use of darker colours.  The flickering can be eliminated by not using the firebox effect.  The fireglow and burning coal (coal) effects are OK.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note: This feature does not work currently in T:ANE and TRS19.&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can, of course, always make your own.&lt;br /&gt;
&lt;br /&gt;
=Scripting additional behaviour in a cab=&lt;br /&gt;
&lt;br /&gt;
A lot can be achieved in Trainz purely by naming the controls correctly and relying on Trainz default cab scripts to make them work. A quite reasonable cab can be made for many locomotives without having to do any scripting whatsoever.&lt;br /&gt;
&lt;br /&gt;
However, a lot more realism can be achieved by scripting the cab. Additional features can be added beyond what Trainz supports, including new types of controls, or extended behaviour on existing controls.&lt;br /&gt;
&lt;br /&gt;
The first thing to consider when looking at scripting a cab, is &amp;quot;is the cab the best place for this feature?&amp;quot;. A cab is not a persistent asset, which means it can go away at any point. When it&#039;s gone, it isn&#039;t running it&#039;s script. Consequently, it is a bad place for any persistent or time based logic - it should only be used to script the immediate behaviour of the controls. Anything beyond this should be implemented the vehicle itself or possibly a script library, both of which are more persistent objects.&lt;br /&gt;
&lt;br /&gt;
If all you want to achieve is to add some simple extra features (e.g. a display of signal aspects within the cab), you can derive from the trainz standard classes, and inherit the default behaviour when adding your new behaviour. This means you can concentrate on just your extra feature, and don&#039;t have to worry about making existing functionality work.&lt;br /&gt;
&lt;br /&gt;
If you want to do something a little more advanced (e.g. change the behaviour of the throttle and/or brake controllers), then you are probably best deriving your cab script from the &#039;cabin&#039; class, ignoring the default cab scripts, and implementing your required behaviour from scratch. This gives you a lot more control, but you do need to do more yourself.&lt;br /&gt;
&lt;br /&gt;
For some examples of the first route, have a look at the MN cabs - the M7 or the ACMU are good examples. Both have a cab signal repeater implemented in the cab interior script, and use the base functionality for almost everything else.&lt;br /&gt;
&lt;br /&gt;
-~= To Be Continued... =~-&lt;br /&gt;
&lt;br /&gt;
==Return to Index==&lt;br /&gt;
 &lt;br /&gt;
[[HowToGuides|&amp;lt;&amp;lt; How To Guides]]&lt;br /&gt;
&lt;br /&gt;
[[Category:How-to guides]]&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=HowTo/Build_a_cab_interior&amp;diff=29703</id>
		<title>HowTo/Build a cab interior</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=HowTo/Build_a_cab_interior&amp;diff=29703"/>
		<updated>2021-06-17T04:52:13Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Trainz uses an [[KIND_Interior|interior]] object to represent a locomotive cab, or view from another vehicle, e.g. a passenger coach, brake van or caboose. Interiors can also be attached to some non-train assets. For this howto, I am going to assume that we are creating a traincar interior, and focus primarily on a cab interior for a diesel or electric locomotive.&lt;br /&gt;
&lt;br /&gt;
=Basic structure=&lt;br /&gt;
&lt;br /&gt;
The basic structure of a cab is quite similar to a number of different assets. You will have a main mesh with a number of attached sub-meshes, which are arranged using a [[%22mesh-table%22_container_(interior_version)|mesh-table]].&lt;br /&gt;
&lt;br /&gt;
The main cab mesh typically consists of the interior walls, roof and floor of the cab, the control desk or stand, all furniture or other static objects visible inside the cab, and also all parts of the locomotive exterior that are visible from inside the cab - e.g. the top of any projecting nose below the cab windows. Remember to consider the sightlines out of rear windows too for visible bodywork panels - the user can move around the cab and rotate the camera to any angle. Users are not restricted to looking forward out of the front windows only.&lt;br /&gt;
&lt;br /&gt;
=Artwork considerations=&lt;br /&gt;
&lt;br /&gt;
There are some differences in style between the construction of an interior object and a typical trainz object.&lt;br /&gt;
&lt;br /&gt;
Except in very specific circumstances, there will not be more than one interior object in existence at any time, and that interior is always viewed from very close range - the user is inside it. Because of this, interiors are typically modelled with a high polygon count and with high resolution textures, to give an impressive visual feel. LOD is not used, as the user never gets far enough away from the interior for LOD techniques to have worthwhile benefit. However, LOD techniques may be ideal in a case of a passenger wagon with high polygon chair models. &lt;br /&gt;
&lt;br /&gt;
Trainz lights interior objects differently to map objects like buildings and other scenery - the main illumination is ambient, not directional. (A steam loco does have a directional light coming from the firebox, but a diesel or electric cab typically has no directional light inside, and relies entirely on ambient illumination).&lt;br /&gt;
&lt;br /&gt;
With ambient illumination, effects such as normal and specular mapping do not have much (if any) effect. Because of this, more effort needs to be put into the diffuse texture for a cab interior than would normally be applied to Trainz objects. Drawing or baking shadows and other effects into the diffuse textures is required to produce a nice looking cab interior.&lt;br /&gt;
&lt;br /&gt;
An example cab would be the [[File:PB_interior.rar]]&lt;br /&gt;
&lt;br /&gt;
=A basic config file=&lt;br /&gt;
&lt;br /&gt;
The minimal required config for an interior to show in-game is:&lt;br /&gt;
&lt;br /&gt;
 kind                                    interior&lt;br /&gt;
 kuid                                    &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&amp;lt;kuid2:YOUR:KUID:HERE&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
 trainz-build                            2.9&lt;br /&gt;
 username                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Your interior name here&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
 category-class                          ZI&lt;br /&gt;
 &lt;br /&gt;
 mesh-table&lt;br /&gt;
 {&lt;br /&gt;
   default&lt;br /&gt;
   {&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;your_interior_mesh_name.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Note: There are also other base tags that should be added that are common to all asset types - e.g. the download station will require a valid thumbnails container before the asset can be uploaded. See the documentation for [[KIND TrainzBaseSpec]] for details of tags which apply to all trainz assets. Depending on which Trainz version you have and which trainz-build number you have specified, some of these may be required - content manager will tell you what is required, listing missing tags as errors.&lt;br /&gt;
&lt;br /&gt;
==camera positions==&lt;br /&gt;
&lt;br /&gt;
If we load a cab up with that config file, we will note that the view is not particularly appealing. Chances are we&#039;re right down near the floor. To fix this, we need to define some default positions for camera views. This is done with the [[%22cameralist%22_Container|cameralist container]] and the [[KIND_Interior#cameradefault|cameradefault]] tag.&lt;br /&gt;
Add the following to your config.txt file:&lt;br /&gt;
&lt;br /&gt;
 cameralist&lt;br /&gt;
 {&lt;br /&gt;
   camera0                               0,0,2,0,0&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 cameradefault                           0&lt;br /&gt;
&lt;br /&gt;
The cameralist container can contain any number of cameras, but they must be numbered sequentially and start at zero.&lt;br /&gt;
&lt;br /&gt;
The five numbers are the X, Y and Z coordinates of the camera in metres relative to the 0,0,0 point of the interior mesh, and the Yaw and Pitch in radians. Luckily you don&#039;t have to work these values out from scratch - add the line &amp;quot;-freeintcam&amp;quot; to your trainzoptions.txt file, and you can move the camera about in the cab with the mouse and keyboard, and the precise position will be displayed in the bottom right corner.&lt;br /&gt;
&lt;br /&gt;
When you have found a position you like, write the numbers down. When you&#039;ve got a good selection of positions recorded, add them to the cameralist container.&lt;br /&gt;
&lt;br /&gt;
You may wish to return to this and tweak the values later once all the controls are in place - but it&#039;s handy to have a good starting position for the camera while testing.&lt;br /&gt;
&lt;br /&gt;
=Cab controls=&lt;br /&gt;
&lt;br /&gt;
A locomotive cab interior needs working cab controls. What fun would sitting in the drivers seat be without being able to pull on the levers, change the switches, and watch the gauges and dials move?&lt;br /&gt;
&lt;br /&gt;
The moving part of each lever, switch, gauge or dial is created as a separate mesh, which is then attached to the cab with an attachment point. (The static part, e.g. guide rails for levers, should be part of the cab mesh itself).&lt;br /&gt;
&lt;br /&gt;
==Lever==&lt;br /&gt;
&lt;br /&gt;
The lever is the basic input device in a cab. It is based on rotational movement, and any object that requires rotational movement (e.g. a wheel or ring) can be implemented as a lever.&lt;br /&gt;
&lt;br /&gt;
If you actually want linear movement, you can still use a lever - just move the attachment point a long way away - e.g. 10 or 20 metres away from the control. The resulting small arc will not be noticable over the length of movement. As an example, sliding windows in Trainz cabs have been implemented as levers &amp;quot;attached&amp;quot; something like 10 or 20 metres out to the side of the vehicle for a long time. (The exception to this is a horn pull rope - trainz provides a control specifically for this purpose).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will need to create the lever in your modelling program aligned correctly - the rotation needs to be around the Z axis, and main part of the object will point along the Y axis.&lt;br /&gt;
&lt;br /&gt;
When adding the attachment point to the main mesh, align it so the Z axis is the axis of rotation. It is common to point the Y axis at the default position - e.g. levers in the &#039;off&#039; or &#039;neutral&#039; position, and needles pointing to zero. This is not strictly required, as the range of movement can be adjusted at both ends, but it provides a handy reference when creating the config file.&lt;br /&gt;
&lt;br /&gt;
[[File:BasicLeverSetup.png|350px|thumb|An example of a lever being used as a signboard cover.]]&lt;br /&gt;
&lt;br /&gt;
It is worth noting that you can reuse a mesh for multiple attachments. This is particularly useful for switches, as identical appearance switches are often used repeatedly in a cab for different purposes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Throttle Lever===&lt;br /&gt;
&lt;br /&gt;
A good example of a standard lever in use is a locomotive throttle control. A typical US diesel throttle has 9 notched positions (from 0 to 8 inclusive).&lt;br /&gt;
&lt;br /&gt;
As noted above, the lever is created in the modelling package so it points along the Y axis and the axis of rotation is along the Z axis. The attachment point is added to the cab interior mesh at the correct position, and rotated so the Z axis is aligned with the axis of rotation, and the Y axis points to the default position.&lt;br /&gt;
&lt;br /&gt;
Now we need to add an entry to the config file to add our throttle lever.&lt;br /&gt;
&lt;br /&gt;
Into the mesh table, add an entry like this:&lt;br /&gt;
&lt;br /&gt;
   throttle_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;throttle_lever.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.throttle_lever&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,8&lt;br /&gt;
     angles                              0,1.57&lt;br /&gt;
     notches                             0,0.125,0.25,0.375,0.5,0.625,0.75,0.875,1&lt;br /&gt;
     notchheight                         1,2,2,2,2,2,2,2,1&lt;br /&gt;
     radius                              0.35&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
... remember to set your attachment point and mesh name correctly.&lt;br /&gt;
&lt;br /&gt;
The &#039;angles&#039; line defines how far the control rotates. It is in radians - there are 2 x Pi (6.28) radians in a complete circle. My default of 1.57 will give you about 90 degrees of rotation, in the positive direction. Adjust this number to get the control to rotate the correct amount. You should be able to work out the number you need in your modelling program by using the rotate tool on the attachment point, and recording the amount of rotation required to move to the intended maximum location. It should not require significant trial and error.&lt;br /&gt;
&lt;br /&gt;
The &#039;radius&#039; line defines the position of the notch position overlay and the text label. It is in metres. If the overlay is too close in, increase this number. If it is too far out, decrease it.&lt;br /&gt;
&lt;br /&gt;
If the lever is the wrong way round (notch 8 is at the wrong end), swap the numbers in the &#039;angles&#039; tag over, so the higher one is first.&lt;br /&gt;
&lt;br /&gt;
If the lever moves the wrong way when you drag it with the mouse (i.e. it goes left in response to a right drag), add the line:&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
This will invert the mouse movement.&lt;br /&gt;
&lt;br /&gt;
The fact we called this lever &amp;quot;throttle_lever&amp;quot; means it will be used to control the throttle by the default cab script.&lt;br /&gt;
&lt;br /&gt;
So what happens if we wanted a different number of notches? Below is an example of a throttle which has 22 notches. The second value in the &#039;limits&#039; tag has been edited to return up to notch 22, and more entries have been added to the &#039;notches&#039; and &#039;notchheight&#039; tags:&lt;br /&gt;
&lt;br /&gt;
   throttle_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;throttle_lever.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.throttle_lever&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,22&lt;br /&gt;
     angles                              0,0.94&lt;br /&gt;
     notches                             0,0.045,0.091,0.136,0.182,0.227,0.273,0.318,0.364,0.409,0.455,0.5,0.545,0.591,0.636,0.682,0.727,0.773,0.818,0.864,0.909,0.955,1&lt;br /&gt;
     notchheight                         1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1&lt;br /&gt;
     radius                              0.35&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Reverser Lever===&lt;br /&gt;
&lt;br /&gt;
The reverser lever is created in a similar manner to throttle lever. The mesh table entry for this will look like:&lt;br /&gt;
&lt;br /&gt;
   reverser_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;reverser_lever.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.reverser_lever&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,2&lt;br /&gt;
     angles                              -0.79,0.79&lt;br /&gt;
     notches                             0,0.5,1&lt;br /&gt;
     notchheight                         1,1,1&lt;br /&gt;
     radius                              0.25&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
In this case, because the &#039;angles&#039; entry has a range both positive and negative, the lever can move in both directions relative to the attachment point. The game will set the default position to neutral (1), so if you&#039;ve lined up your attachment point at one end, don&#039;t worry - you can use angles which range from zero if you need to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Train Air Brake Lever===&lt;br /&gt;
&lt;br /&gt;
There are two types of train air brake lever. A given locomotive only has one type - the brakes are either require manual lapping or are self-lapping. Use the appropriate name and configuration for the loco you are modelling.&lt;br /&gt;
&lt;br /&gt;
====Manual Lapped Brakes====&lt;br /&gt;
&lt;br /&gt;
The manual train brake lever has five positions numbered from zero to four, each one representing a different function. Those functions are Release, Lap, Application, Emergency and Handle Off respectively.&lt;br /&gt;
&lt;br /&gt;
A lever for a manual lap train air brake is defined as follows:&lt;br /&gt;
&lt;br /&gt;
   trainbrakelap_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;train_brake_lap_lever.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.train_brake_lap_lever&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,4&lt;br /&gt;
     angles                              0,0.94&lt;br /&gt;
     notches                             0,0.25,0.5,0.75,1&lt;br /&gt;
     notchheight                         1,1,1,1,1&lt;br /&gt;
     radius                              0.25&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
In this case, the attachment for the lever has been created in the &#039;release&#039; position. If it had been created in the &#039;handle off&#039; position, the angle tag would have been more like:&lt;br /&gt;
&lt;br /&gt;
     angles                             -0.94,0&lt;br /&gt;
&lt;br /&gt;
====Self Lapping Brakes====&lt;br /&gt;
&lt;br /&gt;
A self lapping trainbrake lever has a number of primary notches similar to the manual lap train brake lever. However, instead of a &#039;lap&#039; and &#039;apply&#039; position, it has a grade of application between the &#039;initial&#039; and &#039;full application&#039; positions. An example of a self-lapping brake handle is this one:&lt;br /&gt;
&lt;br /&gt;
   trainbrake_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;train_brake_lever.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.train_brake_lever&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,4&lt;br /&gt;
     angles                              0,0.94&lt;br /&gt;
     notches                             0,0.25,0.27,0.29,0.31,0.33,0.35,0.37,0.39,0.41,0.43,0.45,0.47,0.49,0.5,0.75,1&lt;br /&gt;
     notchheight                         1,1,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1&lt;br /&gt;
     radius                              0.25&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
In this case, there are 14 possible levels of brake application - initial at 0.25, 12 intermediate levels, and full application at 0.5. There is no restriction on the number of intermediate levels - if you are modelling a prototype brake handle with a specific number, you may create precisely that number of notches and arrange them between 0.25 and 0.5 as required.&lt;br /&gt;
&lt;br /&gt;
===Combined throttle brake lever===&lt;br /&gt;
&lt;br /&gt;
There is also another control option - a combined throttle brake lever. This type of control is often found on multiple unit trains. This control is split into two halves. The first half of the movement is an inverted throttle - i.e. max power at zero, no power at 0.5. The second half is an auto lapped train brake application, with 0.5 as release, and 1.0 as emergency.  An example of how to configure a combined throttle and brake lever is below:&lt;br /&gt;
&lt;br /&gt;
   throttle_brake_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;throttle_brake_handle.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.throttle_brake_handle&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,16&lt;br /&gt;
     angles                              0.94,-0.94&lt;br /&gt;
     notches                             0,0.0625,0.125,0.1875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.8125,0.75,0.875,0.9375,1&lt;br /&gt;
     notchheight                         1,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,1&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
     radius                              0.12&lt;br /&gt;
     invert                              1&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
Unfortunately, trains that use this type of control generally use blended and/or EP brakes, and this control uses the standard Trainz air brake, which operates in a distinctly different manner, and as a result, can feel very wrong for this control type. (See the section on scripting controls for how a better combined brake and throttle lever may be implemented).&lt;br /&gt;
&lt;br /&gt;
==Pull lever==&lt;br /&gt;
&lt;br /&gt;
This is a sprung lever. You pull on this lever to activate it, and when you let it go, it returns to the original position. This kind of action is commonly associated with a locomotive horn, and this is what I am using as an example:&lt;br /&gt;
&lt;br /&gt;
   horn&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;pulllever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;horn.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.horn&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     angles                              0,-0.55&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     radius                              -0.02&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0,0&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
==Switch==&lt;br /&gt;
&lt;br /&gt;
A switch is a lever that does not require the user to &#039;drag&#039; it with the mouse - it operates on a click only. This is used for smaller controls that are &#039;on&#039; or &#039;off&#039;, and do not have intermediate positions. Parameters are much like they are for a &#039;lever&#039;, only a switch should only have two notches - on and off.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, some things you&#039;d normally associate with being a &#039;switch&#039; (e.g. the headlight switch control) require mulitple positions, and will need to remain as a &#039;lever&#039; in order to allow the player to set the correct position for the control.&lt;br /&gt;
&lt;br /&gt;
An example of a switch would be:&lt;br /&gt;
&lt;br /&gt;
   switch1&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;switch&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;switch.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.switch1&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     angles                              1.4,0&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0,0&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
As &#039;switch&#039; was introduced in TS2009 SP2, interiors that use kind &#039;switch&#039; controls should be marked trainz-build 3.1 or later in the config.txt.&lt;br /&gt;
&lt;br /&gt;
==button==&lt;br /&gt;
&lt;br /&gt;
A button is a momentary contact press-and-hold button. This is a brand new control added for TS12 patch 2, released end of june 2011. Content using this feature should have trainz-build 3.6 or later in the config.txt.&lt;br /&gt;
&lt;br /&gt;
Finally this brings Trainz the &amp;quot;click to press&amp;quot;, &amp;quot;hold to hold pressed&amp;quot;, &amp;quot;let go to release&amp;quot; style momentary pushbutton. &lt;br /&gt;
&lt;br /&gt;
   button1&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;button&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;switch.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.switch1&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     angles                              0,0.1&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0,0&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Pull rope==&lt;br /&gt;
&lt;br /&gt;
This is a linear pull rope control. Unlike the rotating controls discussed previously, this control type moves the mesh linearly along the Z axis of the attachment. It behaves as you would expect from a suspended rope - click and drag to pull, let go to release. It will spring back to it&#039;s initial position in the same manner as kind &#039;pulllever&#039;.&lt;br /&gt;
&lt;br /&gt;
[[File:Pullropetype.png|800px]]]&lt;br /&gt;
&lt;br /&gt;
   horn&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;pullrope&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;horn_rope.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.horn&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     angles                              0.1,0&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0,0&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
==needle==&lt;br /&gt;
&lt;br /&gt;
A needle is the standard Trainz output device. Like the lever, it is based on rotational movement, and any gauge, dial, or other output device based on rotational movement can be implemented. Any static part of the gauge should be modelled as part of the cab, and only the moving part as part of the needle. Like the lever, the rotation will be around the Z axis of the needle, and it is common practice to point the point of the needle along the Y axis. Cabs often have a number of similar gauges, and re-using the same needle repeatedly in each gauge is a lot easier if this setup is done consistently.&lt;br /&gt;
&lt;br /&gt;
As an example of a needle, here is a basic speedometer:&lt;br /&gt;
&lt;br /&gt;
   speedo_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;speedo_needle.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.speedo_needle&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,67.056&lt;br /&gt;
     angles                              0,4.712&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
The default cab script knows to move the &amp;quot;speedo_needle&amp;quot; object as the train speed changes, so simply by naming this control &amp;quot;speedo_needle&amp;quot;, it has become a speedometer.&lt;br /&gt;
&lt;br /&gt;
For a speedo, the &#039;limits&#039; values will be the minimum and maximum reportable speed in m/s.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Creating other rotational gauges is similar - refer to the [[%22mesh-table%22_container_(interior_version)|mesh-table (interior version)]] documentation to see all the different values that Trainz can show by default.&lt;br /&gt;
&lt;br /&gt;
==light==&lt;br /&gt;
&lt;br /&gt;
Another common type of control is a light. This is created simply as a textured plane, which is either hidden or shown to represent light off or light on. It is attached as any other standard mesh attachment would be - there is no rotation to worry about here.&lt;br /&gt;
&lt;br /&gt;
   wheelslip_light&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;light&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;wheelslip_light.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.wheelslip_light&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
This light will be used to show wheelslip in a default cab. &lt;br /&gt;
&lt;br /&gt;
==animated-lever==&lt;br /&gt;
&lt;br /&gt;
If you want more complex movement than simple rotation, you have the option of animating the lever and using kind &#039;animated-lever&#039;. This will use an animation you create in your modelling program to move the control about. An example of this is visible in the MN ACMU cab. (I&#039;ve reduced the number of notches here for readability - the real one has 32, not 16).&lt;br /&gt;
&lt;br /&gt;
   throttle_lever&lt;br /&gt;
   {&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;throttlehandle.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     anim                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;throttlehandle.kin&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.throttlelever&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,16&lt;br /&gt;
     notches                             0,0.0625,0.125,0.1875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.8125,0.75,0.875,0.9375,1&lt;br /&gt;
     notchheight                         1,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,1&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
     kind                                &amp;quot;animated-lever&amp;quot;&lt;br /&gt;
     test-collisions                     0&lt;br /&gt;
     mousespeed                          1&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
Where the standard lever is rotated between it&#039;s angles to move from notch to notch, the animated-lever has it&#039;s animation played to the corresponding frame.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===collision-proxy===&lt;br /&gt;
&lt;br /&gt;
Animated levers can be hard to grab hold of compared to normal levers. To get around this, an invisible mesh is used to show the game the range of movement the control has, and to allow the user to grab the lever more easily. This example again comes from the MN ACMU cab:&lt;br /&gt;
&lt;br /&gt;
   throttle-collision-box&lt;br /&gt;
   {&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;throttlehandleselection.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att-parent                          &amp;quot;throttle_lever&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.selection_box&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     kind                                &amp;quot;collision-proxy&amp;quot;&lt;br /&gt;
     opacity                             0&lt;br /&gt;
     collision-parent                    &amp;quot;throttle_lever&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
==animated-dial==&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve been paying attention to levers, needles and animated levers, I think you can guess where we are going with this one. This is an animated needle. Instead of rotating between the angles specified, it plays it&#039;s animation to the relevant frame to show the value. Use this when what you want to achieve can&#039;t be done with simple rotational movement.&lt;br /&gt;
&lt;br /&gt;
(Example usage for this control to follow).&lt;br /&gt;
&lt;br /&gt;
==digital-dial==&lt;br /&gt;
&lt;br /&gt;
Some locomotives use a digital readout rather than analogue dials.&lt;br /&gt;
&lt;br /&gt;
Trainz has two control kinds to support digital displays - one for speed units, and one for pressure units. Instead of angles of movement, these both have some font specific options to configure how the digits appear. In both cases, the Y axis of the attachment point should be pointing upward to signify the up direction of the font. &lt;br /&gt;
&lt;br /&gt;
&amp;quot;font&amp;quot; defines the typeface. For a list of valid typefaces, see the [[%22mesh-table%22_container_(interior_version)#font|mesh-table (interior version)]] documentation. Generally this follows closely with a number of default windows font names.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;fontsize&amp;quot; defines the size of the font. The default value for this is 0.02, and this is a pretty respectable size display.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;fontcolor&amp;quot; defines the RGB color of the text. Each value is a floating point number between 0.0 and 1.0.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;mesh&amp;quot; normally would display the mesh used for the needle. In the case of digital dials, they are not used, but the tag is still required. Any mesh can be used here; using an existing needle mesh would be fine.&lt;br /&gt;
&lt;br /&gt;
===digital-dial-spd===&lt;br /&gt;
&lt;br /&gt;
For a speedometer (or any other gauge that shows units in speed, e.g. a speed limit display), use kind &#039;digital-dial-spd&#039;.&lt;br /&gt;
&lt;br /&gt;
An example speedometer using this kind would be declared as:&lt;br /&gt;
&lt;br /&gt;
  speedo_needle2&lt;br /&gt;
  {&lt;br /&gt;
    kind                                &amp;quot;digital-dial-spd&amp;quot;&lt;br /&gt;
    mesh                                &amp;quot;brake_needle.im&amp;quot;&lt;br /&gt;
    att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.digispeedo&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
    limits                              0,55&lt;br /&gt;
    font                                &amp;quot;arial&amp;quot;&lt;br /&gt;
    fontsize                            0.01&lt;br /&gt;
    fontcolor                           196,196,246&lt;br /&gt;
    auto-create                         1&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
===digital-dial-prs===&lt;br /&gt;
&lt;br /&gt;
For a display using pressure units, use digital-dial-prs. This is a digital brake pipe pressure gauge:&lt;br /&gt;
&lt;br /&gt;
   bptrainbrakepipe_needle2&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;digital-dial-prs&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brake_needle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.trainpipe_pressure&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,55&lt;br /&gt;
     font                                &amp;quot;arial&amp;quot;&lt;br /&gt;
     fontsize                            0.01&lt;br /&gt;
     fontcolor                           0.0,1.0,0.0&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
[[File:Digispeedoreference.png|350px|thumb|An example of digital needles being used for pressure and speed.]]&lt;br /&gt;
&lt;br /&gt;
==firebox==&lt;br /&gt;
&lt;br /&gt;
The firebox control is a special kind to implement the fire of a steam locomotive.&lt;br /&gt;
&lt;br /&gt;
(Further information about this specific control to follow).&lt;br /&gt;
&lt;br /&gt;
Note:  Some steam cab interior models use the firebox, fireglow and burning coal effects found in the Auran PB15 cab interior.  This can cause quite severe flickering effects in some models  The intensity of flickering varies on the textures used and can be attenuated by use of darker colours.  The flickering can be eliminated by not using the firebox effect.  The fireglow and burning coal (coal) effects are OK.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note: This feature does not work currently in T:ANE and TRS19.&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can, of course, always make your own.&lt;br /&gt;
&lt;br /&gt;
=Scripting additional behaviour in a cab=&lt;br /&gt;
&lt;br /&gt;
A lot can be achieved in Trainz purely by naming the controls correctly and relying on Trainz default cab scripts to make them work. A quite reasonable cab can be made for many locomotives without having to do any scripting whatsoever.&lt;br /&gt;
&lt;br /&gt;
However, a lot more realism can be achieved by scripting the cab. Additional features can be added beyond what Trainz supports, including new types of controls, or extended behaviour on existing controls.&lt;br /&gt;
&lt;br /&gt;
The first thing to consider when looking at scripting a cab, is &amp;quot;is the cab the best place for this feature?&amp;quot;. A cab is not a persistent asset, which means it can go away at any point. When it&#039;s gone, it isn&#039;t running it&#039;s script. Consequently, it is a bad place for any persistent or time based logic - it should only be used to script the immediate behaviour of the controls. Anything beyond this should be implemented the vehicle itself or possibly a script library, both of which are more persistent objects.&lt;br /&gt;
&lt;br /&gt;
If all you want to achieve is to add some simple extra features (e.g. a display of signal aspects within the cab), you can derive from the trainz standard classes, and inherit the default behaviour when adding your new behaviour. This means you can concentrate on just your extra feature, and don&#039;t have to worry about making existing functionality work.&lt;br /&gt;
&lt;br /&gt;
If you want to do something a little more advanced (e.g. change the behaviour of the throttle and/or brake controllers), then you are probably best deriving your cab script from the &#039;cabin&#039; class, ignoring the default cab scripts, and implementing your required behaviour from scratch. This gives you a lot more control, but you do need to do more yourself.&lt;br /&gt;
&lt;br /&gt;
For some examples of the first route, have a look at the MN cabs - the M7 or the ACMU are good examples. Both have a cab signal repeater implemented in the cab interior script, and use the base functionality for almost everything else.&lt;br /&gt;
&lt;br /&gt;
-~= To Be Continued... =~-&lt;br /&gt;
&lt;br /&gt;
==Return to Index==&lt;br /&gt;
 &lt;br /&gt;
[[HowToGuides|&amp;lt;&amp;lt; How To Guides]]&lt;br /&gt;
&lt;br /&gt;
[[Category:How-to guides]]&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=File:Digispeedoreference.png&amp;diff=29702</id>
		<title>File:Digispeedoreference.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=File:Digispeedoreference.png&amp;diff=29702"/>
		<updated>2021-06-17T04:51:13Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: Example of Digital Speedos using &amp;lt;kuid2:523:55585:1&amp;gt; MN M7 Interior&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Example of Digital Speedos using &amp;lt;kuid2:523:55585:1&amp;gt; MN M7 Interior&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=HowTo/Build_a_cab_interior&amp;diff=29701</id>
		<title>HowTo/Build a cab interior</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=HowTo/Build_a_cab_interior&amp;diff=29701"/>
		<updated>2021-06-16T19:24:21Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: Clarified Digital Needles&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Trainz uses an [[KIND_Interior|interior]] object to represent a locomotive cab, or view from another vehicle, e.g. a passenger coach, brake van or caboose. Interiors can also be attached to some non-train assets. For this howto, I am going to assume that we are creating a traincar interior, and focus primarily on a cab interior for a diesel or electric locomotive.&lt;br /&gt;
&lt;br /&gt;
=Basic structure=&lt;br /&gt;
&lt;br /&gt;
The basic structure of a cab is quite similar to a number of different assets. You will have a main mesh with a number of attached sub-meshes, which are arranged using a [[%22mesh-table%22_container_(interior_version)|mesh-table]].&lt;br /&gt;
&lt;br /&gt;
The main cab mesh typically consists of the interior walls, roof and floor of the cab, the control desk or stand, all furniture or other static objects visible inside the cab, and also all parts of the locomotive exterior that are visible from inside the cab - e.g. the top of any projecting nose below the cab windows. Remember to consider the sightlines out of rear windows too for visible bodywork panels - the user can move around the cab and rotate the camera to any angle. Users are not restricted to looking forward out of the front windows only.&lt;br /&gt;
&lt;br /&gt;
=Artwork considerations=&lt;br /&gt;
&lt;br /&gt;
There are some differences in style between the construction of an interior object and a typical trainz object.&lt;br /&gt;
&lt;br /&gt;
Except in very specific circumstances, there will not be more than one interior object in existence at any time, and that interior is always viewed from very close range - the user is inside it. Because of this, interiors are typically modelled with a high polygon count and with high resolution textures, to give an impressive visual feel. LOD is not used, as the user never gets far enough away from the interior for LOD techniques to have worthwhile benefit. However, LOD techniques may be ideal in a case of a passenger wagon with high polygon chair models. &lt;br /&gt;
&lt;br /&gt;
Trainz lights interior objects differently to map objects like buildings and other scenery - the main illumination is ambient, not directional. (A steam loco does have a directional light coming from the firebox, but a diesel or electric cab typically has no directional light inside, and relies entirely on ambient illumination).&lt;br /&gt;
&lt;br /&gt;
With ambient illumination, effects such as normal and specular mapping do not have much (if any) effect. Because of this, more effort needs to be put into the diffuse texture for a cab interior than would normally be applied to Trainz objects. Drawing or baking shadows and other effects into the diffuse textures is required to produce a nice looking cab interior.&lt;br /&gt;
&lt;br /&gt;
An example cab would be the [[File:PB_interior.rar]]&lt;br /&gt;
&lt;br /&gt;
=A basic config file=&lt;br /&gt;
&lt;br /&gt;
The minimal required config for an interior to show in-game is:&lt;br /&gt;
&lt;br /&gt;
 kind                                    interior&lt;br /&gt;
 kuid                                    &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&amp;lt;kuid2:YOUR:KUID:HERE&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
 trainz-build                            2.9&lt;br /&gt;
 username                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Your interior name here&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
 category-class                          ZI&lt;br /&gt;
 &lt;br /&gt;
 mesh-table&lt;br /&gt;
 {&lt;br /&gt;
   default&lt;br /&gt;
   {&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;your_interior_mesh_name.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Note: There are also other base tags that should be added that are common to all asset types - e.g. the download station will require a valid thumbnails container before the asset can be uploaded. See the documentation for [[KIND TrainzBaseSpec]] for details of tags which apply to all trainz assets. Depending on which Trainz version you have and which trainz-build number you have specified, some of these may be required - content manager will tell you what is required, listing missing tags as errors.&lt;br /&gt;
&lt;br /&gt;
==camera positions==&lt;br /&gt;
&lt;br /&gt;
If we load a cab up with that config file, we will note that the view is not particularly appealing. Chances are we&#039;re right down near the floor. To fix this, we need to define some default positions for camera views. This is done with the [[%22cameralist%22_Container|cameralist container]] and the [[KIND_Interior#cameradefault|cameradefault]] tag.&lt;br /&gt;
Add the following to your config.txt file:&lt;br /&gt;
&lt;br /&gt;
 cameralist&lt;br /&gt;
 {&lt;br /&gt;
   camera0                               0,0,2,0,0&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 cameradefault                           0&lt;br /&gt;
&lt;br /&gt;
The cameralist container can contain any number of cameras, but they must be numbered sequentially and start at zero.&lt;br /&gt;
&lt;br /&gt;
The five numbers are the X, Y and Z coordinates of the camera in metres relative to the 0,0,0 point of the interior mesh, and the Yaw and Pitch in radians. Luckily you don&#039;t have to work these values out from scratch - add the line &amp;quot;-freeintcam&amp;quot; to your trainzoptions.txt file, and you can move the camera about in the cab with the mouse and keyboard, and the precise position will be displayed in the bottom right corner.&lt;br /&gt;
&lt;br /&gt;
When you have found a position you like, write the numbers down. When you&#039;ve got a good selection of positions recorded, add them to the cameralist container.&lt;br /&gt;
&lt;br /&gt;
You may wish to return to this and tweak the values later once all the controls are in place - but it&#039;s handy to have a good starting position for the camera while testing.&lt;br /&gt;
&lt;br /&gt;
=Cab controls=&lt;br /&gt;
&lt;br /&gt;
A locomotive cab interior needs working cab controls. What fun would sitting in the drivers seat be without being able to pull on the levers, change the switches, and watch the gauges and dials move?&lt;br /&gt;
&lt;br /&gt;
The moving part of each lever, switch, gauge or dial is created as a separate mesh, which is then attached to the cab with an attachment point. (The static part, e.g. guide rails for levers, should be part of the cab mesh itself).&lt;br /&gt;
&lt;br /&gt;
==Lever==&lt;br /&gt;
&lt;br /&gt;
The lever is the basic input device in a cab. It is based on rotational movement, and any object that requires rotational movement (e.g. a wheel or ring) can be implemented as a lever.&lt;br /&gt;
&lt;br /&gt;
If you actually want linear movement, you can still use a lever - just move the attachment point a long way away - e.g. 10 or 20 metres away from the control. The resulting small arc will not be noticable over the length of movement. As an example, sliding windows in Trainz cabs have been implemented as levers &amp;quot;attached&amp;quot; something like 10 or 20 metres out to the side of the vehicle for a long time. (The exception to this is a horn pull rope - trainz provides a control specifically for this purpose).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will need to create the lever in your modelling program aligned correctly - the rotation needs to be around the Z axis, and main part of the object will point along the Y axis.&lt;br /&gt;
&lt;br /&gt;
When adding the attachment point to the main mesh, align it so the Z axis is the axis of rotation. It is common to point the Y axis at the default position - e.g. levers in the &#039;off&#039; or &#039;neutral&#039; position, and needles pointing to zero. This is not strictly required, as the range of movement can be adjusted at both ends, but it provides a handy reference when creating the config file.&lt;br /&gt;
&lt;br /&gt;
[[File:BasicLeverSetup.png|350px|thumb|An example of a lever being used as a signboard cover.]]&lt;br /&gt;
&lt;br /&gt;
It is worth noting that you can reuse a mesh for multiple attachments. This is particularly useful for switches, as identical appearance switches are often used repeatedly in a cab for different purposes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Throttle Lever===&lt;br /&gt;
&lt;br /&gt;
A good example of a standard lever in use is a locomotive throttle control. A typical US diesel throttle has 9 notched positions (from 0 to 8 inclusive).&lt;br /&gt;
&lt;br /&gt;
As noted above, the lever is created in the modelling package so it points along the Y axis and the axis of rotation is along the Z axis. The attachment point is added to the cab interior mesh at the correct position, and rotated so the Z axis is aligned with the axis of rotation, and the Y axis points to the default position.&lt;br /&gt;
&lt;br /&gt;
Now we need to add an entry to the config file to add our throttle lever.&lt;br /&gt;
&lt;br /&gt;
Into the mesh table, add an entry like this:&lt;br /&gt;
&lt;br /&gt;
   throttle_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;throttle_lever.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.throttle_lever&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,8&lt;br /&gt;
     angles                              0,1.57&lt;br /&gt;
     notches                             0,0.125,0.25,0.375,0.5,0.625,0.75,0.875,1&lt;br /&gt;
     notchheight                         1,2,2,2,2,2,2,2,1&lt;br /&gt;
     radius                              0.35&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
... remember to set your attachment point and mesh name correctly.&lt;br /&gt;
&lt;br /&gt;
The &#039;angles&#039; line defines how far the control rotates. It is in radians - there are 2 x Pi (6.28) radians in a complete circle. My default of 1.57 will give you about 90 degrees of rotation, in the positive direction. Adjust this number to get the control to rotate the correct amount. You should be able to work out the number you need in your modelling program by using the rotate tool on the attachment point, and recording the amount of rotation required to move to the intended maximum location. It should not require significant trial and error.&lt;br /&gt;
&lt;br /&gt;
The &#039;radius&#039; line defines the position of the notch position overlay and the text label. It is in metres. If the overlay is too close in, increase this number. If it is too far out, decrease it.&lt;br /&gt;
&lt;br /&gt;
If the lever is the wrong way round (notch 8 is at the wrong end), swap the numbers in the &#039;angles&#039; tag over, so the higher one is first.&lt;br /&gt;
&lt;br /&gt;
If the lever moves the wrong way when you drag it with the mouse (i.e. it goes left in response to a right drag), add the line:&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
This will invert the mouse movement.&lt;br /&gt;
&lt;br /&gt;
The fact we called this lever &amp;quot;throttle_lever&amp;quot; means it will be used to control the throttle by the default cab script.&lt;br /&gt;
&lt;br /&gt;
So what happens if we wanted a different number of notches? Below is an example of a throttle which has 22 notches. The second value in the &#039;limits&#039; tag has been edited to return up to notch 22, and more entries have been added to the &#039;notches&#039; and &#039;notchheight&#039; tags:&lt;br /&gt;
&lt;br /&gt;
   throttle_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;throttle_lever.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.throttle_lever&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,22&lt;br /&gt;
     angles                              0,0.94&lt;br /&gt;
     notches                             0,0.045,0.091,0.136,0.182,0.227,0.273,0.318,0.364,0.409,0.455,0.5,0.545,0.591,0.636,0.682,0.727,0.773,0.818,0.864,0.909,0.955,1&lt;br /&gt;
     notchheight                         1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1&lt;br /&gt;
     radius                              0.35&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Reverser Lever===&lt;br /&gt;
&lt;br /&gt;
The reverser lever is created in a similar manner to throttle lever. The mesh table entry for this will look like:&lt;br /&gt;
&lt;br /&gt;
   reverser_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;reverser_lever.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.reverser_lever&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,2&lt;br /&gt;
     angles                              -0.79,0.79&lt;br /&gt;
     notches                             0,0.5,1&lt;br /&gt;
     notchheight                         1,1,1&lt;br /&gt;
     radius                              0.25&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
In this case, because the &#039;angles&#039; entry has a range both positive and negative, the lever can move in both directions relative to the attachment point. The game will set the default position to neutral (1), so if you&#039;ve lined up your attachment point at one end, don&#039;t worry - you can use angles which range from zero if you need to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Train Air Brake Lever===&lt;br /&gt;
&lt;br /&gt;
There are two types of train air brake lever. A given locomotive only has one type - the brakes are either require manual lapping or are self-lapping. Use the appropriate name and configuration for the loco you are modelling.&lt;br /&gt;
&lt;br /&gt;
====Manual Lapped Brakes====&lt;br /&gt;
&lt;br /&gt;
The manual train brake lever has five positions numbered from zero to four, each one representing a different function. Those functions are Release, Lap, Application, Emergency and Handle Off respectively.&lt;br /&gt;
&lt;br /&gt;
A lever for a manual lap train air brake is defined as follows:&lt;br /&gt;
&lt;br /&gt;
   trainbrakelap_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;train_brake_lap_lever.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.train_brake_lap_lever&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,4&lt;br /&gt;
     angles                              0,0.94&lt;br /&gt;
     notches                             0,0.25,0.5,0.75,1&lt;br /&gt;
     notchheight                         1,1,1,1,1&lt;br /&gt;
     radius                              0.25&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
In this case, the attachment for the lever has been created in the &#039;release&#039; position. If it had been created in the &#039;handle off&#039; position, the angle tag would have been more like:&lt;br /&gt;
&lt;br /&gt;
     angles                             -0.94,0&lt;br /&gt;
&lt;br /&gt;
====Self Lapping Brakes====&lt;br /&gt;
&lt;br /&gt;
A self lapping trainbrake lever has a number of primary notches similar to the manual lap train brake lever. However, instead of a &#039;lap&#039; and &#039;apply&#039; position, it has a grade of application between the &#039;initial&#039; and &#039;full application&#039; positions. An example of a self-lapping brake handle is this one:&lt;br /&gt;
&lt;br /&gt;
   trainbrake_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;train_brake_lever.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.train_brake_lever&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,4&lt;br /&gt;
     angles                              0,0.94&lt;br /&gt;
     notches                             0,0.25,0.27,0.29,0.31,0.33,0.35,0.37,0.39,0.41,0.43,0.45,0.47,0.49,0.5,0.75,1&lt;br /&gt;
     notchheight                         1,1,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1&lt;br /&gt;
     radius                              0.25&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
In this case, there are 14 possible levels of brake application - initial at 0.25, 12 intermediate levels, and full application at 0.5. There is no restriction on the number of intermediate levels - if you are modelling a prototype brake handle with a specific number, you may create precisely that number of notches and arrange them between 0.25 and 0.5 as required.&lt;br /&gt;
&lt;br /&gt;
===Combined throttle brake lever===&lt;br /&gt;
&lt;br /&gt;
There is also another control option - a combined throttle brake lever. This type of control is often found on multiple unit trains. This control is split into two halves. The first half of the movement is an inverted throttle - i.e. max power at zero, no power at 0.5. The second half is an auto lapped train brake application, with 0.5 as release, and 1.0 as emergency.  An example of how to configure a combined throttle and brake lever is below:&lt;br /&gt;
&lt;br /&gt;
   throttle_brake_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;throttle_brake_handle.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.throttle_brake_handle&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,16&lt;br /&gt;
     angles                              0.94,-0.94&lt;br /&gt;
     notches                             0,0.0625,0.125,0.1875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.8125,0.75,0.875,0.9375,1&lt;br /&gt;
     notchheight                         1,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,1&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
     radius                              0.12&lt;br /&gt;
     invert                              1&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
Unfortunately, trains that use this type of control generally use blended and/or EP brakes, and this control uses the standard Trainz air brake, which operates in a distinctly different manner, and as a result, can feel very wrong for this control type. (See the section on scripting controls for how a better combined brake and throttle lever may be implemented).&lt;br /&gt;
&lt;br /&gt;
==Pull lever==&lt;br /&gt;
&lt;br /&gt;
This is a sprung lever. You pull on this lever to activate it, and when you let it go, it returns to the original position. This kind of action is commonly associated with a locomotive horn, and this is what I am using as an example:&lt;br /&gt;
&lt;br /&gt;
   horn&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;pulllever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;horn.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.horn&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     angles                              0,-0.55&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     radius                              -0.02&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0,0&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
==Switch==&lt;br /&gt;
&lt;br /&gt;
A switch is a lever that does not require the user to &#039;drag&#039; it with the mouse - it operates on a click only. This is used for smaller controls that are &#039;on&#039; or &#039;off&#039;, and do not have intermediate positions. Parameters are much like they are for a &#039;lever&#039;, only a switch should only have two notches - on and off.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, some things you&#039;d normally associate with being a &#039;switch&#039; (e.g. the headlight switch control) require mulitple positions, and will need to remain as a &#039;lever&#039; in order to allow the player to set the correct position for the control.&lt;br /&gt;
&lt;br /&gt;
An example of a switch would be:&lt;br /&gt;
&lt;br /&gt;
   switch1&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;switch&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;switch.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.switch1&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     angles                              1.4,0&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0,0&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
As &#039;switch&#039; was introduced in TS2009 SP2, interiors that use kind &#039;switch&#039; controls should be marked trainz-build 3.1 or later in the config.txt.&lt;br /&gt;
&lt;br /&gt;
==button==&lt;br /&gt;
&lt;br /&gt;
A button is a momentary contact press-and-hold button. This is a brand new control added for TS12 patch 2, released end of june 2011. Content using this feature should have trainz-build 3.6 or later in the config.txt.&lt;br /&gt;
&lt;br /&gt;
Finally this brings Trainz the &amp;quot;click to press&amp;quot;, &amp;quot;hold to hold pressed&amp;quot;, &amp;quot;let go to release&amp;quot; style momentary pushbutton. &lt;br /&gt;
&lt;br /&gt;
   button1&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;button&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;switch.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.switch1&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     angles                              0,0.1&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0,0&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Pull rope==&lt;br /&gt;
&lt;br /&gt;
This is a linear pull rope control. Unlike the rotating controls discussed previously, this control type moves the mesh linearly along the Z axis of the attachment. It behaves as you would expect from a suspended rope - click and drag to pull, let go to release. It will spring back to it&#039;s initial position in the same manner as kind &#039;pulllever&#039;.&lt;br /&gt;
&lt;br /&gt;
[[File:Pullropetype.png|800px]]]&lt;br /&gt;
&lt;br /&gt;
   horn&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;pullrope&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;horn_rope.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.horn&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     angles                              0.1,0&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0,0&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
==needle==&lt;br /&gt;
&lt;br /&gt;
A needle is the standard Trainz output device. Like the lever, it is based on rotational movement, and any gauge, dial, or other output device based on rotational movement can be implemented. Any static part of the gauge should be modelled as part of the cab, and only the moving part as part of the needle. Like the lever, the rotation will be around the Z axis of the needle, and it is common practice to point the point of the needle along the Y axis. Cabs often have a number of similar gauges, and re-using the same needle repeatedly in each gauge is a lot easier if this setup is done consistently.&lt;br /&gt;
&lt;br /&gt;
As an example of a needle, here is a basic speedometer:&lt;br /&gt;
&lt;br /&gt;
   speedo_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;speedo_needle.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.speedo_needle&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,67.056&lt;br /&gt;
     angles                              0,4.712&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
The default cab script knows to move the &amp;quot;speedo_needle&amp;quot; object as the train speed changes, so simply by naming this control &amp;quot;speedo_needle&amp;quot;, it has become a speedometer.&lt;br /&gt;
&lt;br /&gt;
For a speedo, the &#039;limits&#039; values will be the minimum and maximum reportable speed in m/s.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Creating other rotational gauges is similar - refer to the [[%22mesh-table%22_container_(interior_version)|mesh-table (interior version)]] documentation to see all the different values that Trainz can show by default.&lt;br /&gt;
&lt;br /&gt;
==light==&lt;br /&gt;
&lt;br /&gt;
Another common type of control is a light. This is created simply as a textured plane, which is either hidden or shown to represent light off or light on. It is attached as any other standard mesh attachment would be - there is no rotation to worry about here.&lt;br /&gt;
&lt;br /&gt;
   wheelslip_light&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;light&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;wheelslip_light.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.wheelslip_light&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
This light will be used to show wheelslip in a default cab. &lt;br /&gt;
&lt;br /&gt;
==animated-lever==&lt;br /&gt;
&lt;br /&gt;
If you want more complex movement than simple rotation, you have the option of animating the lever and using kind &#039;animated-lever&#039;. This will use an animation you create in your modelling program to move the control about. An example of this is visible in the MN ACMU cab. (I&#039;ve reduced the number of notches here for readability - the real one has 32, not 16).&lt;br /&gt;
&lt;br /&gt;
   throttle_lever&lt;br /&gt;
   {&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;throttlehandle.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     anim                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;throttlehandle.kin&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.throttlelever&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,16&lt;br /&gt;
     notches                             0,0.0625,0.125,0.1875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.8125,0.75,0.875,0.9375,1&lt;br /&gt;
     notchheight                         1,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,1&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
     kind                                &amp;quot;animated-lever&amp;quot;&lt;br /&gt;
     test-collisions                     0&lt;br /&gt;
     mousespeed                          1&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
Where the standard lever is rotated between it&#039;s angles to move from notch to notch, the animated-lever has it&#039;s animation played to the corresponding frame.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===collision-proxy===&lt;br /&gt;
&lt;br /&gt;
Animated levers can be hard to grab hold of compared to normal levers. To get around this, an invisible mesh is used to show the game the range of movement the control has, and to allow the user to grab the lever more easily. This example again comes from the MN ACMU cab:&lt;br /&gt;
&lt;br /&gt;
   throttle-collision-box&lt;br /&gt;
   {&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;throttlehandleselection.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att-parent                          &amp;quot;throttle_lever&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.selection_box&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     kind                                &amp;quot;collision-proxy&amp;quot;&lt;br /&gt;
     opacity                             0&lt;br /&gt;
     collision-parent                    &amp;quot;throttle_lever&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
==animated-dial==&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve been paying attention to levers, needles and animated levers, I think you can guess where we are going with this one. This is an animated needle. Instead of rotating between the angles specified, it plays it&#039;s animation to the relevant frame to show the value. Use this when what you want to achieve can&#039;t be done with simple rotational movement.&lt;br /&gt;
&lt;br /&gt;
(Example usage for this control to follow).&lt;br /&gt;
&lt;br /&gt;
==digital-dial==&lt;br /&gt;
&lt;br /&gt;
Some locomotives use a digital readout rather than analogue dials.&lt;br /&gt;
&lt;br /&gt;
Trainz has two control kinds to support digital displays - one for speed units, and one for pressure units. Instead of angles of movement, these both have some font specific options to configure how the digits appear. In both cases, the Y axis of the attachment point should be pointing upward to signify the up direction of the font. &lt;br /&gt;
&lt;br /&gt;
&amp;quot;font&amp;quot; defines the typeface. For a list of valid typefaces, see the [[%22mesh-table%22_container_(interior_version)#font|mesh-table (interior version)]] documentation. Generally this follows closely with a number of default windows font names.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;fontsize&amp;quot; defines the size of the font. The default value for this is 0.02, and this is a pretty respectable size display.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;fontcolor&amp;quot; defines the RGB color of the text. Each value is a floating point number between 0.0 and 1.0.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;mesh&amp;quot; normally would display the mesh used for the needle. In the case of digital dials, they are not used, but the tag is still required. Any mesh can be used here; using an existing needle mesh would be fine.&lt;br /&gt;
&lt;br /&gt;
===digital-dial-spd===&lt;br /&gt;
&lt;br /&gt;
For a speedometer (or any other gauge that shows units in speed, e.g. a speed limit display), use kind &#039;digital-dial-spd&#039;.&lt;br /&gt;
&lt;br /&gt;
An example speedometer using this kind would be declared as:&lt;br /&gt;
&lt;br /&gt;
  speedo_needle2&lt;br /&gt;
  {&lt;br /&gt;
    kind                                &amp;quot;digital-dial-spd&amp;quot;&lt;br /&gt;
    mesh                                &amp;quot;brake_needle.im&amp;quot;&lt;br /&gt;
    att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.digispeedo&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
    limits                              0,55&lt;br /&gt;
    font                                &amp;quot;arial&amp;quot;&lt;br /&gt;
    fontsize                            0.01&lt;br /&gt;
    fontcolor                           196,196,246&lt;br /&gt;
    auto-create                         1&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
===digital-dial-prs===&lt;br /&gt;
&lt;br /&gt;
For a display using pressure units, use digital-dial-prs. This is a digital brake pipe pressure gauge:&lt;br /&gt;
&lt;br /&gt;
   bptrainbrakepipe_needle2&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;digital-dial-prs&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brake_needle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.trainpipe_pressure&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,55&lt;br /&gt;
     font                                &amp;quot;arial&amp;quot;&lt;br /&gt;
     fontsize                            0.01&lt;br /&gt;
     fontcolor                           0.0,1.0,0.0&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
==firebox==&lt;br /&gt;
&lt;br /&gt;
The firebox control is a special kind to implement the fire of a steam locomotive.&lt;br /&gt;
&lt;br /&gt;
(Further information about this specific control to follow).&lt;br /&gt;
&lt;br /&gt;
Note:  Some steam cab interior models use the firebox, fireglow and burning coal effects found in the Auran PB15 cab interior.  This can cause quite severe flickering effects in some models  The intensity of flickering varies on the textures used and can be attenuated by use of darker colours.  The flickering can be eliminated by not using the firebox effect.  The fireglow and burning coal (coal) effects are OK.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note: This feature does not work currently in T:ANE and TRS19.&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can, of course, always make your own.&lt;br /&gt;
&lt;br /&gt;
=Scripting additional behaviour in a cab=&lt;br /&gt;
&lt;br /&gt;
A lot can be achieved in Trainz purely by naming the controls correctly and relying on Trainz default cab scripts to make them work. A quite reasonable cab can be made for many locomotives without having to do any scripting whatsoever.&lt;br /&gt;
&lt;br /&gt;
However, a lot more realism can be achieved by scripting the cab. Additional features can be added beyond what Trainz supports, including new types of controls, or extended behaviour on existing controls.&lt;br /&gt;
&lt;br /&gt;
The first thing to consider when looking at scripting a cab, is &amp;quot;is the cab the best place for this feature?&amp;quot;. A cab is not a persistent asset, which means it can go away at any point. When it&#039;s gone, it isn&#039;t running it&#039;s script. Consequently, it is a bad place for any persistent or time based logic - it should only be used to script the immediate behaviour of the controls. Anything beyond this should be implemented the vehicle itself or possibly a script library, both of which are more persistent objects.&lt;br /&gt;
&lt;br /&gt;
If all you want to achieve is to add some simple extra features (e.g. a display of signal aspects within the cab), you can derive from the trainz standard classes, and inherit the default behaviour when adding your new behaviour. This means you can concentrate on just your extra feature, and don&#039;t have to worry about making existing functionality work.&lt;br /&gt;
&lt;br /&gt;
If you want to do something a little more advanced (e.g. change the behaviour of the throttle and/or brake controllers), then you are probably best deriving your cab script from the &#039;cabin&#039; class, ignoring the default cab scripts, and implementing your required behaviour from scratch. This gives you a lot more control, but you do need to do more yourself.&lt;br /&gt;
&lt;br /&gt;
For some examples of the first route, have a look at the MN cabs - the M7 or the ACMU are good examples. Both have a cab signal repeater implemented in the cab interior script, and use the base functionality for almost everything else.&lt;br /&gt;
&lt;br /&gt;
-~= To Be Continued... =~-&lt;br /&gt;
&lt;br /&gt;
==Return to Index==&lt;br /&gt;
 &lt;br /&gt;
[[HowToGuides|&amp;lt;&amp;lt; How To Guides]]&lt;br /&gt;
&lt;br /&gt;
[[Category:How-to guides]]&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Animation_Effect&amp;diff=29700</id>
		<title>Animation Effect</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Animation_Effect&amp;diff=29700"/>
		<updated>2021-06-16T17:17:57Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: /* Explanations and default values */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Animation effect kind is a [[&amp;quot;mesh-table&amp;quot; Container]] effect container.&lt;br /&gt;
&lt;br /&gt;
This page describes [[trainz-build]] 4.6.&lt;br /&gt;
&lt;br /&gt;
The following tags are supported: &lt;br /&gt;
&lt;br /&gt;
 kind &amp;quot;animation&amp;quot;&lt;br /&gt;
 name &amp;quot;&amp;quot;&lt;br /&gt;
 anim &amp;quot;&amp;quot;&lt;br /&gt;
 looped 0&lt;br /&gt;
 speed 1.0&lt;br /&gt;
 animation-starts-active 0&lt;br /&gt;
 animation-has-random-start-position 0&lt;br /&gt;
&lt;br /&gt;
===Explanations and default values===&lt;br /&gt;
The animation effect is used to define the animation for a mesh. Usually, the animation will be controlled by a script related to the asset.&lt;br /&gt;
&lt;br /&gt;
kind&lt;br /&gt;
:Text. The kind name for this effect container.&lt;br /&gt;
:Compulsory &amp;quot;animation&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
name&lt;br /&gt;
:Text. A name for this effect container. This name can be used in scripts.&lt;br /&gt;
:Optional. Default &amp;quot;&amp;quot;&lt;br /&gt;
:&#039;&#039;&#039;Obsolete as of TRS19 111951.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
anim&lt;br /&gt;
:Name. The name of an animation (.kin) file included with this asset&lt;br /&gt;
:Compulsory. &lt;br /&gt;
&lt;br /&gt;
looped&lt;br /&gt;
:Boolean. 0 (false) = the animation executes once when triggered, then stops.  1 = the animation restarts when it reaches the end.&lt;br /&gt;
:Compulsory. &lt;br /&gt;
&lt;br /&gt;
speed&lt;br /&gt;
:Float. A multiplier for the execution rate of the animation.&lt;br /&gt;
:Compulsory. &lt;br /&gt;
&lt;br /&gt;
animation-starts-active&lt;br /&gt;
:Boolean. 0 (false, default) = the animation only begins playing when triggered from script. 1 (true) = the animation starts playing immediately when the parent mesh is first created in the scene.&lt;br /&gt;
&lt;br /&gt;
animation-has-random-start-position&lt;br /&gt;
:Boolean. 0 (false, default) = the animation starts playing from the beginning. 1 (true) = the animation starts at a random position. This is intended to permit multiple instances of a single scenery asset to avoid looking artificially synchronised. Script should avoid attempting to control the animation position if this tag is enabled, as the results may be unpredictable. Typically used with &#039;animation-starts-active&#039; and &#039;looped&#039; enabled.&lt;br /&gt;
&lt;br /&gt;
[[Category:Config Container]]&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=M.tbumpenv&amp;diff=27661</id>
		<title>M.tbumpenv</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=M.tbumpenv&amp;diff=27661"/>
		<updated>2021-02-03T08:11:45Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: /* Blender Material Configuration (2.8+) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This is a legacy material, and should only be used where compatibility with older versions of Trainz is required.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&lt;br /&gt;
Bump mapped environment reflective material.&lt;br /&gt;
&lt;br /&gt;
Blends a environment reflection map onto a bump map.  The reflection is controlled in the alpha channel of the diffuse map. White in the alpha channel is full sun/sky reflection and black is no reflection. &lt;br /&gt;
&lt;br /&gt;
The environment cube map is generated by the game and is not specified in the material configuration.&lt;br /&gt;
&lt;br /&gt;
Used too heavily it will drastically change the original surface color. Used gently it has subtle advantages over m.reflect.&lt;br /&gt;
&lt;br /&gt;
Reducing the specular level (changing the specular color to gray) will reduce the strength of reflection.&lt;br /&gt;
&lt;br /&gt;
When used in &#039;&#039;&#039;TRS19&#039;&#039;&#039; , the alpha channel of the diffuse texture will represent the &#039;&#039;metallic&#039;&#039; and the normal map alpha will determine the &#039;&#039;roughness&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=Preview=&lt;br /&gt;
[[Image:mat_tbumpenv.jpg]]&lt;br /&gt;
=Max Settings=&lt;br /&gt;
[[Image:max_material_tbumpenv.jpg]]&lt;br /&gt;
=Max Settings in detail=&lt;br /&gt;
* Ambient - Ambient color R,G,B&lt;br /&gt;
* Diffuse - Diffuse color R,G,B&lt;br /&gt;
* Specular - Specular color R,G,B&lt;br /&gt;
* Opacity - Level of transparency, 0 = transparent, 100 = opaque.&lt;br /&gt;
* Glossiness - Should be set to 32 to match game.&lt;br /&gt;
* [[Diffuse map]] - RGB = diffuse color, A = environment reflection strength/mask&lt;br /&gt;
* [[Opacity map]] - Legacy support for Diffuse texture Alpha channel - As per above, the alpha channel of the Diffuse texture provides the environment reflection strength/mask&lt;br /&gt;
* [[Normal map]] - RGB = bump normal A, = specular strength&lt;br /&gt;
&lt;br /&gt;
=Blender Material Configuration (2.7x)=&lt;br /&gt;
&lt;br /&gt;
You must use the Blender Render option in Blender as the Cycles Render in V2.79 doesn&#039;t export the texture names associated with the material. You will need a diffuse, and normal texture.&lt;br /&gt;
The material must have the suffix .m.tbumpenv , with any name you like. Here is an example with the material name called &amp;quot;Material.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:Tbumpenv279config.png|border|middle|]]&lt;br /&gt;
&lt;br /&gt;
[[File:Blender27TbumpenvDiffuse.png|border|middle|x700px]]  [[File:Blender27TbumpenvNormal.png|border|middle|x700px]]&lt;br /&gt;
&lt;br /&gt;
=Blender Material Configuration (2.8+)=&lt;br /&gt;
&lt;br /&gt;
In order to export with Blender 2.8+, you will need Rileyzzz&#039;s IM Exporter: [https://github.com/rileyzzz/BlenderIMExporter https://github.com/rileyzzz/BlenderIMExporter]&lt;br /&gt;
&lt;br /&gt;
The Eevee or Cycles renderer will work fine for exporting. The resulting material may look strange in Blender; this is normal. The material must have the suffix .m.tbumpenv , with any name you like. &lt;br /&gt;
&lt;br /&gt;
Use the following node setup to export:&lt;br /&gt;
&lt;br /&gt;
[[File:Tbumpenv - tbumptex Blender 2.8+.png|border|middle|x700px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Additionally, the Alpha, Roughness, Specular, and Emission sliders can be altered to change the appearance of your model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AlphaSlider2.8+.png|border|middle|x300px]] Alpha - Reflects the Visibility (opacity) of the material&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ShininessSlider2.8+.png|border|middle|x300px]] Roughness - Reflects the shininess of the material&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SpecularSlider2.8+.png|border|middle|x300px]] Specular - Reflects the specular value of the material&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:EmissionSlider2.8+.png|border|middle|x300px]] Emission - The Emission strength value can be left at 1.0. If you want your material to glow, change the emission colour to any colour you&#039;d like.&lt;br /&gt;
&lt;br /&gt;
=Substance Painter Preset=&lt;br /&gt;
&lt;br /&gt;
If you want to use Substance Painter for legacy materials, tbumpenv is your best option. It also lets content look almost up to par in TRS19. Here is a Dropbox link with a preset for you: [https://www.dropbox.com/s/6wpuivje3ua1f6v/tbumpenv.spexp?dl=0]. &lt;br /&gt;
* &#039;&#039;&#039;Note: You may have to adjust the alpha channels more to your liking. By default Trainz is quite sensitive for the environment intensity, so you&#039;ll need to adjust the diffuse alpha accordingly.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Related Links=&lt;br /&gt;
[[Material Types]] - Material types supported by Trainz.&lt;br /&gt;
&lt;br /&gt;
[[Max Exporters]] - 3D Studio Max exporters.&lt;br /&gt;
&lt;br /&gt;
[[Exporting with 3D Studio Max]] - Material setup and exporting with 3DS Max.&lt;br /&gt;
&lt;br /&gt;
[[.texture.txt Files]] - What goes into a .texture.txt file&lt;br /&gt;
&lt;br /&gt;
[[Category:Material types]]&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=M.tbumpenv&amp;diff=27660</id>
		<title>M.tbumpenv</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=M.tbumpenv&amp;diff=27660"/>
		<updated>2021-02-03T08:07:32Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This is a legacy material, and should only be used where compatibility with older versions of Trainz is required.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&lt;br /&gt;
Bump mapped environment reflective material.&lt;br /&gt;
&lt;br /&gt;
Blends a environment reflection map onto a bump map.  The reflection is controlled in the alpha channel of the diffuse map. White in the alpha channel is full sun/sky reflection and black is no reflection. &lt;br /&gt;
&lt;br /&gt;
The environment cube map is generated by the game and is not specified in the material configuration.&lt;br /&gt;
&lt;br /&gt;
Used too heavily it will drastically change the original surface color. Used gently it has subtle advantages over m.reflect.&lt;br /&gt;
&lt;br /&gt;
Reducing the specular level (changing the specular color to gray) will reduce the strength of reflection.&lt;br /&gt;
&lt;br /&gt;
When used in &#039;&#039;&#039;TRS19&#039;&#039;&#039; , the alpha channel of the diffuse texture will represent the &#039;&#039;metallic&#039;&#039; and the normal map alpha will determine the &#039;&#039;roughness&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=Preview=&lt;br /&gt;
[[Image:mat_tbumpenv.jpg]]&lt;br /&gt;
=Max Settings=&lt;br /&gt;
[[Image:max_material_tbumpenv.jpg]]&lt;br /&gt;
=Max Settings in detail=&lt;br /&gt;
* Ambient - Ambient color R,G,B&lt;br /&gt;
* Diffuse - Diffuse color R,G,B&lt;br /&gt;
* Specular - Specular color R,G,B&lt;br /&gt;
* Opacity - Level of transparency, 0 = transparent, 100 = opaque.&lt;br /&gt;
* Glossiness - Should be set to 32 to match game.&lt;br /&gt;
* [[Diffuse map]] - RGB = diffuse color, A = environment reflection strength/mask&lt;br /&gt;
* [[Opacity map]] - Legacy support for Diffuse texture Alpha channel - As per above, the alpha channel of the Diffuse texture provides the environment reflection strength/mask&lt;br /&gt;
* [[Normal map]] - RGB = bump normal A, = specular strength&lt;br /&gt;
&lt;br /&gt;
=Blender Material Configuration (2.7x)=&lt;br /&gt;
&lt;br /&gt;
You must use the Blender Render option in Blender as the Cycles Render in V2.79 doesn&#039;t export the texture names associated with the material. You will need a diffuse, and normal texture.&lt;br /&gt;
The material must have the suffix .m.tbumpenv , with any name you like. Here is an example with the material name called &amp;quot;Material.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:Tbumpenv279config.png|border|middle|]]&lt;br /&gt;
&lt;br /&gt;
[[File:Blender27TbumpenvDiffuse.png|border|middle|x700px]]  [[File:Blender27TbumpenvNormal.png|border|middle|x700px]]&lt;br /&gt;
&lt;br /&gt;
=Blender Material Configuration (2.8+)=&lt;br /&gt;
&lt;br /&gt;
In order to export with Blender 2.8+, you will need Rileyzzz&#039;s IM Exporter: [https://github.com/rileyzzz/BlenderIMExporter https://github.com/rileyzzz/BlenderIMExporter]&lt;br /&gt;
&lt;br /&gt;
The Eevee or Cycles renderer will work fine for exporting. The resulting material may look strange in Blender; this is normal. The material must have the suffix .m.tbumpenv , with any name you like. &lt;br /&gt;
&lt;br /&gt;
Use the following node setup to export:&lt;br /&gt;
&lt;br /&gt;
[[File:Tbumpenv - tbumptex Blender 2.8+.png|border|middle|x700px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Additionally, the Alpha, Roughness, Specular, and Emission sliders can be altered to change the appearance of your model.&lt;br /&gt;
&lt;br /&gt;
Alpha - Reflects the Visibility (opacity) of the material&lt;br /&gt;
&lt;br /&gt;
Roughness - Reflects the shininess of the material&lt;br /&gt;
&lt;br /&gt;
Specular - Reflects the specular value of the material&lt;br /&gt;
&lt;br /&gt;
Emission - The Emission strength value can be left at 1.0. If you want your material to glow, change the emission colour from black to any shade in-between black and white. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AlphaSlider2.8+.png|border|middle]]&lt;br /&gt;
&lt;br /&gt;
[[File:ShininessSlider2.8+.png|border|middle]]&lt;br /&gt;
&lt;br /&gt;
[[File:SpecularSlider2.8+.png|border|middle]]&lt;br /&gt;
&lt;br /&gt;
[[File:EmissionSlider2.8+.png|border|middle]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Substance Painter Preset=&lt;br /&gt;
&lt;br /&gt;
If you want to use Substance Painter for legacy materials, tbumpenv is your best option. It also lets content look almost up to par in TRS19. Here is a Dropbox link with a preset for you: [https://www.dropbox.com/s/6wpuivje3ua1f6v/tbumpenv.spexp?dl=0]. &lt;br /&gt;
* &#039;&#039;&#039;Note: You may have to adjust the alpha channels more to your liking. By default Trainz is quite sensitive for the environment intensity, so you&#039;ll need to adjust the diffuse alpha accordingly.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Related Links=&lt;br /&gt;
[[Material Types]] - Material types supported by Trainz.&lt;br /&gt;
&lt;br /&gt;
[[Max Exporters]] - 3D Studio Max exporters.&lt;br /&gt;
&lt;br /&gt;
[[Exporting with 3D Studio Max]] - Material setup and exporting with 3DS Max.&lt;br /&gt;
&lt;br /&gt;
[[.texture.txt Files]] - What goes into a .texture.txt file&lt;br /&gt;
&lt;br /&gt;
[[Category:Material types]]&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=M.tbumpenv&amp;diff=27659</id>
		<title>M.tbumpenv</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=M.tbumpenv&amp;diff=27659"/>
		<updated>2021-02-03T08:03:36Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: Added Blender 2.8+ Configuration with Rileyzzz&amp;#039;s Exporter&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This is a legacy material, and should only be used where compatibility with older versions of Trainz is required.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&lt;br /&gt;
Bump mapped environment reflective material.&lt;br /&gt;
&lt;br /&gt;
Blends a environment reflection map onto a bump map.  The reflection is controlled in the alpha channel of the diffuse map. White in the alpha channel is full sun/sky reflection and black is no reflection. &lt;br /&gt;
&lt;br /&gt;
The environment cube map is generated by the game and is not specified in the material configuration.&lt;br /&gt;
&lt;br /&gt;
Used too heavily it will drastically change the original surface color. Used gently it has subtle advantages over m.reflect.&lt;br /&gt;
&lt;br /&gt;
Reducing the specular level (changing the specular color to gray) will reduce the strength of reflection.&lt;br /&gt;
&lt;br /&gt;
When used in &#039;&#039;&#039;TRS19&#039;&#039;&#039; , the alpha channel of the diffuse texture will represent the &#039;&#039;metallic&#039;&#039; and the normal map alpha will determine the &#039;&#039;roughness&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=Preview=&lt;br /&gt;
[[Image:mat_tbumpenv.jpg]]&lt;br /&gt;
=Max Settings=&lt;br /&gt;
[[Image:max_material_tbumpenv.jpg]]&lt;br /&gt;
=Max Settings in detail=&lt;br /&gt;
* Ambient - Ambient color R,G,B&lt;br /&gt;
* Diffuse - Diffuse color R,G,B&lt;br /&gt;
* Specular - Specular color R,G,B&lt;br /&gt;
* Opacity - Level of transparency, 0 = transparent, 100 = opaque.&lt;br /&gt;
* Glossiness - Should be set to 32 to match game.&lt;br /&gt;
* [[Diffuse map]] - RGB = diffuse color, A = environment reflection strength/mask&lt;br /&gt;
* [[Opacity map]] - Legacy support for Diffuse texture Alpha channel - As per above, the alpha channel of the Diffuse texture provides the environment reflection strength/mask&lt;br /&gt;
* [[Normal map]] - RGB = bump normal A, = specular strength&lt;br /&gt;
&lt;br /&gt;
=Blender Material Configuration (2.7x)=&lt;br /&gt;
&lt;br /&gt;
You must use the Blender Render option in Blender as the Cycles Render in V2.79 doesn&#039;t export the texture names associated with the material. You will need a diffuse, and normal texture.&lt;br /&gt;
The material must have the suffix .m.tbumpenv , with any name you like. Here is an example with the material name called &amp;quot;Material.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:Tbumpenv279config.png|border|middle|]]&lt;br /&gt;
&lt;br /&gt;
[[File:Blender27TbumpenvDiffuse.png|border|middle|x700px]]  [[File:Blender27TbumpenvNormal.png|border|middle|x700px]]&lt;br /&gt;
&lt;br /&gt;
=Blender Material Configuration (2.8+)=&lt;br /&gt;
&lt;br /&gt;
In order to export with Blender 2.8+, you will need Rileyzzz&#039;s IM Exporter: [https://github.com/rileyzzz/BlenderIMExporter https://github.com/rileyzzz/BlenderIMExporter]&lt;br /&gt;
&lt;br /&gt;
The Eevee or Cycles renderer will work fine for exporting. The resulting material may look strange in Blender; this is normal. The material must have the suffix .m.tbumpenv , with any name you like. &lt;br /&gt;
&lt;br /&gt;
Use the following node setup to export:&lt;br /&gt;
&lt;br /&gt;
[[File:Tbumpenv - tbumptex Blender 2.8+.png|border|middle|x700px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Additionally, the Alpha, Roughness, Specular, and Emission sliders can be altered to change the appearance of your model.&lt;br /&gt;
&lt;br /&gt;
Alpha - Reflects the Visibility (opacity) of the material&lt;br /&gt;
&lt;br /&gt;
Roughness - Reflects the shininess of the material&lt;br /&gt;
&lt;br /&gt;
Specular - Reflects the specular value of the material&lt;br /&gt;
&lt;br /&gt;
Emission - The Emission strength value can be left at 1.0. If you want your material to glow, change the emission colour from black to any shade in-between black and white. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AlphaSlider2.8+.png|border|left]]&lt;br /&gt;
[[File:ShininessSlider2.8+.png|border|left]]&lt;br /&gt;
[[File:SpecularSlider2.8+.png|border|left]]&lt;br /&gt;
[[File:EmissionSlider2.8+.png|border|left]]&lt;br /&gt;
&lt;br /&gt;
=Substance Painter Preset=&lt;br /&gt;
&lt;br /&gt;
If you want to use Substance Painter for legacy materials, tbumpenv is your best option. It also lets content look almost up to par in TRS19. Here is a Dropbox link with a preset for you: [https://www.dropbox.com/s/6wpuivje3ua1f6v/tbumpenv.spexp?dl=0]. &lt;br /&gt;
* &#039;&#039;&#039;Note: You may have to adjust the alpha channels more to your liking. By default Trainz is quite sensitive for the environment intensity, so you&#039;ll need to adjust the diffuse alpha accordingly.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Related Links=&lt;br /&gt;
[[Material Types]] - Material types supported by Trainz.&lt;br /&gt;
&lt;br /&gt;
[[Max Exporters]] - 3D Studio Max exporters.&lt;br /&gt;
&lt;br /&gt;
[[Exporting with 3D Studio Max]] - Material setup and exporting with 3DS Max.&lt;br /&gt;
&lt;br /&gt;
[[.texture.txt Files]] - What goes into a .texture.txt file&lt;br /&gt;
&lt;br /&gt;
[[Category:Material types]]&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=File:ShininessSlider2.8%2B.png&amp;diff=27657</id>
		<title>File:ShininessSlider2.8+.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=File:ShininessSlider2.8%2B.png&amp;diff=27657"/>
		<updated>2021-02-03T07:57:43Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=File:SpecularSlider2.8%2B.png&amp;diff=27656</id>
		<title>File:SpecularSlider2.8+.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=File:SpecularSlider2.8%2B.png&amp;diff=27656"/>
		<updated>2021-02-03T07:57:28Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=File:AlphaSlider2.8%2B.png&amp;diff=27655</id>
		<title>File:AlphaSlider2.8+.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=File:AlphaSlider2.8%2B.png&amp;diff=27655"/>
		<updated>2021-02-03T07:56:25Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=File:EmissionSlider2.8%2B.png&amp;diff=27654</id>
		<title>File:EmissionSlider2.8+.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=File:EmissionSlider2.8%2B.png&amp;diff=27654"/>
		<updated>2021-02-03T07:56:08Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=File:Tbumpenv_-_tbumptex_Blender_2.8%2B.png&amp;diff=27653</id>
		<title>File:Tbumpenv - tbumptex Blender 2.8+.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=File:Tbumpenv_-_tbumptex_Blender_2.8%2B.png&amp;diff=27653"/>
		<updated>2021-02-03T07:49:26Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=M.pbrmetal&amp;diff=27652</id>
		<title>M.pbrmetal</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=M.pbrmetal&amp;diff=27652"/>
		<updated>2021-02-03T06:43:39Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: /* Blender Material Configuration V2.8+ */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[m.pbrmetal]] is the most basic PBR-based material type used in Trainz, and should be the default material type of choice for any mesh unless some specific feature of some other material type is required. All PBR materials are defined using a multitude of texture channels (not just a simple RGB image) which define various aspects of the material on a per-texel basis. One major advantage of this approach is that a single in-game [[material]] can be used to display various different real-world materials, rather than requiring multiple separate in-game materials with different parameters. Trainz uses a Metallic/Roughness style [[Physically Based Rendering|PBR workflow]].&lt;br /&gt;
&lt;br /&gt;
It should be noted that the &amp;quot;metal&amp;quot; in the name of this material refers to the physical property used in the lighting equations; it does not mean that the material is only appropriate for metallic surfaces.&lt;br /&gt;
&lt;br /&gt;
This page describes [[&amp;quot;Trainz-build&amp;quot; number|content format v4.6]] and assumes that the [[FBX file format]] is used as a data source for any meshes.&lt;br /&gt;
&lt;br /&gt;
=Texture Slots=&lt;br /&gt;
The following texture slots are used for this material. All textures should typically have the same dimensions unless they represent a uniform color, however this is not strictly enforced.&lt;br /&gt;
&lt;br /&gt;
==Albedo==&lt;br /&gt;
RGB: The [[albedo map]] defines the base color of each texel. The sRGB color space is used.&lt;br /&gt;
&lt;br /&gt;
Please note that there is no alpha channel support. For the most robust result, the alpha channel should be omitted or set to 1.0 (white). Note that unlike legacy Trainz materials, PBR materials do not autodetect opacity mode based on the texture in use. The content creator must select the appropriate material for their desired outcome. Runtime texture replacement should not expect to replace an opaque texture with a blended or masked texture and have the material update automatically.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Albedo Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbralbedomap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
==Normal==&lt;br /&gt;
RGB: Surface [[normal map]]. This defines which way the surface is facing, relative to the interpolated vertex normals. Since this is an XYZ format rather than color data, it should never be modified in Photoshop. Using Photoshop to add a fourth channel or copy/paste smaller textures into a [[texture atlas]] is acceptable. Per-pixel manipulation or use of filters on the &amp;quot;RGB&amp;quot; channels is not acceptable.&lt;br /&gt;
&lt;br /&gt;
A: [[Parallax Occlusion Map|Displacement height]]. 0.0 represents the deepest possible value, while 1.0 represents the shallowest possible value. While it is possible to paint this data in Photoshop, a linear color space must be used, and far superior results will be available through other data sources. The parallax height and the surface normal must be kept in sync, which means that a third-party tool must be used to generate the surface normal from the parallax height if you are painting this map manually.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Normal Texture Example with no Alpha Channel (Parallax)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrnormalmap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Normal Texture Example with Alpha Channel (Parallax)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrnormalwithalpha.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
==Parameter==&lt;br /&gt;
This texture is comprised of four separate channels which each form a separate data element. Linear color space (not sRGB) is used for these channels.&lt;br /&gt;
&lt;br /&gt;
[[File:pbrparametersall.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
R: Emissive. This causes the texture to have an internal glow, even when no external light is present. Used for phosphors, permanently-lit markings, etc. The glow color is based on the albedo. Note that this glow does not cast light upon surrounding surfaces except via the Bloom post-processing effect. You might want to consider making this a gray / dark gray color on some assets that you want more of the albedo color to show through indirect (ambient) lit surfaces.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Parameters (Emissive - Red Channel) Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrparametersemissivemap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
G: Roughness. Defines whether the surface reflections are shiny (0.0) or matte (1.0). See the [[Physically Based Rendering|PBR metal workflow]] for details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Parameters (Roughness - Green Channel) Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrparametersroughnessmap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
B: Ambient Occlusion. Defines whether the surface is exposed to ambient lighting conditions (1.0) or affected only by direct lighting (0.0).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Parameters (Ambient Occlusion - Blue Channel) Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrparametersambientocclusionmap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
A: Metallicity. Defines whether the surface is metallic (1.0) with the albedo used to colorize reflected light, or dielectric (0.0) with the albedo used to colorize the surface. While intermediate values are not physically accurate, they may be used to emulate subsurfaces which are partially metallic. See the [[Physically Based Rendering|PBR metal workflow]] for details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Parameters (Metallic - Alpha Channel) Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrparametersmetallicmap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
The following images show this material type with a few basic configurations of roughness and metallicity, under identical environmental conditions.&lt;br /&gt;
&lt;br /&gt;
[[File:m.pbrmetal-0.png|border|middle|x200px]] [[File:m.pbrmetal-1.png|border|middle|x200px]] [[File:m.pbrmetal-2.png|border|middle|x200px]] [[File:m.pbrmetal-3.png|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:trainz_material_cast_iron.jpg|border|middle|x512px]]&lt;br /&gt;
&lt;br /&gt;
Example asset download:&lt;br /&gt;
&lt;br /&gt;
[http://download.trainzportal.com/tutorials/Trainz_Material_-_pbrmetal_(cast_iron).cdp Trainz Material - pbrmetal (cast iron)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:trainz_material_gloss_paint.jpg|border|middle|x512px]]&lt;br /&gt;
&lt;br /&gt;
Example asset download:&lt;br /&gt;
&lt;br /&gt;
[http://download.trainzportal.com/tutorials/Trainz_Material_-_pbrmetal_(gloss_paint).cdp Trainz Material - pbrmetal (gloss paint)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:trainz_material_painted_metal.jpg|border|middle|x512px]]&lt;br /&gt;
&lt;br /&gt;
Example asset download:&lt;br /&gt;
&lt;br /&gt;
[http://download.trainzportal.com/tutorials/Trainz_Material_-_pbrmetal_(painted_metal).cdp Trainz Material - pbrmetal (painted metal)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:trainz_material_rubber.jpg|border|middle|x512px]]&lt;br /&gt;
&lt;br /&gt;
Example asset download:&lt;br /&gt;
&lt;br /&gt;
[http://download.trainzportal.com/tutorials/Trainz_Material_-_pbrmetal_(rubber).cdp Trainz Material - pbrmetal (rubber)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:trainz_material_stainless_steel.jpg|border|middle|x512px]]&lt;br /&gt;
&lt;br /&gt;
Example asset download:&lt;br /&gt;
&lt;br /&gt;
[http://download.trainzportal.com/tutorials/Trainz_Material_-_pbrmetal_(stainless_steel).cdp Trainz Material - pbrmetal (stainless steel)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:chart_roughness_metallic.jpg|border|middle|x512px]]&lt;br /&gt;
&lt;br /&gt;
Example asset (route + objects) download:&lt;br /&gt;
&lt;br /&gt;
[http://download.trainzportal.com/tutorials/pbr_roughness_metallic_chart_180831a.cdp PBR Roughness / Metallic Chart]&lt;br /&gt;
&lt;br /&gt;
=3ds Max Material Configuration=&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Texture Assignment&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrmetal3dsmaxtextureassignment.jpg]]&lt;br /&gt;
&lt;br /&gt;
=Blender Material Configuration V2.79b=&lt;br /&gt;
&lt;br /&gt;
You must use the Blender Render option in Blender as the Cycles Render in V2.79b doesn&#039;t export the texture names associated with the material.  &lt;br /&gt;
&lt;br /&gt;
The albedo and normal textures have no special requirements but the parameters texture must use the Influence-&amp;gt;Specular-&amp;gt;Hardness tag (checkbox).  The value of the hardness is not exported by the Blender FBX exporter.  Sample settings are shown below.  Note that the normal texture does not use an alpha channel in this example.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Blender_PBRMetal_albedo_setting.jpg|border|middle|x700px]]  [[File:Blender_PBRMetal_normal_setting.jpg|border|middle|x700px]]  [[File:Blender_PBRMetal_parameters_setting.jpg|border|middle|x700px]]&lt;br /&gt;
&lt;br /&gt;
=Blender Material Configuration (2.8+)=&lt;br /&gt;
&lt;br /&gt;
The shader node is a Principled BSDF shader and the FBX exporter supports the export of some texture names but not all.  The following connections should be made:&lt;br /&gt;
&lt;br /&gt;
Albedo texture to the Base Color input.&lt;br /&gt;
&lt;br /&gt;
Parameter texture to the Roughness input.&lt;br /&gt;
&lt;br /&gt;
The normal texture, via a normal converter set to Tangent, to the Normal input.&lt;br /&gt;
&lt;br /&gt;
The 3D view of the mesh does not show a true PBR render.&lt;br /&gt;
&lt;br /&gt;
You will need to update the texture.txt files created by the Trainz FBX importer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Blender 2.80 shader export nodes.jpg|border|middle|x700px]]&lt;br /&gt;
&lt;br /&gt;
=Maya LT Material Configuration=&lt;br /&gt;
&lt;br /&gt;
Maya LT uses a Phong shader and the parameters texture should be linked to the shader Cosine Power input via a Set Range node.  Note that the input and output of this node both use Value X.  The Normal Map must be passed through a Bump converter and then connected to the shader Normal input.  The Bump converter &amp;quot;Use as&amp;quot; value within the attributes editor must use the &amp;quot;Tangent Space Normals&amp;quot; option.  See the images below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note.  The material name shown in these images has &amp;quot;FBXASC046&amp;quot; where the full stops (periods) appear in the name box.m.pbrmetal.  Maya LT does not permit full stops (periods) in name and substitutes an underscore which doesn&#039;t work for Trainz.  FBXASC046 gets replaced with a full stop on export.  N3V are looking at this issue.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Sample_pbrmetal_material.jpg|border|middle]]&lt;br /&gt;
[[File:Sample_pbrmetal_material_properties.jpg|border|middle]]  [[File:Bump_normal_converter_properties.jpg|border|middle]]&lt;br /&gt;
&lt;br /&gt;
=Substance Painter Export Preset=&lt;br /&gt;
&lt;br /&gt;
Export preset for Substance Painter. This preset puts every map you need into Albedo, Normal and Parameter texture channels. As result you will get 3 textures, ready for importing into game.&lt;br /&gt;
&lt;br /&gt;
The link below is a preset that has height maps enabled by default.   &lt;br /&gt;
&lt;br /&gt;
[https://www.dropbox.com/s/ukp3p8uw53332ay/Trainz2019_WithHeight.spexp?dl=0 Trainz 2019 Exporter with Height Maps Enabled]&lt;br /&gt;
&lt;br /&gt;
The link below contains a preset that does not have height maps enabled, which may be more useful to some on rollingstock.&lt;br /&gt;
&lt;br /&gt;
[https://www.dropbox.com/s/4gzmuzdy8g7nwzc/Trainz2019.spexp?dl=0 Trainz 2019 Exporter with Height Maps Disabled]&lt;br /&gt;
&lt;br /&gt;
==Installing the Preset==&lt;br /&gt;
&lt;br /&gt;
First download either or both presets to your computer from the links above. Open Substance Painter and navigate to File -&amp;gt; Import Resources. &lt;br /&gt;
&lt;br /&gt;
[[File:Step2.png]]&lt;br /&gt;
&lt;br /&gt;
At the top of the new window, click on &amp;quot;Add resources.&amp;quot; Then locate your preset you&#039;d like to import.&lt;br /&gt;
&lt;br /&gt;
[[File:Step3.png]]&lt;br /&gt;
&lt;br /&gt;
After selecting the preset Substance Painter should already recognize that it is an export preset. &lt;br /&gt;
&lt;br /&gt;
[[File:Step4.png]]&lt;br /&gt;
&lt;br /&gt;
In the dropdown window at the bottom right corner of the active window, you can select where you want to save it. You can either save this into your project file you are currently working on, or add it to your shelf. If you save it to your shelf you won&#039;t have to import it for every project, so this is the best method! After you are done, click Import.&lt;br /&gt;
&lt;br /&gt;
[[File:Step5N.png]]&lt;br /&gt;
&lt;br /&gt;
==Exporting Textures==&lt;br /&gt;
&lt;br /&gt;
When you are ready to export your textures from your project, navigate at the top left to File -&amp;gt; Export Textures. &lt;br /&gt;
&lt;br /&gt;
[[File:Step6.png]]&lt;br /&gt;
&lt;br /&gt;
In this new window, select the dropdown window near &amp;quot;Config&amp;quot; and select your Trainz 2019 preset from the dropdown window. After you select which texture size you want to export or which materials to export, hit export and your textures will export! At the top of the window will be the directory where your textures will export to. In my case, it is exporting to K:\Class 47\Textures\game\lit up. You can change the directory by simply clicking on it.&lt;br /&gt;
&lt;br /&gt;
[[File:Step7.png]]&lt;br /&gt;
&lt;br /&gt;
That&#039;s all you have to do! These presets will support all PBR materials including pbrmetalmasked, and glass. However to use alphas you will need to enable opacity in the Texture Set Settings.&lt;br /&gt;
&lt;br /&gt;
[[Category:Material types| ]]&lt;br /&gt;
[[Category:Modeling]]&lt;br /&gt;
[[Category:Content creation]]&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=M.glass&amp;diff=27651</id>
		<title>M.glass</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=M.glass&amp;diff=27651"/>
		<updated>2021-02-03T06:43:16Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: /* Blender Material Configuration V2.8+ */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[m.glass]] is a variation on the [[m.pbrmetal]] material. It adds a [[blended alpha]] channel to allow actual glass-like transparencies to be created. All PBR materials are defined using a multitude of texture channels (not just a simple RGB image) which define various aspects of the material on a per-texel basis. One major advantage of this approach is that a single in-game material can be used to display various different real-world materials, rather than requiring multiple separate in-game materials with different parameters. Trainz uses a Metallic/Roughness style PBR workflow.&lt;br /&gt;
&lt;br /&gt;
This material should be used for creating glass and glass-like materials (eg. ice) only. This material has various limitations which make it unsuitable for general use. It is expected that this material will be enhanced over time to improve the glass-like effect, which will further compromise any meshes which attempt to misuse this material for non-glass surfaces. If cutout-style transparency is desired, [[m.pbrmetalmasked]] should be used instead. Foliage should use [[m.pbrmetalmasked]] or [[m.clutter]] with high-resolution geometry and/or texture maps to provide appropriate coverage, rather than attempting to fake coverage using blended alpha.&lt;br /&gt;
&lt;br /&gt;
This page describes content format v4.6 and assumes that the FBX file format is used as a data source for any meshes.&lt;br /&gt;
&lt;br /&gt;
=Texture Slots=&lt;br /&gt;
The following texture slots are used for this material. All textures should typically have the same dimensions unless they represent a uniform color, however this is not strictly enforced.&lt;br /&gt;
&lt;br /&gt;
==Albedo==&lt;br /&gt;
RGB: The [[albedo map]] defines the base color of each texel. The sRGB color space is used.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Albedo Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Fire albedo.png|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
A: The alpha channel provides a greyscale [[blended alpha]] channel. Black indicates full transparency. White indicates full opacity. Mid levels offer partial transparency. If the alpha channel is omitted, this material becomes fully opaque but still suffers from a number of drawbacks, unlike the truly opaque [[m.pbrmetal]]. Note that unlike legacy Trainz materials, PBR materials do not autodetect opacity mode based on the texture in use. The content creator must select the appropriate material for their desired outcome. Runtime texture replacement should not expect to replace an opaque texture with a blended or masked texture and have the material update automatically.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpha Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Fire alpha.png|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
The full texture is available here: [[File:fire.tga]]&lt;br /&gt;
&lt;br /&gt;
==Normal==&lt;br /&gt;
RGB: Surface [[normal map]]. This defines which way the surface is facing, relative to the interpolated vertex normals. Since this is an XYZ format rather than color data, it should never be modified in Photoshop. Using Photoshop to add a fourth channel or copy/paste smaller textures into a [[texture atlas]] is acceptable. Per-pixel manipulation or use of filters on the &amp;quot;RGB&amp;quot; channels is not acceptable.&lt;br /&gt;
&lt;br /&gt;
A: [[Parallax Occlusion Map|Displacement height]]. 0.0 represents the deepest possible value, while 1.0 represents the shallowest possible value. While it is possible to paint this data in Photoshop, a linear color space must be used, and far superior results will be available through other data sources. The parallax height and the surface normal must be kept in sync, which means that a third-party tool must be used to generate the surface normal from the parallax height if you are painting this map manually.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Normal Texture Example with no Alpha Channel (Parallax)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrnormalmap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Normal Texture Example with Alpha Channel (Parallax)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrnormalwithalpha.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
==Parameter==&lt;br /&gt;
This texture is comprised of four separate channels which each form a separate data element. Linear color space (not sRGB) is used for these channels.&lt;br /&gt;
&lt;br /&gt;
[[File:pbrparametersall.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
R: Emissive. This causes the texture to have an internal glow, even when no external light is present. Used for phosphors, permanently-lit markings, etc. The glow color is based on the albedo. Note that this glow does not cast light upon surrounding surfaces except via the Bloom post-processing effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Parameters (Emissive - Red Channel) Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrparametersemissivemap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
G: Roughness. Defines whether the surface reflections are shiny (0.0) or matte (1.0). See the [[Physically Based Rendering|PBR metal workflow]] for details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Parameters (Roughness - Green Channel) Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrparametersroughnessmap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
B: Ambient Occlusion. Defines whether the surface is exposed to ambient lighting conditions (1.0) or affected only by direct lighting (0.0).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Parameters (Ambient Occlusion - Blue Channel) Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrparametersambientocclusionmap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
A: Metallicity. Defines whether the surface is metallic (1.0) with the albedo used to colorize reflected light, or dielectric (0.0) with the albedo used to colorize the surface. While intermediate values are not physically accurate, they may be used to emulate subsurfaces which are partially metallic. See the [[Physically Based Rendering|PBR metal workflow]] for details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Parameters (Metallic - Alpha Channel) Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrparametersmetallicmap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
=Limitations=&lt;br /&gt;
As a truly transparent surface, [[m.glass]] offers excellent standalone visual quality but suffers from a number of drawbacks, including:&lt;br /&gt;
* Limited or no shadow-casting.&lt;br /&gt;
* Limited or no z-buffer writes.&lt;br /&gt;
* Limited capability to correctly resolve z-order against itself or other transparent surfaces.&lt;br /&gt;
* Lower performance.&lt;br /&gt;
&lt;br /&gt;
These limitations are not considered defining characteristics of the material and may change in exact outcome based on changes to the underlying render technology. Minor rendering artifacts caused by these limitations are considered inevitable. Major artifacts (such as see-through walls or large objects with missing shadows) caused by these limitations are considered a content creation fault (eg. inappropriate use of this material where another material would have given a superior result; inappropriate use of a correct-but-limited asset while route building, etc.) and not an engine bug.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
[[File:trainz_material_glass.jpg|border|middle|x512px]]&lt;br /&gt;
&lt;br /&gt;
Example asset download:&lt;br /&gt;
&lt;br /&gt;
[http://download.trainzportal.com/tutorials/Trainz_Material_-_glass.cdp Trainz Material - glass]&lt;br /&gt;
&lt;br /&gt;
=3ds Max Material Configuration=&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Texture Assignment&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ConfigTextureMaxGlass.jpg]]&lt;br /&gt;
&lt;br /&gt;
=Blender Material Configuration (2.7x)=&lt;br /&gt;
You must use the Blender Render option in Blender as the Cycles Render doesn&#039;t export the texture names associated with the material.  The cycles option is still being investigated.&lt;br /&gt;
&lt;br /&gt;
The albedo must have the &amp;quot;Use Alpha&amp;quot; and Influence-&amp;gt;Diffuse-&amp;gt;Alpha tag ticked. The normal does not require any special settings. The parameters texture must use the Influence-&amp;gt;Specular-&amp;gt;Hardness tag (checkbox).  The value of the hardness is not exported by the Blender FBX exporter.  Sample settings are shown below. All textures except the albedo are using png in this example because they do not require an Alpha channel.&lt;br /&gt;
&lt;br /&gt;
[[File:BlenderFBXmglassAlbedo.png|border|middle|x700px]]  [[File:BlenderFBXmglassNormal.png|border|middle|x700px]]  [[File:BlenderFBXmglassparameter.png|border|middle|x700px]]&lt;br /&gt;
&lt;br /&gt;
=Blender Material Configuration (2.8+)=&lt;br /&gt;
&lt;br /&gt;
The shader node is a Principled BSDF shader and the FBX exporter supports the export of some texture names but not all.  The following connections should be made:&lt;br /&gt;
&lt;br /&gt;
Albedo texture to the Base Color input.&lt;br /&gt;
&lt;br /&gt;
Parameter texture to the Roughness input.&lt;br /&gt;
&lt;br /&gt;
The normal texture, via a normal converter set to Tangent, to the Normal input.&lt;br /&gt;
&lt;br /&gt;
The 3D view of the mesh does not show a true PBR render.&lt;br /&gt;
&lt;br /&gt;
You will need to update the texture.txt files created by the Trainz FBX importer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Blender 2.80 shader export nodes.jpg|border|middle|x700px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Material types| ]]&lt;br /&gt;
[[Category:Modeling]]&lt;br /&gt;
[[Category:Content creation]]&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=M.pbrmetalmasked&amp;diff=27650</id>
		<title>M.pbrmetalmasked</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=M.pbrmetalmasked&amp;diff=27650"/>
		<updated>2021-02-03T06:43:07Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: /* Blender Material Configuration V2.8+ */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[m.pbrmetalmasked]] is a minor variation on the [[m.pbrmetal]] material. It adds a [[masked alpha]] channel to allow a complex outline to be created without the use of large numbers of [[polygon]]s. All PBR materials are defined using a multitude of texture channels (not just a simple RGB image) which define various aspects of the material on a per-texel basis. One major advantage of this approach is that a single in-game material can be used to display various different real-world materials, rather than requiring multiple separate in-game materials with different parameters. Trainz uses a Metallic/Roughness style PBR workflow.&lt;br /&gt;
&lt;br /&gt;
It should be noted that the &amp;quot;metal&amp;quot; in the name of this material refers to the physical property used in the lighting equations; it does not mean that the material is only appropriate for metallic surfaces.&lt;br /&gt;
&lt;br /&gt;
On some hardware, [[masked alpha]] materials may perform substantially worse than an opaque material. This cost is per-[[fragment]], meaning that it may be suitable to use a masked material on low-[[Level of Detail|LOD]] meshes where polygon count must remain low and where fragment count is naturally low. On higher-LOD meshes, especially where the material is expected to fill a reasonable percentage of the screen, masked materials should be avoided in favor of higher polygon detail, or should be used in conjunction with true opaque materials such that the majority of opaque fragments are filled by the opaque materials and only the complex edge detail is filled by the masked material.&lt;br /&gt;
&lt;br /&gt;
This page describes content format v4.6 and assumes that the FBX file format is used as a data source for any meshes.&lt;br /&gt;
&lt;br /&gt;
=Texture Slots=&lt;br /&gt;
The following texture slots are used for this material. All textures should typically have the same dimensions unless they represent a uniform color, however this is not strictly enforced.&lt;br /&gt;
&lt;br /&gt;
==Albedo==&lt;br /&gt;
RGB: The [[albedo map]] defines the base color of each texel. The sRGB color space is used.&lt;br /&gt;
&lt;br /&gt;
A: The alpha channel provides a &amp;quot;black and white&amp;quot; [[masked alpha]] channel. Black indicates full transparency, meaning that the [[fragment]] is discarded. White indicates full opacity, meaning that rendering proceeds as per [[m.pbrmetal]]. If the alpha channel is omitted, this material acts exactly as [[m.pbrmetal]] except with lower performance. Note that unlike legacy Trainz materials, PBR materials do not autodetect opacity mode based on the texture in use. The content creator must select the appropriate material for their desired outcome. Runtime texture replacement should not expect to replace an opaque texture with a blended or masked texture and have the material update automatically.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Albedo Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:PortalAlbedowAlpha.png|500px]]&lt;br /&gt;
&lt;br /&gt;
Color Channel Separated&lt;br /&gt;
&lt;br /&gt;
[[File:PortalAlbedo.png|500px]]&lt;br /&gt;
&lt;br /&gt;
Alpha Channel Separated&lt;br /&gt;
&lt;br /&gt;
[[File:PortalAlpha.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==Normal==&lt;br /&gt;
RGB: Surface [[normal map]]. This defines which way the surface is facing, relative to the interpolated vertex normals. Since this is an XYZ format rather than color data, it should never be modified in Photoshop. Using Photoshop to add a fourth channel or copy/paste smaller textures into a [[texture atlas]] is acceptable. Per-pixel manipulation or use of filters on the &amp;quot;RGB&amp;quot; channels is not acceptable.&lt;br /&gt;
&lt;br /&gt;
A: [[Parallax Occlusion Map|Displacement height]]. 0.0 represents the deepest possible value, while 1.0 represents the shallowest possible value. While it is possible to paint this data in Photoshop, a linear color space must be used, and far superior results will be available through other data sources. The parallax height and the surface normal must be kept in sync, which means that a third-party tool must be used to generate the surface normal from the parallax height if you are painting this map manually.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Normal Texture Example with no Alpha Channel (Parallax)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrnormalmap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Normal Texture Example with Alpha Channel (Parallax)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrnormalwithalpha.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
==Parameter==&lt;br /&gt;
This texture is comprised of four separate channels which each form a separate data element. Linear color space (not sRGB) is used for these channels.&lt;br /&gt;
&lt;br /&gt;
[[File:pbrparametersall.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
R: Emissive. This causes the texture to have an internal glow, even when no external light is present. Used for phosphors, permanently-lit markings, etc. The glow color is based on the albedo. Note that this glow does not cast light upon surrounding surfaces except via the Bloom post-processing effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Parameters (Emissive - Red Channel) Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrparametersemissivemap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
G: Roughness. Defines whether the surface reflections are shiny (0.0) or matte (1.0). See the [[Physically Based Rendering|PBR metal workflow]] for details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Parameters (Roughness - Green Channel) Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrparametersroughnessmap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
B: Ambient Occlusion. Defines whether the surface is exposed to ambient lighting conditions (1.0) or affected only by direct lighting (0.0).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Parameters (Ambient Occlusion - Blue Channel) Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrparametersambientocclusionmap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
A: Metallicity. Defines whether the surface is metallic (1.0) with the albedo used to colorize reflected light, or dielectric (0.0) with the albedo used to colorize the surface. While intermediate values are not physically accurate, they may be used to emulate subsurfaces which are partially metallic. See the [[Physically Based Rendering|PBR metal workflow]] for details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Parameters (Metallic - Alpha Channel) Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrparametersmetallicmap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
[[File:trainz_material_pbrmetalmasked.jpg|border|middle|x512px]]&lt;br /&gt;
&lt;br /&gt;
Example asset download:&lt;br /&gt;
&lt;br /&gt;
[http://download.trainzportal.com/tutorials/Trainz_Material_-_pbrmetalmasked.cdp Trainz Material - pbrmetalmasked + emissive]&lt;br /&gt;
&lt;br /&gt;
=3ds Max Material Configuration=&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Texture Assignment&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:kosl.png]]&lt;br /&gt;
&lt;br /&gt;
=Blender Material Configuration (2.7x)=&lt;br /&gt;
You must use the Blender Render option in Blender as the Cycles Render doesn&#039;t export the texture names associated with the material.  The cycles option is still being investigated.&lt;br /&gt;
&lt;br /&gt;
The albedo must have the &amp;quot;Use Alpha&amp;quot; and Influence-&amp;gt;Diffuse-&amp;gt;Alpha tag ticked. The normal does not require any special settings. The parameters texture must use the Influence-&amp;gt;Specular-&amp;gt;Hardness tag (checkbox).  The value of the hardness is not exported by the Blender FBX exporter.  Sample settings are shown below. All textures except the albedo are using png in this example because they do not require an Alpha channel.&lt;br /&gt;
&lt;br /&gt;
[[File:BlenderFBXmglassAlbedo.png|border|middle|x700px]]  [[File:BlenderFBXmglassNormal.png|border|middle|x700px]]  [[File:BlenderFBXmglassparameter.png|border|middle|x700px]]&lt;br /&gt;
&lt;br /&gt;
=Blender Material Configuration (2.8+)=&lt;br /&gt;
&lt;br /&gt;
The shader node is a Principled BSDF shader and the FBX exporter supports the export of some texture names but not all.  The following connections should be made:&lt;br /&gt;
&lt;br /&gt;
Albedo texture to the Base Color input.&lt;br /&gt;
&lt;br /&gt;
Parameter texture to the Roughness input.&lt;br /&gt;
&lt;br /&gt;
The normal texture, via a normal converter set to Tangent, to the Normal input.&lt;br /&gt;
&lt;br /&gt;
The 3D view of the mesh does not show a true PBR render.&lt;br /&gt;
&lt;br /&gt;
You will need to update the texture.txt files created by the Trainz FBX importer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Blender 2.80 shader export nodes.jpg|border|middle|x700px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Material types| ]]&lt;br /&gt;
[[Category:Modeling]]&lt;br /&gt;
[[Category:Content creation]]&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=M.pbrmetalmasked&amp;diff=27649</id>
		<title>M.pbrmetalmasked</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=M.pbrmetalmasked&amp;diff=27649"/>
		<updated>2021-02-03T06:42:27Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: Updated Blender 2.7x settings with images, and added 2.8+ references&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[m.pbrmetalmasked]] is a minor variation on the [[m.pbrmetal]] material. It adds a [[masked alpha]] channel to allow a complex outline to be created without the use of large numbers of [[polygon]]s. All PBR materials are defined using a multitude of texture channels (not just a simple RGB image) which define various aspects of the material on a per-texel basis. One major advantage of this approach is that a single in-game material can be used to display various different real-world materials, rather than requiring multiple separate in-game materials with different parameters. Trainz uses a Metallic/Roughness style PBR workflow.&lt;br /&gt;
&lt;br /&gt;
It should be noted that the &amp;quot;metal&amp;quot; in the name of this material refers to the physical property used in the lighting equations; it does not mean that the material is only appropriate for metallic surfaces.&lt;br /&gt;
&lt;br /&gt;
On some hardware, [[masked alpha]] materials may perform substantially worse than an opaque material. This cost is per-[[fragment]], meaning that it may be suitable to use a masked material on low-[[Level of Detail|LOD]] meshes where polygon count must remain low and where fragment count is naturally low. On higher-LOD meshes, especially where the material is expected to fill a reasonable percentage of the screen, masked materials should be avoided in favor of higher polygon detail, or should be used in conjunction with true opaque materials such that the majority of opaque fragments are filled by the opaque materials and only the complex edge detail is filled by the masked material.&lt;br /&gt;
&lt;br /&gt;
This page describes content format v4.6 and assumes that the FBX file format is used as a data source for any meshes.&lt;br /&gt;
&lt;br /&gt;
=Texture Slots=&lt;br /&gt;
The following texture slots are used for this material. All textures should typically have the same dimensions unless they represent a uniform color, however this is not strictly enforced.&lt;br /&gt;
&lt;br /&gt;
==Albedo==&lt;br /&gt;
RGB: The [[albedo map]] defines the base color of each texel. The sRGB color space is used.&lt;br /&gt;
&lt;br /&gt;
A: The alpha channel provides a &amp;quot;black and white&amp;quot; [[masked alpha]] channel. Black indicates full transparency, meaning that the [[fragment]] is discarded. White indicates full opacity, meaning that rendering proceeds as per [[m.pbrmetal]]. If the alpha channel is omitted, this material acts exactly as [[m.pbrmetal]] except with lower performance. Note that unlike legacy Trainz materials, PBR materials do not autodetect opacity mode based on the texture in use. The content creator must select the appropriate material for their desired outcome. Runtime texture replacement should not expect to replace an opaque texture with a blended or masked texture and have the material update automatically.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Albedo Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:PortalAlbedowAlpha.png|500px]]&lt;br /&gt;
&lt;br /&gt;
Color Channel Separated&lt;br /&gt;
&lt;br /&gt;
[[File:PortalAlbedo.png|500px]]&lt;br /&gt;
&lt;br /&gt;
Alpha Channel Separated&lt;br /&gt;
&lt;br /&gt;
[[File:PortalAlpha.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==Normal==&lt;br /&gt;
RGB: Surface [[normal map]]. This defines which way the surface is facing, relative to the interpolated vertex normals. Since this is an XYZ format rather than color data, it should never be modified in Photoshop. Using Photoshop to add a fourth channel or copy/paste smaller textures into a [[texture atlas]] is acceptable. Per-pixel manipulation or use of filters on the &amp;quot;RGB&amp;quot; channels is not acceptable.&lt;br /&gt;
&lt;br /&gt;
A: [[Parallax Occlusion Map|Displacement height]]. 0.0 represents the deepest possible value, while 1.0 represents the shallowest possible value. While it is possible to paint this data in Photoshop, a linear color space must be used, and far superior results will be available through other data sources. The parallax height and the surface normal must be kept in sync, which means that a third-party tool must be used to generate the surface normal from the parallax height if you are painting this map manually.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Normal Texture Example with no Alpha Channel (Parallax)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrnormalmap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Normal Texture Example with Alpha Channel (Parallax)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrnormalwithalpha.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
==Parameter==&lt;br /&gt;
This texture is comprised of four separate channels which each form a separate data element. Linear color space (not sRGB) is used for these channels.&lt;br /&gt;
&lt;br /&gt;
[[File:pbrparametersall.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
R: Emissive. This causes the texture to have an internal glow, even when no external light is present. Used for phosphors, permanently-lit markings, etc. The glow color is based on the albedo. Note that this glow does not cast light upon surrounding surfaces except via the Bloom post-processing effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Parameters (Emissive - Red Channel) Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrparametersemissivemap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
G: Roughness. Defines whether the surface reflections are shiny (0.0) or matte (1.0). See the [[Physically Based Rendering|PBR metal workflow]] for details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Parameters (Roughness - Green Channel) Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrparametersroughnessmap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
B: Ambient Occlusion. Defines whether the surface is exposed to ambient lighting conditions (1.0) or affected only by direct lighting (0.0).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Parameters (Ambient Occlusion - Blue Channel) Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrparametersambientocclusionmap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
A: Metallicity. Defines whether the surface is metallic (1.0) with the albedo used to colorize reflected light, or dielectric (0.0) with the albedo used to colorize the surface. While intermediate values are not physically accurate, they may be used to emulate subsurfaces which are partially metallic. See the [[Physically Based Rendering|PBR metal workflow]] for details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Parameters (Metallic - Alpha Channel) Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrparametersmetallicmap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
[[File:trainz_material_pbrmetalmasked.jpg|border|middle|x512px]]&lt;br /&gt;
&lt;br /&gt;
Example asset download:&lt;br /&gt;
&lt;br /&gt;
[http://download.trainzportal.com/tutorials/Trainz_Material_-_pbrmetalmasked.cdp Trainz Material - pbrmetalmasked + emissive]&lt;br /&gt;
&lt;br /&gt;
=3ds Max Material Configuration=&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Texture Assignment&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:kosl.png]]&lt;br /&gt;
&lt;br /&gt;
=Blender Material Configuration (2.7x)=&lt;br /&gt;
You must use the Blender Render option in Blender as the Cycles Render doesn&#039;t export the texture names associated with the material.  The cycles option is still being investigated.&lt;br /&gt;
&lt;br /&gt;
The albedo must have the &amp;quot;Use Alpha&amp;quot; and Influence-&amp;gt;Diffuse-&amp;gt;Alpha tag ticked. The normal does not require any special settings. The parameters texture must use the Influence-&amp;gt;Specular-&amp;gt;Hardness tag (checkbox).  The value of the hardness is not exported by the Blender FBX exporter.  Sample settings are shown below. All textures except the albedo are using png in this example because they do not require an Alpha channel.&lt;br /&gt;
&lt;br /&gt;
[[File:BlenderFBXmglassAlbedo.png|border|middle|x700px]]  [[File:BlenderFBXmglassNormal.png|border|middle|x700px]]  [[File:BlenderFBXmglassparameter.png|border|middle|x700px]]&lt;br /&gt;
&lt;br /&gt;
=Blender Material Configuration V2.8+=&lt;br /&gt;
&lt;br /&gt;
The shader node is a Principled BSDF shader and the FBX exporter supports the export of some texture names but not all.  The following connections should be made:&lt;br /&gt;
&lt;br /&gt;
Albedo texture to the Base Color input.&lt;br /&gt;
&lt;br /&gt;
Parameter texture to the Roughness input.&lt;br /&gt;
&lt;br /&gt;
The normal texture, via a normal converter set to Tangent, to the Normal input.&lt;br /&gt;
&lt;br /&gt;
The 3D view of the mesh does not show a true PBR render.&lt;br /&gt;
&lt;br /&gt;
You will need to update the texture.txt files created by the Trainz FBX importer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Blender 2.80 shader export nodes.jpg|border|middle|x700px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Material types| ]]&lt;br /&gt;
[[Category:Modeling]]&lt;br /&gt;
[[Category:Content creation]]&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=M.glass&amp;diff=27648</id>
		<title>M.glass</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=M.glass&amp;diff=27648"/>
		<updated>2021-02-03T06:40:37Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: /* Blender Material Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[m.glass]] is a variation on the [[m.pbrmetal]] material. It adds a [[blended alpha]] channel to allow actual glass-like transparencies to be created. All PBR materials are defined using a multitude of texture channels (not just a simple RGB image) which define various aspects of the material on a per-texel basis. One major advantage of this approach is that a single in-game material can be used to display various different real-world materials, rather than requiring multiple separate in-game materials with different parameters. Trainz uses a Metallic/Roughness style PBR workflow.&lt;br /&gt;
&lt;br /&gt;
This material should be used for creating glass and glass-like materials (eg. ice) only. This material has various limitations which make it unsuitable for general use. It is expected that this material will be enhanced over time to improve the glass-like effect, which will further compromise any meshes which attempt to misuse this material for non-glass surfaces. If cutout-style transparency is desired, [[m.pbrmetalmasked]] should be used instead. Foliage should use [[m.pbrmetalmasked]] or [[m.clutter]] with high-resolution geometry and/or texture maps to provide appropriate coverage, rather than attempting to fake coverage using blended alpha.&lt;br /&gt;
&lt;br /&gt;
This page describes content format v4.6 and assumes that the FBX file format is used as a data source for any meshes.&lt;br /&gt;
&lt;br /&gt;
=Texture Slots=&lt;br /&gt;
The following texture slots are used for this material. All textures should typically have the same dimensions unless they represent a uniform color, however this is not strictly enforced.&lt;br /&gt;
&lt;br /&gt;
==Albedo==&lt;br /&gt;
RGB: The [[albedo map]] defines the base color of each texel. The sRGB color space is used.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Albedo Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Fire albedo.png|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
A: The alpha channel provides a greyscale [[blended alpha]] channel. Black indicates full transparency. White indicates full opacity. Mid levels offer partial transparency. If the alpha channel is omitted, this material becomes fully opaque but still suffers from a number of drawbacks, unlike the truly opaque [[m.pbrmetal]]. Note that unlike legacy Trainz materials, PBR materials do not autodetect opacity mode based on the texture in use. The content creator must select the appropriate material for their desired outcome. Runtime texture replacement should not expect to replace an opaque texture with a blended or masked texture and have the material update automatically.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alpha Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Fire alpha.png|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
The full texture is available here: [[File:fire.tga]]&lt;br /&gt;
&lt;br /&gt;
==Normal==&lt;br /&gt;
RGB: Surface [[normal map]]. This defines which way the surface is facing, relative to the interpolated vertex normals. Since this is an XYZ format rather than color data, it should never be modified in Photoshop. Using Photoshop to add a fourth channel or copy/paste smaller textures into a [[texture atlas]] is acceptable. Per-pixel manipulation or use of filters on the &amp;quot;RGB&amp;quot; channels is not acceptable.&lt;br /&gt;
&lt;br /&gt;
A: [[Parallax Occlusion Map|Displacement height]]. 0.0 represents the deepest possible value, while 1.0 represents the shallowest possible value. While it is possible to paint this data in Photoshop, a linear color space must be used, and far superior results will be available through other data sources. The parallax height and the surface normal must be kept in sync, which means that a third-party tool must be used to generate the surface normal from the parallax height if you are painting this map manually.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Normal Texture Example with no Alpha Channel (Parallax)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrnormalmap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Normal Texture Example with Alpha Channel (Parallax)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrnormalwithalpha.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
==Parameter==&lt;br /&gt;
This texture is comprised of four separate channels which each form a separate data element. Linear color space (not sRGB) is used for these channels.&lt;br /&gt;
&lt;br /&gt;
[[File:pbrparametersall.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
R: Emissive. This causes the texture to have an internal glow, even when no external light is present. Used for phosphors, permanently-lit markings, etc. The glow color is based on the albedo. Note that this glow does not cast light upon surrounding surfaces except via the Bloom post-processing effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Parameters (Emissive - Red Channel) Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrparametersemissivemap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
G: Roughness. Defines whether the surface reflections are shiny (0.0) or matte (1.0). See the [[Physically Based Rendering|PBR metal workflow]] for details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Parameters (Roughness - Green Channel) Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrparametersroughnessmap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
B: Ambient Occlusion. Defines whether the surface is exposed to ambient lighting conditions (1.0) or affected only by direct lighting (0.0).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Parameters (Ambient Occlusion - Blue Channel) Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrparametersambientocclusionmap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
A: Metallicity. Defines whether the surface is metallic (1.0) with the albedo used to colorize reflected light, or dielectric (0.0) with the albedo used to colorize the surface. While intermediate values are not physically accurate, they may be used to emulate subsurfaces which are partially metallic. See the [[Physically Based Rendering|PBR metal workflow]] for details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Parameters (Metallic - Alpha Channel) Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrparametersmetallicmap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
=Limitations=&lt;br /&gt;
As a truly transparent surface, [[m.glass]] offers excellent standalone visual quality but suffers from a number of drawbacks, including:&lt;br /&gt;
* Limited or no shadow-casting.&lt;br /&gt;
* Limited or no z-buffer writes.&lt;br /&gt;
* Limited capability to correctly resolve z-order against itself or other transparent surfaces.&lt;br /&gt;
* Lower performance.&lt;br /&gt;
&lt;br /&gt;
These limitations are not considered defining characteristics of the material and may change in exact outcome based on changes to the underlying render technology. Minor rendering artifacts caused by these limitations are considered inevitable. Major artifacts (such as see-through walls or large objects with missing shadows) caused by these limitations are considered a content creation fault (eg. inappropriate use of this material where another material would have given a superior result; inappropriate use of a correct-but-limited asset while route building, etc.) and not an engine bug.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
[[File:trainz_material_glass.jpg|border|middle|x512px]]&lt;br /&gt;
&lt;br /&gt;
Example asset download:&lt;br /&gt;
&lt;br /&gt;
[http://download.trainzportal.com/tutorials/Trainz_Material_-_glass.cdp Trainz Material - glass]&lt;br /&gt;
&lt;br /&gt;
=3ds Max Material Configuration=&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Texture Assignment&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ConfigTextureMaxGlass.jpg]]&lt;br /&gt;
&lt;br /&gt;
=Blender Material Configuration (2.7x)=&lt;br /&gt;
You must use the Blender Render option in Blender as the Cycles Render doesn&#039;t export the texture names associated with the material.  The cycles option is still being investigated.&lt;br /&gt;
&lt;br /&gt;
The albedo must have the &amp;quot;Use Alpha&amp;quot; and Influence-&amp;gt;Diffuse-&amp;gt;Alpha tag ticked. The normal does not require any special settings. The parameters texture must use the Influence-&amp;gt;Specular-&amp;gt;Hardness tag (checkbox).  The value of the hardness is not exported by the Blender FBX exporter.  Sample settings are shown below. All textures except the albedo are using png in this example because they do not require an Alpha channel.&lt;br /&gt;
&lt;br /&gt;
[[File:BlenderFBXmglassAlbedo.png|border|middle|x700px]]  [[File:BlenderFBXmglassNormal.png|border|middle|x700px]]  [[File:BlenderFBXmglassparameter.png|border|middle|x700px]]&lt;br /&gt;
&lt;br /&gt;
=Blender Material Configuration V2.8+=&lt;br /&gt;
&lt;br /&gt;
The shader node is a Principled BSDF shader and the FBX exporter supports the export of some texture names but not all.  The following connections should be made:&lt;br /&gt;
&lt;br /&gt;
Albedo texture to the Base Color input.&lt;br /&gt;
&lt;br /&gt;
Parameter texture to the Roughness input.&lt;br /&gt;
&lt;br /&gt;
The normal texture, via a normal converter set to Tangent, to the Normal input.&lt;br /&gt;
&lt;br /&gt;
The 3D view of the mesh does not show a true PBR render.&lt;br /&gt;
&lt;br /&gt;
You will need to update the texture.txt files created by the Trainz FBX importer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Blender 2.80 shader export nodes.jpg|border|middle|x700px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Material types| ]]&lt;br /&gt;
[[Category:Modeling]]&lt;br /&gt;
[[Category:Content creation]]&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=M.pbrmetal&amp;diff=27647</id>
		<title>M.pbrmetal</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=M.pbrmetal&amp;diff=27647"/>
		<updated>2021-02-03T06:39:55Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: Edited Blender 2.8 references to not be in Beta&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[m.pbrmetal]] is the most basic PBR-based material type used in Trainz, and should be the default material type of choice for any mesh unless some specific feature of some other material type is required. All PBR materials are defined using a multitude of texture channels (not just a simple RGB image) which define various aspects of the material on a per-texel basis. One major advantage of this approach is that a single in-game [[material]] can be used to display various different real-world materials, rather than requiring multiple separate in-game materials with different parameters. Trainz uses a Metallic/Roughness style [[Physically Based Rendering|PBR workflow]].&lt;br /&gt;
&lt;br /&gt;
It should be noted that the &amp;quot;metal&amp;quot; in the name of this material refers to the physical property used in the lighting equations; it does not mean that the material is only appropriate for metallic surfaces.&lt;br /&gt;
&lt;br /&gt;
This page describes [[&amp;quot;Trainz-build&amp;quot; number|content format v4.6]] and assumes that the [[FBX file format]] is used as a data source for any meshes.&lt;br /&gt;
&lt;br /&gt;
=Texture Slots=&lt;br /&gt;
The following texture slots are used for this material. All textures should typically have the same dimensions unless they represent a uniform color, however this is not strictly enforced.&lt;br /&gt;
&lt;br /&gt;
==Albedo==&lt;br /&gt;
RGB: The [[albedo map]] defines the base color of each texel. The sRGB color space is used.&lt;br /&gt;
&lt;br /&gt;
Please note that there is no alpha channel support. For the most robust result, the alpha channel should be omitted or set to 1.0 (white). Note that unlike legacy Trainz materials, PBR materials do not autodetect opacity mode based on the texture in use. The content creator must select the appropriate material for their desired outcome. Runtime texture replacement should not expect to replace an opaque texture with a blended or masked texture and have the material update automatically.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Albedo Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbralbedomap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
==Normal==&lt;br /&gt;
RGB: Surface [[normal map]]. This defines which way the surface is facing, relative to the interpolated vertex normals. Since this is an XYZ format rather than color data, it should never be modified in Photoshop. Using Photoshop to add a fourth channel or copy/paste smaller textures into a [[texture atlas]] is acceptable. Per-pixel manipulation or use of filters on the &amp;quot;RGB&amp;quot; channels is not acceptable.&lt;br /&gt;
&lt;br /&gt;
A: [[Parallax Occlusion Map|Displacement height]]. 0.0 represents the deepest possible value, while 1.0 represents the shallowest possible value. While it is possible to paint this data in Photoshop, a linear color space must be used, and far superior results will be available through other data sources. The parallax height and the surface normal must be kept in sync, which means that a third-party tool must be used to generate the surface normal from the parallax height if you are painting this map manually.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Normal Texture Example with no Alpha Channel (Parallax)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrnormalmap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Normal Texture Example with Alpha Channel (Parallax)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrnormalwithalpha.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
==Parameter==&lt;br /&gt;
This texture is comprised of four separate channels which each form a separate data element. Linear color space (not sRGB) is used for these channels.&lt;br /&gt;
&lt;br /&gt;
[[File:pbrparametersall.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
R: Emissive. This causes the texture to have an internal glow, even when no external light is present. Used for phosphors, permanently-lit markings, etc. The glow color is based on the albedo. Note that this glow does not cast light upon surrounding surfaces except via the Bloom post-processing effect. You might want to consider making this a gray / dark gray color on some assets that you want more of the albedo color to show through indirect (ambient) lit surfaces.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Parameters (Emissive - Red Channel) Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrparametersemissivemap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
G: Roughness. Defines whether the surface reflections are shiny (0.0) or matte (1.0). See the [[Physically Based Rendering|PBR metal workflow]] for details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Parameters (Roughness - Green Channel) Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrparametersroughnessmap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
B: Ambient Occlusion. Defines whether the surface is exposed to ambient lighting conditions (1.0) or affected only by direct lighting (0.0).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Parameters (Ambient Occlusion - Blue Channel) Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrparametersambientocclusionmap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
A: Metallicity. Defines whether the surface is metallic (1.0) with the albedo used to colorize reflected light, or dielectric (0.0) with the albedo used to colorize the surface. While intermediate values are not physically accurate, they may be used to emulate subsurfaces which are partially metallic. See the [[Physically Based Rendering|PBR metal workflow]] for details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Parameters (Metallic - Alpha Channel) Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrparametersmetallicmap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
The following images show this material type with a few basic configurations of roughness and metallicity, under identical environmental conditions.&lt;br /&gt;
&lt;br /&gt;
[[File:m.pbrmetal-0.png|border|middle|x200px]] [[File:m.pbrmetal-1.png|border|middle|x200px]] [[File:m.pbrmetal-2.png|border|middle|x200px]] [[File:m.pbrmetal-3.png|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:trainz_material_cast_iron.jpg|border|middle|x512px]]&lt;br /&gt;
&lt;br /&gt;
Example asset download:&lt;br /&gt;
&lt;br /&gt;
[http://download.trainzportal.com/tutorials/Trainz_Material_-_pbrmetal_(cast_iron).cdp Trainz Material - pbrmetal (cast iron)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:trainz_material_gloss_paint.jpg|border|middle|x512px]]&lt;br /&gt;
&lt;br /&gt;
Example asset download:&lt;br /&gt;
&lt;br /&gt;
[http://download.trainzportal.com/tutorials/Trainz_Material_-_pbrmetal_(gloss_paint).cdp Trainz Material - pbrmetal (gloss paint)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:trainz_material_painted_metal.jpg|border|middle|x512px]]&lt;br /&gt;
&lt;br /&gt;
Example asset download:&lt;br /&gt;
&lt;br /&gt;
[http://download.trainzportal.com/tutorials/Trainz_Material_-_pbrmetal_(painted_metal).cdp Trainz Material - pbrmetal (painted metal)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:trainz_material_rubber.jpg|border|middle|x512px]]&lt;br /&gt;
&lt;br /&gt;
Example asset download:&lt;br /&gt;
&lt;br /&gt;
[http://download.trainzportal.com/tutorials/Trainz_Material_-_pbrmetal_(rubber).cdp Trainz Material - pbrmetal (rubber)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:trainz_material_stainless_steel.jpg|border|middle|x512px]]&lt;br /&gt;
&lt;br /&gt;
Example asset download:&lt;br /&gt;
&lt;br /&gt;
[http://download.trainzportal.com/tutorials/Trainz_Material_-_pbrmetal_(stainless_steel).cdp Trainz Material - pbrmetal (stainless steel)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:chart_roughness_metallic.jpg|border|middle|x512px]]&lt;br /&gt;
&lt;br /&gt;
Example asset (route + objects) download:&lt;br /&gt;
&lt;br /&gt;
[http://download.trainzportal.com/tutorials/pbr_roughness_metallic_chart_180831a.cdp PBR Roughness / Metallic Chart]&lt;br /&gt;
&lt;br /&gt;
=3ds Max Material Configuration=&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Texture Assignment&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrmetal3dsmaxtextureassignment.jpg]]&lt;br /&gt;
&lt;br /&gt;
=Blender Material Configuration V2.79b=&lt;br /&gt;
&lt;br /&gt;
You must use the Blender Render option in Blender as the Cycles Render in V2.79b doesn&#039;t export the texture names associated with the material.  &lt;br /&gt;
&lt;br /&gt;
The albedo and normal textures have no special requirements but the parameters texture must use the Influence-&amp;gt;Specular-&amp;gt;Hardness tag (checkbox).  The value of the hardness is not exported by the Blender FBX exporter.  Sample settings are shown below.  Note that the normal texture does not use an alpha channel in this example.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Blender_PBRMetal_albedo_setting.jpg|border|middle|x700px]]  [[File:Blender_PBRMetal_normal_setting.jpg|border|middle|x700px]]  [[File:Blender_PBRMetal_parameters_setting.jpg|border|middle|x700px]]&lt;br /&gt;
&lt;br /&gt;
=Blender Material Configuration V2.8+=&lt;br /&gt;
&lt;br /&gt;
The shader node is a Principled BSDF shader and the FBX exporter supports the export of some texture names but not all.  The following connections should be made:&lt;br /&gt;
&lt;br /&gt;
Albedo texture to the Base Color input.&lt;br /&gt;
&lt;br /&gt;
Parameter texture to the Roughness input.&lt;br /&gt;
&lt;br /&gt;
The normal texture, via a normal converter set to Tangent, to the Normal input.&lt;br /&gt;
&lt;br /&gt;
The 3D view of the mesh does not show a true PBR render.&lt;br /&gt;
&lt;br /&gt;
You will need to update the texture.txt files created by the Trainz FBX importer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Blender 2.80 shader export nodes.jpg|border|middle|x700px]]&lt;br /&gt;
&lt;br /&gt;
=Maya LT Material Configuration=&lt;br /&gt;
&lt;br /&gt;
Maya LT uses a Phong shader and the parameters texture should be linked to the shader Cosine Power input via a Set Range node.  Note that the input and output of this node both use Value X.  The Normal Map must be passed through a Bump converter and then connected to the shader Normal input.  The Bump converter &amp;quot;Use as&amp;quot; value within the attributes editor must use the &amp;quot;Tangent Space Normals&amp;quot; option.  See the images below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note.  The material name shown in these images has &amp;quot;FBXASC046&amp;quot; where the full stops (periods) appear in the name box.m.pbrmetal.  Maya LT does not permit full stops (periods) in name and substitutes an underscore which doesn&#039;t work for Trainz.  FBXASC046 gets replaced with a full stop on export.  N3V are looking at this issue.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Sample_pbrmetal_material.jpg|border|middle]]&lt;br /&gt;
[[File:Sample_pbrmetal_material_properties.jpg|border|middle]]  [[File:Bump_normal_converter_properties.jpg|border|middle]]&lt;br /&gt;
&lt;br /&gt;
=Substance Painter Export Preset=&lt;br /&gt;
&lt;br /&gt;
Export preset for Substance Painter. This preset puts every map you need into Albedo, Normal and Parameter texture channels. As result you will get 3 textures, ready for importing into game.&lt;br /&gt;
&lt;br /&gt;
The link below is a preset that has height maps enabled by default.   &lt;br /&gt;
&lt;br /&gt;
[https://www.dropbox.com/s/ukp3p8uw53332ay/Trainz2019_WithHeight.spexp?dl=0 Trainz 2019 Exporter with Height Maps Enabled]&lt;br /&gt;
&lt;br /&gt;
The link below contains a preset that does not have height maps enabled, which may be more useful to some on rollingstock.&lt;br /&gt;
&lt;br /&gt;
[https://www.dropbox.com/s/4gzmuzdy8g7nwzc/Trainz2019.spexp?dl=0 Trainz 2019 Exporter with Height Maps Disabled]&lt;br /&gt;
&lt;br /&gt;
==Installing the Preset==&lt;br /&gt;
&lt;br /&gt;
First download either or both presets to your computer from the links above. Open Substance Painter and navigate to File -&amp;gt; Import Resources. &lt;br /&gt;
&lt;br /&gt;
[[File:Step2.png]]&lt;br /&gt;
&lt;br /&gt;
At the top of the new window, click on &amp;quot;Add resources.&amp;quot; Then locate your preset you&#039;d like to import.&lt;br /&gt;
&lt;br /&gt;
[[File:Step3.png]]&lt;br /&gt;
&lt;br /&gt;
After selecting the preset Substance Painter should already recognize that it is an export preset. &lt;br /&gt;
&lt;br /&gt;
[[File:Step4.png]]&lt;br /&gt;
&lt;br /&gt;
In the dropdown window at the bottom right corner of the active window, you can select where you want to save it. You can either save this into your project file you are currently working on, or add it to your shelf. If you save it to your shelf you won&#039;t have to import it for every project, so this is the best method! After you are done, click Import.&lt;br /&gt;
&lt;br /&gt;
[[File:Step5N.png]]&lt;br /&gt;
&lt;br /&gt;
==Exporting Textures==&lt;br /&gt;
&lt;br /&gt;
When you are ready to export your textures from your project, navigate at the top left to File -&amp;gt; Export Textures. &lt;br /&gt;
&lt;br /&gt;
[[File:Step6.png]]&lt;br /&gt;
&lt;br /&gt;
In this new window, select the dropdown window near &amp;quot;Config&amp;quot; and select your Trainz 2019 preset from the dropdown window. After you select which texture size you want to export or which materials to export, hit export and your textures will export! At the top of the window will be the directory where your textures will export to. In my case, it is exporting to K:\Class 47\Textures\game\lit up. You can change the directory by simply clicking on it.&lt;br /&gt;
&lt;br /&gt;
[[File:Step7.png]]&lt;br /&gt;
&lt;br /&gt;
That&#039;s all you have to do! These presets will support all PBR materials including pbrmetalmasked, and glass. However to use alphas you will need to enable opacity in the Texture Set Settings.&lt;br /&gt;
&lt;br /&gt;
[[Category:Material types| ]]&lt;br /&gt;
[[Category:Modeling]]&lt;br /&gt;
[[Category:Content creation]]&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Adding_the_TRS19_F7_Cabin_to_your_Asset&amp;diff=23854</id>
		<title>Adding the TRS19 F7 Cabin to your Asset</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Adding_the_TRS19_F7_Cabin_to_your_Asset&amp;diff=23854"/>
		<updated>2020-08-27T00:02:19Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: /* Modifying the Nose color */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The new TRS19 EMD F7 cabin has the ability to change the color of the nose to match the road name of your locomotive asset. Changing the color of the nose is as simple as adding a few lines into the config of your locomotive of choice. &lt;br /&gt;
&lt;br /&gt;
[[File:F7IntroPage.png|800px]]&lt;br /&gt;
&lt;br /&gt;
== Adding the Cab to your Asset ==&lt;br /&gt;
&lt;br /&gt;
To begin, open the config of the locomotive you wish to have a custom nose color for. For this tutorial, we will be using &amp;lt;kuid2:999999:2222:1&amp;gt; 1 Hot Rod Special F7 from the DLS. It is recommended to open the config in a superior notepad program such as Notepad++ to preserve formatting. When the config for the Hot Rod F7 is opened, it looks something like this:&lt;br /&gt;
&lt;br /&gt;
    kuid                                    &amp;lt;kuid2:999999:2222:1&amp;gt;&lt;br /&gt;
    username                                &amp;quot;1 Hot Rod Special F7&amp;quot;&lt;br /&gt;
    kind                                    &amp;quot;traincar&amp;quot;&lt;br /&gt;
    trainz-build                            3.5&lt;br /&gt;
    engine                                  1&lt;br /&gt;
    enginespec                              &amp;lt;kuid:999999:42004250&amp;gt;&lt;br /&gt;
    enginesound                             &amp;lt;kuid:-1:42003000&amp;gt;&lt;br /&gt;
    hornsound                               &amp;lt;kuid:37581:1234&amp;gt;&lt;br /&gt;
    interior                                &amp;lt;kuid:217537:220&amp;gt;&lt;br /&gt;
    mesh-table&lt;br /&gt;
    {&lt;br /&gt;
      default&lt;br /&gt;
      {&lt;br /&gt;
        mesh                                &amp;quot;f7_hotrod_body/f7_hotrod_body.im&amp;quot;&lt;br /&gt;
        auto-create                         1&lt;br /&gt;
      }&lt;br /&gt;
  &lt;br /&gt;
      shadow&lt;br /&gt;
      {&lt;br /&gt;
        mesh                                &amp;quot;f7_hotrod_shadow/f7_hotrod_shadow.im&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    bogeys&lt;br /&gt;
    {&lt;br /&gt;
      0&lt;br /&gt;
      {&lt;br /&gt;
        bogey                               &amp;lt;kuid:999999:100100&amp;gt;&lt;br /&gt;
        reversed                            0&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    mass                                    100000&lt;br /&gt;
    company                                 &amp;quot;Auran Brew Crew&amp;quot;&lt;br /&gt;
    fonts                                   0&lt;br /&gt;
    smoke_shade                             0.5&lt;br /&gt;
    smoke_random                            2.6&lt;br /&gt;
    smoke_slowlife                          5&lt;br /&gt;
    smoke_fastlife                          4&lt;br /&gt;
    smoke_height                            2.3&lt;br /&gt;
    smoke_fastspeed                         100&lt;br /&gt;
    category-class                          &amp;quot;AC&amp;quot;&lt;br /&gt;
    category-era                            &amp;quot;2000s&amp;quot;&lt;br /&gt;
    category-region                         &amp;quot;AU&amp;quot;&lt;br /&gt;
    description                             &amp;quot;&amp;quot;&lt;br /&gt;
    author                                  &amp;quot;Brew Crew Productions&amp;quot;&lt;br /&gt;
    organisation                            &amp;quot;Auran Games Pty. Ltd.&amp;quot;&lt;br /&gt;
    contact-website                         &amp;quot;www.virtualtrainz.com&amp;quot;&lt;br /&gt;
    contact-email                           &amp;quot;helpdesk@auran.com&amp;quot;&lt;br /&gt;
    thumbnails&lt;br /&gt;
    {&lt;br /&gt;
      0&lt;br /&gt;
      {&lt;br /&gt;
        image                               &amp;quot;$screenshot$.jpg&amp;quot;&lt;br /&gt;
        width                               240&lt;br /&gt;
        height                              180&lt;br /&gt;
      }&lt;br /&gt;
      1&lt;br /&gt;
      {&lt;br /&gt;
        image                               &amp;quot;f7_hotrod_art\f7_hotrod_art_icon.texture&amp;quot;&lt;br /&gt;
        width                               128&lt;br /&gt;
        height                              64&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    kuid-table&lt;br /&gt;
    {&lt;br /&gt;
      0                                     &amp;lt;kuid:-1:101212&amp;gt;&lt;br /&gt;
      1                                     &amp;lt;kuid:-1:42003000&amp;gt;&lt;br /&gt;
      2                                     &amp;lt;kuid:-1:42003101&amp;gt;&lt;br /&gt;
      3                                     &amp;lt;kuid:999999:100100&amp;gt;&lt;br /&gt;
      4                                     &amp;lt;kuid:999999:42004250&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
The first thing to change is the interior kuid to reference the proper F7 cab. If your locomotive is right-hand drive and uses MPH, use the following kuid:&lt;br /&gt;
    &amp;lt;kuid:-25:1308&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Change the following line from: &lt;br /&gt;
    interior                                &amp;lt;kuid:217537:220&amp;gt;&lt;br /&gt;
to:&lt;br /&gt;
    interior                                &amp;lt;kuid:-25:1308&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The next step is to add an extensions table. Copy and paste the following code into your config:&lt;br /&gt;
&lt;br /&gt;
    extensions&lt;br /&gt;
    {&lt;br /&gt;
      f7cab_parameters&lt;br /&gt;
      {&lt;br /&gt;
        nosecolor                           &amp;quot;XXX&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
The placement of this code does not matter. I placed it directly under the interior tag line and above the mesh table to make editing the extensions easier to edit in the future. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    kuid                                    &amp;lt;kuid2:999999:2222:1&amp;gt;&lt;br /&gt;
    username                                &amp;quot;1 Hot Rod Special F7&amp;quot;&lt;br /&gt;
    kind                                    &amp;quot;traincar&amp;quot;&lt;br /&gt;
    trainz-build                            3.5&lt;br /&gt;
    engine                                  1&lt;br /&gt;
    enginespec                              &amp;lt;kuid:999999:42004250&amp;gt;&lt;br /&gt;
    enginesound                             &amp;lt;kuid:-1:42003000&amp;gt;&lt;br /&gt;
    hornsound                               &amp;lt;kuid:37581:1234&amp;gt;&lt;br /&gt;
    interior                                &amp;lt;kuid:217537:220&amp;gt;&lt;br /&gt;
    extensions&lt;br /&gt;
    {&lt;br /&gt;
      f7cab_parameters&lt;br /&gt;
      {&lt;br /&gt;
        nosecolor                           &amp;quot;XXX&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    mesh-table&lt;br /&gt;
    {&lt;br /&gt;
      default&lt;br /&gt;
      {&lt;br /&gt;
        mesh                                &amp;quot;f7_hotrod_body/f7_hotrod_body.im&amp;quot;&lt;br /&gt;
        auto-create                         1&lt;br /&gt;
      }&lt;br /&gt;
  &lt;br /&gt;
      shadow&lt;br /&gt;
      {&lt;br /&gt;
        mesh                                &amp;quot;f7_hotrod_shadow/f7_hotrod_shadow.im&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    ....&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Modifying the Nose color ==&lt;br /&gt;
&lt;br /&gt;
The final step is to change &amp;quot;XXX&amp;quot; to an appropriate string. Use the first column in the following table to determine the proper string to replace &amp;quot;XXX&amp;quot; with. The strings are case sensitive, so make sure it matches the table or else the cabin will default to black.&lt;br /&gt;
&lt;br /&gt;
By default, the F7 Cab supports these pre-built liveries:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Supported Road names&lt;br /&gt;
|-&lt;br /&gt;
|String &#039;&#039;&#039;(case sensitive!)&#039;&#039;&#039;&lt;br /&gt;
|Color&lt;br /&gt;
|Roadname&lt;br /&gt;
|-&lt;br /&gt;
|red&lt;br /&gt;
|Red&lt;br /&gt;
|Generic Red&lt;br /&gt;
|-&lt;br /&gt;
|superchief&lt;br /&gt;
|Red with Yellow Stripe&lt;br /&gt;
|ATSF Warbonnet&lt;br /&gt;
|-&lt;br /&gt;
|darkblue&lt;br /&gt;
|Dark Blue with Yellow Stripe&lt;br /&gt;
|ATSF Blue Warbonnet&lt;br /&gt;
|-&lt;br /&gt;
|green&lt;br /&gt;
|Green&lt;br /&gt;
|Burlington Northern&lt;br /&gt;
|-&lt;br /&gt;
|orange&lt;br /&gt;
|Orange/Green&lt;br /&gt;
|Great Northern&lt;br /&gt;
|-&lt;br /&gt;
|yellow&lt;br /&gt;
|Yellow&lt;br /&gt;
|North Western/Alaska&lt;br /&gt;
|-&lt;br /&gt;
|lightgrey&lt;br /&gt;
|Light Grey&lt;br /&gt;
|Canadian Pacific&lt;br /&gt;
|-&lt;br /&gt;
|blackred&lt;br /&gt;
|Red with black nose top&lt;br /&gt;
|Canadian National / CP Rail&lt;br /&gt;
|-&lt;br /&gt;
|winetrain&lt;br /&gt;
|Green/Gold&lt;br /&gt;
|Nappa Valley Wine Train&lt;br /&gt;
|-&lt;br /&gt;
|silver&lt;br /&gt;
|Silver/Black&lt;br /&gt;
|Southern Pacific&lt;br /&gt;
|-&lt;br /&gt;
|unionpacific&lt;br /&gt;
|Yellow with Green nose top&lt;br /&gt;
|Union Pacific&lt;br /&gt;
|-&lt;br /&gt;
|darkgrey&lt;br /&gt;
|Dark Grey with Dark Blue nose top&lt;br /&gt;
|Baltimore and Ohio&lt;br /&gt;
|-&lt;br /&gt;
|amtrakphase1&lt;br /&gt;
|Black/Red/White&lt;br /&gt;
|Amtrak Phase I&lt;br /&gt;
|-&lt;br /&gt;
|hotrod&lt;br /&gt;
|Black with Flames&lt;br /&gt;
|Hot Rod Special&lt;br /&gt;
|-&lt;br /&gt;
|prr_red_5stripe&lt;br /&gt;
|PRR Tuscan with 5 Stripe&lt;br /&gt;
|Pennsylvania Railroad&lt;br /&gt;
|-&lt;br /&gt;
|prr_red_1stripe&lt;br /&gt;
|PRR Tuscan with 1 Stripe&lt;br /&gt;
|Pennsylvania Railroad&lt;br /&gt;
|-&lt;br /&gt;
|prr_green_5stripe&lt;br /&gt;
|PRR Brunswick with 5 Stripe&lt;br /&gt;
|Pennsylvania Railroad&lt;br /&gt;
|-&lt;br /&gt;
|prr_green_1stripe&lt;br /&gt;
|PRR Brunswick with 1 Stripe&lt;br /&gt;
|Pennsylvania Railroad&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The final config would look something like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    kuid                                    &amp;lt;kuid2:999999:2222:1&amp;gt;&lt;br /&gt;
    username                                &amp;quot;1 Hot Rod Special F7&amp;quot;&lt;br /&gt;
    kind                                    &amp;quot;traincar&amp;quot;&lt;br /&gt;
    trainz-build                            3.5&lt;br /&gt;
    engine                                  1&lt;br /&gt;
    enginespec                              &amp;lt;kuid:999999:42004250&amp;gt;&lt;br /&gt;
    enginesound                             &amp;lt;kuid:-1:42003000&amp;gt;&lt;br /&gt;
    hornsound                               &amp;lt;kuid:37581:1234&amp;gt;&lt;br /&gt;
    interior                                &amp;lt;kuid:217537:220&amp;gt;&lt;br /&gt;
    extensions&lt;br /&gt;
    {&lt;br /&gt;
      f7cab_parameters&lt;br /&gt;
      {&lt;br /&gt;
        nosecolor                           &amp;quot;hotrod&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    mesh-table&lt;br /&gt;
    {&lt;br /&gt;
      default&lt;br /&gt;
      {&lt;br /&gt;
        mesh                                &amp;quot;f7_hotrod_body/f7_hotrod_body.im&amp;quot;&lt;br /&gt;
        auto-create                         1&lt;br /&gt;
      }&lt;br /&gt;
  &lt;br /&gt;
      shadow&lt;br /&gt;
      {&lt;br /&gt;
        mesh                                &amp;quot;f7_hotrod_shadow/f7_hotrod_shadow.im&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    bogeys&lt;br /&gt;
    {&lt;br /&gt;
      0&lt;br /&gt;
      {&lt;br /&gt;
        bogey                               &amp;lt;kuid:999999:100100&amp;gt;&lt;br /&gt;
        reversed                            0&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    mass                                    100000&lt;br /&gt;
    company                                 &amp;quot;Auran Brew Crew&amp;quot;&lt;br /&gt;
    fonts                                   0&lt;br /&gt;
    smoke_shade                             0.5&lt;br /&gt;
    smoke_random                            2.6&lt;br /&gt;
    smoke_slowlife                          5&lt;br /&gt;
    smoke_fastlife                          4&lt;br /&gt;
    smoke_height                            2.3&lt;br /&gt;
    smoke_fastspeed                         100&lt;br /&gt;
    category-class                          &amp;quot;AC&amp;quot;&lt;br /&gt;
    category-era                            &amp;quot;2000s&amp;quot;&lt;br /&gt;
    category-region                         &amp;quot;AU&amp;quot;&lt;br /&gt;
    description                             &amp;quot;&amp;quot;&lt;br /&gt;
    author                                  &amp;quot;Brew Crew Productions&amp;quot;&lt;br /&gt;
    organisation                            &amp;quot;Auran Games Pty. Ltd.&amp;quot;&lt;br /&gt;
    contact-website                         &amp;quot;www.virtualtrainz.com&amp;quot;&lt;br /&gt;
    contact-email                           &amp;quot;helpdesk@auran.com&amp;quot;&lt;br /&gt;
    thumbnails&lt;br /&gt;
    {&lt;br /&gt;
      0&lt;br /&gt;
      {&lt;br /&gt;
        image                               &amp;quot;$screenshot$.jpg&amp;quot;&lt;br /&gt;
        width                               240&lt;br /&gt;
        height                              180&lt;br /&gt;
      }&lt;br /&gt;
      1&lt;br /&gt;
      {&lt;br /&gt;
        image                               &amp;quot;f7_hotrod_art\f7_hotrod_art_icon.texture&amp;quot;&lt;br /&gt;
        width                               128&lt;br /&gt;
        height                              64&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    kuid-table&lt;br /&gt;
    {&lt;br /&gt;
      0                                     &amp;lt;kuid:-1:101212&amp;gt;&lt;br /&gt;
      1                                     &amp;lt;kuid:-1:42003000&amp;gt;&lt;br /&gt;
      2                                     &amp;lt;kuid:-1:42003101&amp;gt;&lt;br /&gt;
      3                                     &amp;lt;kuid:999999:100100&amp;gt;&lt;br /&gt;
      4                                     &amp;lt;kuid:999999:42004250&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
==Return to Index==&lt;br /&gt;
 &lt;br /&gt;
[[HowToGuides|&amp;lt;&amp;lt; How To Guides]]&lt;br /&gt;
&lt;br /&gt;
[[Category:How-to guides]]&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Class_Train&amp;diff=23848</id>
		<title>Class Train</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Class_Train&amp;diff=23848"/>
		<updated>2020-08-19T22:48:05Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: Added Train Physics Mode constants (DCC, Cab mode)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[TrainzScript Language Reference|API Hierarchy]]&lt;br /&gt;
**[[Class GSObject|GSObject]] *&lt;br /&gt;
***[[Class GameObject|GameObject]]&lt;br /&gt;
****Train&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*A train is a collection of vehicles in TRS.&lt;br /&gt;
*They act as a single entity and may be controlled using this class.&lt;br /&gt;
*A train is placed on a track in script by using [[Class World#CreateTrain|World.CreateTrain()]] or [[Class TrainUtil#CreateTrainFromSoup|TrainUtil.CreateTrainFromSoup()]]. &lt;br /&gt;
*Trainz will automatically create a Train object for each consist that appears in the game.&lt;br /&gt;
*When an existing train is uncoupled and split up into two separate consists a new train object is created.&lt;br /&gt;
*Similarly when two trains couple one of the train objects is destroyed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Messages==&lt;br /&gt;
*Messages sent to and from Train objects are listed below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=50%|margin=15px}}&lt;br /&gt;
|-&lt;br /&gt;
|bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Major&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Minor&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot;|&#039;&#039;&#039;Source&#039;&#039;&#039;||bgcolor=&amp;quot;#EEEEEE&amp;quot; |&#039;&#039;&#039;Destination&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|Schedule||Abort||Train||Train  &lt;br /&gt;
|-&lt;br /&gt;
|Schedule||Complete||Train||Broadcast  &lt;br /&gt;
|-&lt;br /&gt;
|Schedule||Touch||Train||Train  &lt;br /&gt;
|-&lt;br /&gt;
|[[Train Messages|Train]]||Deleted||Train||&lt;br /&gt;
|-&lt;br /&gt;
|[[Signal Messages|Train]]||Entered red signal notify||Train||Broadcast  &lt;br /&gt;
|-&lt;br /&gt;
|[[Signal Messages|Train]]||Entered red signal||Signal||Train  &lt;br /&gt;
|-&lt;br /&gt;
|[[Object Messages|Train]]||EnterTrack||Track||Train  &lt;br /&gt;
|-&lt;br /&gt;
|[[Object Messages|Train]]||InnerEnterTrack||Track||Train  &lt;br /&gt;
|-&lt;br /&gt;
|[[Object Messages|Train]]||InnerLeaveTrack||Track||Train  &lt;br /&gt;
|-&lt;br /&gt;
|[[Object Messages|Train]]||LeaveTrack||Track||Train  &lt;br /&gt;
|-&lt;br /&gt;
|[[Train Messages|Train]]||Over advisory speed limit||Train||Broadcast  &lt;br /&gt;
|-&lt;br /&gt;
|[[Train Messages|Train]]||Over floating speed limit||Train||Broadcast  &lt;br /&gt;
|-&lt;br /&gt;
|[[Train Messages|Train]]||Over speed limit||Train||Broadcast  &lt;br /&gt;
|-&lt;br /&gt;
|[[Train Messages|Train]]||ReachedTarget||Train||Train&lt;br /&gt;
|-&lt;br /&gt;
|[[Train Messages|Train]]||SlowingForTarget||Train||Train  &lt;br /&gt;
|-&lt;br /&gt;
|[[Train Messages|Train]]||StartedMoving||Train||Train  &lt;br /&gt;
|-&lt;br /&gt;
|[[Train Messages|Train]]||StoppedMoving||Train||Train  &lt;br /&gt;
|-&lt;br /&gt;
|[[Train Messages|Train]]||Under advisory speed limit||Train||Broadcast  &lt;br /&gt;
|-&lt;br /&gt;
|[[Train Messages|Train]]||Under floating speed limit||Train||Broadcast  &lt;br /&gt;
|-&lt;br /&gt;
|[[Train Messages|Train]]||Under speed limit||Train||Broadcast  &lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Constants==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Train Control Modes===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=375|public define int CONTROL_MANUAL = 1||User controls train, script can change settings.&lt;br /&gt;
|-&lt;br /&gt;
|public define int CONTROL_AUTOPILOT = 2||Autopilot controls train.&lt;br /&gt;
|-&lt;br /&gt;
|public define int CONTROL_AUTOMANUAL = 3||User controls train, autopilot takes over when train is not currently &#039;focused&#039;.&lt;br /&gt;
|-&lt;br /&gt;
|public define int CONTROL_SCRIPT = 4||Only the script can control the train.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Train Physics Modes===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=375|public define int PHYSICS_DCC = 1||DCC mode. &lt;br /&gt;
|-&lt;br /&gt;
|public define int PHYSICS_SIMULATION = 2||Cab mode.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Reverser Traction Modes===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=375|public define int TRACTION_FORWARD = 2||Reverse is in forward setting.&lt;br /&gt;
|-&lt;br /&gt;
|public define int TRACTION_NEUTRAL = 1||Reverser is in neutral.&lt;br /&gt;
|-&lt;br /&gt;
|public define int TRACTION_REVERSE = 0||Reverser is in reverse.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Train Brake Modes===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=375|public define float  TRAIN_BRAKE_RELEASE = 0.0||Train brakes are released.&lt;br /&gt;
|-&lt;br /&gt;
|public define float  TRAIN_BRAKE_INITIAL = 1.0||Train brakes are in initial mode.&lt;br /&gt;
|-&lt;br /&gt;
|public define float  TRAIN_BRAKE_APPLICATION = 2.0||Train brakes are applied.&lt;br /&gt;
|-&lt;br /&gt;
|public define float  TRAIN_BRAKE_HANDLE_OFF = 3.0||Train brake handle is off.&lt;br /&gt;
|-&lt;br /&gt;
|public define float  TRAIN_BRAKE_EMERGENCY = 4.0||Train brakes are in emergency stop position.&lt;br /&gt;
|-&lt;br /&gt;
|public define float  TRAIN_BRAKE_LAP = 5.0||Train brakes are in the lap position, not available for all trains.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Dynamic Brake States===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=375|public define int  DYNAMIC_BRAKE_TRACTION = 0||Dynamic brakes in traction mode.&lt;br /&gt;
|-&lt;br /&gt;
|public define int  DYNAMIC_BRAKE_NEUTRAL = 1 ||Dynamic brakes in neutral.&lt;br /&gt;
|-&lt;br /&gt;
|public define int  DYNAMIC_BRAKE_BRAKE = 2 ||Dynamic brakes are on.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Found Results===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=375|public define int  RESULT_NONE = 0||Item not found.&lt;br /&gt;
|-&lt;br /&gt;
|public define int  RESULT_FORWARD = 1||Item is in front of train.&lt;br /&gt;
|-&lt;br /&gt;
|public define int  RESULT_INSIDE = 2||Item is within the train, ie between the front and the rear limits.&lt;br /&gt;
|-&lt;br /&gt;
|public define int  RESULT_BACKWARD = 3||Item is behind the train.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Measurement Conversion Multipliers===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=375|public define float  KPH_TO_MPS = 0.278||Kilometres per hour -&amp;gt; Metres per second.&lt;br /&gt;
|-&lt;br /&gt;
|public define float  MPH_TO_MPS = 0.447||Miles per hour -&amp;gt; Metres per second.&lt;br /&gt;
|-&lt;br /&gt;
|public define float  MPH_TO_KPH = 1.609||Miles per hour -&amp;gt; Kilometres per hour.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Members==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{{TableHeader|width=95%|margin=15px}}&lt;br /&gt;
|width=375|&amp;lt;b&amp;gt;public Browser timeTableInfo&amp;lt;/b&amp;gt;||A publicly accessible Browser object for timetable information.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==Methods==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===AddVelocity===&lt;br /&gt;
{{MethodHeader|public native void AddVelocity(float velocity)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;velocity&#039;&#039;&#039; = Velocity to add to the current speed of the train.		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.AddVelocity(5.0);	&lt;br /&gt;
;Notes&lt;br /&gt;
*Velocity parameter must be in metres per second and may be negative.&lt;br /&gt;
*Use the [[#Measurement Conversion Multipliers|Measurement Conversion Multipliers]] to convert from other units.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ClearTrainTimetable===&lt;br /&gt;
{{MethodHeader|public void ClearTrainTimetable(ScenarioBehavior rule)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;rule&#039;&#039;&#039; = rule that called [[#SetTrainTimetable|SetTrainTimetable()]] on this train.		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.ClearTimeTable(timetableRule);	&lt;br /&gt;
;Notes&lt;br /&gt;
*Clears the train timetable of this train. 	&lt;br /&gt;
*Having cleared the TrainTimetable, it is now safe again to set another TrainTimetable for this train through [[#SetTrainTimetable|SetTrainTimetable()]].&lt;br /&gt;
*This method must only be called by the rule which called SetTrainTimetable() in the first place. &lt;br /&gt;
*It is the responsibility of the caller to post a (TrainTimetable, Touch) message after calling this function.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DecTrainBusy===&lt;br /&gt;
{{MethodHeader|public void DecTrainBusy(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.DecTrainBusy();	&lt;br /&gt;
;Notes&lt;br /&gt;
*Decrements this train&#039;s busy count.&lt;br /&gt;
*See [[#IsTrainBusy|IsTrainBusy()]] for further details.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Derail===&lt;br /&gt;
{{MethodHeader|public native void Derail(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.Derail();	&lt;br /&gt;
;Notes&lt;br /&gt;
*Deliberately derails the train.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EnablePhysics===&lt;br /&gt;
{{MethodHeader|public native void EnablePhysics(bool enable)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;enable&#039;&#039;&#039; = True to enable physics calculations for this train, false to disable		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.EnablePhysics(false);		&lt;br /&gt;
;Notes&lt;br /&gt;
*Turning physics off for scenic rolling stock that the player cannot interact with can boost performance.&lt;br /&gt;
*There is no point in doing physic calculations for idle rollingstock.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetActiveDriver===&lt;br /&gt;
{{MethodHeader|public native DriverCharacter GetActiveDriver(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The active driver of this train, null if there is no driver assigned.&lt;br /&gt;
;Syntax&lt;br /&gt;
 DriverCharacter driver = train.GetActiveDriver();		&lt;br /&gt;
;Notes&lt;br /&gt;
*There may be more than one driver on a train but there is only one active driver and an individual Locomotive may only have one driver assigned.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetAdvisoryLimit===&lt;br /&gt;
{{MethodHeader|public native float GetAdvisoryLimit(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current advisory speed limit set by script.		&lt;br /&gt;
;Syntax&lt;br /&gt;
 float speed = train.GetAdvisoryLimit();		&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetAllowsUserContol===&lt;br /&gt;
{{MethodHeader|public native bool GetAllowsUserControl(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this train allows the user to control it directly through DCC or Cabin interfaces, false otherwise.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool canDrive =train.getAllowsUserControl();		&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetAutopilotMode===&lt;br /&gt;
{{MethodHeader|public native int GetAutopilot Mode(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Train Control Modes|Train Control Mode]] constants defining the method by which the train is currently controlled.&lt;br /&gt;
;Syntax&lt;br /&gt;
 int controlMode = train.GetAutopilotMode();		&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetAutopilotStopJunctionBase===&lt;br /&gt;
{{MethodHeader|public native JunctionBase GetAutopilotStopJunctionBase(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The junction object that is preventing the autopilot from taking this train any further, null if the train is not stopped by a junction.		&lt;br /&gt;
;Syntax&lt;br /&gt;
 JunctionBase junction = train GetAutopilotStopJunctionBase();		&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetAutopilotStopTrain===&lt;br /&gt;
{{MethodHeader|public native Train GetAutopilotStopTrain(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The train that is preventing the autopilot from taking this train any further, null if the train is not being held up by another train.		&lt;br /&gt;
;Syntax&lt;br /&gt;
 Train otherTrain = train.GetAutopilotStopTrain();		&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetAutopilotTargetSlowing===&lt;br /&gt;
{{MethodHeader|public native bool GetAutopilotTargetSlowing(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the autopilot is slowing down for its target destination, false otherwise.		&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool isSlowing = train.GetAutopilotTargetSlowing();		&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetDCCThrottle===&lt;br /&gt;
{{MethodHeader|public native float GetDCCThrottle(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The DCC throttle setting for this train when using DCC physics.		&lt;br /&gt;
;Syntax&lt;br /&gt;
 float throttle = GetDCCThrottle();		&lt;br /&gt;
;Notes&lt;br /&gt;
*The returned value will be in the range [-1.0 .. 1.0] where -1.0 is full throttle in reverse, 0.0 is stationary and 1.0 is full throttle forward.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetFrontmostLocomotive===&lt;br /&gt;
{{MethodHeader|public native Locomotive GetFrontmostLocomotive(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*Returns a reference to the frontmost locomotive in the train.	&lt;br /&gt;
;Syntax&lt;br /&gt;
 Loco = Train.GetFrontmostLocomotive();	&lt;br /&gt;
;Notes&lt;br /&gt;
*&amp;lt;font color=red&amp;gt;The &#039;&#039;front&#039;&#039; of the train is defined relative to the train&#039;s current heading.??&amp;lt;/font&amp;gt;	&lt;br /&gt;
*The train&#039;s heading may not correspond to its physical appearance and can change during game play.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetHeadlightState===&lt;br /&gt;
{{MethodHeader|public native bool GetHeadlightState(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if headlights are turned on, false otherwise.		&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool lights = train.GetHeadlightState();		&lt;br /&gt;
;Notes&lt;br /&gt;
*Only the frontmost locomotive will display headlighs.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetLastVisitedBuildable===&lt;br /&gt;
{{MethodHeader|public Buildable GetLastVisitedBuildable(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The last [[Class Buildable|Buildable]] object visited by this train, null if there have been no such visits.&lt;br /&gt;
;Syntax&lt;br /&gt;
 Buildable buildable = train.GetLastVisitedBuildable();		&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetLastVisitedIndustry===&lt;br /&gt;
{{MethodHeader|public Industry GetLastVisitedIndustry(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The last Industry object visited by this train, null if there have been no such visits.		&lt;br /&gt;
;Syntax&lt;br /&gt;
 Industry industry = train.GetLastVisitedIndustry();		&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetLastVisitedTrack===&lt;br /&gt;
{{MethodHeader|public Track GetLastVisitedTrack(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The last track segment visited by this train.		&lt;br /&gt;
;Syntax&lt;br /&gt;
 Track track = train.GetLastVisitedTrack();		&lt;br /&gt;
;Notes&lt;br /&gt;
*Note that the returned value may be null. &amp;lt;font color=red&amp;gt;How is that possible?&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetHighBeams===&lt;br /&gt;
{{MethodHeader|public bool GetHighBeams(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the frontmost locomotive&#039;s high beams are on, false otherwise.		&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool High_Lights = train.GetHighBeams();		&lt;br /&gt;
;Notes&lt;br /&gt;
*See also [[Class Vehicle#GetHighBeams|Vehicle.GetHighBeams()]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetMaximumCouplingStressVehicle===&lt;br /&gt;
{{MethodHeader|public native Vehicle GetMaximumCouplingStressVehicle(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The Vehicle in this consist that is experiencing the greatest level of coupling stress.		&lt;br /&gt;
;Syntax&lt;br /&gt;
 Vehicle vehicle = GetMaximumCouplingStressVehicle();		&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetPantographState===&lt;br /&gt;
{{MethodHeader|public native int GetPantographState(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The state of the pantographs of the electric locomotives in this train.		&lt;br /&gt;
;Syntax&lt;br /&gt;
 int pantoState = train.GetPantographState();		&lt;br /&gt;
;Notes&lt;br /&gt;
*The returned value will be in the range [0..3] where:&lt;br /&gt;
**0 = Both pantographs down.&lt;br /&gt;
**1 = Front pantograph up.&lt;br /&gt;
**2 = Rear pantograph up.&lt;br /&gt;
**3 = Both pantographs up.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetPhysicsModel===&lt;br /&gt;
{{MethodHeader|public native int GetPhysicsModel(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The mode of control chosen by the player to drive the locomotive		&lt;br /&gt;
;Syntax&lt;br /&gt;
 int Mode = train.GetPhysicsModel();		&lt;br /&gt;
;Notes&lt;br /&gt;
*The returned value will be :&lt;br /&gt;
**2 = CabinControl&lt;br /&gt;
**1 = DCCMode&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===GetSmoothedVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetSmoothedVelocity(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*Returns a smoothed velocity, intended for human consumption.		&lt;br /&gt;
;Syntax&lt;br /&gt;
 float speed = train.GetSmoothedVelocity();		&lt;br /&gt;
;Notes&lt;br /&gt;
*If you require an accurate velocity readout for physics operations, use [[#GetVelocity|GetVelocity()]].&lt;br /&gt;
*&#039;&#039;In practice, even when the train stops completely, it does not report an absolute zero.&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetSpeedLimit===&lt;br /&gt;
{{MethodHeader|public native float GetSpeedLimit(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The current sign posted speed limit. 		&lt;br /&gt;
;Syntax&lt;br /&gt;
 float permittedSpeed = train.GetSpeedLimit();		&lt;br /&gt;
;Notes&lt;br /&gt;
*The speed limit is dependent on trackside signs placed in Surveyor as well as the direction of the train.&lt;br /&gt;
*A default value applies to track that isn&#039;t sign posted.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetTrackmarkDirection===&lt;br /&gt;
{{MethodHeader|public native int GetTrackmarkDirection(TrackMark mark)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mark&#039;&#039;&#039; = A reference to the Trackmark to search for.&lt;br /&gt;
;Returned Value&lt;br /&gt;
* One of the [[#Found Results|Found Result]] values representing the location of the given track mark relative to this train.			&lt;br /&gt;
;Syntax&lt;br /&gt;
 int location = train.GetTrackmarkDirection(trackmark);		&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetTrainBrakes===&lt;br /&gt;
{{MethodHeader|public native float GetTrainBrakes(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*One of the [[#Train Brake Modes|Train Brake mode]] constants indicating the current state of this train&#039;s brakes.		&lt;br /&gt;
;Syntax&lt;br /&gt;
 float brakeState = train.GetTrainBrakes();		&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetTrainDisplayName===&lt;br /&gt;
{{MethodHeader|public native string GetTrainDisplayName(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*A localised display name for this train. 		&lt;br /&gt;
;Syntax&lt;br /&gt;
 string trainName = train.GetTrainDisplayName();		&lt;br /&gt;
;Notes&lt;br /&gt;
*This will be a name Trainz has created for the consist such as &amp;quot;Consist 0&amp;quot; and will match the description shown in the Minimap view. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetTrainPriorityNumber===&lt;br /&gt;
{{MethodHeader|public native int GetTrainPriorityNumber(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*Train priority value in the range [1 .. 3]		&lt;br /&gt;
;Syntax&lt;br /&gt;
 int priority = train.GetTrainPriorityNumber();&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[#SetTrainPriority|SetTrainPriority()]] for further details.		&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetTrainTimetable===&lt;br /&gt;
{{MethodHeader|public TrainTimetable GetTrainTimetable(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The TrainTimetable that the train is currently using, null if there is none.&lt;br /&gt;
;Syntax&lt;br /&gt;
  TrainTimetable timetable = train.GetTrainTimetable();		&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetTrainVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetTrainVelocity(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The train&#039;s current velocity in metres per second.&lt;br /&gt;
;Syntax&lt;br /&gt;
  float speed = train.GetTrainVelocity();		&lt;br /&gt;
;Notes&lt;br /&gt;
* This function provides the instantaneous velocity for vehicles in this train, which is good for physics calculations but not good for human-readable display.  If you want human-readable display, use [[#GetSmoothedVelocity|GetSmoothedVelocity()]] instead.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===GetVehicles===&lt;br /&gt;
{{MethodHeader|public native Vehicle[ ] GetVehicles(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*Returns an array consisting of all the vehicles making up this train.	&lt;br /&gt;
;Syntax&lt;br /&gt;
 Vehicle[] vehicles = train.GetVehicles();	&lt;br /&gt;
;Notes&lt;br /&gt;
 *GetVehicles[0] is always the front vehicle of the train relative to the train&#039;s current heading.	&lt;br /&gt;
*The train&#039;s heading may not correspond to its physical appearance and can change during game play.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GetVelocity===&lt;br /&gt;
{{MethodHeader|public native float GetVelocity(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The train&#039;s current velocity.		&lt;br /&gt;
;Syntax&lt;br /&gt;
 float speed = train.GetVelocity();		&lt;br /&gt;
;Notes&lt;br /&gt;
*Warning!  The TS10 and TS12 Train.gs scripts advise this method is buggy and to use [[#GetSmoothedVelocity|GetSmoothedVelocity()]] or [[#GetTrainVelocity|GetTrainVelocity()]] instead.&lt;br /&gt;
*This function provides the instantaneous velocity for vehicles in this train, which is good for physics calculations but not good for human-readable display.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===HasReachedInnerJunctionRadius===&lt;br /&gt;
{{MethodHeader|public bool HasReachedJunctionInnerJunctionRadius(JunctionBase junction)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;junction&#039;&#039;&#039; = JunctionBase object to query.			&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this train is within the inner radius of the given junction, false otherwise.		&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool arrived = train.HasReachedInnerJunctionRadius(junction10);		&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===HasTrainTimetable===&lt;br /&gt;
{{MethodHeader|public bool HasTrainTimetable(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this train has an attached TrainTimetable, false otherwise.		&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool timed = train.HasTrainTimetable();		&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===IsScheduleRunning===&lt;br /&gt;
{{MethodHeader|public bool IsScheduleRunning(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this train is currently running to a Schedule, false otherwise.		&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool scheduled = train.IsScheduleRunning();		&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===IsScheduleWindowVisible===&lt;br /&gt;
{{MethodHeader|public bool IsScheduleWindowVisible(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the schedule window for this train is currently open, false otherwise.		&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool windowOpen = IsScheduleWindowVisible();		&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===IsStillInJunction===&lt;br /&gt;
{{MethodHeader|public bool IsStillInJunction(JunctionBase junction)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;junction&#039;&#039;&#039; = JunctionBase object to query.			&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the train holds a Permit for the given junction, flse otherwise.		&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool inJunction = train.IsStillInJunction(junction10);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===IsStopped===&lt;br /&gt;
{{MethodHeader|public native bool IsStopped(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the train is currently stationary, false if it is in motion.		&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool moving=train.IsStopped();		&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===IsTrainBusy===&lt;br /&gt;
{{MethodHeader|public bool IsTrainBusy(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the train&#039;s &#039;busy&#039; count is greater than zero, false otherwise.		&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool busy = train.IsTrainBusy();		&lt;br /&gt;
;Notes&lt;br /&gt;
*Using the [[#IncTrainBusy|IncTrainBusy()]] method, any piece of script code can tag a train being busy. &lt;br /&gt;
*The train can be untagged later by calling DecTrainBusy(). &lt;br /&gt;
*This mechanism is mainly used by industries that are doing something with the train. &lt;br /&gt;
*A train can be tagged as being busy more than once by calling IncTrainBusy() multiple times so different industries can tag the train. &lt;br /&gt;
*Each time IncTrainBusy() is called, an internal busy count is incremented and if that busy count is greater than zero, the train is considered busy.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===IsViewDetailsVisible===&lt;br /&gt;
{{MethodHeader|public bool IsViewDetailsVisible(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*true if the ViewDetails window for this train is visible, false otherwise.		&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool visible = train.IsViewDetailsVisible();		&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===MapObjectIsInFront===&lt;br /&gt;
{{MethodHeader|public bool MapObjectIsInFront(MapObject obj, float range)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;obj&#039;&#039;&#039; = MapObject to search for.&lt;br /&gt;
*&#039;&#039;&#039;range&#039;&#039;&#039; = Maximum search distance.			&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the object is found within the specified distance and in front of the train, false otherwise.		&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool isClose = train.MapObjectIsInFront(terminus,100.0);		&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ReleaseTrackPermits===&lt;br /&gt;
{{MethodHeader|public void ReleaseTrackPermits(Permit[ ] permitList)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;permitList&#039;&#039;&#039; = Permit array containing a list of permits to release.		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.ReleaseTrackPermits(permitList);		&lt;br /&gt;
;Notes&lt;br /&gt;
*This method will release any permits from the &#039;&#039;permitList&#039;&#039; array that are currently held by this train.&lt;br /&gt;
*Any other permits in the array that are not held by this train will be ignored.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===RunSchedule===&lt;br /&gt;
{{MethodHeader|public thread void RunSchedule(Schedule schedule, bool loop, float delay)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;schedule&#039;&#039;&#039; = The Schedule that the train is to follow.&lt;br /&gt;
*&#039;&#039;&#039;loop&#039;&#039;&#039; = False to run the schedule once, True to repeat it continuously.&lt;br /&gt;
*&#039;&#039;&#039;delay&#039;&#039;&#039; = Time in seconds to wait before starting the schedule.			&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.RunSchedule(schedule,false,10.0);		&lt;br /&gt;
;Notes&lt;br /&gt;
*See [[Class Schedule|Schedule]] for information on how to build a schedule.&lt;br /&gt;
*Only one schedule may run on a train at a time and the user cannot control the train when it is running a schedule.&lt;br /&gt;
*This method is a thread, so the calling code does not need to wait for it to finish and return before executing other code.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetAdvisoryLimit===&lt;br /&gt;
{{MethodHeader|public native void SetAdvisoryLimit(float speed)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;speed&#039;&#039;&#039; = Speed limit to set in &amp;lt;del&amp;gt;KPH&amp;lt;/del&amp;gt; metres/second.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.SetAdvisoryLimit(60.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*Sets an advisory speed limit for a script controlled train.&lt;br /&gt;
*Use zero in the speed parameter to clear any previously imposed limit.&lt;br /&gt;
*&amp;lt;font color=red&amp;gt;Does this really use KPH, most similar methods use MPS&amp;lt;/font&amp;gt;&lt;br /&gt;
*&amp;lt;font color=red&amp;gt;Experimental evidence confirms that it&#039;s in m/s not kph or mph&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetAutopilotMode===&lt;br /&gt;
{{MethodHeader|public native void SetAutopilotMode(int mode)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mode&#039;&#039;&#039; = One of the [[#Train Control Modes|Train Control Mode]] constants specifying the method by which this train is controlled.		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.SetAutopilotMode(Train.CONTROL_AUTOMANUAL);		&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetAutopilotTarget===&lt;br /&gt;
{{MethodHeader|public native void SetAutopilotTarget(Buildable buildable, string trigger)&amp;lt;br&amp;gt;public native void SetAutopilotTarget(Trackside trackside)&amp;lt;br&amp;gt;public native void SetAutopilotTarget(Track track)&amp;lt;br&amp;gt;public native void SetAutopilotTarget(JunctionBase junction)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;buildable&#039;&#039;&#039; = Buildable object to use as a destination.&lt;br /&gt;
*&#039;&#039;&#039;trigger&#039;&#039;&#039; = Attached trigger within the buildable, specified by name.&lt;br /&gt;
*&#039;&#039;&#039;trackside&#039;&#039;&#039; =  Trackside object to use as a destination.&lt;br /&gt;
*&#039;&#039;&#039;track&#039;&#039;&#039; = Track segment to use as a destination.&lt;br /&gt;
*&#039;&#039;&#039;junction&#039;&#039;&#039; = JunctionBase object to use as a destination.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.SetAutopilotTarget(&amp;quot;Kings Cross Station&amp;quot;,&amp;quot;trigger1&amp;quot;);		&lt;br /&gt;
;Notes&lt;br /&gt;
*This method sets a destination for the autopilot to take this train to.&lt;br /&gt;
*Objects from respective child classes such as industries, signals and trackmarks may be specified.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetAutopilotTargetMinimumDistance===&lt;br /&gt;
{{MethodHeader|public native void SetAutopilotTargetMinimumDistance(float distance)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;distance&#039;&#039;&#039; = The minimum distance in metres, between the train and the autopilot target, to be reached before the train will start to slow down.			&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train SetAutopilotTargetMinimumDistance(100.0);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetAutoPilotTargetMinimumSpeed===&lt;br /&gt;
{{MethodHeader|public native void SetAutopilotTargetMinimumSpeed(float speed)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;speed&#039;&#039;&#039; = Minimum speed, in metres per second, that the train should be travelling at when it reaches the Autopilot target.			&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.SetAutoPilotTargetMinimumSpeed(20.0);		&lt;br /&gt;
;Notes&lt;br /&gt;
*&amp;lt;font color=red&amp;gt;The documentation seems to mean that the train should be going at 20.0 OR MORE.  Shouldn&#039;t it be MaximumSpeed???&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetBail===&lt;br /&gt;
{{MethodHeader|public native void SetBail(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.SetBail();		&lt;br /&gt;
;Notes&lt;br /&gt;
*Depresses the bail control for a short period.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetCouplingMask===&lt;br /&gt;
{{MethodHeader|public void SetCouplingMask(int mask)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mask&#039;&#039;&#039; = A mask specifying which of the trains exposed couplers are allowed to couple.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.SetCouplingMask(Vehicle.COUPLE_NONE); // prevents this train from coupling to another in Driver mode.&lt;br /&gt;
;Notes&lt;br /&gt;
*The mask can be built using the [[Class Vehicle#Coupler Flags|Coupler Flag]] constants defined in [[Class Vehicle]].&lt;br /&gt;
*This method will not prevent vehicles or trains from coupling in Surveyor, but takes effect in Driver mode.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetDCCThrottle===&lt;br /&gt;
{{MethodHeader|public native void SetDCCThrottle(float throttle)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;throttle&#039;&#039;&#039; = Float value in the range -1.0 .. 1.0 defining the throttle setting for the train when using DCC physics.			&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.SetDCCThrottle(0.0); //sets the throttle to neutral.		&lt;br /&gt;
;Notes&lt;br /&gt;
*Full speed ahead is 1.0&lt;br /&gt;
*Maximum in reverse is -1.0&lt;br /&gt;
*Neutral is 0.0&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetDecouplingMask===&lt;br /&gt;
{{MethodHeader|public void SetDecouplingMask(int mask)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mask&#039;&#039;&#039; = A mask specifying which of the couplers are allowed to couple, applies to all of the vehicles in the train.			&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.SetDecouplingMask(Vehicle.COUPLE_FRONT|Vehicle.COUPLE_BACK); // prevents vehicles being uncoupled from the train in Driver mode.&lt;br /&gt;
;Notes&lt;br /&gt;
*The mask can be built using the [[Class Vehicle#Coupler Flags|Coupler Flag]] constants defined in [[Class Vehicle]].&lt;br /&gt;
*This method will not prevent vehicles or trains from being uncoupled in Surveyor, but takes effect in Driver mode.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetDynamicBrakeMode===&lt;br /&gt;
{{MethodHeader|public native void SetDynamicBrakeMode(int mode)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*One of the [[#Dynamic Brake States|Dynamic Brake State]] constants indicating the current state of this train&#039;s brakes.			&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.SetDynamicBrakeMode(Train.DYNAMIC_BRAKE_TRACTION);		&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetFloatingLimit===&lt;br /&gt;
{{MethodHeader|public native void SetFloatingLimit(float delta, bool enable)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;delta&#039;&#039;&#039; = Tolerance allowed from the posted limit in metres per second.&lt;br /&gt;
*&#039;&#039;&#039;enable&#039;&#039;&#039; = Use true to enable messages related to floating limits, false to disable.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.SetFloatingLimit(5.0,true);		&lt;br /&gt;
;Notes&lt;br /&gt;
*Sets the floating speed limit level above the sign posted limit.&lt;br /&gt;
*The floating limit is an amount of tolerance above the current speed limit. &lt;br /&gt;
*Messages for floating speed violations are not to be confused with regular speed limit messages.&lt;br /&gt;
*The floating limit is monitored by the Scenario.Monitor() thread, and may be used for point deduction when speeding. It should therefore be reserved for player trains.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetHandBrake===&lt;br /&gt;
{{MethodHeader|public void SetHandBrake(bool state)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;state&#039;&#039;&#039; = Use true to apply the handbrake to all vehicles in this train which are not Locomotives, false to release the handbrake.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.SetHandBrake(true);		&lt;br /&gt;
;Notes &#039;&#039;The use of this function did not reveal any effect on the physics of trains.&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetHeadlightState===&lt;br /&gt;
{{MethodHeader|public native void SetHeadlightState(bool lightsOn)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;lightsOn&#039;&#039;&#039; = True to turn the headlights on, false to turn them off.			&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.SetHeadlightState(true);		&lt;br /&gt;
;Notes&lt;br /&gt;
*This method affects only the headlights on the frontmost locomotive.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetHighBeams===&lt;br /&gt;
{{MethodHeader|public void SetHighBeams(bool value)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;value&#039;&#039;&#039; = True to turn on high beams, false to turn them off.		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.SetHighBeams(true);		&lt;br /&gt;
;Notes&lt;br /&gt;
*See also [[Class Vehicle#SetHighBeams|Vehicle.SetHighColor()]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetLastVisitedBuildable===&lt;br /&gt;
{{MethodHeader|public void SetLastVisitedBuildable(Buildable buildable)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;buildable&#039;&#039;&#039; = Sets the last visited buildable to the given object.			&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.SetLastVisitedBuildable(KingsCrossStation);		&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetManualThrottle===&lt;br /&gt;
{{MethodHeader|public native void SetManualThrottle(int notch)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;notch&#039;&#039;&#039; = Value in the range 0 .. 8 to set the throttle.			&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.SetManualThrottle(5);		&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetPantogaphState===&lt;br /&gt;
{{MethodHeader|public native void SetPantographState(int state)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;state&#039;&#039;&#039; = Value in the range 0 .. 3 to set the pantographs if this train has them.			&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.SetPantographState(3);		&lt;br /&gt;
;Notes&lt;br /&gt;
*Use one of these values for &#039;&#039;state&#039;&#039;:&lt;br /&gt;
**0 = Both pantographs down.&lt;br /&gt;
**1 = Front pantograph up.&lt;br /&gt;
**2 = Rear pantograph up.&lt;br /&gt;
**3 = Both pantographs up.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetReverser===&lt;br /&gt;
{{MethodHeader|public native void SetReverser(int mode)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mode&#039;&#039;&#039; = One of the [[#Reverser Traction Modes|Reverser Traction Mode]] constants defining the required state of the train&#039;s reverser lever.			&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.SetReverser(Train.TRACTION_REVERSE);		&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetTrainBrakes===&lt;br /&gt;
{{MethodHeader|public native void SetTrainBrakes(float mode)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mode&#039;&#039;&#039; = One of the [[#Train Brake States|Train Brake State]] constants defining the required state of the train&#039;s brakes.			&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.SetTrainBrakes(Train.TRAIN_BRAKE_EMERGENCY);		&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetTrainPriorityNumber===&lt;br /&gt;
{{MethodHeader|public native void SetTrainPriority Number(int priority)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;priority&#039;&#039;&#039; = Priority value in the range 1 .. 3.			&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.SetTrainPriorityNumber(2);		&lt;br /&gt;
;Notes&lt;br /&gt;
*All trains and track sections can be assigned a priority value in the range of [1 - 3] with the default value being 2.&lt;br /&gt;
*The priority value is not a numerical scale of precedence, but a value for the AI driver to attempt to match.&lt;br /&gt;
*This means the driver will &#039;&#039;prefer&#039;&#039; track sections that have a priority equal to that of the train.&lt;br /&gt;
*Changing the priority of the train only takes affect when the driver restarts a new schedule.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetTrainTimetable===&lt;br /&gt;
{{MethodHeader|public void SetTrainTimetable(TrainTimetable timetable)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;timetable&#039;&#039;&#039; = Assigns the specified timetable to this train.			&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.SetTrainTimetable(timetable);&lt;br /&gt;
;Notes&lt;br /&gt;
*This train must not already have a TrainTimetable assigned.&lt;br /&gt;
*To ensure that this proviso is met, use [[#ClearTrainTimetabel|ClearTrainTimetable()]] prior to calling this method.&lt;br /&gt;
*It is the responsibility of the caller to post a &amp;quot;TrainTimetable&amp;quot;,&amp;quot;Touch&amp;quot; message after calling this function.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SetVelocity===&lt;br /&gt;
{{MethodHeader|public native void SetVelocity(float velocity)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;velocity&#039;&#039;&#039; = Velocity to apply to the train, in metres per second.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.SetVelocity(0.0); // stops the train, subject to braking performance.		&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ShowInConsistMenu===&lt;br /&gt;
{{MethodHeader|public native void ShowInConsistMenu(bool show)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;show&#039;&#039;&#039; = True to make this train visible to the in-game consist menu, false to hide it.			&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.ShowInConsistMenu(false);		&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SoundHorn===&lt;br /&gt;
{{MethodHeader|public native void SoundHorn(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.SoundHorn();		&lt;br /&gt;
;Notes&lt;br /&gt;
*Sounds the horn or whictle for all locomotives in this train.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===StopSchedule===&lt;br /&gt;
{{MethodHeader|public void StopSchedule(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.StopSchedule();		&lt;br /&gt;
;Notes&lt;br /&gt;
*This method stops the Schedule this train is currently running (if any).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===StopScheduleAndWait===&lt;br /&gt;
{{MethodHeader|public void StopSchedule(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.StopSchedule();		&lt;br /&gt;
;Notes&lt;br /&gt;
*This method stops the Schedule this train is currently running (if any) and waits until the train&#039;s schedule actually stops before returning. &lt;br /&gt;
*If the train is not running a schedule, the method returns after broadcasting a &amp;quot;Schedule&amp;quot;,&amp;quot;Touch&amp;quot; message, in case someone is listening for schedule messages.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===StopTrainGently===&lt;br /&gt;
{{MethodHeader|public native void StopTrainGently(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.StopTrainGently();		&lt;br /&gt;
;Notes&lt;br /&gt;
*Brings the train to a halt over a short time period.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===TakePermitOnTrack===&lt;br /&gt;
{{MethodHeader|public Permit[ ] TakePermitOnTrack(bool direction)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;direction&#039;&#039;&#039; = Direction relative to the train in which to take out permits.			&lt;br /&gt;
;Returned Value&lt;br /&gt;
*An array including any permits taken which have not yet been granted to this train. Some of these permits may not yet have been granted. 		&lt;br /&gt;
;Syntax&lt;br /&gt;
 Permit[] permits = train.TakePermitOnTrack(true);		&lt;br /&gt;
;Notes&lt;br /&gt;
*Gets permits on the current track in the given direction.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===TestTrackPermit===&lt;br /&gt;
{{MethodHeader|public native bool TestTrackPermit(Permit permit, bool innerOnly)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;permit&#039;&#039;&#039; = An existing Permit object.&lt;br /&gt;
*&#039;&#039;&#039;innerOnly&#039;&#039;&#039; = If true the method will test only the inner radius, if false the default radius of 150 metres will be used.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if this train is within the track controlled by &#039;&#039;permit&#039;&#039;, false otherwise. 		&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool ownPermit = train.TestTrackPermit(permit1,false);		&lt;br /&gt;
;Notes&lt;br /&gt;
*The method generates an exception if the &#039;&#039;permit&#039;&#039; parameter does not refer to a track.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ToggleScheduleWindow===&lt;br /&gt;
{{MethodHeader|public void ToggleScheduleWindow(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.ToggleScheduleWindow();		&lt;br /&gt;
;Notes&lt;br /&gt;
*If the schedule window is already open/visible, this method will destroy it.&lt;br /&gt;
*Otherwise if the view details window is not visible, UpdateScheduleWindow() is called to create it for display.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ToggleViewDetailsWindow===&lt;br /&gt;
{{MethodHeader|public void ToggleViewDetailsWindow(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.ToggleViewDetailsWindow();		&lt;br /&gt;
;Notes&lt;br /&gt;
*If the ViewDetails window is already open/visible, this method will destroy it.&lt;br /&gt;
*Otherwise if the view details window is not visible, ViewDetails() is called to create it for display.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===TrackSearch===&lt;br /&gt;
{{MethodHeader|public native MapObject[ ] TrackSearch(bool direction, float distance)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;direction&#039;&#039;&#039; = Direction to search relative to the train&#039;s heading, true for forwards, false for backwards.&lt;br /&gt;
*&#039;&#039;&#039;distance&#039;&#039;&#039; = Maximum search distance in metres.			&lt;br /&gt;
;Returned Value&lt;br /&gt;
*An array of objects found along the track in the defined search direction, the array might be empty.		&lt;br /&gt;
;Syntax&lt;br /&gt;
 MapObject[] objects = train.TrackSearch(true,5000.0) // searches 5km forwards along the track.		&lt;br /&gt;
;Notes&lt;br /&gt;
*Gets all of the Trackside and SceneryWithTrack objects on a length of track that is either in front of or behind this train. &lt;br /&gt;
*Descendants of these classes are also returned.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===TracksideIsInFront===&lt;br /&gt;
{{MethodHeader|public bool TracksideIsInFront(Trackside obj, float range)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;obj&#039;&#039;&#039; = Trackside object to search for.&lt;br /&gt;
*&#039;&#039;&#039;range&#039;&#039;&#039; = Mximum search distance.			&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the object is logically forward of this train, false otherwise.		&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool found = train.TracksideIsInFront(signal1,500.0);		&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Turnaround===&lt;br /&gt;
{{MethodHeader|public native void Turnaround(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.Turnaround();		&lt;br /&gt;
;Notes&lt;br /&gt;
*Reverses the logical direction of the train, ie changes its heading.&lt;br /&gt;
*The physical direction of the vehicles is not altered but the throttle direction is reversed.&lt;br /&gt;
*If the camera is focused on the train in tracking view when this method is called the camera&#039;s direction of view (relative to the map) will alter through 180 degrees.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UpdateScheduleWindow===&lt;br /&gt;
{{MethodHeader|public void UpdateScheduleWindow(string vehicleName)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;vehicleName&#039;&#039;&#039; = Name of vehicle within the train.			&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.UpdateScheduleWindow(&amp;quot;brake2&amp;quot;);		&lt;br /&gt;
;Notes&lt;br /&gt;
*Updates the schedule window from the given vehicle.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UpdateViewDetails===&lt;br /&gt;
{{MethodHeader|public void UpdateViewDetails(Vehicle vehicle)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;vehicle&#039;&#039;&#039; = Reference to a vehicle within the train.			&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.UpdateViewDetails(vehicle);&lt;br /&gt;
;Notes&lt;br /&gt;
*Called by Vehicle.UpdateViewDetails() when a vehicle&#039;s load has changed so that the train&#039;s detail window can be amended.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UpdateViewDetailsLocomotive===&lt;br /&gt;
{{MethodHeader|public void UpdateViewDetailsLocomotive(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.UpdateViewDetailsLocomotive(vehicle);&lt;br /&gt;
;Notes&lt;br /&gt;
*Called by Locomotive.UpdateViewDetails() when any of the Locomotive&#039;s operating parameters have changed so that the train&#039;s detail window can be amended.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ViewDetails===&lt;br /&gt;
{{MethodHeader|public void ViewDetails(Vehicle vehicle)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;vehicle&#039;&#039;&#039; = Reference to a vehicle within the train.			&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None	&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.ViewDetails(vehicle);		&lt;br /&gt;
;Notes&lt;br /&gt;
*This method is called by Vehicle.ViewDetails() when the user has requested to view the details of the consist.&lt;br /&gt;
*It will create a Browser window listing information about the train including who the driver character is and the loads of all vehicles.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===WasRunScheduleSuccessful===&lt;br /&gt;
{{MethodHeader|public bool WasRunScheduleSuccessful(void)}}	&lt;br /&gt;
;Parameters&lt;br /&gt;
*None		&lt;br /&gt;
;Returned Value&lt;br /&gt;
*True if the most recently run schedule was successfully, false otherwise. 		&lt;br /&gt;
;Syntax&lt;br /&gt;
 train.WasRunScheduleSuccessful();		&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Code Examples==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related Methods==&lt;br /&gt;
[[Class TrainUtil#AreInTrain|TrainUtil.AreInTrain()]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[Class TrainUtil#CreateTrainFromSoup|TrainUtil.CreateTrainFromSoup()]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[Class TrainUtil#IsInTrain|TrainUtil.IsInTrain()]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[Class World#CreateTrain|World.CreateTrain()]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[Class World#DeleteTrain|World.DeleteTrain()]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[Class World#GetTrainList|World.GetTrainList()]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Categories==&lt;br /&gt;
[[Category:Script Class]]&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Texture_file&amp;diff=23745</id>
		<title>Texture file</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Texture_file&amp;diff=23745"/>
		<updated>2020-07-02T21:45:16Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: /* Notes on Image Editors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORP-top}}&lt;br /&gt;
Trainz &#039;&#039;&#039;Texture files&#039;&#039;&#039; are ASCII text format specification files describing a single texture. Texture files have a &amp;quot;.texture.txt&amp;quot; name extension, however when a texture file is specified within a [[config.txt file]] or similar, the &amp;quot;.txt&amp;quot; must be omitted (as you are specifying a resource name, not a file path), leaving only the &amp;quot;.texture&amp;quot; extension.&lt;br /&gt;
&lt;br /&gt;
Texture files (*.texture.txt) should be distinguished from [[image file]]s (*.tga, etc.) and [[material]]s. A material may utilize zero or more texture files, and a texture file may utilize one or more image files. While we often refer to the image data as &amp;quot;a texture&amp;quot;, this usage isn&#039;t strictly correct as any given texture also has a number of metadata attributes which are not present in the source image. Additionally, a texture may be compressed (at installation time) which may actually lose some of the data originally present in the source image.&lt;br /&gt;
&lt;br /&gt;
When importing a [[trainzmesh file]] from an [[FBX file]], any image files referenced in the FBX which do not already have corresponding texture files will have generic texture files created automatically. These files may be suitable for basic purposes, but may need to be customized for more advanced functionality. Once the file has been created (and optionally customised) the importer will not recreate/overwrite it on subsequent runs.&lt;br /&gt;
&lt;br /&gt;
This page describes [[&amp;quot;Trainz-build&amp;quot; number|content format v4.6]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=File format=&lt;br /&gt;
&lt;br /&gt;
The user-editable *.texture.txt files are ASCII text formatted key-value pairs with the following options. Please note that this format is not the same (despite some similarities) as other text-based formats used by Trainz. Please be aware of the [[filename character restrictions]] when naming texture and image files.&lt;br /&gt;
&lt;br /&gt;
;Syntax&lt;br /&gt;
Each key is specified on a new line. There is no white space anywhere in the line. A empty value is sometimes valid. The syntax is:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;key&amp;gt;=&amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Example:&lt;br /&gt;
 Primary=WayCoolTexture.tga&lt;br /&gt;
 Alpha=WayCoolTexture.tga&lt;br /&gt;
 Tile=st&lt;br /&gt;
 AlphaHint=masked&lt;br /&gt;
&#039;&#039;(Example only, not recommended settings)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Keys and Values==&lt;br /&gt;
&lt;br /&gt;
 Primary=diffusemap.bmp&lt;br /&gt;
&lt;br /&gt;
This tag specifies the filename of the image file representing the color (R, G, B) channels of the texture. Any alpha channel in the image file is ignored. The resultant texture will have a pure white (100%) alpha channel.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Primary=diffusemap.jpg&lt;br /&gt;
 Alpha=diffusemap.bmp&lt;br /&gt;
&lt;br /&gt;
This tag combination specifies the filenames of the image file representing the color (R, G, B) channels of the texture (Primary) and the image file representing the transparency of the texture (Alpha). The Alpha image should be grayscale. Neither file should contain an alpha (A) channel (ie, both images should be 24-bit). The two image files must be of identical size.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Primary=diffusemap.tga&lt;br /&gt;
 Alpha=diffusemap.tga&lt;br /&gt;
&lt;br /&gt;
This tag combination specifies the filename of a single image file representing the color and transparency (R, G, B, A) channels of the texture. In this case both tags must reference the same filename. The image file must contain an alpha channel.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Compression=dxt3&lt;br /&gt;
&lt;br /&gt;
This tag hints the usage of a particular texture compression scheme. If you don&#039;t have a specific effect in mind, don&#039;t include this tag. Valid options are currently &#039;none&#039;, &#039;dxt1&#039;, &#039;dxt3&#039;, &#039;dxt5&#039;. Refer [[DXT Compression]].&lt;br /&gt;
&lt;br /&gt;
The current selection logic for texture compression is as follows, however it should be noted that this may change between Trainz versions. The first matching rule is used.&lt;br /&gt;
&lt;br /&gt;
* Special texture formats (such as HDR) which don&#039;t support compression are stored uncompressed.&lt;br /&gt;
* &amp;quot;Compression=none&amp;quot; forces no compression. This gives the best visual result for a given input image, but typically yields worse visual results per output texture filesize. It is often better to activate compression and double the image dimensions, rather than disabling compression.&lt;br /&gt;
* Images with an &amp;quot;opaque&amp;quot; alpha hint use DXT1 compression.&lt;br /&gt;
* &amp;quot;Compression=dxt3&amp;quot; will use DXT3 compression.&lt;br /&gt;
* DXT5 compression is used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 NormalMapHint=normalmap&lt;br /&gt;
&lt;br /&gt;
The &#039;NormalMapHint&#039; tag allows the texture to be specified as a [[normal map]]. By default, Trainz will assume that your texture is a [[diffuse map]] and will apply some processing options which are not appropriate for normal maps. You must specify this option for normal maps. Valid options are &#039;none&#039; and &#039;normalmap&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ModifyMap=flipgreen&lt;br /&gt;
&lt;br /&gt;
The &#039;ModifyMap&#039; option allows a texture&#039;s green color channel to be flipped.  Some programs such as [[Autodesk 3ds Max]] create [[normal map]]s with the Y axis facing the opposite way to what is expected by the Trainz shaders.  This option can be used to make the bump effect look correct in Trainz. Valid options are &#039;none&#039; and &#039;flipgreen&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 AlphaHint=opaque&lt;br /&gt;
&lt;br /&gt;
The &#039;AlphaHint&#039; tag allows you to force a particular alpha mode on the texture. Valid options are &#039;opaque&#039; (meaning that the alpha channel is overwritten with pure white), &#039;semitransparent&#039; (meaning that the alpha channel is a grayscale blend) and &#039;masked&#039; (meaning that the alpha channel is clamped to a pure black&amp;amp;white bitmap based on a 50% threshold.) If omitted, Trainz will supply an appropriate value for this tag based on the actual contents of the Alpha channel.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Tile=st&lt;br /&gt;
&lt;br /&gt;
Tiling refers to the ability for texture coordinates outside the range of (0.0 .. 1.0) to be treated as valid coordinates on an infinitely tiled texture. With tiling active, coordinates which pass the right/bottom side of the texture effectively wrap back onto the left/top side, and so on. Valid options include &#039;s&#039; (tile horizontally), &#039;t&#039; (tile vertically), &#039;st&#039; (tile both horizontally and vertically), and &#039;none&#039; (do not tile the image).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 MipAlgorithm=no-weight-by-alpha&lt;br /&gt;
&lt;br /&gt;
The default [[mipmap]] generation algorithm generally treats the alpha channel as an opacity and prioritizes opaque texels over transparent ones. This can lead to poor results in cases where the alpha channel is used for a different purpose (such as with PBR parameter textures). The &amp;quot;no-weight-by-alpha&amp;quot; hint can be used to ensure that the game will give equal weighting to texels regardless of their alpha channel.&lt;br /&gt;
&lt;br /&gt;
The value of this key is only relevant where [[Content Manager]] is responsible for producing mipmap images. It is not relevant on any mipmap images provided in the source images.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 nonpoweroftwo=1&lt;br /&gt;
&lt;br /&gt;
By default, all textures must have both their width and height as a power of two (eg. 8, 16, 32, 64, 128, 256, 512, 1024, 2048), though they need not be square. Setting the value &#039;1&#039; for the &#039;nonpoweroftwo&#039; key allows this restriction to be relaxed. This is currently considered experimental and may have unexpected performance, quality, or functionality outcomes. It is not recommended that end-users utilize this format at the current time.&lt;br /&gt;
&lt;br /&gt;
Non-power-of-two (NPOT) textures may not support mipmapping and thus may be noticeably affected by the moire effect in addition to having higher overall GPU bandwidth requirements.&lt;br /&gt;
&lt;br /&gt;
=Texture Formats=&lt;br /&gt;
The following texture formats are supported internally by Trainz on desktop platforms.&lt;br /&gt;
* R8 G8 B8 A8&lt;br /&gt;
* DXT1&lt;br /&gt;
* DXT3&lt;br /&gt;
* DXT5&lt;br /&gt;
* R32F G32F B32F A32F&lt;br /&gt;
&lt;br /&gt;
The selection of internal format depends on the source image format and the value of the &#039;Compression&#039; key.&lt;br /&gt;
&lt;br /&gt;
=Texture Size=&lt;br /&gt;
Textures must be no more than 4096 pixels in either dimension, although it is strongly recommended that textures are kept below this maximum to avoid performance problems. Small objects should typically use approximately 512x512. Large, highly detailed objects such as train vehicles or ground textures will typically use 2048x2048.&lt;br /&gt;
Uniform-color textures (ie. textures in which all [[texel]]s have the same color) should be 8x8, 2x2, or 1x1.&lt;br /&gt;
Textures must be a power-of-two size in each dimension (unless the &#039;nonpoweroftwo&#039; key is activated), but need not be square. Some materials may give unexpected results for non-square textures; consult the material-specific documentation for details.&lt;br /&gt;
&lt;br /&gt;
=Source Image Formats=&lt;br /&gt;
The following image formats are acceptable as source data for the texture file. Note that these formats are not used at runtime, and that format-specific benefits such as compression will apply to the DLS download size of the content but not to the runtime memory footprint or GPU bandwidth usage.&lt;br /&gt;
&lt;br /&gt;
* Targa (.tga) files. Targa is a lossless image format with optional compression and optional alpha channel. This is a sensible choice where compatibility with older versions of Trainz is desired.&lt;br /&gt;
* JPEG (.jpg) files. JPEG is a lossy image compression format with no alpha channel support. This format should generally be avoided since it will typically lead to the image being compressed in a lossy format (JPG), decompressed, recompressed again into another lossy format (DXT1), losing detail at each stage. Worse, if JPEG files are used during the creation of the image, each edit-save-test cycle may result in a loss of image quality.&lt;br /&gt;
* Windows Bitmap (.bmp) files. BMP is a lossless image format with no compression and optional alpha channel. This format should generally be avoided since it does not offer compression and has no redeeming benefits.&lt;br /&gt;
* HDR (.hdr) files. HDR is a lossless image format with 32 bits of precision per channel. The R32F G32F B32F A32F internal texture format is used, and texture compression is not supported. This is a very expensive format (in terms of memory and performance) and should only be used where absolutely essential. Textures created in this format should be kept as small as possible (eg. 256-512 pixels wide and high) but at least 8x8 pixels wide and high.&lt;br /&gt;
* PNG (.png) files. PNG is a lossless compressed image format with alpha channel support. This is the best choice where compatibility with older versions of Trainz is not required.&lt;br /&gt;
* DDS (.dds) files. This has very limited support intended for specific internal purposes; it is not recommended that end-users utilize this format at the current time.&lt;br /&gt;
&lt;br /&gt;
All images which comprise a given texture must have identical dimensions (width, height).&lt;br /&gt;
&lt;br /&gt;
Source images should use the SRGB color space except where material-specific documentation indicates otherwise.&lt;br /&gt;
&lt;br /&gt;
=Notes on Image Editors=&lt;br /&gt;
* The Targa Exporter plugin shipped with some older versions of Adobe Photoshop is broken and silently corrupts or discards alpha channels; a free update is available which resolves this issue.&lt;br /&gt;
* Some image editors do not support alpha channels on BMP files.&lt;br /&gt;
* By default, Photoshop does not allow for explicit editing of the alpha channel in PNG images. There is a free plugin called [https://www.fnordware.com/superpng/ SuperPNG] which integrates better PNG support to enable saving and editing of PNG alpha masks.&lt;br /&gt;
* [http://www.amnoid.de/ddsview/ ddsview ] is an open source image editor that can properly open all of the texture formats used by Trainz. This is an easy tool to quickly convert between PNG parameters and TGA parameters.&lt;br /&gt;
&lt;br /&gt;
=*.txt File Extension=&lt;br /&gt;
Texture files have a &amp;quot;.texture.txt&amp;quot; name extension, however when a texture file is specified within a [[config.txt file]] or similar, the &amp;quot;.txt&amp;quot; must be omitted, leaving the &amp;quot;.texture&amp;quot; extension.&lt;br /&gt;
For example, a texture file named &#039;&#039;grass.texture.txt&#039;&#039; is specified in a [[KIND Groundtexture]] config file using the syntax &#039;&#039;texture &amp;quot;grass.texture&amp;quot;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=Use of Image Files in Place of Texture Files=&lt;br /&gt;
Trainz previously supported using &#039;&#039;any supported image file&#039;&#039; type in place of a [[Texture file]]. [[TANE]] does not support this technique; a texture.txt file must be used.&lt;br /&gt;
&lt;br /&gt;
[[Category:File formats]]&lt;br /&gt;
[[Category:Modeling]]&lt;br /&gt;
[[Category:Content creation]]&lt;br /&gt;
{{ORP-bot}}&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Texture_file&amp;diff=23744</id>
		<title>Texture file</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Texture_file&amp;diff=23744"/>
		<updated>2020-07-02T21:39:16Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: /* Source Image Formats */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORP-top}}&lt;br /&gt;
Trainz &#039;&#039;&#039;Texture files&#039;&#039;&#039; are ASCII text format specification files describing a single texture. Texture files have a &amp;quot;.texture.txt&amp;quot; name extension, however when a texture file is specified within a [[config.txt file]] or similar, the &amp;quot;.txt&amp;quot; must be omitted (as you are specifying a resource name, not a file path), leaving only the &amp;quot;.texture&amp;quot; extension.&lt;br /&gt;
&lt;br /&gt;
Texture files (*.texture.txt) should be distinguished from [[image file]]s (*.tga, etc.) and [[material]]s. A material may utilize zero or more texture files, and a texture file may utilize one or more image files. While we often refer to the image data as &amp;quot;a texture&amp;quot;, this usage isn&#039;t strictly correct as any given texture also has a number of metadata attributes which are not present in the source image. Additionally, a texture may be compressed (at installation time) which may actually lose some of the data originally present in the source image.&lt;br /&gt;
&lt;br /&gt;
When importing a [[trainzmesh file]] from an [[FBX file]], any image files referenced in the FBX which do not already have corresponding texture files will have generic texture files created automatically. These files may be suitable for basic purposes, but may need to be customized for more advanced functionality. Once the file has been created (and optionally customised) the importer will not recreate/overwrite it on subsequent runs.&lt;br /&gt;
&lt;br /&gt;
This page describes [[&amp;quot;Trainz-build&amp;quot; number|content format v4.6]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=File format=&lt;br /&gt;
&lt;br /&gt;
The user-editable *.texture.txt files are ASCII text formatted key-value pairs with the following options. Please note that this format is not the same (despite some similarities) as other text-based formats used by Trainz. Please be aware of the [[filename character restrictions]] when naming texture and image files.&lt;br /&gt;
&lt;br /&gt;
;Syntax&lt;br /&gt;
Each key is specified on a new line. There is no white space anywhere in the line. A empty value is sometimes valid. The syntax is:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;key&amp;gt;=&amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Example:&lt;br /&gt;
 Primary=WayCoolTexture.tga&lt;br /&gt;
 Alpha=WayCoolTexture.tga&lt;br /&gt;
 Tile=st&lt;br /&gt;
 AlphaHint=masked&lt;br /&gt;
&#039;&#039;(Example only, not recommended settings)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Keys and Values==&lt;br /&gt;
&lt;br /&gt;
 Primary=diffusemap.bmp&lt;br /&gt;
&lt;br /&gt;
This tag specifies the filename of the image file representing the color (R, G, B) channels of the texture. Any alpha channel in the image file is ignored. The resultant texture will have a pure white (100%) alpha channel.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Primary=diffusemap.jpg&lt;br /&gt;
 Alpha=diffusemap.bmp&lt;br /&gt;
&lt;br /&gt;
This tag combination specifies the filenames of the image file representing the color (R, G, B) channels of the texture (Primary) and the image file representing the transparency of the texture (Alpha). The Alpha image should be grayscale. Neither file should contain an alpha (A) channel (ie, both images should be 24-bit). The two image files must be of identical size.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Primary=diffusemap.tga&lt;br /&gt;
 Alpha=diffusemap.tga&lt;br /&gt;
&lt;br /&gt;
This tag combination specifies the filename of a single image file representing the color and transparency (R, G, B, A) channels of the texture. In this case both tags must reference the same filename. The image file must contain an alpha channel.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Compression=dxt3&lt;br /&gt;
&lt;br /&gt;
This tag hints the usage of a particular texture compression scheme. If you don&#039;t have a specific effect in mind, don&#039;t include this tag. Valid options are currently &#039;none&#039;, &#039;dxt1&#039;, &#039;dxt3&#039;, &#039;dxt5&#039;. Refer [[DXT Compression]].&lt;br /&gt;
&lt;br /&gt;
The current selection logic for texture compression is as follows, however it should be noted that this may change between Trainz versions. The first matching rule is used.&lt;br /&gt;
&lt;br /&gt;
* Special texture formats (such as HDR) which don&#039;t support compression are stored uncompressed.&lt;br /&gt;
* &amp;quot;Compression=none&amp;quot; forces no compression. This gives the best visual result for a given input image, but typically yields worse visual results per output texture filesize. It is often better to activate compression and double the image dimensions, rather than disabling compression.&lt;br /&gt;
* Images with an &amp;quot;opaque&amp;quot; alpha hint use DXT1 compression.&lt;br /&gt;
* &amp;quot;Compression=dxt3&amp;quot; will use DXT3 compression.&lt;br /&gt;
* DXT5 compression is used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 NormalMapHint=normalmap&lt;br /&gt;
&lt;br /&gt;
The &#039;NormalMapHint&#039; tag allows the texture to be specified as a [[normal map]]. By default, Trainz will assume that your texture is a [[diffuse map]] and will apply some processing options which are not appropriate for normal maps. You must specify this option for normal maps. Valid options are &#039;none&#039; and &#039;normalmap&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ModifyMap=flipgreen&lt;br /&gt;
&lt;br /&gt;
The &#039;ModifyMap&#039; option allows a texture&#039;s green color channel to be flipped.  Some programs such as [[Autodesk 3ds Max]] create [[normal map]]s with the Y axis facing the opposite way to what is expected by the Trainz shaders.  This option can be used to make the bump effect look correct in Trainz. Valid options are &#039;none&#039; and &#039;flipgreen&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 AlphaHint=opaque&lt;br /&gt;
&lt;br /&gt;
The &#039;AlphaHint&#039; tag allows you to force a particular alpha mode on the texture. Valid options are &#039;opaque&#039; (meaning that the alpha channel is overwritten with pure white), &#039;semitransparent&#039; (meaning that the alpha channel is a grayscale blend) and &#039;masked&#039; (meaning that the alpha channel is clamped to a pure black&amp;amp;white bitmap based on a 50% threshold.) If omitted, Trainz will supply an appropriate value for this tag based on the actual contents of the Alpha channel.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Tile=st&lt;br /&gt;
&lt;br /&gt;
Tiling refers to the ability for texture coordinates outside the range of (0.0 .. 1.0) to be treated as valid coordinates on an infinitely tiled texture. With tiling active, coordinates which pass the right/bottom side of the texture effectively wrap back onto the left/top side, and so on. Valid options include &#039;s&#039; (tile horizontally), &#039;t&#039; (tile vertically), &#039;st&#039; (tile both horizontally and vertically), and &#039;none&#039; (do not tile the image).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 MipAlgorithm=no-weight-by-alpha&lt;br /&gt;
&lt;br /&gt;
The default [[mipmap]] generation algorithm generally treats the alpha channel as an opacity and prioritizes opaque texels over transparent ones. This can lead to poor results in cases where the alpha channel is used for a different purpose (such as with PBR parameter textures). The &amp;quot;no-weight-by-alpha&amp;quot; hint can be used to ensure that the game will give equal weighting to texels regardless of their alpha channel.&lt;br /&gt;
&lt;br /&gt;
The value of this key is only relevant where [[Content Manager]] is responsible for producing mipmap images. It is not relevant on any mipmap images provided in the source images.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 nonpoweroftwo=1&lt;br /&gt;
&lt;br /&gt;
By default, all textures must have both their width and height as a power of two (eg. 8, 16, 32, 64, 128, 256, 512, 1024, 2048), though they need not be square. Setting the value &#039;1&#039; for the &#039;nonpoweroftwo&#039; key allows this restriction to be relaxed. This is currently considered experimental and may have unexpected performance, quality, or functionality outcomes. It is not recommended that end-users utilize this format at the current time.&lt;br /&gt;
&lt;br /&gt;
Non-power-of-two (NPOT) textures may not support mipmapping and thus may be noticeably affected by the moire effect in addition to having higher overall GPU bandwidth requirements.&lt;br /&gt;
&lt;br /&gt;
=Texture Formats=&lt;br /&gt;
The following texture formats are supported internally by Trainz on desktop platforms.&lt;br /&gt;
* R8 G8 B8 A8&lt;br /&gt;
* DXT1&lt;br /&gt;
* DXT3&lt;br /&gt;
* DXT5&lt;br /&gt;
* R32F G32F B32F A32F&lt;br /&gt;
&lt;br /&gt;
The selection of internal format depends on the source image format and the value of the &#039;Compression&#039; key.&lt;br /&gt;
&lt;br /&gt;
=Texture Size=&lt;br /&gt;
Textures must be no more than 4096 pixels in either dimension, although it is strongly recommended that textures are kept below this maximum to avoid performance problems. Small objects should typically use approximately 512x512. Large, highly detailed objects such as train vehicles or ground textures will typically use 2048x2048.&lt;br /&gt;
Uniform-color textures (ie. textures in which all [[texel]]s have the same color) should be 8x8, 2x2, or 1x1.&lt;br /&gt;
Textures must be a power-of-two size in each dimension (unless the &#039;nonpoweroftwo&#039; key is activated), but need not be square. Some materials may give unexpected results for non-square textures; consult the material-specific documentation for details.&lt;br /&gt;
&lt;br /&gt;
=Source Image Formats=&lt;br /&gt;
The following image formats are acceptable as source data for the texture file. Note that these formats are not used at runtime, and that format-specific benefits such as compression will apply to the DLS download size of the content but not to the runtime memory footprint or GPU bandwidth usage.&lt;br /&gt;
&lt;br /&gt;
* Targa (.tga) files. Targa is a lossless image format with optional compression and optional alpha channel. This is a sensible choice where compatibility with older versions of Trainz is desired.&lt;br /&gt;
* JPEG (.jpg) files. JPEG is a lossy image compression format with no alpha channel support. This format should generally be avoided since it will typically lead to the image being compressed in a lossy format (JPG), decompressed, recompressed again into another lossy format (DXT1), losing detail at each stage. Worse, if JPEG files are used during the creation of the image, each edit-save-test cycle may result in a loss of image quality.&lt;br /&gt;
* Windows Bitmap (.bmp) files. BMP is a lossless image format with no compression and optional alpha channel. This format should generally be avoided since it does not offer compression and has no redeeming benefits.&lt;br /&gt;
* HDR (.hdr) files. HDR is a lossless image format with 32 bits of precision per channel. The R32F G32F B32F A32F internal texture format is used, and texture compression is not supported. This is a very expensive format (in terms of memory and performance) and should only be used where absolutely essential. Textures created in this format should be kept as small as possible (eg. 256-512 pixels wide and high) but at least 8x8 pixels wide and high.&lt;br /&gt;
* PNG (.png) files. PNG is a lossless compressed image format with alpha channel support. This is the best choice where compatibility with older versions of Trainz is not required.&lt;br /&gt;
* DDS (.dds) files. This has very limited support intended for specific internal purposes; it is not recommended that end-users utilize this format at the current time.&lt;br /&gt;
&lt;br /&gt;
All images which comprise a given texture must have identical dimensions (width, height).&lt;br /&gt;
&lt;br /&gt;
Source images should use the SRGB color space except where material-specific documentation indicates otherwise.&lt;br /&gt;
&lt;br /&gt;
=Notes on Image Editors=&lt;br /&gt;
* The Targa Exporter plugin shipped with some older versions of Adobe Photoshop is broken and silently corrupts or discards alpha channels; a free update is available which resolves this issue.&lt;br /&gt;
* Some image editors do not support alpha channels on BMP files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=*.txt File Extension=&lt;br /&gt;
Texture files have a &amp;quot;.texture.txt&amp;quot; name extension, however when a texture file is specified within a [[config.txt file]] or similar, the &amp;quot;.txt&amp;quot; must be omitted, leaving the &amp;quot;.texture&amp;quot; extension.&lt;br /&gt;
For example, a texture file named &#039;&#039;grass.texture.txt&#039;&#039; is specified in a [[KIND Groundtexture]] config file using the syntax &#039;&#039;texture &amp;quot;grass.texture&amp;quot;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=Use of Image Files in Place of Texture Files=&lt;br /&gt;
Trainz previously supported using &#039;&#039;any supported image file&#039;&#039; type in place of a [[Texture file]]. [[TANE]] does not support this technique; a texture.txt file must be used.&lt;br /&gt;
&lt;br /&gt;
[[Category:File formats]]&lt;br /&gt;
[[Category:Modeling]]&lt;br /&gt;
[[Category:Content creation]]&lt;br /&gt;
{{ORP-bot}}&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Texture_file&amp;diff=23743</id>
		<title>Texture file</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Texture_file&amp;diff=23743"/>
		<updated>2020-07-02T21:38:35Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: /* Texture Size */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ORP-top}}&lt;br /&gt;
Trainz &#039;&#039;&#039;Texture files&#039;&#039;&#039; are ASCII text format specification files describing a single texture. Texture files have a &amp;quot;.texture.txt&amp;quot; name extension, however when a texture file is specified within a [[config.txt file]] or similar, the &amp;quot;.txt&amp;quot; must be omitted (as you are specifying a resource name, not a file path), leaving only the &amp;quot;.texture&amp;quot; extension.&lt;br /&gt;
&lt;br /&gt;
Texture files (*.texture.txt) should be distinguished from [[image file]]s (*.tga, etc.) and [[material]]s. A material may utilize zero or more texture files, and a texture file may utilize one or more image files. While we often refer to the image data as &amp;quot;a texture&amp;quot;, this usage isn&#039;t strictly correct as any given texture also has a number of metadata attributes which are not present in the source image. Additionally, a texture may be compressed (at installation time) which may actually lose some of the data originally present in the source image.&lt;br /&gt;
&lt;br /&gt;
When importing a [[trainzmesh file]] from an [[FBX file]], any image files referenced in the FBX which do not already have corresponding texture files will have generic texture files created automatically. These files may be suitable for basic purposes, but may need to be customized for more advanced functionality. Once the file has been created (and optionally customised) the importer will not recreate/overwrite it on subsequent runs.&lt;br /&gt;
&lt;br /&gt;
This page describes [[&amp;quot;Trainz-build&amp;quot; number|content format v4.6]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=File format=&lt;br /&gt;
&lt;br /&gt;
The user-editable *.texture.txt files are ASCII text formatted key-value pairs with the following options. Please note that this format is not the same (despite some similarities) as other text-based formats used by Trainz. Please be aware of the [[filename character restrictions]] when naming texture and image files.&lt;br /&gt;
&lt;br /&gt;
;Syntax&lt;br /&gt;
Each key is specified on a new line. There is no white space anywhere in the line. A empty value is sometimes valid. The syntax is:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;key&amp;gt;=&amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Example:&lt;br /&gt;
 Primary=WayCoolTexture.tga&lt;br /&gt;
 Alpha=WayCoolTexture.tga&lt;br /&gt;
 Tile=st&lt;br /&gt;
 AlphaHint=masked&lt;br /&gt;
&#039;&#039;(Example only, not recommended settings)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Keys and Values==&lt;br /&gt;
&lt;br /&gt;
 Primary=diffusemap.bmp&lt;br /&gt;
&lt;br /&gt;
This tag specifies the filename of the image file representing the color (R, G, B) channels of the texture. Any alpha channel in the image file is ignored. The resultant texture will have a pure white (100%) alpha channel.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Primary=diffusemap.jpg&lt;br /&gt;
 Alpha=diffusemap.bmp&lt;br /&gt;
&lt;br /&gt;
This tag combination specifies the filenames of the image file representing the color (R, G, B) channels of the texture (Primary) and the image file representing the transparency of the texture (Alpha). The Alpha image should be grayscale. Neither file should contain an alpha (A) channel (ie, both images should be 24-bit). The two image files must be of identical size.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Primary=diffusemap.tga&lt;br /&gt;
 Alpha=diffusemap.tga&lt;br /&gt;
&lt;br /&gt;
This tag combination specifies the filename of a single image file representing the color and transparency (R, G, B, A) channels of the texture. In this case both tags must reference the same filename. The image file must contain an alpha channel.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Compression=dxt3&lt;br /&gt;
&lt;br /&gt;
This tag hints the usage of a particular texture compression scheme. If you don&#039;t have a specific effect in mind, don&#039;t include this tag. Valid options are currently &#039;none&#039;, &#039;dxt1&#039;, &#039;dxt3&#039;, &#039;dxt5&#039;. Refer [[DXT Compression]].&lt;br /&gt;
&lt;br /&gt;
The current selection logic for texture compression is as follows, however it should be noted that this may change between Trainz versions. The first matching rule is used.&lt;br /&gt;
&lt;br /&gt;
* Special texture formats (such as HDR) which don&#039;t support compression are stored uncompressed.&lt;br /&gt;
* &amp;quot;Compression=none&amp;quot; forces no compression. This gives the best visual result for a given input image, but typically yields worse visual results per output texture filesize. It is often better to activate compression and double the image dimensions, rather than disabling compression.&lt;br /&gt;
* Images with an &amp;quot;opaque&amp;quot; alpha hint use DXT1 compression.&lt;br /&gt;
* &amp;quot;Compression=dxt3&amp;quot; will use DXT3 compression.&lt;br /&gt;
* DXT5 compression is used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 NormalMapHint=normalmap&lt;br /&gt;
&lt;br /&gt;
The &#039;NormalMapHint&#039; tag allows the texture to be specified as a [[normal map]]. By default, Trainz will assume that your texture is a [[diffuse map]] and will apply some processing options which are not appropriate for normal maps. You must specify this option for normal maps. Valid options are &#039;none&#039; and &#039;normalmap&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ModifyMap=flipgreen&lt;br /&gt;
&lt;br /&gt;
The &#039;ModifyMap&#039; option allows a texture&#039;s green color channel to be flipped.  Some programs such as [[Autodesk 3ds Max]] create [[normal map]]s with the Y axis facing the opposite way to what is expected by the Trainz shaders.  This option can be used to make the bump effect look correct in Trainz. Valid options are &#039;none&#039; and &#039;flipgreen&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 AlphaHint=opaque&lt;br /&gt;
&lt;br /&gt;
The &#039;AlphaHint&#039; tag allows you to force a particular alpha mode on the texture. Valid options are &#039;opaque&#039; (meaning that the alpha channel is overwritten with pure white), &#039;semitransparent&#039; (meaning that the alpha channel is a grayscale blend) and &#039;masked&#039; (meaning that the alpha channel is clamped to a pure black&amp;amp;white bitmap based on a 50% threshold.) If omitted, Trainz will supply an appropriate value for this tag based on the actual contents of the Alpha channel.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Tile=st&lt;br /&gt;
&lt;br /&gt;
Tiling refers to the ability for texture coordinates outside the range of (0.0 .. 1.0) to be treated as valid coordinates on an infinitely tiled texture. With tiling active, coordinates which pass the right/bottom side of the texture effectively wrap back onto the left/top side, and so on. Valid options include &#039;s&#039; (tile horizontally), &#039;t&#039; (tile vertically), &#039;st&#039; (tile both horizontally and vertically), and &#039;none&#039; (do not tile the image).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 MipAlgorithm=no-weight-by-alpha&lt;br /&gt;
&lt;br /&gt;
The default [[mipmap]] generation algorithm generally treats the alpha channel as an opacity and prioritizes opaque texels over transparent ones. This can lead to poor results in cases where the alpha channel is used for a different purpose (such as with PBR parameter textures). The &amp;quot;no-weight-by-alpha&amp;quot; hint can be used to ensure that the game will give equal weighting to texels regardless of their alpha channel.&lt;br /&gt;
&lt;br /&gt;
The value of this key is only relevant where [[Content Manager]] is responsible for producing mipmap images. It is not relevant on any mipmap images provided in the source images.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 nonpoweroftwo=1&lt;br /&gt;
&lt;br /&gt;
By default, all textures must have both their width and height as a power of two (eg. 8, 16, 32, 64, 128, 256, 512, 1024, 2048), though they need not be square. Setting the value &#039;1&#039; for the &#039;nonpoweroftwo&#039; key allows this restriction to be relaxed. This is currently considered experimental and may have unexpected performance, quality, or functionality outcomes. It is not recommended that end-users utilize this format at the current time.&lt;br /&gt;
&lt;br /&gt;
Non-power-of-two (NPOT) textures may not support mipmapping and thus may be noticeably affected by the moire effect in addition to having higher overall GPU bandwidth requirements.&lt;br /&gt;
&lt;br /&gt;
=Texture Formats=&lt;br /&gt;
The following texture formats are supported internally by Trainz on desktop platforms.&lt;br /&gt;
* R8 G8 B8 A8&lt;br /&gt;
* DXT1&lt;br /&gt;
* DXT3&lt;br /&gt;
* DXT5&lt;br /&gt;
* R32F G32F B32F A32F&lt;br /&gt;
&lt;br /&gt;
The selection of internal format depends on the source image format and the value of the &#039;Compression&#039; key.&lt;br /&gt;
&lt;br /&gt;
=Texture Size=&lt;br /&gt;
Textures must be no more than 4096 pixels in either dimension, although it is strongly recommended that textures are kept below this maximum to avoid performance problems. Small objects should typically use approximately 512x512. Large, highly detailed objects such as train vehicles or ground textures will typically use 2048x2048.&lt;br /&gt;
Uniform-color textures (ie. textures in which all [[texel]]s have the same color) should be 8x8, 2x2, or 1x1.&lt;br /&gt;
Textures must be a power-of-two size in each dimension (unless the &#039;nonpoweroftwo&#039; key is activated), but need not be square. Some materials may give unexpected results for non-square textures; consult the material-specific documentation for details.&lt;br /&gt;
&lt;br /&gt;
=Source Image Formats=&lt;br /&gt;
The following image formats are acceptable as source data for the texture file. Note that these formats are not used at runtime, and that format-specific benefits such as compression will apply to the DLS download size of the content but not to the runtime memory footprint or GPU bandwidth usage.&lt;br /&gt;
&lt;br /&gt;
* Targa (.tga) files. Targa is a lossless image format with optional compression and optional alpha channel. This is a sensible choice where compatibility with older versions of Trainz is desired.&lt;br /&gt;
* JPEG (.jpg) files. JPEG is a lossy image compression format with no alpha channel support. This format should generally be avoided since it will typically lead to the image being compressed in a lossy format (JPG), decompressed, recompressed again into another lossy format (DXT1), losing detail at each stage. Worse, if JPEG files are used during the creation of the image, each edit-save-test cycle may result in a loss of image quality.&lt;br /&gt;
* Windows Bitmap (.bmp) files. BMP is a lossless image format with no compression and optional alpha channel. This format should generally be avoided since it does not offer compression and has no redeeming benefits.&lt;br /&gt;
* HDR (.hdr) files. HDR is a lossless image format with 32 bits of precision per channel. The R32F G32F B32F A32F internal texture format is used, and texture compression is not supported. This is a very expensive format (in terms of memory and performance) and should only be used where absolutely essential. Textures created in this format should be kept as small as possible (eg. 256-512 pixels wide and high).&lt;br /&gt;
* PNG (.png) files. PNG is a lossless compressed image format with alpha channel support. This is the best choice where compatibility with older versions of Trainz is not required.&lt;br /&gt;
* DDS (.dds) files. This has very limited support intended for specific internal purposes; it is not recommended that end-users utilize this format at the current time.&lt;br /&gt;
&lt;br /&gt;
All images which comprise a given texture must have identical dimensions (width, height).&lt;br /&gt;
&lt;br /&gt;
Source images should use the SRGB color space except where material-specific documentation indicates otherwise.&lt;br /&gt;
&lt;br /&gt;
=Notes on Image Editors=&lt;br /&gt;
* The Targa Exporter plugin shipped with some older versions of Adobe Photoshop is broken and silently corrupts or discards alpha channels; a free update is available which resolves this issue.&lt;br /&gt;
* Some image editors do not support alpha channels on BMP files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=*.txt File Extension=&lt;br /&gt;
Texture files have a &amp;quot;.texture.txt&amp;quot; name extension, however when a texture file is specified within a [[config.txt file]] or similar, the &amp;quot;.txt&amp;quot; must be omitted, leaving the &amp;quot;.texture&amp;quot; extension.&lt;br /&gt;
For example, a texture file named &#039;&#039;grass.texture.txt&#039;&#039; is specified in a [[KIND Groundtexture]] config file using the syntax &#039;&#039;texture &amp;quot;grass.texture&amp;quot;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=Use of Image Files in Place of Texture Files=&lt;br /&gt;
Trainz previously supported using &#039;&#039;any supported image file&#039;&#039; type in place of a [[Texture file]]. [[TANE]] does not support this technique; a texture.txt file must be used.&lt;br /&gt;
&lt;br /&gt;
[[Category:File formats]]&lt;br /&gt;
[[Category:Modeling]]&lt;br /&gt;
[[Category:Content creation]]&lt;br /&gt;
{{ORP-bot}}&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=M.pbrmetalmasked&amp;diff=23729</id>
		<title>M.pbrmetalmasked</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=M.pbrmetalmasked&amp;diff=23729"/>
		<updated>2020-06-25T19:20:56Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: /* Albedo */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[m.pbrmetalmasked]] is a minor variation on the [[m.pbrmetal]] material. It adds a [[masked alpha]] channel to allow a complex outline to be created without the use of large numbers of [[polygon]]s. All PBR materials are defined using a multitude of texture channels (not just a simple RGB image) which define various aspects of the material on a per-texel basis. One major advantage of this approach is that a single in-game material can be used to display various different real-world materials, rather than requiring multiple separate in-game materials with different parameters. Trainz uses a Metallic/Roughness style PBR workflow.&lt;br /&gt;
&lt;br /&gt;
It should be noted that the &amp;quot;metal&amp;quot; in the name of this material refers to the physical property used in the lighting equations; it does not mean that the material is only appropriate for metallic surfaces.&lt;br /&gt;
&lt;br /&gt;
On some hardware, [[masked alpha]] materials may perform substantially worse than an opaque material. This cost is per-[[fragment]], meaning that it may be suitable to use a masked material on low-[[Level of Detail|LOD]] meshes where polygon count must remain low and where fragment count is naturally low. On higher-LOD meshes, especially where the material is expected to fill a reasonable percentage of the screen, masked materials should be avoided in favor of higher polygon detail, or should be used in conjunction with true opaque materials such that the majority of opaque fragments are filled by the opaque materials and only the complex edge detail is filled by the masked material.&lt;br /&gt;
&lt;br /&gt;
This page describes content format v4.6 and assumes that the FBX file format is used as a data source for any meshes.&lt;br /&gt;
&lt;br /&gt;
=Texture Slots=&lt;br /&gt;
The following texture slots are used for this material. All textures should typically have the same dimensions unless they represent a uniform color, however this is not strictly enforced.&lt;br /&gt;
&lt;br /&gt;
==Albedo==&lt;br /&gt;
RGB: The [[albedo map]] defines the base color of each texel. The sRGB color space is used.&lt;br /&gt;
&lt;br /&gt;
A: The alpha channel provides a &amp;quot;black and white&amp;quot; [[masked alpha]] channel. Black indicates full transparency, meaning that the [[fragment]] is discarded. White indicates full opacity, meaning that rendering proceeds as per [[m.pbrmetal]]. If the alpha channel is omitted, this material acts exactly as [[m.pbrmetal]] except with lower performance. Note that unlike legacy Trainz materials, PBR materials do not autodetect opacity mode based on the texture in use. The content creator must select the appropriate material for their desired outcome. Runtime texture replacement should not expect to replace an opaque texture with a blended or masked texture and have the material update automatically.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Albedo Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:PortalAlbedowAlpha.png|500px]]&lt;br /&gt;
&lt;br /&gt;
Color Channel Separated&lt;br /&gt;
&lt;br /&gt;
[[File:PortalAlbedo.png|500px]]&lt;br /&gt;
&lt;br /&gt;
Alpha Channel Separated&lt;br /&gt;
&lt;br /&gt;
[[File:PortalAlpha.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==Normal==&lt;br /&gt;
RGB: Surface [[normal map]]. This defines which way the surface is facing, relative to the interpolated vertex normals. Since this is an XYZ format rather than color data, it should never be modified in Photoshop. Using Photoshop to add a fourth channel or copy/paste smaller textures into a [[texture atlas]] is acceptable. Per-pixel manipulation or use of filters on the &amp;quot;RGB&amp;quot; channels is not acceptable.&lt;br /&gt;
&lt;br /&gt;
A: [[Parallax Occlusion Map|Displacement height]]. 0.0 represents the deepest possible value, while 1.0 represents the shallowest possible value. While it is possible to paint this data in Photoshop, a linear color space must be used, and far superior results will be available through other data sources. The parallax height and the surface normal must be kept in sync, which means that a third-party tool must be used to generate the surface normal from the parallax height if you are painting this map manually.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Normal Texture Example with no Alpha Channel (Parallax)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrnormalmap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Normal Texture Example with Alpha Channel (Parallax)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrnormalwithalpha.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
==Parameter==&lt;br /&gt;
This texture is comprised of four separate channels which each form a separate data element. Linear color space (not sRGB) is used for these channels.&lt;br /&gt;
&lt;br /&gt;
[[File:pbrparametersall.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
R: Emissive. This causes the texture to have an internal glow, even when no external light is present. Used for phosphors, permanently-lit markings, etc. The glow color is based on the albedo. Note that this glow does not cast light upon surrounding surfaces except via the Bloom post-processing effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Parameters (Emissive - Red Channel) Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrparametersemissivemap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
G: Roughness. Defines whether the surface reflections are shiny (0.0) or matte (1.0). See the [[Physically Based Rendering|PBR metal workflow]] for details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Parameters (Roughness - Green Channel) Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrparametersroughnessmap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
B: Ambient Occlusion. Defines whether the surface is exposed to ambient lighting conditions (1.0) or affected only by direct lighting (0.0).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Parameters (Ambient Occlusion - Blue Channel) Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrparametersambientocclusionmap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
A: Metallicity. Defines whether the surface is metallic (1.0) with the albedo used to colorize reflected light, or dielectric (0.0) with the albedo used to colorize the surface. While intermediate values are not physically accurate, they may be used to emulate subsurfaces which are partially metallic. See the [[Physically Based Rendering|PBR metal workflow]] for details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Parameters (Metallic - Alpha Channel) Texture Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:pbrparametersmetallicmap1.jpg|border|middle|x200px]]&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
[[File:trainz_material_pbrmetalmasked.jpg|border|middle|x512px]]&lt;br /&gt;
&lt;br /&gt;
Example asset download:&lt;br /&gt;
&lt;br /&gt;
[http://download.trainzportal.com/tutorials/Trainz_Material_-_pbrmetalmasked.cdp Trainz Material - pbrmetalmasked + emissive]&lt;br /&gt;
&lt;br /&gt;
=3ds Max Material Configuration=&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Texture Assignment&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
=Blender Material Configuration=&lt;br /&gt;
&lt;br /&gt;
The Blender settings for PBRMetalMasked are the same as [[M.pbrmetal#Blender Material Configuration|PBRMetal Blender Settings]] except for the albedo texture where the Image-&amp;gt;Use_Alpha should be checked.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Material types| ]]&lt;br /&gt;
[[Category:Modeling]]&lt;br /&gt;
[[Category:Content creation]]&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=File:PortalAlbedowAlpha.png&amp;diff=23728</id>
		<title>File:PortalAlbedowAlpha.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=File:PortalAlbedowAlpha.png&amp;diff=23728"/>
		<updated>2020-06-25T19:19:51Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=File:PortalAlpha.png&amp;diff=23727</id>
		<title>File:PortalAlpha.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=File:PortalAlpha.png&amp;diff=23727"/>
		<updated>2020-06-25T19:16:32Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=File:PortalAlbedo.png&amp;diff=23726</id>
		<title>File:PortalAlbedo.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=File:PortalAlbedo.png&amp;diff=23726"/>
		<updated>2020-06-25T19:15:58Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=FBX_file_format&amp;diff=23720</id>
		<title>FBX file format</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=FBX_file_format&amp;diff=23720"/>
		<updated>2020-06-17T22:07:57Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: /* Animation Event Files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FBX file format is a proprietary file format owned by Autodesk, Inc. but used as a common interchange format for many products. As of trainz-build 4.5, Trainz uses FBX as a mesh import format.&lt;br /&gt;
&lt;br /&gt;
=Creating an FBX File=&lt;br /&gt;
FBX files are typically created in modelling software such as [http://www.autodesk.com/products/3ds-max/overview Autodesk&#039;s 3DS Max], or the [https://www.blender.org Blender Foundation&#039;s Blender]. Export instructions for these software packages can be found here:&lt;br /&gt;
&lt;br /&gt;
* [[HowTo/Export from 3DS Max using FBX]]&lt;br /&gt;
* [[HowTo/Export from Blender using FBX]]&lt;br /&gt;
&lt;br /&gt;
While it is likely possible to create FBX files from a wide range of other software, we cannot guarantee that all software is capable of producing Trainz-compatible FBX files. The more that a given software is commonly used to produce in-game models in FBX format for other games, the more likely it will also work with Trainz.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Importing from FBX=&lt;br /&gt;
&lt;br /&gt;
No separate &amp;quot;import&amp;quot; step is required to source a Trainz mesh from FBX format. [[Content Manager]] will perform the necessary conversions when importing an asset.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Asset Configuration ==&lt;br /&gt;
The following configuration is used to import from FBX format:&lt;br /&gt;
&lt;br /&gt;
* The [[config.txt file]] must specify a [[trainz-build]] version of 4.5 or higher.&lt;br /&gt;
* The mesh reference in the [[config.txt file]] (for example, in the [[&amp;quot;mesh-table&amp;quot; container]]) must use a [[Trainzmesh_file|&amp;quot;*.trainzmesh&amp;quot;]] file extension.&lt;br /&gt;
* If the FBX file contains animation tracks, the anim reference in the config.txt file should be named &amp;quot;&amp;lt;mesh-file-name&amp;gt;_&amp;lt;animation-track-name&amp;gt;.kin&amp;quot;.&lt;br /&gt;
* The FBX file must be placed within the asset folder at the indicated location, but with a &amp;quot;*.FBX&amp;quot; file extension.&lt;br /&gt;
* If the FBX file references textures, an image file (eg. &amp;quot;*.tga&amp;quot;) or a texture resource (eg. &amp;quot;*.texture.txt&amp;quot;) with a matching file name must be present in the same folder as the FBX file.&lt;br /&gt;
* If the FBX file contains animation tracks, an animation event file may be present in the same folder as the FBX file. This should be named &amp;quot;&amp;lt;mesh-file-name&amp;gt;_&amp;lt;animation-track-name&amp;gt;.evt&amp;quot;. This is not mandatory.&lt;br /&gt;
&lt;br /&gt;
== Mesh Metadata Files ==&lt;br /&gt;
Various attributes which users may wish to control are frequently not available in standard modelling packages, or are not exported to the FBX file format. An optional &amp;quot;&amp;lt;mesh-file-name&amp;gt;.txt&amp;quot; file may be included alongside the &amp;quot;&amp;lt;mesh-file-name&amp;gt;.fbx&amp;quot; file to convey these attributes. Where attributes are specified in this metadata file, they override any entries read from the FBX file itself. If an attribute is not specified, it is calculated from the FBX file.&lt;br /&gt;
&lt;br /&gt;
See the [[mesh metadata file]] page for full details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Animation Event Files ==&lt;br /&gt;
Animation event files are simple hand-created ASCII text files which provide additional sequencing data used to synchronise scripted behaviour with animation playback. They use the file extension &amp;quot;*.evt&amp;quot;. Each line of the text file should contain three items separated by whitespace. The items are as follows:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&amp;lt;frame-number&amp;gt; &amp;lt;event-type&amp;gt; &amp;lt;event-name&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For example, if the FBX came from Blender and was called:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;doors.fbx&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
the &amp;quot;*.evt&amp;quot; should be labeled &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;doors_scene.evt&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Since Content Manager will create a *.kin file called: &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;doors_scene.kin&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
The frame number is a zero-based frame index. Animations are typically exported at 30fps, which means that 0 is the very start of the animation, 30 is one second into the animation, and so on. Events should be in ascending frame order. Frames must be in the form of three digits. For instance, if an event wanted to be triggered at frame 2, then it must be typed as &#039;&#039;002&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Event type must always be &amp;quot;Generic_Event&amp;quot; (without the quotes).&lt;br /&gt;
&lt;br /&gt;
The event name is a word comprised of printable ASCII characters (not including whitespace or line break).&lt;br /&gt;
&lt;br /&gt;
As the animation is played back within Trainz, each event sends a script message to the MeshObject with the major type [[Animation-Event Message|&amp;quot;Animation-Event&amp;quot;]] and the minor type equal to the event name.&lt;br /&gt;
&lt;br /&gt;
Please note that animation event files are processed by the mesh importer and the results are included into the Trainz animation file (*.kin). The game proper never uses &amp;quot;*.evt&amp;quot; files.&lt;br /&gt;
&lt;br /&gt;
An example &amp;quot;*.evt&amp;quot; could look like this:&lt;br /&gt;
&lt;br /&gt;
 001 Generic_Event door_start&lt;br /&gt;
 002 Generic_Event door_sealing&lt;br /&gt;
 007 Generic_Event door_beeping&lt;br /&gt;
&lt;br /&gt;
If everything is labeled properly, Content Manager should find the event and report it in the log while submitting the Asset. It will display how many events were found in each event file. &lt;br /&gt;
&lt;br /&gt;
[[File:ParsedEvent.png]]&lt;br /&gt;
&lt;br /&gt;
== Submit ==&lt;br /&gt;
As the asset is submitted into the [[Trainz Asset Database]], Content Manager will import the FBX, TXT and EVT files, and create a number of matching Trainz-specific files:&lt;br /&gt;
&lt;br /&gt;
* A mesh file is created with the name &amp;quot;&amp;lt;mesh-file-name&amp;gt;.trainzmesh&amp;quot;. Any existing file at this path is overwritten.&lt;br /&gt;
* One animation file is created per animation track, named as &amp;quot;&amp;lt;mesh-file-name&amp;gt;_&amp;lt;animation-track-name&amp;gt;.kin&amp;quot;. Any existing files at these paths are overwritten.&lt;br /&gt;
* If necessary, &amp;quot;*.texture.txt&amp;quot; files are created for each source image. Existing files are not overwritten. It is likely that you will want to hand-customise the auto-generated files to configure alpha behaviour or etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Deleting Source Files ==&lt;br /&gt;
The source files (FBX, EVT, TXT) are not deleted in this process, however you may choose to delete them once the imports have been completed. Trainz will accept files in &amp;quot;*.trainzmesh&amp;quot; and &amp;quot;*.kin&amp;quot; format without requiring any equivalent &amp;quot;*.fbx&amp;quot;, &amp;quot;*.txt&amp;quot; or &amp;quot;*.evt&amp;quot; files. You may alternatively leave the source files in place so that other users can load your source mesh directly into their own modelling package.&lt;br /&gt;
&lt;br /&gt;
== Renaming Binary Files ==&lt;br /&gt;
&amp;quot;*.trainzmesh&amp;quot; files and &amp;quot;*.kin&amp;quot; files may optionally be renamed after the initial import once the creating &amp;quot;*.fbx&amp;quot; has been removed- there is no point in renaming binary files while the source &amp;quot;*.fbx&amp;quot; file is still present, as the binary files will simply be re-exported with the original name. When renaming binary files, be sure to update any config.txt references appropriately. This technique can be used to create multiple &amp;quot;*.kin&amp;quot; files which all apply to a single mesh (ie. by importing several *.trainzmesh and *.kin pairs with effectively identical meshes but different animations, then discarding the duplicate meshes).&lt;br /&gt;
&lt;br /&gt;
== Open Source ==&lt;br /&gt;
Trainz reads FBX files courtesy of the [http://www.assimp.org ASSIMP] BSD-licensed mesh importer. This product supports both &amp;quot;text&amp;quot; and &amp;quot;binary&amp;quot; FBX formats, but we recommend using binary format where possible. Our version of ASSIMP includes a small number of modifications to improve the robustness of the importer and compatibility with typical Trainz meshes. While the ASSIMP importer library does support a number of other formats beyond FBX, we do not offer this capability in Trainz at the current time.&lt;br /&gt;
&lt;br /&gt;
== Trouble Shooting ==&lt;br /&gt;
&lt;br /&gt;
=== 3DS MAX ===&lt;br /&gt;
&lt;br /&gt;
====Channel Maps====&lt;br /&gt;
&lt;br /&gt;
Sometimes 3DS Max likes to add extra map channels without you realising, and FBX will most likely report an error such as &amp;quot;Error, T13316:FBX: ignoring binormal layer&amp;quot; or &amp;quot;Unable to determine vertex format&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
You can remove the extras by:&lt;br /&gt;
&lt;br /&gt;
1) Select mesh&lt;br /&gt;
&lt;br /&gt;
2) Open &#039;utilities&#039; tab in max&lt;br /&gt;
&lt;br /&gt;
3) Click on &#039;more...&#039;&lt;br /&gt;
&lt;br /&gt;
4) Click on &#039;Channel Info&#039;&lt;br /&gt;
&lt;br /&gt;
5) Click on &#039;Channel Info&#039; button&lt;br /&gt;
&lt;br /&gt;
6) You&#039;ll see a list of ID/s etc. There will be a line marked &#039;1:map&amp;quot; in the ID column, and another marked &amp;quot;2:map&amp;quot;. Both will have the UVW channel in the &#039;channel name&#039; column.&lt;br /&gt;
&lt;br /&gt;
7) Select the &#039;1:map&#039; line and click on &#039;Name&#039; at the top, and enter &#039;-none-&#039; and click ok&lt;br /&gt;
&lt;br /&gt;
8) Select &#039;2:map&#039; and click on &#039;clear&#039; at the top&lt;br /&gt;
&lt;br /&gt;
Now try exporting.&lt;br /&gt;
&lt;br /&gt;
====Mesh / Bone Scale====&lt;br /&gt;
&lt;br /&gt;
Another one to check is your mesh scale. If any of your meshes are scaled to something other than 100% (X:100, Y:100, Z:100) your mesh is likely to look incorrect or animate incorrectly. Check all bones and meshes to make sure they are 100% scale.&lt;br /&gt;
&lt;br /&gt;
====Displacement Slot====&lt;br /&gt;
&lt;br /&gt;
When you render your scene with a pbrmetaldetail material and forget about the displacement slot, strange results will arise. Don&#039;t forget your displacement slot!&lt;br /&gt;
&lt;br /&gt;
====Bogey Animations====&lt;br /&gt;
You must name your animation &amp;quot;anim.kin&amp;quot; in your bogey asset. You can leave the anim tag out of your config.txt as the anim.kin file is what the bogeys use.&lt;br /&gt;
&lt;br /&gt;
====Warnings and Errors====&lt;br /&gt;
We will be updating this section with more information as we continue testing the new systems. &lt;br /&gt;
&lt;br /&gt;
* Warn,  T13272: FBX-DOM (TOK_KEY, offset 0x14d27) source object for connection does not exist&lt;br /&gt;
* Error, T13272: FBX: length of input data unexpected for ByPolygon mapping: 2586, expected 2463&lt;br /&gt;
&lt;br /&gt;
To fix these errors, check your UV and channel maps then re-export.&lt;br /&gt;
&lt;br /&gt;
[[Category:Modeling]]&lt;br /&gt;
[[Category:Content creation]]&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=File:ParsedEvent.png&amp;diff=23719</id>
		<title>File:ParsedEvent.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=File:ParsedEvent.png&amp;diff=23719"/>
		<updated>2020-06-17T22:05:56Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=%22mesh-table%22_container_(interior_version)&amp;diff=23718</id>
		<title>&quot;mesh-table&quot; container (interior version)</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=%22mesh-table%22_container_(interior_version)&amp;diff=23718"/>
		<updated>2020-06-17T02:59:55Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: /* mousespeed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &amp;quot;mesh-table&amp;quot; container is a top-level [[config.txt file]] entry used by various [[Content_Configuration#Content_Types|Content Types]]. Refer to the [[&amp;quot;mesh-table&amp;quot; Container]] documentation for the standard tags - this document only describes the extensions available within the mesh table when it is used in a [[KIND_Interior|cab interior]] asset.&lt;br /&gt;
&lt;br /&gt;
Most of the entries in a mesh-table for an interior will be cab controls. A cab control has a single value associated with it, which could be an input (e.g. a lever position) or an output (a dial or gauge position).&lt;br /&gt;
&lt;br /&gt;
=Standard Mesh Names=&lt;br /&gt;
&lt;br /&gt;
There are a number of standard mesh names that the trainz default cab script uses for it&#039;s controls. For a Diesel or Electric cab (either unscripted, or scripted and inheriting from the DefaultLocomotiveCabin class), the following are the default mesh names:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Needles:&#039;&#039;&#039;&lt;br /&gt;
* speedo_needle -- speedometer&lt;br /&gt;
* speedo_needle2 -- speedometer&lt;br /&gt;
* bplocomain_needle -- loco main reservoir pressure gauge&lt;br /&gt;
* bptrainbrakecylinder_needle -- locomotive brake cylinder pressure gauge&lt;br /&gt;
* bptrainbrakecylinder_needle2 -- locomotive brake cylinder pressure gauge&lt;br /&gt;
* no3pipe_needle -- brake pressure gauge (currently loco brake cylinder -- but maybe intended for something else?)&lt;br /&gt;
* bptrainbrakecylinder2_needle -- brake pressure gauge (source unknown)&lt;br /&gt;
* bptrainbrakepipe_needle -- train brake pipe pressure gauge&lt;br /&gt;
* bptrainbrakepipe_needle2 -- train brake pipe pressure gauge&lt;br /&gt;
* bploco_equaliser -- brake equaliser pressure gauge&lt;br /&gt;
* flow_needle -- brake flow rate gauge&lt;br /&gt;
* ampmeter_needle -- traction ammeter gauge&lt;br /&gt;
* ampmeter2_needle -- traction ammeter gauge&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Levers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* throttle_lever -- throttle lever control&lt;br /&gt;
* reverser_lever -- reverser lever control&lt;br /&gt;
* trainbrake_lever -- self-lapping train brake control&lt;br /&gt;
* trainbrakelap_lever -- non self-lapping train brake control&lt;br /&gt;
* independantbrake_lever -- locomotive independent brake control. Note the typo in the control name.&lt;br /&gt;
* dynamicbrake_lever -- dynamic brake control&lt;br /&gt;
* wheelslip_light -- wheelslip indicator&lt;br /&gt;
* horn -- horn control&lt;br /&gt;
* light_switch -- light control&lt;br /&gt;
* pantograph_lever -- pantograph control&lt;br /&gt;
* throttle_brake_lever -- combined throttle/self-lapping brake lever&lt;br /&gt;
* bell -- bell control&lt;br /&gt;
For a Steam cab (either unscripted, or scripted and inheriting from the DefaultSteamCabin class), these default mesh names are available:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Needles:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* speedo_needle -- speedometer&lt;br /&gt;
* bplocomain_needle -- loco main reservoir pressure gauge&lt;br /&gt;
* bptrainbrakecylinder_needle -- locomotive brake cylinder pressure gauge&lt;br /&gt;
* no3pipe_needle -- brake pressure gauge (currently loco brake cylinder -- but maybe intended for something else?)&lt;br /&gt;
* bptrainbrakecylinder2_needle -- brake pressure gauge (source unknown)&lt;br /&gt;
* bptrainbrakepipe_needle -- train brake pipe pressure gauge&lt;br /&gt;
* bploco_equaliser -- brake equaliser pressure gauge&lt;br /&gt;
* flow_needle -- brake flow rate gauge&lt;br /&gt;
* boiler_needle -- boiler pressure&lt;br /&gt;
* boiler_needle1 -- boiler pressure&lt;br /&gt;
* steam_chest_needle -- steam chest pressure&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Levers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* trainbrake_lever -- self-lapping train brake control&lt;br /&gt;
* trainbrakelap_lever -- non self-lapping train brake control&lt;br /&gt;
* independantbrake_lever -- locomotive independent brake control. Note the typo in the control name.&lt;br /&gt;
* horn -- horn control&lt;br /&gt;
* light_switch -- light control&lt;br /&gt;
* waterglass_left -- boiler water level&lt;br /&gt;
* waterglass_right -- boiler water level&lt;br /&gt;
* firebox -- the interior of the firebox (to show fire temperature) Only works pre-TANE.&lt;br /&gt;
* regulator -- regulator (throttle) control&lt;br /&gt;
* reverser -- cutoff (reverser) control&lt;br /&gt;
* water_injector_0 -- primary water injector control&lt;br /&gt;
* water_injector_1 -- secondary water injector control&lt;br /&gt;
* blower -- steam blower control&lt;br /&gt;
* fire_plates -- the firebox door&lt;br /&gt;
* sanding_lever -- locomotive sander control&lt;br /&gt;
* blowdown_lever -- blowdown control (releases water out of the boiler)&lt;br /&gt;
* bell -- bell control&lt;br /&gt;
* left_window -- Left window control&lt;br /&gt;
* right_window -- Right window control&lt;br /&gt;
* left_sliding_window-- Left sliding window control&lt;br /&gt;
* right_sliding_window-- Right sliding window control&lt;br /&gt;
* seat0 -- Seat control&lt;br /&gt;
* seat1 -- Seat control&lt;br /&gt;
* whistle_lever -- Whistle lever control. (Doesn&#039;t seem to actually control the horn, so the whistle lever should actually be called &amp;quot;horn&amp;quot; to function properly.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=Supported Tags=&lt;br /&gt;
Each mesh subcontainer supports the following tags. Each tag is shown here with its default value. Standard tags inherited from the normal mesh table are omitted for brevity.&lt;br /&gt;
&lt;br /&gt;
 tooltip-text &amp;quot;&amp;quot;&lt;br /&gt;
 tooltip-token &amp;quot;&amp;quot;&lt;br /&gt;
 tooltip-mesh &amp;quot;&amp;quot;&lt;br /&gt;
 limits 0,1&lt;br /&gt;
 angles 0,0&lt;br /&gt;
 kind &amp;quot;&amp;quot;&lt;br /&gt;
 collision-parent &amp;quot;&amp;quot;&lt;br /&gt;
 mousemode &amp;quot;&amp;quot;&lt;br /&gt;
 mousespeed 1&lt;br /&gt;
 notches &lt;br /&gt;
 invert 0&lt;br /&gt;
 notchheight &lt;br /&gt;
 onlight &amp;quot;&amp;quot;&lt;br /&gt;
 value 0.0&lt;br /&gt;
 font &amp;quot;swiss&amp;quot;&lt;br /&gt;
 fontsize 12&lt;br /&gt;
 fontcolor 1.0,1.0,1.0&lt;br /&gt;
 fade-time 0.5&lt;br /&gt;
&lt;br /&gt;
====angles====&lt;br /&gt;
:Type: Decimal Pair&lt;br /&gt;
:Desc: Specifies the minimum and maximum extents of movement for a control or needle. For control types that rotate, these values are in radians[[http://en.wikipedia.org/wiki/Radian]]. In the case of a speedometer, this would define the amount of angular movement of the needle - a speedometer running from horizontal left to horizontal right may use -1.57 to 1.57, for example. If the cab control needs to move the other way, put the higher number first.&lt;br /&gt;
&lt;br /&gt;
====collision-parent====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: A mesh of kind collision-proxy must specify a collision-parent - the mesh it is a collision proxy for. This is the name of another control in the mesh-table.&lt;br /&gt;
&lt;br /&gt;
====fade-time====&lt;br /&gt;
:Type: Float&lt;br /&gt;
:Desc: The time, in seconds, for a &amp;quot;light&amp;quot; control to fully switch on or off.  Default is 0.5 seconds.&lt;br /&gt;
&lt;br /&gt;
====font====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: Font name to use for the readout of a digital control.&lt;br /&gt;
:Options are:&lt;br /&gt;
:* &#039;&#039;swiss&#039;&#039; (Default option. Renders with arial in PC builds.)&lt;br /&gt;
:* &#039;&#039;times_new_roman&#039;&#039;&lt;br /&gt;
:* &#039;&#039;verdana&#039;&#039;&lt;br /&gt;
:* &#039;&#039;century_gothic&#039;&#039;&lt;br /&gt;
:* &#039;&#039;cordia&#039;&#039;&lt;br /&gt;
:* &#039;&#039;courier&#039;&#039;&lt;br /&gt;
:* &#039;&#039;helvetica&#039;&#039;&lt;br /&gt;
:* &#039;&#039;arial&#039;&#039;&lt;br /&gt;
:* &#039;&#039;comic_sans&#039;&#039;&lt;br /&gt;
:* &#039;&#039;sans_serif&#039;&#039;&lt;br /&gt;
:* &#039;&#039;impact&#039;&#039;&lt;br /&gt;
:* &#039;&#039;console&#039;&#039;&lt;br /&gt;
:* &#039;&#039;tohoma&#039;&#039; (renders using the &#039;&#039;Tahoma&#039;&#039; font on PC builds.)&lt;br /&gt;
:* &#039;&#039;garamond&#039;&#039;&lt;br /&gt;
:These roughly correspond with Windows font names. Beware - not all fonts are available on all platforms, and where a font is not available, a different font may be substituted.&lt;br /&gt;
&lt;br /&gt;
====fontcolor====&lt;br /&gt;
:Type: Decimal Triplet&lt;br /&gt;
:Desc: RGB font color for the readout of a digital control. Colors are specified within the range 0.0 to 1.0, with 0.0 being black and 1.0 being full intensity. Default is 1.0,1.0,1.0 - white.&lt;br /&gt;
&lt;br /&gt;
====fontsize====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Font size for the readout of a digital control. Default is 12.&lt;br /&gt;
&lt;br /&gt;
====invert====&lt;br /&gt;
:Type: Boolean&lt;br /&gt;
:Desc: Invert mouse movement for this control. If the control moves the wrong way compared to the mouse, change this setting.&lt;br /&gt;
&lt;br /&gt;
====kind====&lt;br /&gt;
:Type: Selection&lt;br /&gt;
:Desc: The type of control this mesh table element represents.&lt;br /&gt;
:Options are:&lt;br /&gt;
:* &#039;&#039;animated-lever&#039;&#039;&lt;br /&gt;
:Operates like a standard lever, only uses a named animation instead of the angles tag for movement.&lt;br /&gt;
:* &#039;&#039;animated-dial&#039;&#039;&lt;br /&gt;
:Operates like a standard needle, only uses a named animation to represent the gauge readout instead of the angles tag.&lt;br /&gt;
:* &#039;&#039;collision-proxy&#039;&#039;&lt;br /&gt;
:This element type defines a volume within the cab where the mouse pointer will be considered to be over the cab control. Generally used in conjunction with an animated-lever. Name of the animated lever is defined in the tag &#039;&#039;collision-parent&#039;&#039;.&lt;br /&gt;
:* &#039;&#039;digital-dial-spd&#039;&#039;&lt;br /&gt;
:Digital readout for a speedometer, and using speed units.&lt;br /&gt;
:* &#039;&#039;digital-dial-prs&#039;&#039;&lt;br /&gt;
:Digital readout for a pressure gauge, using pressure units.&lt;br /&gt;
:* &#039;&#039;firebox&#039;&#039;&lt;br /&gt;
:The animated firebox in a steam locomotive.&lt;br /&gt;
:* &#039;&#039;lever&#039;&#039;&lt;br /&gt;
:A standard lever, often used for throttle and brake controls. Requires the user to click hold and move the mouse to move the lever between it&#039;s notches. This control will stay at any notch position when let go.&lt;br /&gt;
:* &#039;&#039;light&#039;&#039;&lt;br /&gt;
:A light glow / overlay - this mesh is hidden when the light is off and shown when the light is on.&lt;br /&gt;
:* &#039;&#039;needle&#039;&#039;&lt;br /&gt;
:An analogue gauge needle. Can be used to implement many different types of gauges.&lt;br /&gt;
:* &#039;&#039;pulllever&#039;&#039;&lt;br /&gt;
:Like a lever, only sprung to return to it&#039;s initial position when the user lets go of the control. Useful for horns.&lt;br /&gt;
:* &#039;&#039;pullrope&#039;&#039;&lt;br /&gt;
:Like a pulllever, only with linear (not rotational) movement.&lt;br /&gt;
:* &#039;&#039;switch&#039;&#039;&lt;br /&gt;
:This control requires only a single click to move between it&#039;s two endpoints. It is better suited than a lever to small switches and buttons.&lt;br /&gt;
:* &#039;&#039;button&#039;&#039;&lt;br /&gt;
:Similar to switch but requires the mouse be held down to keep the control active. I.e., press and hold the mouse button to push the control down, release the mouse and the control will return to the off position.&lt;br /&gt;
&lt;br /&gt;
====limits====&lt;br /&gt;
:Type: Decimal Pair&lt;br /&gt;
:Desc: Specifies the minimum and maximum values for a cab control or needle at it&#039;s two endpoints of movement. In the case of a speedometer, this would be the range of speeds it can display - 0m/s to 50m/s, for example.&lt;br /&gt;
&lt;br /&gt;
====mousemode====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: If set to &amp;quot;exact&amp;quot;, will require the mouse to be positioned over the geometry of the control precisely to activate it. Otherwise a bounding volume is used. This is useful for large controls which would otherwise block access to smaller controls.&lt;br /&gt;
&lt;br /&gt;
====mousespeed====&lt;br /&gt;
:Type: Float&lt;br /&gt;
:Desc: Controls the mouse speed and push/pull direction for controls. The higher the number, the less effort is required by the user to move the lever to another notch.  &#039;&#039;&#039;&#039;&#039;Do not use zero&#039;&#039;&#039;&#039;&#039;.&lt;br /&gt;
:Examples of use:&lt;br /&gt;
:* mousespeed -1    - &#039;&#039;Inverts mouse direction.&#039;&#039;&lt;br /&gt;
:* mousespeed 2    - &#039;&#039;Doubles mouse speed in default direction.&#039;&#039;&lt;br /&gt;
:* mousespeed -0.5 - &#039;&#039;Inverts mouse direction and halves the speed.&#039;&#039;&lt;br /&gt;
:* mousespeed 10    - &#039;&#039;Multiplies the mouse speed tenfold in default direction. Useful for smaller levers that require too much mouse movement to activate the lever.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====notches====&lt;br /&gt;
:Type: Decimal List&lt;br /&gt;
:Desc: Specifies the positions of the notches for this control. Notches are discrete positions within the movement of the control where the lever can be stopped. If a lever does not have notches, it can be positioned at any location. There are two common uses for notches. Firstly, they can be used to define a control which has a number of discrete positions which mean specific things (e.g. a brake valve). Secondly, they are used to define pre-set discrete values that a control can provide (e.g. a throttle lever). A typical US diesel 8 notch throttle would have something like &amp;quot;notches 0.0,0.125,0.25,0.375,0.5,0.625,0.75,0.875,1.0&amp;quot;, specifying nine positions (for &#039;off&#039; and notches 1 thru 8).&lt;br /&gt;
:Notes: When using notches, the tag &#039;&#039;notchheight&#039;&#039; must be used otherwise the lever will not function and spring back to the original position.&lt;br /&gt;
&lt;br /&gt;
====notchheight====&lt;br /&gt;
:Type: Integer List&lt;br /&gt;
:Desc: Specifies the importance of the notches for this control. This affects how the graphical overlay draws each notch. This is useful for a combined brake and throttle controller, or any other control where you want to mark a specific position relative to the others. This should have the same number of values as the &#039;notches&#039; list.&lt;br /&gt;
:Three styles are available:&lt;br /&gt;
:* &#039;1&#039; configures this bar to be a standard length and width bar.&lt;br /&gt;
:* &#039;2&#039; configures this bar to be shorter in length, and is often used for intermediate positions.&lt;br /&gt;
:* &#039;3&#039; configures this bar to be standard length, but thicker in width. This is often used for marking a specific position.&lt;br /&gt;
&lt;br /&gt;
:Notes: &#039;&#039;&#039;A kind &#039;&#039;lever&#039;&#039; type will not function unless notch heights are specified.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====onlight====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: Specify the name of a &#039;&#039;light&#039;&#039; kind mesh which is enabled when this switch/lever is in the &#039;&#039;on&#039;&#039; position, and disabled when it is in the &#039;&#039;off&#039;&#039; position. The mesh name must be in the mesh-table.  See the example below.&lt;br /&gt;
&lt;br /&gt;
====radius====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Specifies the distance for the 2D notch overlay.&lt;br /&gt;
&lt;br /&gt;
====tooltip-mesh====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: Specifies the name of a mesh-table entry for a mesh to show when the control is moused over. The mesh will be faded in/out over a short period.&lt;br /&gt;
&lt;br /&gt;
====tooltip-text====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: OBSOLETE: DO NOT USE. This text will be used in the tooltip that appears when the mouse cursor hovers over a cab control.&lt;br /&gt;
&lt;br /&gt;
====tooltip-token====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: The name of a string table entry. The contents of the named string table entry will be displayed as a tooltip that appears when the mouse cursor hovers over a cab control. If a token is used then it must appear as a tag in the  [[%22String-table%22 container]].&lt;br /&gt;
&lt;br /&gt;
====value====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Specifies the initial value for this control. For a lever or other input device, this will specify the initial position of the control before the user moves it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Cab Interior Mesh-Table Example=&lt;br /&gt;
The following is an example of a mesh-table which implements a number of cab controls&lt;br /&gt;
&lt;br /&gt;
 mesh-table&lt;br /&gt;
 {&lt;br /&gt;
   default&lt;br /&gt;
   {&lt;br /&gt;
     mesh                                &amp;quot;interior.im&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   wheelslip_light&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;light&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;wheelslip_light.im&amp;quot;&lt;br /&gt;
     auto-create                         0&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   bptrainbrakepipe_needle2&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;digital-dial-prs&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.brakepipe2&amp;quot;&lt;br /&gt;
     limits                              0,55&lt;br /&gt;
     font                                &amp;quot;arial&amp;quot;&lt;br /&gt;
     fontsize                            0.007&lt;br /&gt;
     fontcolor                           80,240,120&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   speedo_needle2&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;digital-dial-spd&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.digispeedo&amp;quot;&lt;br /&gt;
     limits                              0,55&lt;br /&gt;
     font                                &amp;quot;arial&amp;quot;&lt;br /&gt;
     fontsize                            0.01&lt;br /&gt;
     fontcolor                           0,0,0&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   throttle_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;throttle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.throttle&amp;quot;&lt;br /&gt;
     limits                              0,8&lt;br /&gt;
     angles                              0,1.69&lt;br /&gt;
     notches                             0,0.125,0.25,0.375,0.5,0.625,0.75,0.875,1&lt;br /&gt;
     notchheight                         1,2,2,2,2,2,2,2,1&lt;br /&gt;
     radius                              0.35&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   dynamicbrake_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;dynamic_handle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.dynamic&amp;quot;&lt;br /&gt;
     limits                              0,2&lt;br /&gt;
     angles                              0,-1.69&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0.1,1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     radius                              0.35&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   trainbrakelap_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     mesh                                &amp;quot;trainbrake_handle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.trainbrake_handle&amp;quot;&lt;br /&gt;
     limits                              0,4&lt;br /&gt;
     angles                              0,-2&lt;br /&gt;
     notches                             0,0.25,0.5,0.75,1&lt;br /&gt;
     notchheight                         2,2,2,2,2&lt;br /&gt;
     mousespeed                          1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   independantbrake_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;indy_handle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.ind&amp;quot;&lt;br /&gt;
     limits                              0,32&lt;br /&gt;
     angles                              0.94,0&lt;br /&gt;
     notches                             0,0.5,1&lt;br /&gt;
     notchheight                         1,1,1&lt;br /&gt;
     radius                              0.35&lt;br /&gt;
     mousespeed                          1&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   flow_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;flowneedle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.bpflow&amp;quot;&lt;br /&gt;
     limits                              0,1050&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   bplocomain_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedlered.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.mainres&amp;quot;&lt;br /&gt;
     limits                              0,1240&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   bploco_equaliser&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.eqres&amp;quot;&lt;br /&gt;
     limits                              0,1240&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   bptrainbrakecylinder_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedlered.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.brakecyl&amp;quot;&lt;br /&gt;
     limits                              -50,1390&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   bptrainbrakepipe_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.brakepipe&amp;quot;&lt;br /&gt;
     limits                              0,1240&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   speedo_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;speedo_pointer.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.speedo&amp;quot;&lt;br /&gt;
     limits                              0,43&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   ampmeter_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;needleamps.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.ampmeter&amp;quot;&lt;br /&gt;
     limits                              0,1700&lt;br /&gt;
     angles                              0,3.02058&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   reverser_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;reverser_handle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.throttle01&amp;quot;&lt;br /&gt;
     limits                              0,2&lt;br /&gt;
     angles                              -0.55,0.55&lt;br /&gt;
     notches                             0,0.5,1&lt;br /&gt;
     notchheight                         1,1,1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   light_switch&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.hdlt&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;hdltswtch.im&amp;quot;&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     angles                              0,2&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0.1,0.1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   horn&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;pulllever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;horn.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.horn&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     angles                              0,-0.55&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     radius                              -0.02&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0,0&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   pantograph_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;pantograph_lever.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.pantograph_lever&amp;quot;&lt;br /&gt;
     limits                              0,3&lt;br /&gt;
     angles                              1.4,0&lt;br /&gt;
     notches                             0,0.5,0.75,1.0&lt;br /&gt;
     notchheight                         0,0,1,1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     onlight                             &amp;quot;line_power&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   line_power&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;light&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;line_power.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.line_power&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
[[Category:Config Container|M]]&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=%22mesh-table%22_container_(interior_version)&amp;diff=23717</id>
		<title>&quot;mesh-table&quot; container (interior version)</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=%22mesh-table%22_container_(interior_version)&amp;diff=23717"/>
		<updated>2020-06-17T02:55:31Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: /* notchheight */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &amp;quot;mesh-table&amp;quot; container is a top-level [[config.txt file]] entry used by various [[Content_Configuration#Content_Types|Content Types]]. Refer to the [[&amp;quot;mesh-table&amp;quot; Container]] documentation for the standard tags - this document only describes the extensions available within the mesh table when it is used in a [[KIND_Interior|cab interior]] asset.&lt;br /&gt;
&lt;br /&gt;
Most of the entries in a mesh-table for an interior will be cab controls. A cab control has a single value associated with it, which could be an input (e.g. a lever position) or an output (a dial or gauge position).&lt;br /&gt;
&lt;br /&gt;
=Standard Mesh Names=&lt;br /&gt;
&lt;br /&gt;
There are a number of standard mesh names that the trainz default cab script uses for it&#039;s controls. For a Diesel or Electric cab (either unscripted, or scripted and inheriting from the DefaultLocomotiveCabin class), the following are the default mesh names:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Needles:&#039;&#039;&#039;&lt;br /&gt;
* speedo_needle -- speedometer&lt;br /&gt;
* speedo_needle2 -- speedometer&lt;br /&gt;
* bplocomain_needle -- loco main reservoir pressure gauge&lt;br /&gt;
* bptrainbrakecylinder_needle -- locomotive brake cylinder pressure gauge&lt;br /&gt;
* bptrainbrakecylinder_needle2 -- locomotive brake cylinder pressure gauge&lt;br /&gt;
* no3pipe_needle -- brake pressure gauge (currently loco brake cylinder -- but maybe intended for something else?)&lt;br /&gt;
* bptrainbrakecylinder2_needle -- brake pressure gauge (source unknown)&lt;br /&gt;
* bptrainbrakepipe_needle -- train brake pipe pressure gauge&lt;br /&gt;
* bptrainbrakepipe_needle2 -- train brake pipe pressure gauge&lt;br /&gt;
* bploco_equaliser -- brake equaliser pressure gauge&lt;br /&gt;
* flow_needle -- brake flow rate gauge&lt;br /&gt;
* ampmeter_needle -- traction ammeter gauge&lt;br /&gt;
* ampmeter2_needle -- traction ammeter gauge&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Levers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* throttle_lever -- throttle lever control&lt;br /&gt;
* reverser_lever -- reverser lever control&lt;br /&gt;
* trainbrake_lever -- self-lapping train brake control&lt;br /&gt;
* trainbrakelap_lever -- non self-lapping train brake control&lt;br /&gt;
* independantbrake_lever -- locomotive independent brake control. Note the typo in the control name.&lt;br /&gt;
* dynamicbrake_lever -- dynamic brake control&lt;br /&gt;
* wheelslip_light -- wheelslip indicator&lt;br /&gt;
* horn -- horn control&lt;br /&gt;
* light_switch -- light control&lt;br /&gt;
* pantograph_lever -- pantograph control&lt;br /&gt;
* throttle_brake_lever -- combined throttle/self-lapping brake lever&lt;br /&gt;
* bell -- bell control&lt;br /&gt;
For a Steam cab (either unscripted, or scripted and inheriting from the DefaultSteamCabin class), these default mesh names are available:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Needles:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* speedo_needle -- speedometer&lt;br /&gt;
* bplocomain_needle -- loco main reservoir pressure gauge&lt;br /&gt;
* bptrainbrakecylinder_needle -- locomotive brake cylinder pressure gauge&lt;br /&gt;
* no3pipe_needle -- brake pressure gauge (currently loco brake cylinder -- but maybe intended for something else?)&lt;br /&gt;
* bptrainbrakecylinder2_needle -- brake pressure gauge (source unknown)&lt;br /&gt;
* bptrainbrakepipe_needle -- train brake pipe pressure gauge&lt;br /&gt;
* bploco_equaliser -- brake equaliser pressure gauge&lt;br /&gt;
* flow_needle -- brake flow rate gauge&lt;br /&gt;
* boiler_needle -- boiler pressure&lt;br /&gt;
* boiler_needle1 -- boiler pressure&lt;br /&gt;
* steam_chest_needle -- steam chest pressure&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Levers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* trainbrake_lever -- self-lapping train brake control&lt;br /&gt;
* trainbrakelap_lever -- non self-lapping train brake control&lt;br /&gt;
* independantbrake_lever -- locomotive independent brake control. Note the typo in the control name.&lt;br /&gt;
* horn -- horn control&lt;br /&gt;
* light_switch -- light control&lt;br /&gt;
* waterglass_left -- boiler water level&lt;br /&gt;
* waterglass_right -- boiler water level&lt;br /&gt;
* firebox -- the interior of the firebox (to show fire temperature) Only works pre-TANE.&lt;br /&gt;
* regulator -- regulator (throttle) control&lt;br /&gt;
* reverser -- cutoff (reverser) control&lt;br /&gt;
* water_injector_0 -- primary water injector control&lt;br /&gt;
* water_injector_1 -- secondary water injector control&lt;br /&gt;
* blower -- steam blower control&lt;br /&gt;
* fire_plates -- the firebox door&lt;br /&gt;
* sanding_lever -- locomotive sander control&lt;br /&gt;
* blowdown_lever -- blowdown control (releases water out of the boiler)&lt;br /&gt;
* bell -- bell control&lt;br /&gt;
* left_window -- Left window control&lt;br /&gt;
* right_window -- Right window control&lt;br /&gt;
* left_sliding_window-- Left sliding window control&lt;br /&gt;
* right_sliding_window-- Right sliding window control&lt;br /&gt;
* seat0 -- Seat control&lt;br /&gt;
* seat1 -- Seat control&lt;br /&gt;
* whistle_lever -- Whistle lever control. (Doesn&#039;t seem to actually control the horn, so the whistle lever should actually be called &amp;quot;horn&amp;quot; to function properly.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=Supported Tags=&lt;br /&gt;
Each mesh subcontainer supports the following tags. Each tag is shown here with its default value. Standard tags inherited from the normal mesh table are omitted for brevity.&lt;br /&gt;
&lt;br /&gt;
 tooltip-text &amp;quot;&amp;quot;&lt;br /&gt;
 tooltip-token &amp;quot;&amp;quot;&lt;br /&gt;
 tooltip-mesh &amp;quot;&amp;quot;&lt;br /&gt;
 limits 0,1&lt;br /&gt;
 angles 0,0&lt;br /&gt;
 kind &amp;quot;&amp;quot;&lt;br /&gt;
 collision-parent &amp;quot;&amp;quot;&lt;br /&gt;
 mousemode &amp;quot;&amp;quot;&lt;br /&gt;
 mousespeed 1&lt;br /&gt;
 notches &lt;br /&gt;
 invert 0&lt;br /&gt;
 notchheight &lt;br /&gt;
 onlight &amp;quot;&amp;quot;&lt;br /&gt;
 value 0.0&lt;br /&gt;
 font &amp;quot;swiss&amp;quot;&lt;br /&gt;
 fontsize 12&lt;br /&gt;
 fontcolor 1.0,1.0,1.0&lt;br /&gt;
 fade-time 0.5&lt;br /&gt;
&lt;br /&gt;
====angles====&lt;br /&gt;
:Type: Decimal Pair&lt;br /&gt;
:Desc: Specifies the minimum and maximum extents of movement for a control or needle. For control types that rotate, these values are in radians[[http://en.wikipedia.org/wiki/Radian]]. In the case of a speedometer, this would define the amount of angular movement of the needle - a speedometer running from horizontal left to horizontal right may use -1.57 to 1.57, for example. If the cab control needs to move the other way, put the higher number first.&lt;br /&gt;
&lt;br /&gt;
====collision-parent====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: A mesh of kind collision-proxy must specify a collision-parent - the mesh it is a collision proxy for. This is the name of another control in the mesh-table.&lt;br /&gt;
&lt;br /&gt;
====fade-time====&lt;br /&gt;
:Type: Float&lt;br /&gt;
:Desc: The time, in seconds, for a &amp;quot;light&amp;quot; control to fully switch on or off.  Default is 0.5 seconds.&lt;br /&gt;
&lt;br /&gt;
====font====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: Font name to use for the readout of a digital control.&lt;br /&gt;
:Options are:&lt;br /&gt;
:* &#039;&#039;swiss&#039;&#039; (Default option. Renders with arial in PC builds.)&lt;br /&gt;
:* &#039;&#039;times_new_roman&#039;&#039;&lt;br /&gt;
:* &#039;&#039;verdana&#039;&#039;&lt;br /&gt;
:* &#039;&#039;century_gothic&#039;&#039;&lt;br /&gt;
:* &#039;&#039;cordia&#039;&#039;&lt;br /&gt;
:* &#039;&#039;courier&#039;&#039;&lt;br /&gt;
:* &#039;&#039;helvetica&#039;&#039;&lt;br /&gt;
:* &#039;&#039;arial&#039;&#039;&lt;br /&gt;
:* &#039;&#039;comic_sans&#039;&#039;&lt;br /&gt;
:* &#039;&#039;sans_serif&#039;&#039;&lt;br /&gt;
:* &#039;&#039;impact&#039;&#039;&lt;br /&gt;
:* &#039;&#039;console&#039;&#039;&lt;br /&gt;
:* &#039;&#039;tohoma&#039;&#039; (renders using the &#039;&#039;Tahoma&#039;&#039; font on PC builds.)&lt;br /&gt;
:* &#039;&#039;garamond&#039;&#039;&lt;br /&gt;
:These roughly correspond with Windows font names. Beware - not all fonts are available on all platforms, and where a font is not available, a different font may be substituted.&lt;br /&gt;
&lt;br /&gt;
====fontcolor====&lt;br /&gt;
:Type: Decimal Triplet&lt;br /&gt;
:Desc: RGB font color for the readout of a digital control. Colors are specified within the range 0.0 to 1.0, with 0.0 being black and 1.0 being full intensity. Default is 1.0,1.0,1.0 - white.&lt;br /&gt;
&lt;br /&gt;
====fontsize====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Font size for the readout of a digital control. Default is 12.&lt;br /&gt;
&lt;br /&gt;
====invert====&lt;br /&gt;
:Type: Boolean&lt;br /&gt;
:Desc: Invert mouse movement for this control. If the control moves the wrong way compared to the mouse, change this setting.&lt;br /&gt;
&lt;br /&gt;
====kind====&lt;br /&gt;
:Type: Selection&lt;br /&gt;
:Desc: The type of control this mesh table element represents.&lt;br /&gt;
:Options are:&lt;br /&gt;
:* &#039;&#039;animated-lever&#039;&#039;&lt;br /&gt;
:Operates like a standard lever, only uses a named animation instead of the angles tag for movement.&lt;br /&gt;
:* &#039;&#039;animated-dial&#039;&#039;&lt;br /&gt;
:Operates like a standard needle, only uses a named animation to represent the gauge readout instead of the angles tag.&lt;br /&gt;
:* &#039;&#039;collision-proxy&#039;&#039;&lt;br /&gt;
:This element type defines a volume within the cab where the mouse pointer will be considered to be over the cab control. Generally used in conjunction with an animated-lever. Name of the animated lever is defined in the tag &#039;&#039;collision-parent&#039;&#039;.&lt;br /&gt;
:* &#039;&#039;digital-dial-spd&#039;&#039;&lt;br /&gt;
:Digital readout for a speedometer, and using speed units.&lt;br /&gt;
:* &#039;&#039;digital-dial-prs&#039;&#039;&lt;br /&gt;
:Digital readout for a pressure gauge, using pressure units.&lt;br /&gt;
:* &#039;&#039;firebox&#039;&#039;&lt;br /&gt;
:The animated firebox in a steam locomotive.&lt;br /&gt;
:* &#039;&#039;lever&#039;&#039;&lt;br /&gt;
:A standard lever, often used for throttle and brake controls. Requires the user to click hold and move the mouse to move the lever between it&#039;s notches. This control will stay at any notch position when let go.&lt;br /&gt;
:* &#039;&#039;light&#039;&#039;&lt;br /&gt;
:A light glow / overlay - this mesh is hidden when the light is off and shown when the light is on.&lt;br /&gt;
:* &#039;&#039;needle&#039;&#039;&lt;br /&gt;
:An analogue gauge needle. Can be used to implement many different types of gauges.&lt;br /&gt;
:* &#039;&#039;pulllever&#039;&#039;&lt;br /&gt;
:Like a lever, only sprung to return to it&#039;s initial position when the user lets go of the control. Useful for horns.&lt;br /&gt;
:* &#039;&#039;pullrope&#039;&#039;&lt;br /&gt;
:Like a pulllever, only with linear (not rotational) movement.&lt;br /&gt;
:* &#039;&#039;switch&#039;&#039;&lt;br /&gt;
:This control requires only a single click to move between it&#039;s two endpoints. It is better suited than a lever to small switches and buttons.&lt;br /&gt;
:* &#039;&#039;button&#039;&#039;&lt;br /&gt;
:Similar to switch but requires the mouse be held down to keep the control active. I.e., press and hold the mouse button to push the control down, release the mouse and the control will return to the off position.&lt;br /&gt;
&lt;br /&gt;
====limits====&lt;br /&gt;
:Type: Decimal Pair&lt;br /&gt;
:Desc: Specifies the minimum and maximum values for a cab control or needle at it&#039;s two endpoints of movement. In the case of a speedometer, this would be the range of speeds it can display - 0m/s to 50m/s, for example.&lt;br /&gt;
&lt;br /&gt;
====mousemode====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: If set to &amp;quot;exact&amp;quot;, will require the mouse to be positioned over the geometry of the control precisely to activate it. Otherwise a bounding volume is used. This is useful for large controls which would otherwise block access to smaller controls.&lt;br /&gt;
&lt;br /&gt;
====mousespeed====&lt;br /&gt;
:Type: Float&lt;br /&gt;
:Desc: Controls the mouse speed and push/pull direction for controls.  &#039;&#039;&#039;&#039;&#039;Do not use zero&#039;&#039;&#039;&#039;&#039;.&lt;br /&gt;
:Examples of use:&lt;br /&gt;
:* mousespeed -1   Inverts mouse direction.&lt;br /&gt;
:* mousespeed 2    Doubles mouse speed in default direction.&lt;br /&gt;
:* mousespeed -0.5 Inverts mouse direction and halves the speed.&lt;br /&gt;
:* mousespeed 10    Multiplies the mouse speed tenfold in default direction. Useful for smaller levers that require too much mouse movement to activate the lever.&lt;br /&gt;
&lt;br /&gt;
====notches====&lt;br /&gt;
:Type: Decimal List&lt;br /&gt;
:Desc: Specifies the positions of the notches for this control. Notches are discrete positions within the movement of the control where the lever can be stopped. If a lever does not have notches, it can be positioned at any location. There are two common uses for notches. Firstly, they can be used to define a control which has a number of discrete positions which mean specific things (e.g. a brake valve). Secondly, they are used to define pre-set discrete values that a control can provide (e.g. a throttle lever). A typical US diesel 8 notch throttle would have something like &amp;quot;notches 0.0,0.125,0.25,0.375,0.5,0.625,0.75,0.875,1.0&amp;quot;, specifying nine positions (for &#039;off&#039; and notches 1 thru 8).&lt;br /&gt;
:Notes: When using notches, the tag &#039;&#039;notchheight&#039;&#039; must be used otherwise the lever will not function and spring back to the original position.&lt;br /&gt;
&lt;br /&gt;
====notchheight====&lt;br /&gt;
:Type: Integer List&lt;br /&gt;
:Desc: Specifies the importance of the notches for this control. This affects how the graphical overlay draws each notch. This is useful for a combined brake and throttle controller, or any other control where you want to mark a specific position relative to the others. This should have the same number of values as the &#039;notches&#039; list.&lt;br /&gt;
:Three styles are available:&lt;br /&gt;
:* &#039;1&#039; configures this bar to be a standard length and width bar.&lt;br /&gt;
:* &#039;2&#039; configures this bar to be shorter in length, and is often used for intermediate positions.&lt;br /&gt;
:* &#039;3&#039; configures this bar to be standard length, but thicker in width. This is often used for marking a specific position.&lt;br /&gt;
&lt;br /&gt;
:Notes: &#039;&#039;&#039;A kind &#039;&#039;lever&#039;&#039; type will not function unless notch heights are specified.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====onlight====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: Specify the name of a &#039;&#039;light&#039;&#039; kind mesh which is enabled when this switch/lever is in the &#039;&#039;on&#039;&#039; position, and disabled when it is in the &#039;&#039;off&#039;&#039; position. The mesh name must be in the mesh-table.  See the example below.&lt;br /&gt;
&lt;br /&gt;
====radius====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Specifies the distance for the 2D notch overlay.&lt;br /&gt;
&lt;br /&gt;
====tooltip-mesh====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: Specifies the name of a mesh-table entry for a mesh to show when the control is moused over. The mesh will be faded in/out over a short period.&lt;br /&gt;
&lt;br /&gt;
====tooltip-text====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: OBSOLETE: DO NOT USE. This text will be used in the tooltip that appears when the mouse cursor hovers over a cab control.&lt;br /&gt;
&lt;br /&gt;
====tooltip-token====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: The name of a string table entry. The contents of the named string table entry will be displayed as a tooltip that appears when the mouse cursor hovers over a cab control. If a token is used then it must appear as a tag in the  [[%22String-table%22 container]].&lt;br /&gt;
&lt;br /&gt;
====value====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Specifies the initial value for this control. For a lever or other input device, this will specify the initial position of the control before the user moves it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Cab Interior Mesh-Table Example=&lt;br /&gt;
The following is an example of a mesh-table which implements a number of cab controls&lt;br /&gt;
&lt;br /&gt;
 mesh-table&lt;br /&gt;
 {&lt;br /&gt;
   default&lt;br /&gt;
   {&lt;br /&gt;
     mesh                                &amp;quot;interior.im&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   wheelslip_light&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;light&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;wheelslip_light.im&amp;quot;&lt;br /&gt;
     auto-create                         0&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   bptrainbrakepipe_needle2&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;digital-dial-prs&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.brakepipe2&amp;quot;&lt;br /&gt;
     limits                              0,55&lt;br /&gt;
     font                                &amp;quot;arial&amp;quot;&lt;br /&gt;
     fontsize                            0.007&lt;br /&gt;
     fontcolor                           80,240,120&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   speedo_needle2&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;digital-dial-spd&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.digispeedo&amp;quot;&lt;br /&gt;
     limits                              0,55&lt;br /&gt;
     font                                &amp;quot;arial&amp;quot;&lt;br /&gt;
     fontsize                            0.01&lt;br /&gt;
     fontcolor                           0,0,0&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   throttle_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;throttle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.throttle&amp;quot;&lt;br /&gt;
     limits                              0,8&lt;br /&gt;
     angles                              0,1.69&lt;br /&gt;
     notches                             0,0.125,0.25,0.375,0.5,0.625,0.75,0.875,1&lt;br /&gt;
     notchheight                         1,2,2,2,2,2,2,2,1&lt;br /&gt;
     radius                              0.35&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   dynamicbrake_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;dynamic_handle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.dynamic&amp;quot;&lt;br /&gt;
     limits                              0,2&lt;br /&gt;
     angles                              0,-1.69&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0.1,1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     radius                              0.35&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   trainbrakelap_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     mesh                                &amp;quot;trainbrake_handle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.trainbrake_handle&amp;quot;&lt;br /&gt;
     limits                              0,4&lt;br /&gt;
     angles                              0,-2&lt;br /&gt;
     notches                             0,0.25,0.5,0.75,1&lt;br /&gt;
     notchheight                         2,2,2,2,2&lt;br /&gt;
     mousespeed                          1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   independantbrake_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;indy_handle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.ind&amp;quot;&lt;br /&gt;
     limits                              0,32&lt;br /&gt;
     angles                              0.94,0&lt;br /&gt;
     notches                             0,0.5,1&lt;br /&gt;
     notchheight                         1,1,1&lt;br /&gt;
     radius                              0.35&lt;br /&gt;
     mousespeed                          1&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   flow_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;flowneedle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.bpflow&amp;quot;&lt;br /&gt;
     limits                              0,1050&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   bplocomain_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedlered.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.mainres&amp;quot;&lt;br /&gt;
     limits                              0,1240&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   bploco_equaliser&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.eqres&amp;quot;&lt;br /&gt;
     limits                              0,1240&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   bptrainbrakecylinder_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedlered.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.brakecyl&amp;quot;&lt;br /&gt;
     limits                              -50,1390&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   bptrainbrakepipe_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.brakepipe&amp;quot;&lt;br /&gt;
     limits                              0,1240&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   speedo_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;speedo_pointer.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.speedo&amp;quot;&lt;br /&gt;
     limits                              0,43&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   ampmeter_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;needleamps.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.ampmeter&amp;quot;&lt;br /&gt;
     limits                              0,1700&lt;br /&gt;
     angles                              0,3.02058&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   reverser_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;reverser_handle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.throttle01&amp;quot;&lt;br /&gt;
     limits                              0,2&lt;br /&gt;
     angles                              -0.55,0.55&lt;br /&gt;
     notches                             0,0.5,1&lt;br /&gt;
     notchheight                         1,1,1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   light_switch&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.hdlt&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;hdltswtch.im&amp;quot;&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     angles                              0,2&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0.1,0.1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   horn&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;pulllever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;horn.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.horn&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     angles                              0,-0.55&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     radius                              -0.02&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0,0&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   pantograph_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;pantograph_lever.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.pantograph_lever&amp;quot;&lt;br /&gt;
     limits                              0,3&lt;br /&gt;
     angles                              1.4,0&lt;br /&gt;
     notches                             0,0.5,0.75,1.0&lt;br /&gt;
     notchheight                         0,0,1,1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     onlight                             &amp;quot;line_power&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   line_power&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;light&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;line_power.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.line_power&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
[[Category:Config Container|M]]&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=%22mesh-table%22_container_(interior_version)&amp;diff=23716</id>
		<title>&quot;mesh-table&quot; container (interior version)</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=%22mesh-table%22_container_(interior_version)&amp;diff=23716"/>
		<updated>2020-06-17T02:54:58Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: /* notches */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &amp;quot;mesh-table&amp;quot; container is a top-level [[config.txt file]] entry used by various [[Content_Configuration#Content_Types|Content Types]]. Refer to the [[&amp;quot;mesh-table&amp;quot; Container]] documentation for the standard tags - this document only describes the extensions available within the mesh table when it is used in a [[KIND_Interior|cab interior]] asset.&lt;br /&gt;
&lt;br /&gt;
Most of the entries in a mesh-table for an interior will be cab controls. A cab control has a single value associated with it, which could be an input (e.g. a lever position) or an output (a dial or gauge position).&lt;br /&gt;
&lt;br /&gt;
=Standard Mesh Names=&lt;br /&gt;
&lt;br /&gt;
There are a number of standard mesh names that the trainz default cab script uses for it&#039;s controls. For a Diesel or Electric cab (either unscripted, or scripted and inheriting from the DefaultLocomotiveCabin class), the following are the default mesh names:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Needles:&#039;&#039;&#039;&lt;br /&gt;
* speedo_needle -- speedometer&lt;br /&gt;
* speedo_needle2 -- speedometer&lt;br /&gt;
* bplocomain_needle -- loco main reservoir pressure gauge&lt;br /&gt;
* bptrainbrakecylinder_needle -- locomotive brake cylinder pressure gauge&lt;br /&gt;
* bptrainbrakecylinder_needle2 -- locomotive brake cylinder pressure gauge&lt;br /&gt;
* no3pipe_needle -- brake pressure gauge (currently loco brake cylinder -- but maybe intended for something else?)&lt;br /&gt;
* bptrainbrakecylinder2_needle -- brake pressure gauge (source unknown)&lt;br /&gt;
* bptrainbrakepipe_needle -- train brake pipe pressure gauge&lt;br /&gt;
* bptrainbrakepipe_needle2 -- train brake pipe pressure gauge&lt;br /&gt;
* bploco_equaliser -- brake equaliser pressure gauge&lt;br /&gt;
* flow_needle -- brake flow rate gauge&lt;br /&gt;
* ampmeter_needle -- traction ammeter gauge&lt;br /&gt;
* ampmeter2_needle -- traction ammeter gauge&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Levers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* throttle_lever -- throttle lever control&lt;br /&gt;
* reverser_lever -- reverser lever control&lt;br /&gt;
* trainbrake_lever -- self-lapping train brake control&lt;br /&gt;
* trainbrakelap_lever -- non self-lapping train brake control&lt;br /&gt;
* independantbrake_lever -- locomotive independent brake control. Note the typo in the control name.&lt;br /&gt;
* dynamicbrake_lever -- dynamic brake control&lt;br /&gt;
* wheelslip_light -- wheelslip indicator&lt;br /&gt;
* horn -- horn control&lt;br /&gt;
* light_switch -- light control&lt;br /&gt;
* pantograph_lever -- pantograph control&lt;br /&gt;
* throttle_brake_lever -- combined throttle/self-lapping brake lever&lt;br /&gt;
* bell -- bell control&lt;br /&gt;
For a Steam cab (either unscripted, or scripted and inheriting from the DefaultSteamCabin class), these default mesh names are available:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Needles:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* speedo_needle -- speedometer&lt;br /&gt;
* bplocomain_needle -- loco main reservoir pressure gauge&lt;br /&gt;
* bptrainbrakecylinder_needle -- locomotive brake cylinder pressure gauge&lt;br /&gt;
* no3pipe_needle -- brake pressure gauge (currently loco brake cylinder -- but maybe intended for something else?)&lt;br /&gt;
* bptrainbrakecylinder2_needle -- brake pressure gauge (source unknown)&lt;br /&gt;
* bptrainbrakepipe_needle -- train brake pipe pressure gauge&lt;br /&gt;
* bploco_equaliser -- brake equaliser pressure gauge&lt;br /&gt;
* flow_needle -- brake flow rate gauge&lt;br /&gt;
* boiler_needle -- boiler pressure&lt;br /&gt;
* boiler_needle1 -- boiler pressure&lt;br /&gt;
* steam_chest_needle -- steam chest pressure&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Levers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* trainbrake_lever -- self-lapping train brake control&lt;br /&gt;
* trainbrakelap_lever -- non self-lapping train brake control&lt;br /&gt;
* independantbrake_lever -- locomotive independent brake control. Note the typo in the control name.&lt;br /&gt;
* horn -- horn control&lt;br /&gt;
* light_switch -- light control&lt;br /&gt;
* waterglass_left -- boiler water level&lt;br /&gt;
* waterglass_right -- boiler water level&lt;br /&gt;
* firebox -- the interior of the firebox (to show fire temperature) Only works pre-TANE.&lt;br /&gt;
* regulator -- regulator (throttle) control&lt;br /&gt;
* reverser -- cutoff (reverser) control&lt;br /&gt;
* water_injector_0 -- primary water injector control&lt;br /&gt;
* water_injector_1 -- secondary water injector control&lt;br /&gt;
* blower -- steam blower control&lt;br /&gt;
* fire_plates -- the firebox door&lt;br /&gt;
* sanding_lever -- locomotive sander control&lt;br /&gt;
* blowdown_lever -- blowdown control (releases water out of the boiler)&lt;br /&gt;
* bell -- bell control&lt;br /&gt;
* left_window -- Left window control&lt;br /&gt;
* right_window -- Right window control&lt;br /&gt;
* left_sliding_window-- Left sliding window control&lt;br /&gt;
* right_sliding_window-- Right sliding window control&lt;br /&gt;
* seat0 -- Seat control&lt;br /&gt;
* seat1 -- Seat control&lt;br /&gt;
* whistle_lever -- Whistle lever control. (Doesn&#039;t seem to actually control the horn, so the whistle lever should actually be called &amp;quot;horn&amp;quot; to function properly.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=Supported Tags=&lt;br /&gt;
Each mesh subcontainer supports the following tags. Each tag is shown here with its default value. Standard tags inherited from the normal mesh table are omitted for brevity.&lt;br /&gt;
&lt;br /&gt;
 tooltip-text &amp;quot;&amp;quot;&lt;br /&gt;
 tooltip-token &amp;quot;&amp;quot;&lt;br /&gt;
 tooltip-mesh &amp;quot;&amp;quot;&lt;br /&gt;
 limits 0,1&lt;br /&gt;
 angles 0,0&lt;br /&gt;
 kind &amp;quot;&amp;quot;&lt;br /&gt;
 collision-parent &amp;quot;&amp;quot;&lt;br /&gt;
 mousemode &amp;quot;&amp;quot;&lt;br /&gt;
 mousespeed 1&lt;br /&gt;
 notches &lt;br /&gt;
 invert 0&lt;br /&gt;
 notchheight &lt;br /&gt;
 onlight &amp;quot;&amp;quot;&lt;br /&gt;
 value 0.0&lt;br /&gt;
 font &amp;quot;swiss&amp;quot;&lt;br /&gt;
 fontsize 12&lt;br /&gt;
 fontcolor 1.0,1.0,1.0&lt;br /&gt;
 fade-time 0.5&lt;br /&gt;
&lt;br /&gt;
====angles====&lt;br /&gt;
:Type: Decimal Pair&lt;br /&gt;
:Desc: Specifies the minimum and maximum extents of movement for a control or needle. For control types that rotate, these values are in radians[[http://en.wikipedia.org/wiki/Radian]]. In the case of a speedometer, this would define the amount of angular movement of the needle - a speedometer running from horizontal left to horizontal right may use -1.57 to 1.57, for example. If the cab control needs to move the other way, put the higher number first.&lt;br /&gt;
&lt;br /&gt;
====collision-parent====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: A mesh of kind collision-proxy must specify a collision-parent - the mesh it is a collision proxy for. This is the name of another control in the mesh-table.&lt;br /&gt;
&lt;br /&gt;
====fade-time====&lt;br /&gt;
:Type: Float&lt;br /&gt;
:Desc: The time, in seconds, for a &amp;quot;light&amp;quot; control to fully switch on or off.  Default is 0.5 seconds.&lt;br /&gt;
&lt;br /&gt;
====font====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: Font name to use for the readout of a digital control.&lt;br /&gt;
:Options are:&lt;br /&gt;
:* &#039;&#039;swiss&#039;&#039; (Default option. Renders with arial in PC builds.)&lt;br /&gt;
:* &#039;&#039;times_new_roman&#039;&#039;&lt;br /&gt;
:* &#039;&#039;verdana&#039;&#039;&lt;br /&gt;
:* &#039;&#039;century_gothic&#039;&#039;&lt;br /&gt;
:* &#039;&#039;cordia&#039;&#039;&lt;br /&gt;
:* &#039;&#039;courier&#039;&#039;&lt;br /&gt;
:* &#039;&#039;helvetica&#039;&#039;&lt;br /&gt;
:* &#039;&#039;arial&#039;&#039;&lt;br /&gt;
:* &#039;&#039;comic_sans&#039;&#039;&lt;br /&gt;
:* &#039;&#039;sans_serif&#039;&#039;&lt;br /&gt;
:* &#039;&#039;impact&#039;&#039;&lt;br /&gt;
:* &#039;&#039;console&#039;&#039;&lt;br /&gt;
:* &#039;&#039;tohoma&#039;&#039; (renders using the &#039;&#039;Tahoma&#039;&#039; font on PC builds.)&lt;br /&gt;
:* &#039;&#039;garamond&#039;&#039;&lt;br /&gt;
:These roughly correspond with Windows font names. Beware - not all fonts are available on all platforms, and where a font is not available, a different font may be substituted.&lt;br /&gt;
&lt;br /&gt;
====fontcolor====&lt;br /&gt;
:Type: Decimal Triplet&lt;br /&gt;
:Desc: RGB font color for the readout of a digital control. Colors are specified within the range 0.0 to 1.0, with 0.0 being black and 1.0 being full intensity. Default is 1.0,1.0,1.0 - white.&lt;br /&gt;
&lt;br /&gt;
====fontsize====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Font size for the readout of a digital control. Default is 12.&lt;br /&gt;
&lt;br /&gt;
====invert====&lt;br /&gt;
:Type: Boolean&lt;br /&gt;
:Desc: Invert mouse movement for this control. If the control moves the wrong way compared to the mouse, change this setting.&lt;br /&gt;
&lt;br /&gt;
====kind====&lt;br /&gt;
:Type: Selection&lt;br /&gt;
:Desc: The type of control this mesh table element represents.&lt;br /&gt;
:Options are:&lt;br /&gt;
:* &#039;&#039;animated-lever&#039;&#039;&lt;br /&gt;
:Operates like a standard lever, only uses a named animation instead of the angles tag for movement.&lt;br /&gt;
:* &#039;&#039;animated-dial&#039;&#039;&lt;br /&gt;
:Operates like a standard needle, only uses a named animation to represent the gauge readout instead of the angles tag.&lt;br /&gt;
:* &#039;&#039;collision-proxy&#039;&#039;&lt;br /&gt;
:This element type defines a volume within the cab where the mouse pointer will be considered to be over the cab control. Generally used in conjunction with an animated-lever. Name of the animated lever is defined in the tag &#039;&#039;collision-parent&#039;&#039;.&lt;br /&gt;
:* &#039;&#039;digital-dial-spd&#039;&#039;&lt;br /&gt;
:Digital readout for a speedometer, and using speed units.&lt;br /&gt;
:* &#039;&#039;digital-dial-prs&#039;&#039;&lt;br /&gt;
:Digital readout for a pressure gauge, using pressure units.&lt;br /&gt;
:* &#039;&#039;firebox&#039;&#039;&lt;br /&gt;
:The animated firebox in a steam locomotive.&lt;br /&gt;
:* &#039;&#039;lever&#039;&#039;&lt;br /&gt;
:A standard lever, often used for throttle and brake controls. Requires the user to click hold and move the mouse to move the lever between it&#039;s notches. This control will stay at any notch position when let go.&lt;br /&gt;
:* &#039;&#039;light&#039;&#039;&lt;br /&gt;
:A light glow / overlay - this mesh is hidden when the light is off and shown when the light is on.&lt;br /&gt;
:* &#039;&#039;needle&#039;&#039;&lt;br /&gt;
:An analogue gauge needle. Can be used to implement many different types of gauges.&lt;br /&gt;
:* &#039;&#039;pulllever&#039;&#039;&lt;br /&gt;
:Like a lever, only sprung to return to it&#039;s initial position when the user lets go of the control. Useful for horns.&lt;br /&gt;
:* &#039;&#039;pullrope&#039;&#039;&lt;br /&gt;
:Like a pulllever, only with linear (not rotational) movement.&lt;br /&gt;
:* &#039;&#039;switch&#039;&#039;&lt;br /&gt;
:This control requires only a single click to move between it&#039;s two endpoints. It is better suited than a lever to small switches and buttons.&lt;br /&gt;
:* &#039;&#039;button&#039;&#039;&lt;br /&gt;
:Similar to switch but requires the mouse be held down to keep the control active. I.e., press and hold the mouse button to push the control down, release the mouse and the control will return to the off position.&lt;br /&gt;
&lt;br /&gt;
====limits====&lt;br /&gt;
:Type: Decimal Pair&lt;br /&gt;
:Desc: Specifies the minimum and maximum values for a cab control or needle at it&#039;s two endpoints of movement. In the case of a speedometer, this would be the range of speeds it can display - 0m/s to 50m/s, for example.&lt;br /&gt;
&lt;br /&gt;
====mousemode====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: If set to &amp;quot;exact&amp;quot;, will require the mouse to be positioned over the geometry of the control precisely to activate it. Otherwise a bounding volume is used. This is useful for large controls which would otherwise block access to smaller controls.&lt;br /&gt;
&lt;br /&gt;
====mousespeed====&lt;br /&gt;
:Type: Float&lt;br /&gt;
:Desc: Controls the mouse speed and push/pull direction for controls.  &#039;&#039;&#039;&#039;&#039;Do not use zero&#039;&#039;&#039;&#039;&#039;.&lt;br /&gt;
:Examples of use:&lt;br /&gt;
:* mousespeed -1   Inverts mouse direction.&lt;br /&gt;
:* mousespeed 2    Doubles mouse speed in default direction.&lt;br /&gt;
:* mousespeed -0.5 Inverts mouse direction and halves the speed.&lt;br /&gt;
:* mousespeed 10    Multiplies the mouse speed tenfold in default direction. Useful for smaller levers that require too much mouse movement to activate the lever.&lt;br /&gt;
&lt;br /&gt;
====notches====&lt;br /&gt;
:Type: Decimal List&lt;br /&gt;
:Desc: Specifies the positions of the notches for this control. Notches are discrete positions within the movement of the control where the lever can be stopped. If a lever does not have notches, it can be positioned at any location. There are two common uses for notches. Firstly, they can be used to define a control which has a number of discrete positions which mean specific things (e.g. a brake valve). Secondly, they are used to define pre-set discrete values that a control can provide (e.g. a throttle lever). A typical US diesel 8 notch throttle would have something like &amp;quot;notches 0.0,0.125,0.25,0.375,0.5,0.625,0.75,0.875,1.0&amp;quot;, specifying nine positions (for &#039;off&#039; and notches 1 thru 8).&lt;br /&gt;
:Notes: When using notches, the tag &#039;&#039;notchheight&#039;&#039; must be used otherwise the lever will not function and spring back to the original position.&lt;br /&gt;
&lt;br /&gt;
====notchheight====&lt;br /&gt;
:Type: Integer List&lt;br /&gt;
:Desc: Specifies the importance of the notches for this control. This affects how the graphical overlay draws each notch. This is useful for a combined brake and throttle controller, or any other control where you want to mark a specific position relative to the others. This should have the same number of values as the &#039;notches&#039; list.&lt;br /&gt;
:Three styles are available:&lt;br /&gt;
:* &#039;1&#039; configures this bar to be a standard length and width bar.&lt;br /&gt;
:* &#039;2&#039; configures this bar to be shorter in length, and is often used for intermediate positions.&lt;br /&gt;
:* &#039;3&#039; configures this bar to be standard length, but thicker in width. This is often used for marking a specific position.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A kind &#039;&#039;lever&#039;&#039; type will not function unless notch heights are specified.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====onlight====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: Specify the name of a &#039;&#039;light&#039;&#039; kind mesh which is enabled when this switch/lever is in the &#039;&#039;on&#039;&#039; position, and disabled when it is in the &#039;&#039;off&#039;&#039; position. The mesh name must be in the mesh-table.  See the example below.&lt;br /&gt;
&lt;br /&gt;
====radius====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Specifies the distance for the 2D notch overlay.&lt;br /&gt;
&lt;br /&gt;
====tooltip-mesh====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: Specifies the name of a mesh-table entry for a mesh to show when the control is moused over. The mesh will be faded in/out over a short period.&lt;br /&gt;
&lt;br /&gt;
====tooltip-text====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: OBSOLETE: DO NOT USE. This text will be used in the tooltip that appears when the mouse cursor hovers over a cab control.&lt;br /&gt;
&lt;br /&gt;
====tooltip-token====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: The name of a string table entry. The contents of the named string table entry will be displayed as a tooltip that appears when the mouse cursor hovers over a cab control. If a token is used then it must appear as a tag in the  [[%22String-table%22 container]].&lt;br /&gt;
&lt;br /&gt;
====value====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Specifies the initial value for this control. For a lever or other input device, this will specify the initial position of the control before the user moves it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Cab Interior Mesh-Table Example=&lt;br /&gt;
The following is an example of a mesh-table which implements a number of cab controls&lt;br /&gt;
&lt;br /&gt;
 mesh-table&lt;br /&gt;
 {&lt;br /&gt;
   default&lt;br /&gt;
   {&lt;br /&gt;
     mesh                                &amp;quot;interior.im&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   wheelslip_light&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;light&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;wheelslip_light.im&amp;quot;&lt;br /&gt;
     auto-create                         0&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   bptrainbrakepipe_needle2&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;digital-dial-prs&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.brakepipe2&amp;quot;&lt;br /&gt;
     limits                              0,55&lt;br /&gt;
     font                                &amp;quot;arial&amp;quot;&lt;br /&gt;
     fontsize                            0.007&lt;br /&gt;
     fontcolor                           80,240,120&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   speedo_needle2&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;digital-dial-spd&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.digispeedo&amp;quot;&lt;br /&gt;
     limits                              0,55&lt;br /&gt;
     font                                &amp;quot;arial&amp;quot;&lt;br /&gt;
     fontsize                            0.01&lt;br /&gt;
     fontcolor                           0,0,0&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   throttle_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;throttle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.throttle&amp;quot;&lt;br /&gt;
     limits                              0,8&lt;br /&gt;
     angles                              0,1.69&lt;br /&gt;
     notches                             0,0.125,0.25,0.375,0.5,0.625,0.75,0.875,1&lt;br /&gt;
     notchheight                         1,2,2,2,2,2,2,2,1&lt;br /&gt;
     radius                              0.35&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   dynamicbrake_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;dynamic_handle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.dynamic&amp;quot;&lt;br /&gt;
     limits                              0,2&lt;br /&gt;
     angles                              0,-1.69&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0.1,1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     radius                              0.35&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   trainbrakelap_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     mesh                                &amp;quot;trainbrake_handle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.trainbrake_handle&amp;quot;&lt;br /&gt;
     limits                              0,4&lt;br /&gt;
     angles                              0,-2&lt;br /&gt;
     notches                             0,0.25,0.5,0.75,1&lt;br /&gt;
     notchheight                         2,2,2,2,2&lt;br /&gt;
     mousespeed                          1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   independantbrake_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;indy_handle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.ind&amp;quot;&lt;br /&gt;
     limits                              0,32&lt;br /&gt;
     angles                              0.94,0&lt;br /&gt;
     notches                             0,0.5,1&lt;br /&gt;
     notchheight                         1,1,1&lt;br /&gt;
     radius                              0.35&lt;br /&gt;
     mousespeed                          1&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   flow_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;flowneedle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.bpflow&amp;quot;&lt;br /&gt;
     limits                              0,1050&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   bplocomain_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedlered.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.mainres&amp;quot;&lt;br /&gt;
     limits                              0,1240&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   bploco_equaliser&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.eqres&amp;quot;&lt;br /&gt;
     limits                              0,1240&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   bptrainbrakecylinder_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedlered.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.brakecyl&amp;quot;&lt;br /&gt;
     limits                              -50,1390&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   bptrainbrakepipe_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.brakepipe&amp;quot;&lt;br /&gt;
     limits                              0,1240&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   speedo_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;speedo_pointer.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.speedo&amp;quot;&lt;br /&gt;
     limits                              0,43&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   ampmeter_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;needleamps.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.ampmeter&amp;quot;&lt;br /&gt;
     limits                              0,1700&lt;br /&gt;
     angles                              0,3.02058&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   reverser_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;reverser_handle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.throttle01&amp;quot;&lt;br /&gt;
     limits                              0,2&lt;br /&gt;
     angles                              -0.55,0.55&lt;br /&gt;
     notches                             0,0.5,1&lt;br /&gt;
     notchheight                         1,1,1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   light_switch&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.hdlt&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;hdltswtch.im&amp;quot;&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     angles                              0,2&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0.1,0.1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   horn&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;pulllever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;horn.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.horn&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     angles                              0,-0.55&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     radius                              -0.02&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0,0&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   pantograph_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;pantograph_lever.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.pantograph_lever&amp;quot;&lt;br /&gt;
     limits                              0,3&lt;br /&gt;
     angles                              1.4,0&lt;br /&gt;
     notches                             0,0.5,0.75,1.0&lt;br /&gt;
     notchheight                         0,0,1,1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     onlight                             &amp;quot;line_power&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   line_power&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;light&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;line_power.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.line_power&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
[[Category:Config Container|M]]&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=%22mesh-table%22_container_(interior_version)&amp;diff=23715</id>
		<title>&quot;mesh-table&quot; container (interior version)</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=%22mesh-table%22_container_(interior_version)&amp;diff=23715"/>
		<updated>2020-06-17T02:50:49Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: /* notchheight */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &amp;quot;mesh-table&amp;quot; container is a top-level [[config.txt file]] entry used by various [[Content_Configuration#Content_Types|Content Types]]. Refer to the [[&amp;quot;mesh-table&amp;quot; Container]] documentation for the standard tags - this document only describes the extensions available within the mesh table when it is used in a [[KIND_Interior|cab interior]] asset.&lt;br /&gt;
&lt;br /&gt;
Most of the entries in a mesh-table for an interior will be cab controls. A cab control has a single value associated with it, which could be an input (e.g. a lever position) or an output (a dial or gauge position).&lt;br /&gt;
&lt;br /&gt;
=Standard Mesh Names=&lt;br /&gt;
&lt;br /&gt;
There are a number of standard mesh names that the trainz default cab script uses for it&#039;s controls. For a Diesel or Electric cab (either unscripted, or scripted and inheriting from the DefaultLocomotiveCabin class), the following are the default mesh names:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Needles:&#039;&#039;&#039;&lt;br /&gt;
* speedo_needle -- speedometer&lt;br /&gt;
* speedo_needle2 -- speedometer&lt;br /&gt;
* bplocomain_needle -- loco main reservoir pressure gauge&lt;br /&gt;
* bptrainbrakecylinder_needle -- locomotive brake cylinder pressure gauge&lt;br /&gt;
* bptrainbrakecylinder_needle2 -- locomotive brake cylinder pressure gauge&lt;br /&gt;
* no3pipe_needle -- brake pressure gauge (currently loco brake cylinder -- but maybe intended for something else?)&lt;br /&gt;
* bptrainbrakecylinder2_needle -- brake pressure gauge (source unknown)&lt;br /&gt;
* bptrainbrakepipe_needle -- train brake pipe pressure gauge&lt;br /&gt;
* bptrainbrakepipe_needle2 -- train brake pipe pressure gauge&lt;br /&gt;
* bploco_equaliser -- brake equaliser pressure gauge&lt;br /&gt;
* flow_needle -- brake flow rate gauge&lt;br /&gt;
* ampmeter_needle -- traction ammeter gauge&lt;br /&gt;
* ampmeter2_needle -- traction ammeter gauge&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Levers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* throttle_lever -- throttle lever control&lt;br /&gt;
* reverser_lever -- reverser lever control&lt;br /&gt;
* trainbrake_lever -- self-lapping train brake control&lt;br /&gt;
* trainbrakelap_lever -- non self-lapping train brake control&lt;br /&gt;
* independantbrake_lever -- locomotive independent brake control. Note the typo in the control name.&lt;br /&gt;
* dynamicbrake_lever -- dynamic brake control&lt;br /&gt;
* wheelslip_light -- wheelslip indicator&lt;br /&gt;
* horn -- horn control&lt;br /&gt;
* light_switch -- light control&lt;br /&gt;
* pantograph_lever -- pantograph control&lt;br /&gt;
* throttle_brake_lever -- combined throttle/self-lapping brake lever&lt;br /&gt;
* bell -- bell control&lt;br /&gt;
For a Steam cab (either unscripted, or scripted and inheriting from the DefaultSteamCabin class), these default mesh names are available:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Needles:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* speedo_needle -- speedometer&lt;br /&gt;
* bplocomain_needle -- loco main reservoir pressure gauge&lt;br /&gt;
* bptrainbrakecylinder_needle -- locomotive brake cylinder pressure gauge&lt;br /&gt;
* no3pipe_needle -- brake pressure gauge (currently loco brake cylinder -- but maybe intended for something else?)&lt;br /&gt;
* bptrainbrakecylinder2_needle -- brake pressure gauge (source unknown)&lt;br /&gt;
* bptrainbrakepipe_needle -- train brake pipe pressure gauge&lt;br /&gt;
* bploco_equaliser -- brake equaliser pressure gauge&lt;br /&gt;
* flow_needle -- brake flow rate gauge&lt;br /&gt;
* boiler_needle -- boiler pressure&lt;br /&gt;
* boiler_needle1 -- boiler pressure&lt;br /&gt;
* steam_chest_needle -- steam chest pressure&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Levers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* trainbrake_lever -- self-lapping train brake control&lt;br /&gt;
* trainbrakelap_lever -- non self-lapping train brake control&lt;br /&gt;
* independantbrake_lever -- locomotive independent brake control. Note the typo in the control name.&lt;br /&gt;
* horn -- horn control&lt;br /&gt;
* light_switch -- light control&lt;br /&gt;
* waterglass_left -- boiler water level&lt;br /&gt;
* waterglass_right -- boiler water level&lt;br /&gt;
* firebox -- the interior of the firebox (to show fire temperature) Only works pre-TANE.&lt;br /&gt;
* regulator -- regulator (throttle) control&lt;br /&gt;
* reverser -- cutoff (reverser) control&lt;br /&gt;
* water_injector_0 -- primary water injector control&lt;br /&gt;
* water_injector_1 -- secondary water injector control&lt;br /&gt;
* blower -- steam blower control&lt;br /&gt;
* fire_plates -- the firebox door&lt;br /&gt;
* sanding_lever -- locomotive sander control&lt;br /&gt;
* blowdown_lever -- blowdown control (releases water out of the boiler)&lt;br /&gt;
* bell -- bell control&lt;br /&gt;
* left_window -- Left window control&lt;br /&gt;
* right_window -- Right window control&lt;br /&gt;
* left_sliding_window-- Left sliding window control&lt;br /&gt;
* right_sliding_window-- Right sliding window control&lt;br /&gt;
* seat0 -- Seat control&lt;br /&gt;
* seat1 -- Seat control&lt;br /&gt;
* whistle_lever -- Whistle lever control. (Doesn&#039;t seem to actually control the horn, so the whistle lever should actually be called &amp;quot;horn&amp;quot; to function properly.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=Supported Tags=&lt;br /&gt;
Each mesh subcontainer supports the following tags. Each tag is shown here with its default value. Standard tags inherited from the normal mesh table are omitted for brevity.&lt;br /&gt;
&lt;br /&gt;
 tooltip-text &amp;quot;&amp;quot;&lt;br /&gt;
 tooltip-token &amp;quot;&amp;quot;&lt;br /&gt;
 tooltip-mesh &amp;quot;&amp;quot;&lt;br /&gt;
 limits 0,1&lt;br /&gt;
 angles 0,0&lt;br /&gt;
 kind &amp;quot;&amp;quot;&lt;br /&gt;
 collision-parent &amp;quot;&amp;quot;&lt;br /&gt;
 mousemode &amp;quot;&amp;quot;&lt;br /&gt;
 mousespeed 1&lt;br /&gt;
 notches &lt;br /&gt;
 invert 0&lt;br /&gt;
 notchheight &lt;br /&gt;
 onlight &amp;quot;&amp;quot;&lt;br /&gt;
 value 0.0&lt;br /&gt;
 font &amp;quot;swiss&amp;quot;&lt;br /&gt;
 fontsize 12&lt;br /&gt;
 fontcolor 1.0,1.0,1.0&lt;br /&gt;
 fade-time 0.5&lt;br /&gt;
&lt;br /&gt;
====angles====&lt;br /&gt;
:Type: Decimal Pair&lt;br /&gt;
:Desc: Specifies the minimum and maximum extents of movement for a control or needle. For control types that rotate, these values are in radians[[http://en.wikipedia.org/wiki/Radian]]. In the case of a speedometer, this would define the amount of angular movement of the needle - a speedometer running from horizontal left to horizontal right may use -1.57 to 1.57, for example. If the cab control needs to move the other way, put the higher number first.&lt;br /&gt;
&lt;br /&gt;
====collision-parent====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: A mesh of kind collision-proxy must specify a collision-parent - the mesh it is a collision proxy for. This is the name of another control in the mesh-table.&lt;br /&gt;
&lt;br /&gt;
====fade-time====&lt;br /&gt;
:Type: Float&lt;br /&gt;
:Desc: The time, in seconds, for a &amp;quot;light&amp;quot; control to fully switch on or off.  Default is 0.5 seconds.&lt;br /&gt;
&lt;br /&gt;
====font====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: Font name to use for the readout of a digital control.&lt;br /&gt;
:Options are:&lt;br /&gt;
:* &#039;&#039;swiss&#039;&#039; (Default option. Renders with arial in PC builds.)&lt;br /&gt;
:* &#039;&#039;times_new_roman&#039;&#039;&lt;br /&gt;
:* &#039;&#039;verdana&#039;&#039;&lt;br /&gt;
:* &#039;&#039;century_gothic&#039;&#039;&lt;br /&gt;
:* &#039;&#039;cordia&#039;&#039;&lt;br /&gt;
:* &#039;&#039;courier&#039;&#039;&lt;br /&gt;
:* &#039;&#039;helvetica&#039;&#039;&lt;br /&gt;
:* &#039;&#039;arial&#039;&#039;&lt;br /&gt;
:* &#039;&#039;comic_sans&#039;&#039;&lt;br /&gt;
:* &#039;&#039;sans_serif&#039;&#039;&lt;br /&gt;
:* &#039;&#039;impact&#039;&#039;&lt;br /&gt;
:* &#039;&#039;console&#039;&#039;&lt;br /&gt;
:* &#039;&#039;tohoma&#039;&#039; (renders using the &#039;&#039;Tahoma&#039;&#039; font on PC builds.)&lt;br /&gt;
:* &#039;&#039;garamond&#039;&#039;&lt;br /&gt;
:These roughly correspond with Windows font names. Beware - not all fonts are available on all platforms, and where a font is not available, a different font may be substituted.&lt;br /&gt;
&lt;br /&gt;
====fontcolor====&lt;br /&gt;
:Type: Decimal Triplet&lt;br /&gt;
:Desc: RGB font color for the readout of a digital control. Colors are specified within the range 0.0 to 1.0, with 0.0 being black and 1.0 being full intensity. Default is 1.0,1.0,1.0 - white.&lt;br /&gt;
&lt;br /&gt;
====fontsize====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Font size for the readout of a digital control. Default is 12.&lt;br /&gt;
&lt;br /&gt;
====invert====&lt;br /&gt;
:Type: Boolean&lt;br /&gt;
:Desc: Invert mouse movement for this control. If the control moves the wrong way compared to the mouse, change this setting.&lt;br /&gt;
&lt;br /&gt;
====kind====&lt;br /&gt;
:Type: Selection&lt;br /&gt;
:Desc: The type of control this mesh table element represents.&lt;br /&gt;
:Options are:&lt;br /&gt;
:* &#039;&#039;animated-lever&#039;&#039;&lt;br /&gt;
:Operates like a standard lever, only uses a named animation instead of the angles tag for movement.&lt;br /&gt;
:* &#039;&#039;animated-dial&#039;&#039;&lt;br /&gt;
:Operates like a standard needle, only uses a named animation to represent the gauge readout instead of the angles tag.&lt;br /&gt;
:* &#039;&#039;collision-proxy&#039;&#039;&lt;br /&gt;
:This element type defines a volume within the cab where the mouse pointer will be considered to be over the cab control. Generally used in conjunction with an animated-lever. Name of the animated lever is defined in the tag &#039;&#039;collision-parent&#039;&#039;.&lt;br /&gt;
:* &#039;&#039;digital-dial-spd&#039;&#039;&lt;br /&gt;
:Digital readout for a speedometer, and using speed units.&lt;br /&gt;
:* &#039;&#039;digital-dial-prs&#039;&#039;&lt;br /&gt;
:Digital readout for a pressure gauge, using pressure units.&lt;br /&gt;
:* &#039;&#039;firebox&#039;&#039;&lt;br /&gt;
:The animated firebox in a steam locomotive.&lt;br /&gt;
:* &#039;&#039;lever&#039;&#039;&lt;br /&gt;
:A standard lever, often used for throttle and brake controls. Requires the user to click hold and move the mouse to move the lever between it&#039;s notches. This control will stay at any notch position when let go.&lt;br /&gt;
:* &#039;&#039;light&#039;&#039;&lt;br /&gt;
:A light glow / overlay - this mesh is hidden when the light is off and shown when the light is on.&lt;br /&gt;
:* &#039;&#039;needle&#039;&#039;&lt;br /&gt;
:An analogue gauge needle. Can be used to implement many different types of gauges.&lt;br /&gt;
:* &#039;&#039;pulllever&#039;&#039;&lt;br /&gt;
:Like a lever, only sprung to return to it&#039;s initial position when the user lets go of the control. Useful for horns.&lt;br /&gt;
:* &#039;&#039;pullrope&#039;&#039;&lt;br /&gt;
:Like a pulllever, only with linear (not rotational) movement.&lt;br /&gt;
:* &#039;&#039;switch&#039;&#039;&lt;br /&gt;
:This control requires only a single click to move between it&#039;s two endpoints. It is better suited than a lever to small switches and buttons.&lt;br /&gt;
:* &#039;&#039;button&#039;&#039;&lt;br /&gt;
:Similar to switch but requires the mouse be held down to keep the control active. I.e., press and hold the mouse button to push the control down, release the mouse and the control will return to the off position.&lt;br /&gt;
&lt;br /&gt;
====limits====&lt;br /&gt;
:Type: Decimal Pair&lt;br /&gt;
:Desc: Specifies the minimum and maximum values for a cab control or needle at it&#039;s two endpoints of movement. In the case of a speedometer, this would be the range of speeds it can display - 0m/s to 50m/s, for example.&lt;br /&gt;
&lt;br /&gt;
====mousemode====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: If set to &amp;quot;exact&amp;quot;, will require the mouse to be positioned over the geometry of the control precisely to activate it. Otherwise a bounding volume is used. This is useful for large controls which would otherwise block access to smaller controls.&lt;br /&gt;
&lt;br /&gt;
====mousespeed====&lt;br /&gt;
:Type: Float&lt;br /&gt;
:Desc: Controls the mouse speed and push/pull direction for controls.  &#039;&#039;&#039;&#039;&#039;Do not use zero&#039;&#039;&#039;&#039;&#039;.&lt;br /&gt;
:Examples of use:&lt;br /&gt;
:* mousespeed -1   Inverts mouse direction.&lt;br /&gt;
:* mousespeed 2    Doubles mouse speed in default direction.&lt;br /&gt;
:* mousespeed -0.5 Inverts mouse direction and halves the speed.&lt;br /&gt;
:* mousespeed 10    Multiplies the mouse speed tenfold in default direction. Useful for smaller levers that require too much mouse movement to activate the lever.&lt;br /&gt;
&lt;br /&gt;
====notches====&lt;br /&gt;
:Type: Decimal List&lt;br /&gt;
:Desc: Specifies the positions of the notches for this control. Notches are discrete positions within the movement of the control where the lever can be stopped. If a lever does not have notches, it can be positioned at any location. There are two common uses for notches. Firstly, they can be used to define a control which has a number of discrete positions which mean specific things (e.g. a brake valve). Secondly, they are used to define pre-set discrete values that a control can provide (e.g. a throttle lever). A typical US diesel 8 notch throttle would have something like &amp;quot;notches 0.0,0.125,0.25,0.375,0.5,0.625,0.75,0.875,1.0&amp;quot;, specifying nine positions (for &#039;off&#039; and notches 1 thru 8).&lt;br /&gt;
&lt;br /&gt;
====notchheight====&lt;br /&gt;
:Type: Integer List&lt;br /&gt;
:Desc: Specifies the importance of the notches for this control. This affects how the graphical overlay draws each notch. This is useful for a combined brake and throttle controller, or any other control where you want to mark a specific position relative to the others. This should have the same number of values as the &#039;notches&#039; list.&lt;br /&gt;
:Three styles are available:&lt;br /&gt;
:* &#039;1&#039; configures this bar to be a standard length and width bar.&lt;br /&gt;
:* &#039;2&#039; configures this bar to be shorter in length, and is often used for intermediate positions.&lt;br /&gt;
:* &#039;3&#039; configures this bar to be standard length, but thicker in width. This is often used for marking a specific position.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A kind &#039;&#039;lever&#039;&#039; type will not function unless notch heights are specified.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====onlight====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: Specify the name of a &#039;&#039;light&#039;&#039; kind mesh which is enabled when this switch/lever is in the &#039;&#039;on&#039;&#039; position, and disabled when it is in the &#039;&#039;off&#039;&#039; position. The mesh name must be in the mesh-table.  See the example below.&lt;br /&gt;
&lt;br /&gt;
====radius====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Specifies the distance for the 2D notch overlay.&lt;br /&gt;
&lt;br /&gt;
====tooltip-mesh====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: Specifies the name of a mesh-table entry for a mesh to show when the control is moused over. The mesh will be faded in/out over a short period.&lt;br /&gt;
&lt;br /&gt;
====tooltip-text====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: OBSOLETE: DO NOT USE. This text will be used in the tooltip that appears when the mouse cursor hovers over a cab control.&lt;br /&gt;
&lt;br /&gt;
====tooltip-token====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: The name of a string table entry. The contents of the named string table entry will be displayed as a tooltip that appears when the mouse cursor hovers over a cab control. If a token is used then it must appear as a tag in the  [[%22String-table%22 container]].&lt;br /&gt;
&lt;br /&gt;
====value====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Specifies the initial value for this control. For a lever or other input device, this will specify the initial position of the control before the user moves it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Cab Interior Mesh-Table Example=&lt;br /&gt;
The following is an example of a mesh-table which implements a number of cab controls&lt;br /&gt;
&lt;br /&gt;
 mesh-table&lt;br /&gt;
 {&lt;br /&gt;
   default&lt;br /&gt;
   {&lt;br /&gt;
     mesh                                &amp;quot;interior.im&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   wheelslip_light&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;light&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;wheelslip_light.im&amp;quot;&lt;br /&gt;
     auto-create                         0&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   bptrainbrakepipe_needle2&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;digital-dial-prs&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.brakepipe2&amp;quot;&lt;br /&gt;
     limits                              0,55&lt;br /&gt;
     font                                &amp;quot;arial&amp;quot;&lt;br /&gt;
     fontsize                            0.007&lt;br /&gt;
     fontcolor                           80,240,120&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   speedo_needle2&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;digital-dial-spd&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.digispeedo&amp;quot;&lt;br /&gt;
     limits                              0,55&lt;br /&gt;
     font                                &amp;quot;arial&amp;quot;&lt;br /&gt;
     fontsize                            0.01&lt;br /&gt;
     fontcolor                           0,0,0&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   throttle_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;throttle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.throttle&amp;quot;&lt;br /&gt;
     limits                              0,8&lt;br /&gt;
     angles                              0,1.69&lt;br /&gt;
     notches                             0,0.125,0.25,0.375,0.5,0.625,0.75,0.875,1&lt;br /&gt;
     notchheight                         1,2,2,2,2,2,2,2,1&lt;br /&gt;
     radius                              0.35&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   dynamicbrake_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;dynamic_handle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.dynamic&amp;quot;&lt;br /&gt;
     limits                              0,2&lt;br /&gt;
     angles                              0,-1.69&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0.1,1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     radius                              0.35&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   trainbrakelap_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     mesh                                &amp;quot;trainbrake_handle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.trainbrake_handle&amp;quot;&lt;br /&gt;
     limits                              0,4&lt;br /&gt;
     angles                              0,-2&lt;br /&gt;
     notches                             0,0.25,0.5,0.75,1&lt;br /&gt;
     notchheight                         2,2,2,2,2&lt;br /&gt;
     mousespeed                          1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   independantbrake_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;indy_handle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.ind&amp;quot;&lt;br /&gt;
     limits                              0,32&lt;br /&gt;
     angles                              0.94,0&lt;br /&gt;
     notches                             0,0.5,1&lt;br /&gt;
     notchheight                         1,1,1&lt;br /&gt;
     radius                              0.35&lt;br /&gt;
     mousespeed                          1&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   flow_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;flowneedle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.bpflow&amp;quot;&lt;br /&gt;
     limits                              0,1050&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   bplocomain_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedlered.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.mainres&amp;quot;&lt;br /&gt;
     limits                              0,1240&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   bploco_equaliser&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.eqres&amp;quot;&lt;br /&gt;
     limits                              0,1240&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   bptrainbrakecylinder_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedlered.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.brakecyl&amp;quot;&lt;br /&gt;
     limits                              -50,1390&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   bptrainbrakepipe_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.brakepipe&amp;quot;&lt;br /&gt;
     limits                              0,1240&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   speedo_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;speedo_pointer.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.speedo&amp;quot;&lt;br /&gt;
     limits                              0,43&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   ampmeter_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;needleamps.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.ampmeter&amp;quot;&lt;br /&gt;
     limits                              0,1700&lt;br /&gt;
     angles                              0,3.02058&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   reverser_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;reverser_handle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.throttle01&amp;quot;&lt;br /&gt;
     limits                              0,2&lt;br /&gt;
     angles                              -0.55,0.55&lt;br /&gt;
     notches                             0,0.5,1&lt;br /&gt;
     notchheight                         1,1,1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   light_switch&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.hdlt&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;hdltswtch.im&amp;quot;&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     angles                              0,2&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0.1,0.1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   horn&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;pulllever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;horn.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.horn&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     angles                              0,-0.55&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     radius                              -0.02&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0,0&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   pantograph_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;pantograph_lever.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.pantograph_lever&amp;quot;&lt;br /&gt;
     limits                              0,3&lt;br /&gt;
     angles                              1.4,0&lt;br /&gt;
     notches                             0,0.5,0.75,1.0&lt;br /&gt;
     notchheight                         0,0,1,1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     onlight                             &amp;quot;line_power&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   line_power&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;light&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;line_power.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.line_power&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
[[Category:Config Container|M]]&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=%22mesh-table%22_container_(interior_version)&amp;diff=23714</id>
		<title>&quot;mesh-table&quot; container (interior version)</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=%22mesh-table%22_container_(interior_version)&amp;diff=23714"/>
		<updated>2020-06-16T23:34:15Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: /* mousespeed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &amp;quot;mesh-table&amp;quot; container is a top-level [[config.txt file]] entry used by various [[Content_Configuration#Content_Types|Content Types]]. Refer to the [[&amp;quot;mesh-table&amp;quot; Container]] documentation for the standard tags - this document only describes the extensions available within the mesh table when it is used in a [[KIND_Interior|cab interior]] asset.&lt;br /&gt;
&lt;br /&gt;
Most of the entries in a mesh-table for an interior will be cab controls. A cab control has a single value associated with it, which could be an input (e.g. a lever position) or an output (a dial or gauge position).&lt;br /&gt;
&lt;br /&gt;
=Standard Mesh Names=&lt;br /&gt;
&lt;br /&gt;
There are a number of standard mesh names that the trainz default cab script uses for it&#039;s controls. For a Diesel or Electric cab (either unscripted, or scripted and inheriting from the DefaultLocomotiveCabin class), the following are the default mesh names:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Needles:&#039;&#039;&#039;&lt;br /&gt;
* speedo_needle -- speedometer&lt;br /&gt;
* speedo_needle2 -- speedometer&lt;br /&gt;
* bplocomain_needle -- loco main reservoir pressure gauge&lt;br /&gt;
* bptrainbrakecylinder_needle -- locomotive brake cylinder pressure gauge&lt;br /&gt;
* bptrainbrakecylinder_needle2 -- locomotive brake cylinder pressure gauge&lt;br /&gt;
* no3pipe_needle -- brake pressure gauge (currently loco brake cylinder -- but maybe intended for something else?)&lt;br /&gt;
* bptrainbrakecylinder2_needle -- brake pressure gauge (source unknown)&lt;br /&gt;
* bptrainbrakepipe_needle -- train brake pipe pressure gauge&lt;br /&gt;
* bptrainbrakepipe_needle2 -- train brake pipe pressure gauge&lt;br /&gt;
* bploco_equaliser -- brake equaliser pressure gauge&lt;br /&gt;
* flow_needle -- brake flow rate gauge&lt;br /&gt;
* ampmeter_needle -- traction ammeter gauge&lt;br /&gt;
* ampmeter2_needle -- traction ammeter gauge&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Levers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* throttle_lever -- throttle lever control&lt;br /&gt;
* reverser_lever -- reverser lever control&lt;br /&gt;
* trainbrake_lever -- self-lapping train brake control&lt;br /&gt;
* trainbrakelap_lever -- non self-lapping train brake control&lt;br /&gt;
* independantbrake_lever -- locomotive independent brake control. Note the typo in the control name.&lt;br /&gt;
* dynamicbrake_lever -- dynamic brake control&lt;br /&gt;
* wheelslip_light -- wheelslip indicator&lt;br /&gt;
* horn -- horn control&lt;br /&gt;
* light_switch -- light control&lt;br /&gt;
* pantograph_lever -- pantograph control&lt;br /&gt;
* throttle_brake_lever -- combined throttle/self-lapping brake lever&lt;br /&gt;
* bell -- bell control&lt;br /&gt;
For a Steam cab (either unscripted, or scripted and inheriting from the DefaultSteamCabin class), these default mesh names are available:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Needles:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* speedo_needle -- speedometer&lt;br /&gt;
* bplocomain_needle -- loco main reservoir pressure gauge&lt;br /&gt;
* bptrainbrakecylinder_needle -- locomotive brake cylinder pressure gauge&lt;br /&gt;
* no3pipe_needle -- brake pressure gauge (currently loco brake cylinder -- but maybe intended for something else?)&lt;br /&gt;
* bptrainbrakecylinder2_needle -- brake pressure gauge (source unknown)&lt;br /&gt;
* bptrainbrakepipe_needle -- train brake pipe pressure gauge&lt;br /&gt;
* bploco_equaliser -- brake equaliser pressure gauge&lt;br /&gt;
* flow_needle -- brake flow rate gauge&lt;br /&gt;
* boiler_needle -- boiler pressure&lt;br /&gt;
* boiler_needle1 -- boiler pressure&lt;br /&gt;
* steam_chest_needle -- steam chest pressure&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Levers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* trainbrake_lever -- self-lapping train brake control&lt;br /&gt;
* trainbrakelap_lever -- non self-lapping train brake control&lt;br /&gt;
* independantbrake_lever -- locomotive independent brake control. Note the typo in the control name.&lt;br /&gt;
* horn -- horn control&lt;br /&gt;
* light_switch -- light control&lt;br /&gt;
* waterglass_left -- boiler water level&lt;br /&gt;
* waterglass_right -- boiler water level&lt;br /&gt;
* firebox -- the interior of the firebox (to show fire temperature) Only works pre-TANE.&lt;br /&gt;
* regulator -- regulator (throttle) control&lt;br /&gt;
* reverser -- cutoff (reverser) control&lt;br /&gt;
* water_injector_0 -- primary water injector control&lt;br /&gt;
* water_injector_1 -- secondary water injector control&lt;br /&gt;
* blower -- steam blower control&lt;br /&gt;
* fire_plates -- the firebox door&lt;br /&gt;
* sanding_lever -- locomotive sander control&lt;br /&gt;
* blowdown_lever -- blowdown control (releases water out of the boiler)&lt;br /&gt;
* bell -- bell control&lt;br /&gt;
* left_window -- Left window control&lt;br /&gt;
* right_window -- Right window control&lt;br /&gt;
* left_sliding_window-- Left sliding window control&lt;br /&gt;
* right_sliding_window-- Right sliding window control&lt;br /&gt;
* seat0 -- Seat control&lt;br /&gt;
* seat1 -- Seat control&lt;br /&gt;
* whistle_lever -- Whistle lever control. (Doesn&#039;t seem to actually control the horn, so the whistle lever should actually be called &amp;quot;horn&amp;quot; to function properly.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=Supported Tags=&lt;br /&gt;
Each mesh subcontainer supports the following tags. Each tag is shown here with its default value. Standard tags inherited from the normal mesh table are omitted for brevity.&lt;br /&gt;
&lt;br /&gt;
 tooltip-text &amp;quot;&amp;quot;&lt;br /&gt;
 tooltip-token &amp;quot;&amp;quot;&lt;br /&gt;
 tooltip-mesh &amp;quot;&amp;quot;&lt;br /&gt;
 limits 0,1&lt;br /&gt;
 angles 0,0&lt;br /&gt;
 kind &amp;quot;&amp;quot;&lt;br /&gt;
 collision-parent &amp;quot;&amp;quot;&lt;br /&gt;
 mousemode &amp;quot;&amp;quot;&lt;br /&gt;
 mousespeed 1&lt;br /&gt;
 notches &lt;br /&gt;
 invert 0&lt;br /&gt;
 notchheight &lt;br /&gt;
 onlight &amp;quot;&amp;quot;&lt;br /&gt;
 value 0.0&lt;br /&gt;
 font &amp;quot;swiss&amp;quot;&lt;br /&gt;
 fontsize 12&lt;br /&gt;
 fontcolor 1.0,1.0,1.0&lt;br /&gt;
 fade-time 0.5&lt;br /&gt;
&lt;br /&gt;
====angles====&lt;br /&gt;
:Type: Decimal Pair&lt;br /&gt;
:Desc: Specifies the minimum and maximum extents of movement for a control or needle. For control types that rotate, these values are in radians[[http://en.wikipedia.org/wiki/Radian]]. In the case of a speedometer, this would define the amount of angular movement of the needle - a speedometer running from horizontal left to horizontal right may use -1.57 to 1.57, for example. If the cab control needs to move the other way, put the higher number first.&lt;br /&gt;
&lt;br /&gt;
====collision-parent====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: A mesh of kind collision-proxy must specify a collision-parent - the mesh it is a collision proxy for. This is the name of another control in the mesh-table.&lt;br /&gt;
&lt;br /&gt;
====fade-time====&lt;br /&gt;
:Type: Float&lt;br /&gt;
:Desc: The time, in seconds, for a &amp;quot;light&amp;quot; control to fully switch on or off.  Default is 0.5 seconds.&lt;br /&gt;
&lt;br /&gt;
====font====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: Font name to use for the readout of a digital control.&lt;br /&gt;
:Options are:&lt;br /&gt;
:* &#039;&#039;swiss&#039;&#039; (Default option. Renders with arial in PC builds.)&lt;br /&gt;
:* &#039;&#039;times_new_roman&#039;&#039;&lt;br /&gt;
:* &#039;&#039;verdana&#039;&#039;&lt;br /&gt;
:* &#039;&#039;century_gothic&#039;&#039;&lt;br /&gt;
:* &#039;&#039;cordia&#039;&#039;&lt;br /&gt;
:* &#039;&#039;courier&#039;&#039;&lt;br /&gt;
:* &#039;&#039;helvetica&#039;&#039;&lt;br /&gt;
:* &#039;&#039;arial&#039;&#039;&lt;br /&gt;
:* &#039;&#039;comic_sans&#039;&#039;&lt;br /&gt;
:* &#039;&#039;sans_serif&#039;&#039;&lt;br /&gt;
:* &#039;&#039;impact&#039;&#039;&lt;br /&gt;
:* &#039;&#039;console&#039;&#039;&lt;br /&gt;
:* &#039;&#039;tohoma&#039;&#039; (renders using the &#039;&#039;Tahoma&#039;&#039; font on PC builds.)&lt;br /&gt;
:* &#039;&#039;garamond&#039;&#039;&lt;br /&gt;
:These roughly correspond with Windows font names. Beware - not all fonts are available on all platforms, and where a font is not available, a different font may be substituted.&lt;br /&gt;
&lt;br /&gt;
====fontcolor====&lt;br /&gt;
:Type: Decimal Triplet&lt;br /&gt;
:Desc: RGB font color for the readout of a digital control. Colors are specified within the range 0.0 to 1.0, with 0.0 being black and 1.0 being full intensity. Default is 1.0,1.0,1.0 - white.&lt;br /&gt;
&lt;br /&gt;
====fontsize====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Font size for the readout of a digital control. Default is 12.&lt;br /&gt;
&lt;br /&gt;
====invert====&lt;br /&gt;
:Type: Boolean&lt;br /&gt;
:Desc: Invert mouse movement for this control. If the control moves the wrong way compared to the mouse, change this setting.&lt;br /&gt;
&lt;br /&gt;
====kind====&lt;br /&gt;
:Type: Selection&lt;br /&gt;
:Desc: The type of control this mesh table element represents.&lt;br /&gt;
:Options are:&lt;br /&gt;
:* &#039;&#039;animated-lever&#039;&#039;&lt;br /&gt;
:Operates like a standard lever, only uses a named animation instead of the angles tag for movement.&lt;br /&gt;
:* &#039;&#039;animated-dial&#039;&#039;&lt;br /&gt;
:Operates like a standard needle, only uses a named animation to represent the gauge readout instead of the angles tag.&lt;br /&gt;
:* &#039;&#039;collision-proxy&#039;&#039;&lt;br /&gt;
:This element type defines a volume within the cab where the mouse pointer will be considered to be over the cab control. Generally used in conjunction with an animated-lever. Name of the animated lever is defined in the tag &#039;&#039;collision-parent&#039;&#039;.&lt;br /&gt;
:* &#039;&#039;digital-dial-spd&#039;&#039;&lt;br /&gt;
:Digital readout for a speedometer, and using speed units.&lt;br /&gt;
:* &#039;&#039;digital-dial-prs&#039;&#039;&lt;br /&gt;
:Digital readout for a pressure gauge, using pressure units.&lt;br /&gt;
:* &#039;&#039;firebox&#039;&#039;&lt;br /&gt;
:The animated firebox in a steam locomotive.&lt;br /&gt;
:* &#039;&#039;lever&#039;&#039;&lt;br /&gt;
:A standard lever, often used for throttle and brake controls. Requires the user to click hold and move the mouse to move the lever between it&#039;s notches. This control will stay at any notch position when let go.&lt;br /&gt;
:* &#039;&#039;light&#039;&#039;&lt;br /&gt;
:A light glow / overlay - this mesh is hidden when the light is off and shown when the light is on.&lt;br /&gt;
:* &#039;&#039;needle&#039;&#039;&lt;br /&gt;
:An analogue gauge needle. Can be used to implement many different types of gauges.&lt;br /&gt;
:* &#039;&#039;pulllever&#039;&#039;&lt;br /&gt;
:Like a lever, only sprung to return to it&#039;s initial position when the user lets go of the control. Useful for horns.&lt;br /&gt;
:* &#039;&#039;pullrope&#039;&#039;&lt;br /&gt;
:Like a pulllever, only with linear (not rotational) movement.&lt;br /&gt;
:* &#039;&#039;switch&#039;&#039;&lt;br /&gt;
:This control requires only a single click to move between it&#039;s two endpoints. It is better suited than a lever to small switches and buttons.&lt;br /&gt;
:* &#039;&#039;button&#039;&#039;&lt;br /&gt;
:Similar to switch but requires the mouse be held down to keep the control active. I.e., press and hold the mouse button to push the control down, release the mouse and the control will return to the off position.&lt;br /&gt;
&lt;br /&gt;
====limits====&lt;br /&gt;
:Type: Decimal Pair&lt;br /&gt;
:Desc: Specifies the minimum and maximum values for a cab control or needle at it&#039;s two endpoints of movement. In the case of a speedometer, this would be the range of speeds it can display - 0m/s to 50m/s, for example.&lt;br /&gt;
&lt;br /&gt;
====mousemode====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: If set to &amp;quot;exact&amp;quot;, will require the mouse to be positioned over the geometry of the control precisely to activate it. Otherwise a bounding volume is used. This is useful for large controls which would otherwise block access to smaller controls.&lt;br /&gt;
&lt;br /&gt;
====mousespeed====&lt;br /&gt;
:Type: Float&lt;br /&gt;
:Desc: Controls the mouse speed and push/pull direction for controls.  &#039;&#039;&#039;&#039;&#039;Do not use zero&#039;&#039;&#039;&#039;&#039;.&lt;br /&gt;
:Examples of use:&lt;br /&gt;
:* mousespeed -1   Inverts mouse direction.&lt;br /&gt;
:* mousespeed 2    Doubles mouse speed in default direction.&lt;br /&gt;
:* mousespeed -0.5 Inverts mouse direction and halves the speed.&lt;br /&gt;
:* mousespeed 10    Multiplies the mouse speed tenfold in default direction. Useful for smaller levers that require too much mouse movement to activate the lever.&lt;br /&gt;
&lt;br /&gt;
====notches====&lt;br /&gt;
:Type: Decimal List&lt;br /&gt;
:Desc: Specifies the positions of the notches for this control. Notches are discrete positions within the movement of the control where the lever can be stopped. If a lever does not have notches, it can be positioned at any location. There are two common uses for notches. Firstly, they can be used to define a control which has a number of discrete positions which mean specific things (e.g. a brake valve). Secondly, they are used to define pre-set discrete values that a control can provide (e.g. a throttle lever). A typical US diesel 8 notch throttle would have something like &amp;quot;notches 0.0,0.125,0.25,0.375,0.5,0.625,0.75,0.875,1.0&amp;quot;, specifying nine positions (for &#039;off&#039; and notches 1 thru 8).&lt;br /&gt;
&lt;br /&gt;
====notchheight====&lt;br /&gt;
:Type: Integer List&lt;br /&gt;
:Desc: Specifies the importance of the notches for this control. This affects how the graphical overlay draws each notch. This is useful for a combined brake and throttle controller, or any other control where you want to mark a specific position relative to the others. This should have the same number of values as the &#039;notches&#039; list.&lt;br /&gt;
:Three styles are available:&lt;br /&gt;
:* &#039;1&#039; configures this bar to be a standard length and width bar.&lt;br /&gt;
:* &#039;2&#039; configures this bar to be shorter in length, and is often used for intermediate positions.&lt;br /&gt;
:* &#039;3&#039; configures this bar to be standard length, but thicker in width. This is often used for marking a specific position.&lt;br /&gt;
&lt;br /&gt;
====onlight====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: Specify the name of a &#039;&#039;light&#039;&#039; kind mesh which is enabled when this switch/lever is in the &#039;&#039;on&#039;&#039; position, and disabled when it is in the &#039;&#039;off&#039;&#039; position. The mesh name must be in the mesh-table.  See the example below.&lt;br /&gt;
&lt;br /&gt;
====radius====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Specifies the distance for the 2D notch overlay.&lt;br /&gt;
&lt;br /&gt;
====tooltip-mesh====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: Specifies the name of a mesh-table entry for a mesh to show when the control is moused over. The mesh will be faded in/out over a short period.&lt;br /&gt;
&lt;br /&gt;
====tooltip-text====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: OBSOLETE: DO NOT USE. This text will be used in the tooltip that appears when the mouse cursor hovers over a cab control.&lt;br /&gt;
&lt;br /&gt;
====tooltip-token====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: The name of a string table entry. The contents of the named string table entry will be displayed as a tooltip that appears when the mouse cursor hovers over a cab control. If a token is used then it must appear as a tag in the  [[%22String-table%22 container]].&lt;br /&gt;
&lt;br /&gt;
====value====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Specifies the initial value for this control. For a lever or other input device, this will specify the initial position of the control before the user moves it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Cab Interior Mesh-Table Example=&lt;br /&gt;
The following is an example of a mesh-table which implements a number of cab controls&lt;br /&gt;
&lt;br /&gt;
 mesh-table&lt;br /&gt;
 {&lt;br /&gt;
   default&lt;br /&gt;
   {&lt;br /&gt;
     mesh                                &amp;quot;interior.im&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   wheelslip_light&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;light&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;wheelslip_light.im&amp;quot;&lt;br /&gt;
     auto-create                         0&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   bptrainbrakepipe_needle2&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;digital-dial-prs&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.brakepipe2&amp;quot;&lt;br /&gt;
     limits                              0,55&lt;br /&gt;
     font                                &amp;quot;arial&amp;quot;&lt;br /&gt;
     fontsize                            0.007&lt;br /&gt;
     fontcolor                           80,240,120&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   speedo_needle2&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;digital-dial-spd&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.digispeedo&amp;quot;&lt;br /&gt;
     limits                              0,55&lt;br /&gt;
     font                                &amp;quot;arial&amp;quot;&lt;br /&gt;
     fontsize                            0.01&lt;br /&gt;
     fontcolor                           0,0,0&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   throttle_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;throttle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.throttle&amp;quot;&lt;br /&gt;
     limits                              0,8&lt;br /&gt;
     angles                              0,1.69&lt;br /&gt;
     notches                             0,0.125,0.25,0.375,0.5,0.625,0.75,0.875,1&lt;br /&gt;
     notchheight                         1,2,2,2,2,2,2,2,1&lt;br /&gt;
     radius                              0.35&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   dynamicbrake_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;dynamic_handle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.dynamic&amp;quot;&lt;br /&gt;
     limits                              0,2&lt;br /&gt;
     angles                              0,-1.69&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0.1,1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     radius                              0.35&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   trainbrakelap_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     mesh                                &amp;quot;trainbrake_handle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.trainbrake_handle&amp;quot;&lt;br /&gt;
     limits                              0,4&lt;br /&gt;
     angles                              0,-2&lt;br /&gt;
     notches                             0,0.25,0.5,0.75,1&lt;br /&gt;
     notchheight                         2,2,2,2,2&lt;br /&gt;
     mousespeed                          1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   independantbrake_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;indy_handle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.ind&amp;quot;&lt;br /&gt;
     limits                              0,32&lt;br /&gt;
     angles                              0.94,0&lt;br /&gt;
     notches                             0,0.5,1&lt;br /&gt;
     notchheight                         1,1,1&lt;br /&gt;
     radius                              0.35&lt;br /&gt;
     mousespeed                          1&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   flow_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;flowneedle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.bpflow&amp;quot;&lt;br /&gt;
     limits                              0,1050&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   bplocomain_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedlered.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.mainres&amp;quot;&lt;br /&gt;
     limits                              0,1240&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   bploco_equaliser&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.eqres&amp;quot;&lt;br /&gt;
     limits                              0,1240&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   bptrainbrakecylinder_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedlered.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.brakecyl&amp;quot;&lt;br /&gt;
     limits                              -50,1390&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   bptrainbrakepipe_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.brakepipe&amp;quot;&lt;br /&gt;
     limits                              0,1240&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   speedo_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;speedo_pointer.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.speedo&amp;quot;&lt;br /&gt;
     limits                              0,43&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   ampmeter_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;needleamps.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.ampmeter&amp;quot;&lt;br /&gt;
     limits                              0,1700&lt;br /&gt;
     angles                              0,3.02058&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   reverser_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;reverser_handle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.throttle01&amp;quot;&lt;br /&gt;
     limits                              0,2&lt;br /&gt;
     angles                              -0.55,0.55&lt;br /&gt;
     notches                             0,0.5,1&lt;br /&gt;
     notchheight                         1,1,1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   light_switch&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.hdlt&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;hdltswtch.im&amp;quot;&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     angles                              0,2&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0.1,0.1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   horn&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;pulllever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;horn.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.horn&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     angles                              0,-0.55&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     radius                              -0.02&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0,0&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   pantograph_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;pantograph_lever.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.pantograph_lever&amp;quot;&lt;br /&gt;
     limits                              0,3&lt;br /&gt;
     angles                              1.4,0&lt;br /&gt;
     notches                             0,0.5,0.75,1.0&lt;br /&gt;
     notchheight                         0,0,1,1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     onlight                             &amp;quot;line_power&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   line_power&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;light&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;line_power.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.line_power&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
[[Category:Config Container|M]]&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=KIND_Interior&amp;diff=23713</id>
		<title>KIND Interior</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=KIND_Interior&amp;diff=23713"/>
		<updated>2020-06-16T20:35:24Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: Added a event tag chart for cabin.txt&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[KIND Interior]] provides the basis for a building or vehicle interior, with or without control levers and dials.&lt;br /&gt;
&lt;br /&gt;
This asset type inherits all mesh display characteristics, and adds interior-specific functionality such as control levers. Please read [[HowTo/Build a cab interior]] for a step-by-step guide to creating an Interior asset.&lt;br /&gt;
&lt;br /&gt;
==KIND Hierarchy==&lt;br /&gt;
===Parent Classes===&lt;br /&gt;
* [[KIND Mesh]]&lt;br /&gt;
===Child Classes===&lt;br /&gt;
* &#039;&#039;none.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Supported Tags==&lt;br /&gt;
Each interior asset supports the following tags. Each tag is shown here with its default value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 kind &amp;quot;interior&amp;quot;&lt;br /&gt;
 [[%22cameralist%22_Container|cameralist]]&lt;br /&gt;
 {&lt;br /&gt;
   camera0                               0,0,0,0,0&lt;br /&gt;
 }&lt;br /&gt;
 [[%22soundscript%22_Container|soundscript]]&lt;br /&gt;
 {&lt;br /&gt;
 }&lt;br /&gt;
 cameradefault                           0&lt;br /&gt;
 cabin-visible-from-outside              0&lt;br /&gt;
 outside-visible-from-cabin              0&lt;br /&gt;
 controlset                              &amp;quot;&amp;quot;&lt;br /&gt;
 enable-shadows-in-cab                   1&lt;br /&gt;
 [[%22mesh-table%22_container_(interior_version)|mesh-table]]&lt;br /&gt;
 {&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====cameralist====&lt;br /&gt;
:Type: [[%22cameralist%22_Container|CameraList Container]]&lt;br /&gt;
:Desc: Lists the different camera view positions and orientations this interior has.&lt;br /&gt;
====soundscript====&lt;br /&gt;
:Type: [[%22soundscript%22_Container|SoundScript Container]]&lt;br /&gt;
:Desc: Details sounds that a cab interior can produce. Sounds may be triggered by the asset script, or by object animations. &lt;br /&gt;
====cameradefault====&lt;br /&gt;
:Type: Integer&lt;br /&gt;
:Desc: Defines which of the cameras in &#039;cameralist&#039; is the default camera (the one selected when the user first goes into cab view mode). e.g. &amp;quot;cameradefault 3&amp;quot; will make &amp;quot;camera3&amp;quot; the default camera view.&lt;br /&gt;
====cabin-visible-from-outside====&lt;br /&gt;
:Type: Boolean&lt;br /&gt;
:Desc: If true, makes the cab mesh visible from the outside view.&lt;br /&gt;
This is intended for objects with simple but obviously visible cab controls that are not enclosed - e.g. the controls to operate a transfer table. It would be far too much of a performance impact to use this on locomotive models, as locomotive cabs are very performance intensive.&lt;br /&gt;
====outside-visible-from-cabin====&lt;br /&gt;
:Type: Boolean&lt;br /&gt;
:Desc: If true, makes the loco body mesh visible while in the cab interior view.&lt;br /&gt;
This is intended to be used with an interior where the cab controls that are not in an enclosed space - e.g. a transfer table.&lt;br /&gt;
While using this on a traincar is not considered problematic from a performance perspective, please note this will require a very carefully designed cab and loco asset - both the inside of the loco mesh and the cab interior will be visible at the same time, and unless done very carefully, this is likely to cause graphical problems with overlapping polygons and unexpectedly visible or opaque surfaces.&lt;br /&gt;
====controlset====&lt;br /&gt;
:Type: [[KUID]]&lt;br /&gt;
:Desc: Specifies a [[KIND_Controlset|controlset]] asset used to send script messages to this interiors custom script. Optional.&lt;br /&gt;
&lt;br /&gt;
====enable-shadows-in-cab====&lt;br /&gt;
:Type: Boolean&lt;br /&gt;
:Desc: If true (1), makes the cab interior receive shadows. Note that this will cast a shadow of the interior onto the environment when viewed from the interior camera. It&#039;s therefore preferable that the interior mesh preserves the basic shape of the vehicle if you wish to apply this setting.&lt;br /&gt;
&lt;br /&gt;
====interior-controls-type====&lt;br /&gt;
:Type: Text String &lt;br /&gt;
:Desc: Specifies the type of the control.   Types are &lt;br /&gt;
:* none (non-powered car)&lt;br /&gt;
:* hostler (driveable B unit or cab car)&lt;br /&gt;
:* full (loco)&lt;br /&gt;
:Compulsory from 3.8.&lt;br /&gt;
&lt;br /&gt;
====mesh-table====&lt;br /&gt;
:Type: [[%22mesh-table%22_container_(interior_version)|MeshTable Container (Interior version)]]&lt;br /&gt;
:Desc: All the meshes for the cab interior (the shell itself, along with all the controls and gauges) are listed here. A mesh table for an interior has a number of additional options that a normal mesh table does not.&lt;br /&gt;
&lt;br /&gt;
==Example Config.txt==&lt;br /&gt;
Sample [[config.txt file]] for a interior asset, with the Standard Tags excluded for brevity:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 kind                                    &amp;quot;interior&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 cameralist&lt;br /&gt;
 {&lt;br /&gt;
   camera0                               -1.236,0.173,0.392,0.511,-0.155&lt;br /&gt;
   camera1                               -1.278,-0.176,0.392,0.511,-0.155&lt;br /&gt;
   camera2                               -1.247,0.344,0.52,6.708,-0.403&lt;br /&gt;
   camera3                               -0.113,0.965,0.52,6.312,-0.377&lt;br /&gt;
   camera4                               1.35,0.15,0.52,5.71,-0.265&lt;br /&gt;
   camera5                               1.374,0.208,0.205,6.048,-0.06&lt;br /&gt;
   camera6                               -0.754,0.926,1.011,6.636,-0.516&lt;br /&gt;
   camera7                               -1.293,0.449,0.459,6.757,-0.342&lt;br /&gt;
 }&lt;br /&gt;
 cameradefault                           0&lt;br /&gt;
 &lt;br /&gt;
 mesh-table&lt;br /&gt;
 {&lt;br /&gt;
   default&lt;br /&gt;
   {&lt;br /&gt;
     mesh                                &amp;quot;c_interior.im&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   wheelslip_light&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;light&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;wheelslip_light.im&amp;quot;&lt;br /&gt;
     auto-create                         0&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   bptrainbrakepipe_needle2&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;digital-dial-prs&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.brakepipe2&amp;quot;&lt;br /&gt;
     limits                              0,55&lt;br /&gt;
     font                                &amp;quot;arial&amp;quot;&lt;br /&gt;
     fontsize                            0.007&lt;br /&gt;
     fontcolor                           80,240,120&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   speedo_needle2&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;digital-dial-spd&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.digispeedo&amp;quot;&lt;br /&gt;
     limits                              0,55&lt;br /&gt;
     font                                &amp;quot;arial&amp;quot;&lt;br /&gt;
     fontsize                            0.01&lt;br /&gt;
     fontcolor                           0,0,0&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   throttle_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;throttle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.throttle&amp;quot;&lt;br /&gt;
     limits                              0,8&lt;br /&gt;
     angles                              0,1.69&lt;br /&gt;
     notches                             0,0.125,0.25,0.375,0.5,0.625,0.75,0.875,1&lt;br /&gt;
     notchheight                         1,2,2,2,2,2,2,2,1&lt;br /&gt;
     radius                              0.35&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   dynamicbrake_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;dynamic_handle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.dynamic&amp;quot;&lt;br /&gt;
     limits                              0,2&lt;br /&gt;
     angles                              0,-1.69&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0.1,1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     radius                              0.35&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   trainbrakelap_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     mesh                                &amp;quot;trainbrake_handle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.trainbrake_handle&amp;quot;&lt;br /&gt;
     limits                              0,4&lt;br /&gt;
     angles                              0,-2&lt;br /&gt;
     notches                             0,0.25,0.5,0.75,1&lt;br /&gt;
     notchheight                         2,2,2,2,2&lt;br /&gt;
     mousespeed                          1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   independantbrake_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;indy_handle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.ind&amp;quot;&lt;br /&gt;
     limits                              0,32&lt;br /&gt;
     angles                              0.94,0&lt;br /&gt;
     notches                             0,0.5,1&lt;br /&gt;
     notchheight                         1,1,1&lt;br /&gt;
     radius                              0.35&lt;br /&gt;
     mousespeed                          1&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   flow_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;flowneedle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.bpflow&amp;quot;&lt;br /&gt;
     limits                              0,1050&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   bplocomain_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedlered.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.mainres&amp;quot;&lt;br /&gt;
     limits                              0,1240&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   bploco_equaliser&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.eqres&amp;quot;&lt;br /&gt;
     limits                              0,1240&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   bptrainbrakecylinder_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedlered.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.brakecyl&amp;quot;&lt;br /&gt;
     limits                              -50,1390&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   bptrainbrakepipe_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.brakepipe&amp;quot;&lt;br /&gt;
     limits                              0,1240&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   speedo_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;speedo_pointer.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.speedo&amp;quot;&lt;br /&gt;
     limits                              0,43&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   ampmeter_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;needleamps.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.ampmeter&amp;quot;&lt;br /&gt;
     limits                              0,1700&lt;br /&gt;
     angles                              0,3.02058&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   reverser_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;reverser_handle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.throttle01&amp;quot;&lt;br /&gt;
     limits                              0,2&lt;br /&gt;
     angles                              -0.55,0.55&lt;br /&gt;
     notches                             0,0.5,1&lt;br /&gt;
     notchheight                         1,1,1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   right_sliding_window&lt;br /&gt;
   {&lt;br /&gt;
     mesh                                &amp;quot;window1.im&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     att                                 &amp;quot;a.window1&amp;quot;&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     angles                              0,-0.009&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         1,1&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   right_sliding_window2&lt;br /&gt;
   {&lt;br /&gt;
     mesh                                &amp;quot;window2.im&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     att                                 &amp;quot;a.window2&amp;quot;&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     angles                              0,0.009&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         1,1&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   left_sliding_window&lt;br /&gt;
   {&lt;br /&gt;
     mesh                                &amp;quot;window3.im&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     att                                 &amp;quot;a.window3&amp;quot;&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     angles                              0,-0.009&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         1,1&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   left_sliding_window2&lt;br /&gt;
   {&lt;br /&gt;
     mesh                                &amp;quot;window4.im&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     att                                 &amp;quot;a.window4&amp;quot;&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     angles                              0,0.009&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         1,1&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mousespeed                          1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   light_switch&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.hdlt&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;hdltswtch.im&amp;quot;&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     angles                              0,2&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0.1,0.1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   horn&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;pulllever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;horn.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.horn&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     angles                              0,-0.55&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     radius                              -0.02&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0,0&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Mesh table entry speedo_needle is required to update speed information on a RailDriver console.&lt;br /&gt;
&lt;br /&gt;
==Custom Sounds==&lt;br /&gt;
===Overview===&lt;br /&gt;
It is possible to assign custom sounds to cabin controls without using a custom script. This can be performed via the addition of a &#039;cabin.txt&#039; configuration file to an interior asset. The cabin.txt and custom sounds files must be placed in the an asset sub-directory named &#039;sounds&#039;.&lt;br /&gt;
&lt;br /&gt;
===Cabin.txt File Format===&lt;br /&gt;
The cabin.txt file lists 1 sound even per row, with each sound event defined by three space separated values. Empty rows are permitted and will be safely ignored. Each sound event requires the following three values:&lt;br /&gt;
&lt;br /&gt;
====Target====&lt;br /&gt;
The name of the mesh-table entry for the mesh of the cabin control.&lt;br /&gt;
====Event====&lt;br /&gt;
The name of a cabin control event which will trigger the sound. The full list of supported events is as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;mouseenter&#039;&#039;&#039; :- Triggered when the players mouse hovers over the control&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;mouseleave&#039;&#039;&#039; :- Triggered when the players mouse was over the control but no longer is&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;mousedown&#039;&#039;&#039; :- Triggered when the player presses a mouse button while over the control&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;beginselect&#039;&#039;&#039; :- Triggered when the player actives a control, i.e. selects it&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;mouseup&#039;&#039;&#039; :- Triggered when the player releases a mouse button while over the control&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;endselect&#039;&#039;&#039; :- Triggered when the player deselects a control&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;change-notch&#039;&#039;&#039; :- Triggered on notched controls only, whenever the player moves the control one notch&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;lever-low&#039;&#039;&#039; :- Triggered on lever type controls, when the lever is moved to the lowest position&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;lever-high&#039;&#039;&#039; :- Triggered on lever type controls, when the lever is moved to the highest position&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;looping&#039;&#039;&#039; :- Triggered when a control is moved to notch 1, this sound will play in a loop until the control is changed. A typical use for this would be a fire sound while the firedoor of a steam train is open.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Tips====&lt;br /&gt;
Some lever types will only create a sound based on the correct event type. Below is a chart to describe which events will work with the correct lever type. It is a work in-progress and is not fully complete:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Event tag chart&lt;br /&gt;
|-&lt;br /&gt;
|Lever Type&lt;br /&gt;
|Event tag&lt;br /&gt;
|Notes&lt;br /&gt;
|-&lt;br /&gt;
|animated-lever&lt;br /&gt;
|change-notch , beginselect, lever-high, lever-low&lt;br /&gt;
|Change-notch and beginselect are good choices for animated levers.&lt;br /&gt;
|-&lt;br /&gt;
|lever&lt;br /&gt;
|change-notch , beginselect, lever-high, lever-low&lt;br /&gt;
|Change-notch and beginselect are good choices for levers.&lt;br /&gt;
|-&lt;br /&gt;
|pulllever&lt;br /&gt;
|change-notch , lever-high, lever-low&lt;br /&gt;
|change-notch will only create a sound for each notch in a pulllever, which is typically the starting and ending position.&lt;br /&gt;
|-&lt;br /&gt;
|pullrope&lt;br /&gt;
|change-notch , lever-high, lever-low&lt;br /&gt;
|change-notch will only create a sound for each notch in a pullrope, which is typically the starting and ending position.&lt;br /&gt;
|-&lt;br /&gt;
|switch&lt;br /&gt;
|beginselect&lt;br /&gt;
|switch seems to only react to beginselect.&lt;br /&gt;
|-&lt;br /&gt;
|button&lt;br /&gt;
|unknown&lt;br /&gt;
|unknown&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Sound File====&lt;br /&gt;
The file-name of the sound to play (relative to the &#039;sound&#039; sub-directory)&lt;br /&gt;
&lt;br /&gt;
Below is an example of a cabin.txt file which will assign custom sounds to the reverser and windows of the example config.txt file above.&lt;br /&gt;
&lt;br /&gt;
  reverser_lever lever-low reverser_notch.wav&lt;br /&gt;
  reverser_lever lever-high reverser_throw.wav&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
  right_sliding_window change-notch window_open.wav&lt;br /&gt;
  right_sliding_window2 change-notch window_open.wav&lt;br /&gt;
  left_sliding_window change-notch window_open.wav&lt;br /&gt;
  left_sliding_window2 change-notch window_open.wav&lt;br /&gt;
  handbrake_wheel looping handbrakemove.wav //&lt;br /&gt;
  cool_switch beginselect click.wav // Note this is a kind &amp;quot;switch&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Material/Textures==&lt;br /&gt;
For best visual results you should make sure there isn&#039;t anything below the gray color (R:100, G:100, B:100) in the red channel of the parameters texture (see TRS19 material - [[m.pbrmetal]] - for more information on the parameters texture).&lt;br /&gt;
You can have higher (whiter values) but RGB:100 is probably the minimum you&#039;ll want to go with to make things clear in-cabs.&lt;br /&gt;
&lt;br /&gt;
[[file:in-cab_rgb100.jpg|1275px]]&lt;br /&gt;
&lt;br /&gt;
==Downloads==&lt;br /&gt;
&#039;&#039;Attach sample files here?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Categories==&lt;br /&gt;
[[Category:Asset KIND|I]]&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=HowTo/Build_a_cab_interior&amp;diff=23700</id>
		<title>HowTo/Build a cab interior</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=HowTo/Build_a_cab_interior&amp;diff=23700"/>
		<updated>2020-06-10T20:57:31Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: /* Artwork considerations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Trainz uses an [[KIND_Interior|interior]] object to represent a locomotive cab, or view from another vehicle, e.g. a passenger coach, brake van or caboose. Interiors can also be attached to some non-train assets. For this howto, I am going to assume that we are creating a traincar interior, and focus primarily on a cab interior for a diesel or electric locomotive.&lt;br /&gt;
&lt;br /&gt;
=Basic structure=&lt;br /&gt;
&lt;br /&gt;
The basic structure of a cab is quite similar to a number of different assets. You will have a main mesh with a number of attached sub-meshes, which are arranged using a [[%22mesh-table%22_container_(interior_version)|mesh-table]].&lt;br /&gt;
&lt;br /&gt;
The main cab mesh typically consists of the interior walls, roof and floor of the cab, the control desk or stand, all furniture or other static objects visible inside the cab, and also all parts of the locomotive exterior that are visible from inside the cab - e.g. the top of any projecting nose below the cab windows. Remember to consider the sightlines out of rear windows too for visible bodywork panels - the user can move around the cab and rotate the camera to any angle. Users are not restricted to looking forward out of the front windows only.&lt;br /&gt;
&lt;br /&gt;
=Artwork considerations=&lt;br /&gt;
&lt;br /&gt;
There are some differences in style between the construction of an interior object and a typical trainz object.&lt;br /&gt;
&lt;br /&gt;
Except in very specific circumstances, there will not be more than one interior object in existence at any time, and that interior is always viewed from very close range - the user is inside it. Because of this, interiors are typically modelled with a high polygon count and with high resolution textures, to give an impressive visual feel. LOD is not used, as the user never gets far enough away from the interior for LOD techniques to have worthwhile benefit. However, LOD techniques may be ideal in a case of a passenger wagon with high polygon chair models. &lt;br /&gt;
&lt;br /&gt;
Trainz lights interior objects differently to map objects like buildings and other scenery - the main illumination is ambient, not directional. (A steam loco does have a directional light coming from the firebox, but a diesel or electric cab typically has no directional light inside, and relies entirely on ambient illumination).&lt;br /&gt;
&lt;br /&gt;
With ambient illumination, effects such as normal and specular mapping do not have much (if any) effect. Because of this, more effort needs to be put into the diffuse texture for a cab interior than would normally be applied to Trainz objects. Drawing or baking shadows and other effects into the diffuse textures is required to produce a nice looking cab interior.&lt;br /&gt;
&lt;br /&gt;
An example cab would be the [[File:PB_interior.rar]]&lt;br /&gt;
&lt;br /&gt;
=A basic config file=&lt;br /&gt;
&lt;br /&gt;
The minimal required config for an interior to show in-game is:&lt;br /&gt;
&lt;br /&gt;
 kind                                    interior&lt;br /&gt;
 kuid                                    &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&amp;lt;kuid2:YOUR:KUID:HERE&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
 trainz-build                            2.9&lt;br /&gt;
 username                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Your interior name here&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
 category-class                          ZI&lt;br /&gt;
 &lt;br /&gt;
 mesh-table&lt;br /&gt;
 {&lt;br /&gt;
   default&lt;br /&gt;
   {&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;your_interior_mesh_name.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Note: There are also other base tags that should be added that are common to all asset types - e.g. the download station will require a valid thumbnails container before the asset can be uploaded. See the documentation for [[KIND TrainzBaseSpec]] for details of tags which apply to all trainz assets. Depending on which Trainz version you have and which trainz-build number you have specified, some of these may be required - content manager will tell you what is required, listing missing tags as errors.&lt;br /&gt;
&lt;br /&gt;
==camera positions==&lt;br /&gt;
&lt;br /&gt;
If we load a cab up with that config file, we will note that the view is not particularly appealing. Chances are we&#039;re right down near the floor. To fix this, we need to define some default positions for camera views. This is done with the [[%22cameralist%22_Container|cameralist container]] and the [[KIND_Interior#cameradefault|cameradefault]] tag.&lt;br /&gt;
Add the following to your config.txt file:&lt;br /&gt;
&lt;br /&gt;
 cameralist&lt;br /&gt;
 {&lt;br /&gt;
   camera0                               0,0,2,0,0&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 cameradefault                           0&lt;br /&gt;
&lt;br /&gt;
The cameralist container can contain any number of cameras, but they must be numbered sequentially and start at zero.&lt;br /&gt;
&lt;br /&gt;
The five numbers are the X, Y and Z coordinates of the camera in metres relative to the 0,0,0 point of the interior mesh, and the Yaw and Pitch in radians. Luckily you don&#039;t have to work these values out from scratch - add the line &amp;quot;-freeintcam&amp;quot; to your trainzoptions.txt file, and you can move the camera about in the cab with the mouse and keyboard, and the precise position will be displayed in the bottom right corner.&lt;br /&gt;
&lt;br /&gt;
When you have found a position you like, write the numbers down. When you&#039;ve got a good selection of positions recorded, add them to the cameralist container.&lt;br /&gt;
&lt;br /&gt;
You may wish to return to this and tweak the values later once all the controls are in place - but it&#039;s handy to have a good starting position for the camera while testing.&lt;br /&gt;
&lt;br /&gt;
=Cab controls=&lt;br /&gt;
&lt;br /&gt;
A locomotive cab interior needs working cab controls. What fun would sitting in the drivers seat be without being able to pull on the levers, change the switches, and watch the gauges and dials move?&lt;br /&gt;
&lt;br /&gt;
The moving part of each lever, switch, gauge or dial is created as a separate mesh, which is then attached to the cab with an attachment point. (The static part, e.g. guide rails for levers, should be part of the cab mesh itself).&lt;br /&gt;
&lt;br /&gt;
==Lever==&lt;br /&gt;
&lt;br /&gt;
The lever is the basic input device in a cab. It is based on rotational movement, and any object that requires rotational movement (e.g. a wheel or ring) can be implemented as a lever.&lt;br /&gt;
&lt;br /&gt;
If you actually want linear movement, you can still use a lever - just move the attachment point a long way away - e.g. 10 or 20 metres away from the control. The resulting small arc will not be noticable over the length of movement. As an example, sliding windows in Trainz cabs have been implemented as levers &amp;quot;attached&amp;quot; something like 10 or 20 metres out to the side of the vehicle for a long time. (The exception to this is a horn pull rope - trainz provides a control specifically for this purpose).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will need to create the lever in your modelling program aligned correctly - the rotation needs to be around the Z axis, and main part of the object will point along the Y axis.&lt;br /&gt;
&lt;br /&gt;
When adding the attachment point to the main mesh, align it so the Z axis is the axis of rotation. It is common to point the Y axis at the default position - e.g. levers in the &#039;off&#039; or &#039;neutral&#039; position, and needles pointing to zero. This is not strictly required, as the range of movement can be adjusted at both ends, but it provides a handy reference when creating the config file.&lt;br /&gt;
&lt;br /&gt;
[[File:BasicLeverSetup.png|350px|thumb|An example of a lever being used as a signboard cover.]]&lt;br /&gt;
&lt;br /&gt;
It is worth noting that you can reuse a mesh for multiple attachments. This is particularly useful for switches, as identical appearance switches are often used repeatedly in a cab for different purposes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Throttle Lever===&lt;br /&gt;
&lt;br /&gt;
A good example of a standard lever in use is a locomotive throttle control. A typical US diesel throttle has 9 notched positions (from 0 to 8 inclusive).&lt;br /&gt;
&lt;br /&gt;
As noted above, the lever is created in the modelling package so it points along the Y axis and the axis of rotation is along the Z axis. The attachment point is added to the cab interior mesh at the correct position, and rotated so the Z axis is aligned with the axis of rotation, and the Y axis points to the default position.&lt;br /&gt;
&lt;br /&gt;
Now we need to add an entry to the config file to add our throttle lever.&lt;br /&gt;
&lt;br /&gt;
Into the mesh table, add an entry like this:&lt;br /&gt;
&lt;br /&gt;
   throttle_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;throttle_lever.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.throttle_lever&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,8&lt;br /&gt;
     angles                              0,1.57&lt;br /&gt;
     notches                             0,0.125,0.25,0.375,0.5,0.625,0.75,0.875,1&lt;br /&gt;
     notchheight                         1,2,2,2,2,2,2,2,1&lt;br /&gt;
     radius                              0.35&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
... remember to set your attachment point and mesh name correctly.&lt;br /&gt;
&lt;br /&gt;
The &#039;angles&#039; line defines how far the control rotates. It is in radians - there are 2 x Pi (6.28) radians in a complete circle. My default of 1.57 will give you about 90 degrees of rotation, in the positive direction. Adjust this number to get the control to rotate the correct amount. You should be able to work out the number you need in your modelling program by using the rotate tool on the attachment point, and recording the amount of rotation required to move to the intended maximum location. It should not require significant trial and error.&lt;br /&gt;
&lt;br /&gt;
The &#039;radius&#039; line defines the position of the notch position overlay and the text label. It is in metres. If the overlay is too close in, increase this number. If it is too far out, decrease it.&lt;br /&gt;
&lt;br /&gt;
If the lever is the wrong way round (notch 8 is at the wrong end), swap the numbers in the &#039;angles&#039; tag over, so the higher one is first.&lt;br /&gt;
&lt;br /&gt;
If the lever moves the wrong way when you drag it with the mouse (i.e. it goes left in response to a right drag), add the line:&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
This will invert the mouse movement.&lt;br /&gt;
&lt;br /&gt;
The fact we called this lever &amp;quot;throttle_lever&amp;quot; means it will be used to control the throttle by the default cab script.&lt;br /&gt;
&lt;br /&gt;
So what happens if we wanted a different number of notches? Below is an example of a throttle which has 22 notches. The second value in the &#039;limits&#039; tag has been edited to return up to notch 22, and more entries have been added to the &#039;notches&#039; and &#039;notchheight&#039; tags:&lt;br /&gt;
&lt;br /&gt;
   throttle_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;throttle_lever.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.throttle_lever&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,22&lt;br /&gt;
     angles                              0,0.94&lt;br /&gt;
     notches                             0,0.045,0.091,0.136,0.182,0.227,0.273,0.318,0.364,0.409,0.455,0.5,0.545,0.591,0.636,0.682,0.727,0.773,0.818,0.864,0.909,0.955,1&lt;br /&gt;
     notchheight                         1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1&lt;br /&gt;
     radius                              0.35&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Reverser Lever===&lt;br /&gt;
&lt;br /&gt;
The reverser lever is created in a similar manner to throttle lever. The mesh table entry for this will look like:&lt;br /&gt;
&lt;br /&gt;
   reverser_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;reverser_lever.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.reverser_lever&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,2&lt;br /&gt;
     angles                              -0.79,0.79&lt;br /&gt;
     notches                             0,0.5,1&lt;br /&gt;
     notchheight                         1,1,1&lt;br /&gt;
     radius                              0.25&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
In this case, because the &#039;angles&#039; entry has a range both positive and negative, the lever can move in both directions relative to the attachment point. The game will set the default position to neutral (1), so if you&#039;ve lined up your attachment point at one end, don&#039;t worry - you can use angles which range from zero if you need to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Train Air Brake Lever===&lt;br /&gt;
&lt;br /&gt;
There are two types of train air brake lever. A given locomotive only has one type - the brakes are either require manual lapping or are self-lapping. Use the appropriate name and configuration for the loco you are modelling.&lt;br /&gt;
&lt;br /&gt;
====Manual Lapped Brakes====&lt;br /&gt;
&lt;br /&gt;
The manual train brake lever has five positions numbered from zero to four, each one representing a different function. Those functions are Release, Lap, Application, Emergency and Handle Off respectively.&lt;br /&gt;
&lt;br /&gt;
A lever for a manual lap train air brake is defined as follows:&lt;br /&gt;
&lt;br /&gt;
   trainbrakelap_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;train_brake_lap_lever.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.train_brake_lap_lever&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,4&lt;br /&gt;
     angles                              0,0.94&lt;br /&gt;
     notches                             0,0.25,0.5,0.75,1&lt;br /&gt;
     notchheight                         1,1,1,1,1&lt;br /&gt;
     radius                              0.25&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
In this case, the attachment for the lever has been created in the &#039;release&#039; position. If it had been created in the &#039;handle off&#039; position, the angle tag would have been more like:&lt;br /&gt;
&lt;br /&gt;
     angles                             -0.94,0&lt;br /&gt;
&lt;br /&gt;
====Self Lapping Brakes====&lt;br /&gt;
&lt;br /&gt;
A self lapping trainbrake lever has a number of primary notches similar to the manual lap train brake lever. However, instead of a &#039;lap&#039; and &#039;apply&#039; position, it has a grade of application between the &#039;initial&#039; and &#039;full application&#039; positions. An example of a self-lapping brake handle is this one:&lt;br /&gt;
&lt;br /&gt;
   trainbrake_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;train_brake_lever.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.train_brake_lever&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,4&lt;br /&gt;
     angles                              0,0.94&lt;br /&gt;
     notches                             0,0.25,0.27,0.29,0.31,0.33,0.35,0.37,0.39,0.41,0.43,0.45,0.47,0.49,0.5,0.75,1&lt;br /&gt;
     notchheight                         1,1,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1&lt;br /&gt;
     radius                              0.25&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
In this case, there are 14 possible levels of brake application - initial at 0.25, 12 intermediate levels, and full application at 0.5. There is no restriction on the number of intermediate levels - if you are modelling a prototype brake handle with a specific number, you may create precisely that number of notches and arrange them between 0.25 and 0.5 as required.&lt;br /&gt;
&lt;br /&gt;
===Combined throttle brake lever===&lt;br /&gt;
&lt;br /&gt;
There is also another control option - a combined throttle brake lever. This type of control is often found on multiple unit trains. This control is split into two halves. The first half of the movement is an inverted throttle - i.e. max power at zero, no power at 0.5. The second half is an auto lapped train brake application, with 0.5 as release, and 1.0 as emergency.  An example of how to configure a combined throttle and brake lever is below:&lt;br /&gt;
&lt;br /&gt;
   throttle_brake_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;throttle_brake_handle.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.throttle_brake_handle&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,16&lt;br /&gt;
     angles                              0.94,-0.94&lt;br /&gt;
     notches                             0,0.0625,0.125,0.1875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.8125,0.75,0.875,0.9375,1&lt;br /&gt;
     notchheight                         1,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,1&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
     radius                              0.12&lt;br /&gt;
     invert                              1&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
Unfortunately, trains that use this type of control generally use blended and/or EP brakes, and this control uses the standard Trainz air brake, which operates in a distinctly different manner, and as a result, can feel very wrong for this control type. (See the section on scripting controls for how a better combined brake and throttle lever may be implemented).&lt;br /&gt;
&lt;br /&gt;
==Pull lever==&lt;br /&gt;
&lt;br /&gt;
This is a sprung lever. You pull on this lever to activate it, and when you let it go, it returns to the original position. This kind of action is commonly associated with a locomotive horn, and this is what I am using as an example:&lt;br /&gt;
&lt;br /&gt;
   horn&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;pulllever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;horn.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.horn&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     angles                              0,-0.55&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     radius                              -0.02&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0,0&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
==Switch==&lt;br /&gt;
&lt;br /&gt;
A switch is a lever that does not require the user to &#039;drag&#039; it with the mouse - it operates on a click only. This is used for smaller controls that are &#039;on&#039; or &#039;off&#039;, and do not have intermediate positions. Parameters are much like they are for a &#039;lever&#039;, only a switch should only have two notches - on and off.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, some things you&#039;d normally associate with being a &#039;switch&#039; (e.g. the headlight switch control) require mulitple positions, and will need to remain as a &#039;lever&#039; in order to allow the player to set the correct position for the control.&lt;br /&gt;
&lt;br /&gt;
An example of a switch would be:&lt;br /&gt;
&lt;br /&gt;
   switch1&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;switch&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;switch.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.switch1&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     angles                              1.4,0&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0,0&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
As &#039;switch&#039; was introduced in TS2009 SP2, interiors that use kind &#039;switch&#039; controls should be marked trainz-build 3.1 or later in the config.txt.&lt;br /&gt;
&lt;br /&gt;
==button==&lt;br /&gt;
&lt;br /&gt;
A button is a momentary contact press-and-hold button. This is a brand new control added for TS12 patch 2, released end of june 2011. Content using this feature should have trainz-build 3.6 or later in the config.txt.&lt;br /&gt;
&lt;br /&gt;
Finally this brings Trainz the &amp;quot;click to press&amp;quot;, &amp;quot;hold to hold pressed&amp;quot;, &amp;quot;let go to release&amp;quot; style momentary pushbutton. &lt;br /&gt;
&lt;br /&gt;
   button1&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;button&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;switch.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.switch1&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     angles                              0,0.1&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0,0&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Pull rope==&lt;br /&gt;
&lt;br /&gt;
This is a linear pull rope control. Unlike the rotating controls discussed previously, this control type moves the mesh linearly along the Z axis of the attachment. It behaves as you would expect from a suspended rope - click and drag to pull, let go to release. It will spring back to it&#039;s initial position in the same manner as kind &#039;pulllever&#039;.&lt;br /&gt;
&lt;br /&gt;
[[File:Pullropetype.png|800px]]]&lt;br /&gt;
&lt;br /&gt;
   horn&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;pullrope&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;horn_rope.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.horn&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     angles                              0.1,0&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0,0&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
==needle==&lt;br /&gt;
&lt;br /&gt;
A needle is the standard Trainz output device. Like the lever, it is based on rotational movement, and any gauge, dial, or other output device based on rotational movement can be implemented. Any static part of the gauge should be modelled as part of the cab, and only the moving part as part of the needle. Like the lever, the rotation will be around the Z axis of the needle, and it is common practice to point the point of the needle along the Y axis. Cabs often have a number of similar gauges, and re-using the same needle repeatedly in each gauge is a lot easier if this setup is done consistently.&lt;br /&gt;
&lt;br /&gt;
As an example of a needle, here is a basic speedometer:&lt;br /&gt;
&lt;br /&gt;
   speedo_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;speedo_needle.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.speedo_needle&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,67.056&lt;br /&gt;
     angles                              0,4.712&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
The default cab script knows to move the &amp;quot;speedo_needle&amp;quot; object as the train speed changes, so simply by naming this control &amp;quot;speedo_needle&amp;quot;, it has become a speedometer.&lt;br /&gt;
&lt;br /&gt;
For a speedo, the &#039;limits&#039; values will be the minimum and maximum reportable speed in m/s.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Creating other rotational gauges is similar - refer to the [[%22mesh-table%22_container_(interior_version)|mesh-table (interior version)]] documentation to see all the different values that Trainz can show by default.&lt;br /&gt;
&lt;br /&gt;
==light==&lt;br /&gt;
&lt;br /&gt;
Another common type of control is a light. This is created simply as a textured plane, which is either hidden or shown to represent light off or light on. It is attached as any other standard mesh attachment would be - there is no rotation to worry about here.&lt;br /&gt;
&lt;br /&gt;
   wheelslip_light&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;light&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;wheelslip_light.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.wheelslip_light&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
This light will be used to show wheelslip in a default cab. &lt;br /&gt;
&lt;br /&gt;
==animated-lever==&lt;br /&gt;
&lt;br /&gt;
If you want more complex movement than simple rotation, you have the option of animating the lever and using kind &#039;animated-lever&#039;. This will use an animation you create in your modelling program to move the control about. An example of this is visible in the MN ACMU cab. (I&#039;ve reduced the number of notches here for readability - the real one has 32, not 16).&lt;br /&gt;
&lt;br /&gt;
   throttle_lever&lt;br /&gt;
   {&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;throttlehandle.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     anim                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;throttlehandle.kin&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.throttlelever&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,16&lt;br /&gt;
     notches                             0,0.0625,0.125,0.1875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.8125,0.75,0.875,0.9375,1&lt;br /&gt;
     notchheight                         1,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,1&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
     kind                                &amp;quot;animated-lever&amp;quot;&lt;br /&gt;
     test-collisions                     0&lt;br /&gt;
     mousespeed                          1&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
Where the standard lever is rotated between it&#039;s angles to move from notch to notch, the animated-lever has it&#039;s animation played to the corresponding frame.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===collision-proxy===&lt;br /&gt;
&lt;br /&gt;
Animated levers can be hard to grab hold of compared to normal levers. To get around this, an invisible mesh is used to show the game the range of movement the control has, and to allow the user to grab the lever more easily. This example again comes from the MN ACMU cab:&lt;br /&gt;
&lt;br /&gt;
   throttle-collision-box&lt;br /&gt;
   {&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;throttlehandleselection.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att-parent                          &amp;quot;throttle_lever&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.selection_box&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     kind                                &amp;quot;collision-proxy&amp;quot;&lt;br /&gt;
     opacity                             0&lt;br /&gt;
     collision-parent                    &amp;quot;throttle_lever&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
==animated-dial==&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve been paying attention to levers, needles and animated levers, I think you can guess where we are going with this one. This is an animated needle. Instead of rotating between the angles specified, it plays it&#039;s animation to the relevant frame to show the value. Use this when what you want to achieve can&#039;t be done with simple rotational movement.&lt;br /&gt;
&lt;br /&gt;
(Example usage for this control to follow).&lt;br /&gt;
&lt;br /&gt;
==digital-dial==&lt;br /&gt;
&lt;br /&gt;
Some locomotives use a digital readout rather than analogue dials.&lt;br /&gt;
&lt;br /&gt;
Trainz has two control kinds to support digital displays - one for speed units, and one for pressure units. Instead of angles of movement, these both have some font specific options to configure how the digits appear.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;font&amp;quot; defines the typeface. For a list of valid typefaces, see the [[%22mesh-table%22_container_(interior_version)#font|mesh-table (interior version)]] documentation. Generally this follows closely with a number of default windows font names.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;fontsize&amp;quot; defines the size of the font. The default value for this is 0.02, and this is a pretty respectable size display.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;fontcolor&amp;quot; defines the RGB color of the text. Each value is a floating point number between 0.0 and 1.0.&lt;br /&gt;
&lt;br /&gt;
===digital-dial-spd===&lt;br /&gt;
&lt;br /&gt;
For a speedometer (or any other gauge that shows units in speed, e.g. a speed limit display), use kind &#039;digital-dial-spd&#039;.&lt;br /&gt;
&lt;br /&gt;
An example speedometer using this kind would be declared as:&lt;br /&gt;
&lt;br /&gt;
   speedo_needle2&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;digital-dial-spd&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.digispeedo&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     font                                &amp;quot;arial&amp;quot;&lt;br /&gt;
     fontsize                            0.01&lt;br /&gt;
     fontcolor                           1.0,1.0,1.0&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
===digital-dial-prs===&lt;br /&gt;
&lt;br /&gt;
For a display using pressure units, use digital-dial-prs. This is a digital brake pipe pressure gauge:&lt;br /&gt;
&lt;br /&gt;
   bptrainbrakepipe_needle2&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;digital-dial-prs&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.trainpipe_pressure&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     font                                &amp;quot;arial&amp;quot;&lt;br /&gt;
     fontsize                            0.01&lt;br /&gt;
     fontcolor                           0.0,1.0,0.0&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
==firebox==&lt;br /&gt;
&lt;br /&gt;
The firebox control is a special kind to implement the fire of a steam locomotive.&lt;br /&gt;
&lt;br /&gt;
(Further information about this specific control to follow).&lt;br /&gt;
&lt;br /&gt;
Note:  Some steam cab interior models use the firebox, fireglow and burning coal effects found in the Auran PB15 cab interior.  This can cause quite severe flickering effects in some models  The intensity of flickering varies on the textures used and can be attenuated by use of darker colours.  The flickering can be eliminated by not using the firebox effect.  The fireglow and burning coal (coal) effects are OK.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note: This feature does not work currently in T:ANE and TRS19.&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can, of course, always make your own.&lt;br /&gt;
&lt;br /&gt;
=Scripting additional behaviour in a cab=&lt;br /&gt;
&lt;br /&gt;
A lot can be achieved in Trainz purely by naming the controls correctly and relying on Trainz default cab scripts to make them work. A quite reasonable cab can be made for many locomotives without having to do any scripting whatsoever.&lt;br /&gt;
&lt;br /&gt;
However, a lot more realism can be achieved by scripting the cab. Additional features can be added beyond what Trainz supports, including new types of controls, or extended behaviour on existing controls.&lt;br /&gt;
&lt;br /&gt;
The first thing to consider when looking at scripting a cab, is &amp;quot;is the cab the best place for this feature?&amp;quot;. A cab is not a persistent asset, which means it can go away at any point. When it&#039;s gone, it isn&#039;t running it&#039;s script. Consequently, it is a bad place for any persistent or time based logic - it should only be used to script the immediate behaviour of the controls. Anything beyond this should be implemented the vehicle itself or possibly a script library, both of which are more persistent objects.&lt;br /&gt;
&lt;br /&gt;
If all you want to achieve is to add some simple extra features (e.g. a display of signal aspects within the cab), you can derive from the trainz standard classes, and inherit the default behaviour when adding your new behaviour. This means you can concentrate on just your extra feature, and don&#039;t have to worry about making existing functionality work.&lt;br /&gt;
&lt;br /&gt;
If you want to do something a little more advanced (e.g. change the behaviour of the throttle and/or brake controllers), then you are probably best deriving your cab script from the &#039;cabin&#039; class, ignoring the default cab scripts, and implementing your required behaviour from scratch. This gives you a lot more control, but you do need to do more yourself.&lt;br /&gt;
&lt;br /&gt;
For some examples of the first route, have a look at the MN cabs - the M7 or the ACMU are good examples. Both have a cab signal repeater implemented in the cab interior script, and use the base functionality for almost everything else.&lt;br /&gt;
&lt;br /&gt;
-~= To Be Continued... =~-&lt;br /&gt;
&lt;br /&gt;
==Return to Index==&lt;br /&gt;
 &lt;br /&gt;
[[HowToGuides|&amp;lt;&amp;lt; How To Guides]]&lt;br /&gt;
&lt;br /&gt;
[[Category:How-to guides]]&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=HowTo/Build_a_cab_interior&amp;diff=23699</id>
		<title>HowTo/Build a cab interior</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=HowTo/Build_a_cab_interior&amp;diff=23699"/>
		<updated>2020-06-10T20:55:40Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: /* Lever */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Trainz uses an [[KIND_Interior|interior]] object to represent a locomotive cab, or view from another vehicle, e.g. a passenger coach, brake van or caboose. Interiors can also be attached to some non-train assets. For this howto, I am going to assume that we are creating a traincar interior, and focus primarily on a cab interior for a diesel or electric locomotive.&lt;br /&gt;
&lt;br /&gt;
=Basic structure=&lt;br /&gt;
&lt;br /&gt;
The basic structure of a cab is quite similar to a number of different assets. You will have a main mesh with a number of attached sub-meshes, which are arranged using a [[%22mesh-table%22_container_(interior_version)|mesh-table]].&lt;br /&gt;
&lt;br /&gt;
The main cab mesh typically consists of the interior walls, roof and floor of the cab, the control desk or stand, all furniture or other static objects visible inside the cab, and also all parts of the locomotive exterior that are visible from inside the cab - e.g. the top of any projecting nose below the cab windows. Remember to consider the sightlines out of rear windows too for visible bodywork panels - the user can move around the cab and rotate the camera to any angle. Users are not restricted to looking forward out of the front windows only.&lt;br /&gt;
&lt;br /&gt;
=Artwork considerations=&lt;br /&gt;
&lt;br /&gt;
There are some differences in style between the construction of an interior object and a typical trainz object.&lt;br /&gt;
&lt;br /&gt;
Except in very specific circumstances, there will not be more than one interior object in existence at any time, and that interior is always viewed from very close range - the user is inside it. Because of this, interiors are typically modelled with a high polygon count and with high resolution textures, to give an impressive visual feel. LOD is not used, as the user never gets far enough away from the interior for LOD techniques to have worthwhile benefit.&lt;br /&gt;
&lt;br /&gt;
Trainz lights interior objects differently to map objects like buildings and other scenery - the main illumination is ambient, not directional. (A steam loco does have a directional light coming from the firebox, but a diesel or electric cab typically has no directional light inside, and relies entirely on ambient illumination).&lt;br /&gt;
&lt;br /&gt;
With ambient illumination, effects such as normal and specular mapping do not have much (if any) effect. Because of this, more effort needs to be put into the diffuse texture for a cab interior than would normally be applied to Trainz objects. Drawing or baking shadows and other effects into the diffuse textures is required to produce a nice looking cab interior.&lt;br /&gt;
&lt;br /&gt;
An example cab would be the [[File:PB_interior.rar]]&lt;br /&gt;
&lt;br /&gt;
=A basic config file=&lt;br /&gt;
&lt;br /&gt;
The minimal required config for an interior to show in-game is:&lt;br /&gt;
&lt;br /&gt;
 kind                                    interior&lt;br /&gt;
 kuid                                    &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&amp;lt;kuid2:YOUR:KUID:HERE&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
 trainz-build                            2.9&lt;br /&gt;
 username                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Your interior name here&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
 category-class                          ZI&lt;br /&gt;
 &lt;br /&gt;
 mesh-table&lt;br /&gt;
 {&lt;br /&gt;
   default&lt;br /&gt;
   {&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;your_interior_mesh_name.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Note: There are also other base tags that should be added that are common to all asset types - e.g. the download station will require a valid thumbnails container before the asset can be uploaded. See the documentation for [[KIND TrainzBaseSpec]] for details of tags which apply to all trainz assets. Depending on which Trainz version you have and which trainz-build number you have specified, some of these may be required - content manager will tell you what is required, listing missing tags as errors.&lt;br /&gt;
&lt;br /&gt;
==camera positions==&lt;br /&gt;
&lt;br /&gt;
If we load a cab up with that config file, we will note that the view is not particularly appealing. Chances are we&#039;re right down near the floor. To fix this, we need to define some default positions for camera views. This is done with the [[%22cameralist%22_Container|cameralist container]] and the [[KIND_Interior#cameradefault|cameradefault]] tag.&lt;br /&gt;
Add the following to your config.txt file:&lt;br /&gt;
&lt;br /&gt;
 cameralist&lt;br /&gt;
 {&lt;br /&gt;
   camera0                               0,0,2,0,0&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 cameradefault                           0&lt;br /&gt;
&lt;br /&gt;
The cameralist container can contain any number of cameras, but they must be numbered sequentially and start at zero.&lt;br /&gt;
&lt;br /&gt;
The five numbers are the X, Y and Z coordinates of the camera in metres relative to the 0,0,0 point of the interior mesh, and the Yaw and Pitch in radians. Luckily you don&#039;t have to work these values out from scratch - add the line &amp;quot;-freeintcam&amp;quot; to your trainzoptions.txt file, and you can move the camera about in the cab with the mouse and keyboard, and the precise position will be displayed in the bottom right corner.&lt;br /&gt;
&lt;br /&gt;
When you have found a position you like, write the numbers down. When you&#039;ve got a good selection of positions recorded, add them to the cameralist container.&lt;br /&gt;
&lt;br /&gt;
You may wish to return to this and tweak the values later once all the controls are in place - but it&#039;s handy to have a good starting position for the camera while testing.&lt;br /&gt;
&lt;br /&gt;
=Cab controls=&lt;br /&gt;
&lt;br /&gt;
A locomotive cab interior needs working cab controls. What fun would sitting in the drivers seat be without being able to pull on the levers, change the switches, and watch the gauges and dials move?&lt;br /&gt;
&lt;br /&gt;
The moving part of each lever, switch, gauge or dial is created as a separate mesh, which is then attached to the cab with an attachment point. (The static part, e.g. guide rails for levers, should be part of the cab mesh itself).&lt;br /&gt;
&lt;br /&gt;
==Lever==&lt;br /&gt;
&lt;br /&gt;
The lever is the basic input device in a cab. It is based on rotational movement, and any object that requires rotational movement (e.g. a wheel or ring) can be implemented as a lever.&lt;br /&gt;
&lt;br /&gt;
If you actually want linear movement, you can still use a lever - just move the attachment point a long way away - e.g. 10 or 20 metres away from the control. The resulting small arc will not be noticable over the length of movement. As an example, sliding windows in Trainz cabs have been implemented as levers &amp;quot;attached&amp;quot; something like 10 or 20 metres out to the side of the vehicle for a long time. (The exception to this is a horn pull rope - trainz provides a control specifically for this purpose).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will need to create the lever in your modelling program aligned correctly - the rotation needs to be around the Z axis, and main part of the object will point along the Y axis.&lt;br /&gt;
&lt;br /&gt;
When adding the attachment point to the main mesh, align it so the Z axis is the axis of rotation. It is common to point the Y axis at the default position - e.g. levers in the &#039;off&#039; or &#039;neutral&#039; position, and needles pointing to zero. This is not strictly required, as the range of movement can be adjusted at both ends, but it provides a handy reference when creating the config file.&lt;br /&gt;
&lt;br /&gt;
[[File:BasicLeverSetup.png|350px|thumb|An example of a lever being used as a signboard cover.]]&lt;br /&gt;
&lt;br /&gt;
It is worth noting that you can reuse a mesh for multiple attachments. This is particularly useful for switches, as identical appearance switches are often used repeatedly in a cab for different purposes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Throttle Lever===&lt;br /&gt;
&lt;br /&gt;
A good example of a standard lever in use is a locomotive throttle control. A typical US diesel throttle has 9 notched positions (from 0 to 8 inclusive).&lt;br /&gt;
&lt;br /&gt;
As noted above, the lever is created in the modelling package so it points along the Y axis and the axis of rotation is along the Z axis. The attachment point is added to the cab interior mesh at the correct position, and rotated so the Z axis is aligned with the axis of rotation, and the Y axis points to the default position.&lt;br /&gt;
&lt;br /&gt;
Now we need to add an entry to the config file to add our throttle lever.&lt;br /&gt;
&lt;br /&gt;
Into the mesh table, add an entry like this:&lt;br /&gt;
&lt;br /&gt;
   throttle_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;throttle_lever.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.throttle_lever&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,8&lt;br /&gt;
     angles                              0,1.57&lt;br /&gt;
     notches                             0,0.125,0.25,0.375,0.5,0.625,0.75,0.875,1&lt;br /&gt;
     notchheight                         1,2,2,2,2,2,2,2,1&lt;br /&gt;
     radius                              0.35&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
... remember to set your attachment point and mesh name correctly.&lt;br /&gt;
&lt;br /&gt;
The &#039;angles&#039; line defines how far the control rotates. It is in radians - there are 2 x Pi (6.28) radians in a complete circle. My default of 1.57 will give you about 90 degrees of rotation, in the positive direction. Adjust this number to get the control to rotate the correct amount. You should be able to work out the number you need in your modelling program by using the rotate tool on the attachment point, and recording the amount of rotation required to move to the intended maximum location. It should not require significant trial and error.&lt;br /&gt;
&lt;br /&gt;
The &#039;radius&#039; line defines the position of the notch position overlay and the text label. It is in metres. If the overlay is too close in, increase this number. If it is too far out, decrease it.&lt;br /&gt;
&lt;br /&gt;
If the lever is the wrong way round (notch 8 is at the wrong end), swap the numbers in the &#039;angles&#039; tag over, so the higher one is first.&lt;br /&gt;
&lt;br /&gt;
If the lever moves the wrong way when you drag it with the mouse (i.e. it goes left in response to a right drag), add the line:&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
This will invert the mouse movement.&lt;br /&gt;
&lt;br /&gt;
The fact we called this lever &amp;quot;throttle_lever&amp;quot; means it will be used to control the throttle by the default cab script.&lt;br /&gt;
&lt;br /&gt;
So what happens if we wanted a different number of notches? Below is an example of a throttle which has 22 notches. The second value in the &#039;limits&#039; tag has been edited to return up to notch 22, and more entries have been added to the &#039;notches&#039; and &#039;notchheight&#039; tags:&lt;br /&gt;
&lt;br /&gt;
   throttle_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;throttle_lever.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.throttle_lever&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,22&lt;br /&gt;
     angles                              0,0.94&lt;br /&gt;
     notches                             0,0.045,0.091,0.136,0.182,0.227,0.273,0.318,0.364,0.409,0.455,0.5,0.545,0.591,0.636,0.682,0.727,0.773,0.818,0.864,0.909,0.955,1&lt;br /&gt;
     notchheight                         1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1&lt;br /&gt;
     radius                              0.35&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Reverser Lever===&lt;br /&gt;
&lt;br /&gt;
The reverser lever is created in a similar manner to throttle lever. The mesh table entry for this will look like:&lt;br /&gt;
&lt;br /&gt;
   reverser_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;reverser_lever.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.reverser_lever&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,2&lt;br /&gt;
     angles                              -0.79,0.79&lt;br /&gt;
     notches                             0,0.5,1&lt;br /&gt;
     notchheight                         1,1,1&lt;br /&gt;
     radius                              0.25&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
In this case, because the &#039;angles&#039; entry has a range both positive and negative, the lever can move in both directions relative to the attachment point. The game will set the default position to neutral (1), so if you&#039;ve lined up your attachment point at one end, don&#039;t worry - you can use angles which range from zero if you need to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Train Air Brake Lever===&lt;br /&gt;
&lt;br /&gt;
There are two types of train air brake lever. A given locomotive only has one type - the brakes are either require manual lapping or are self-lapping. Use the appropriate name and configuration for the loco you are modelling.&lt;br /&gt;
&lt;br /&gt;
====Manual Lapped Brakes====&lt;br /&gt;
&lt;br /&gt;
The manual train brake lever has five positions numbered from zero to four, each one representing a different function. Those functions are Release, Lap, Application, Emergency and Handle Off respectively.&lt;br /&gt;
&lt;br /&gt;
A lever for a manual lap train air brake is defined as follows:&lt;br /&gt;
&lt;br /&gt;
   trainbrakelap_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;train_brake_lap_lever.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.train_brake_lap_lever&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,4&lt;br /&gt;
     angles                              0,0.94&lt;br /&gt;
     notches                             0,0.25,0.5,0.75,1&lt;br /&gt;
     notchheight                         1,1,1,1,1&lt;br /&gt;
     radius                              0.25&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
In this case, the attachment for the lever has been created in the &#039;release&#039; position. If it had been created in the &#039;handle off&#039; position, the angle tag would have been more like:&lt;br /&gt;
&lt;br /&gt;
     angles                             -0.94,0&lt;br /&gt;
&lt;br /&gt;
====Self Lapping Brakes====&lt;br /&gt;
&lt;br /&gt;
A self lapping trainbrake lever has a number of primary notches similar to the manual lap train brake lever. However, instead of a &#039;lap&#039; and &#039;apply&#039; position, it has a grade of application between the &#039;initial&#039; and &#039;full application&#039; positions. An example of a self-lapping brake handle is this one:&lt;br /&gt;
&lt;br /&gt;
   trainbrake_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;train_brake_lever.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.train_brake_lever&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,4&lt;br /&gt;
     angles                              0,0.94&lt;br /&gt;
     notches                             0,0.25,0.27,0.29,0.31,0.33,0.35,0.37,0.39,0.41,0.43,0.45,0.47,0.49,0.5,0.75,1&lt;br /&gt;
     notchheight                         1,1,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1&lt;br /&gt;
     radius                              0.25&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
In this case, there are 14 possible levels of brake application - initial at 0.25, 12 intermediate levels, and full application at 0.5. There is no restriction on the number of intermediate levels - if you are modelling a prototype brake handle with a specific number, you may create precisely that number of notches and arrange them between 0.25 and 0.5 as required.&lt;br /&gt;
&lt;br /&gt;
===Combined throttle brake lever===&lt;br /&gt;
&lt;br /&gt;
There is also another control option - a combined throttle brake lever. This type of control is often found on multiple unit trains. This control is split into two halves. The first half of the movement is an inverted throttle - i.e. max power at zero, no power at 0.5. The second half is an auto lapped train brake application, with 0.5 as release, and 1.0 as emergency.  An example of how to configure a combined throttle and brake lever is below:&lt;br /&gt;
&lt;br /&gt;
   throttle_brake_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;throttle_brake_handle.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.throttle_brake_handle&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,16&lt;br /&gt;
     angles                              0.94,-0.94&lt;br /&gt;
     notches                             0,0.0625,0.125,0.1875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.8125,0.75,0.875,0.9375,1&lt;br /&gt;
     notchheight                         1,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,1&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
     radius                              0.12&lt;br /&gt;
     invert                              1&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
Unfortunately, trains that use this type of control generally use blended and/or EP brakes, and this control uses the standard Trainz air brake, which operates in a distinctly different manner, and as a result, can feel very wrong for this control type. (See the section on scripting controls for how a better combined brake and throttle lever may be implemented).&lt;br /&gt;
&lt;br /&gt;
==Pull lever==&lt;br /&gt;
&lt;br /&gt;
This is a sprung lever. You pull on this lever to activate it, and when you let it go, it returns to the original position. This kind of action is commonly associated with a locomotive horn, and this is what I am using as an example:&lt;br /&gt;
&lt;br /&gt;
   horn&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;pulllever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;horn.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.horn&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     angles                              0,-0.55&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     radius                              -0.02&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0,0&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
==Switch==&lt;br /&gt;
&lt;br /&gt;
A switch is a lever that does not require the user to &#039;drag&#039; it with the mouse - it operates on a click only. This is used for smaller controls that are &#039;on&#039; or &#039;off&#039;, and do not have intermediate positions. Parameters are much like they are for a &#039;lever&#039;, only a switch should only have two notches - on and off.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, some things you&#039;d normally associate with being a &#039;switch&#039; (e.g. the headlight switch control) require mulitple positions, and will need to remain as a &#039;lever&#039; in order to allow the player to set the correct position for the control.&lt;br /&gt;
&lt;br /&gt;
An example of a switch would be:&lt;br /&gt;
&lt;br /&gt;
   switch1&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;switch&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;switch.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.switch1&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     angles                              1.4,0&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0,0&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
As &#039;switch&#039; was introduced in TS2009 SP2, interiors that use kind &#039;switch&#039; controls should be marked trainz-build 3.1 or later in the config.txt.&lt;br /&gt;
&lt;br /&gt;
==button==&lt;br /&gt;
&lt;br /&gt;
A button is a momentary contact press-and-hold button. This is a brand new control added for TS12 patch 2, released end of june 2011. Content using this feature should have trainz-build 3.6 or later in the config.txt.&lt;br /&gt;
&lt;br /&gt;
Finally this brings Trainz the &amp;quot;click to press&amp;quot;, &amp;quot;hold to hold pressed&amp;quot;, &amp;quot;let go to release&amp;quot; style momentary pushbutton. &lt;br /&gt;
&lt;br /&gt;
   button1&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;button&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;switch.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.switch1&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     angles                              0,0.1&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0,0&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Pull rope==&lt;br /&gt;
&lt;br /&gt;
This is a linear pull rope control. Unlike the rotating controls discussed previously, this control type moves the mesh linearly along the Z axis of the attachment. It behaves as you would expect from a suspended rope - click and drag to pull, let go to release. It will spring back to it&#039;s initial position in the same manner as kind &#039;pulllever&#039;.&lt;br /&gt;
&lt;br /&gt;
[[File:Pullropetype.png|800px]]]&lt;br /&gt;
&lt;br /&gt;
   horn&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;pullrope&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;horn_rope.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.horn&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     angles                              0.1,0&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0,0&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
==needle==&lt;br /&gt;
&lt;br /&gt;
A needle is the standard Trainz output device. Like the lever, it is based on rotational movement, and any gauge, dial, or other output device based on rotational movement can be implemented. Any static part of the gauge should be modelled as part of the cab, and only the moving part as part of the needle. Like the lever, the rotation will be around the Z axis of the needle, and it is common practice to point the point of the needle along the Y axis. Cabs often have a number of similar gauges, and re-using the same needle repeatedly in each gauge is a lot easier if this setup is done consistently.&lt;br /&gt;
&lt;br /&gt;
As an example of a needle, here is a basic speedometer:&lt;br /&gt;
&lt;br /&gt;
   speedo_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;speedo_needle.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.speedo_needle&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,67.056&lt;br /&gt;
     angles                              0,4.712&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
The default cab script knows to move the &amp;quot;speedo_needle&amp;quot; object as the train speed changes, so simply by naming this control &amp;quot;speedo_needle&amp;quot;, it has become a speedometer.&lt;br /&gt;
&lt;br /&gt;
For a speedo, the &#039;limits&#039; values will be the minimum and maximum reportable speed in m/s.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Creating other rotational gauges is similar - refer to the [[%22mesh-table%22_container_(interior_version)|mesh-table (interior version)]] documentation to see all the different values that Trainz can show by default.&lt;br /&gt;
&lt;br /&gt;
==light==&lt;br /&gt;
&lt;br /&gt;
Another common type of control is a light. This is created simply as a textured plane, which is either hidden or shown to represent light off or light on. It is attached as any other standard mesh attachment would be - there is no rotation to worry about here.&lt;br /&gt;
&lt;br /&gt;
   wheelslip_light&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;light&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;wheelslip_light.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.wheelslip_light&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
This light will be used to show wheelslip in a default cab. &lt;br /&gt;
&lt;br /&gt;
==animated-lever==&lt;br /&gt;
&lt;br /&gt;
If you want more complex movement than simple rotation, you have the option of animating the lever and using kind &#039;animated-lever&#039;. This will use an animation you create in your modelling program to move the control about. An example of this is visible in the MN ACMU cab. (I&#039;ve reduced the number of notches here for readability - the real one has 32, not 16).&lt;br /&gt;
&lt;br /&gt;
   throttle_lever&lt;br /&gt;
   {&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;throttlehandle.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     anim                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;throttlehandle.kin&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.throttlelever&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,16&lt;br /&gt;
     notches                             0,0.0625,0.125,0.1875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.8125,0.75,0.875,0.9375,1&lt;br /&gt;
     notchheight                         1,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,1&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
     kind                                &amp;quot;animated-lever&amp;quot;&lt;br /&gt;
     test-collisions                     0&lt;br /&gt;
     mousespeed                          1&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
Where the standard lever is rotated between it&#039;s angles to move from notch to notch, the animated-lever has it&#039;s animation played to the corresponding frame.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===collision-proxy===&lt;br /&gt;
&lt;br /&gt;
Animated levers can be hard to grab hold of compared to normal levers. To get around this, an invisible mesh is used to show the game the range of movement the control has, and to allow the user to grab the lever more easily. This example again comes from the MN ACMU cab:&lt;br /&gt;
&lt;br /&gt;
   throttle-collision-box&lt;br /&gt;
   {&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;throttlehandleselection.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att-parent                          &amp;quot;throttle_lever&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.selection_box&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     kind                                &amp;quot;collision-proxy&amp;quot;&lt;br /&gt;
     opacity                             0&lt;br /&gt;
     collision-parent                    &amp;quot;throttle_lever&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
==animated-dial==&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve been paying attention to levers, needles and animated levers, I think you can guess where we are going with this one. This is an animated needle. Instead of rotating between the angles specified, it plays it&#039;s animation to the relevant frame to show the value. Use this when what you want to achieve can&#039;t be done with simple rotational movement.&lt;br /&gt;
&lt;br /&gt;
(Example usage for this control to follow).&lt;br /&gt;
&lt;br /&gt;
==digital-dial==&lt;br /&gt;
&lt;br /&gt;
Some locomotives use a digital readout rather than analogue dials.&lt;br /&gt;
&lt;br /&gt;
Trainz has two control kinds to support digital displays - one for speed units, and one for pressure units. Instead of angles of movement, these both have some font specific options to configure how the digits appear.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;font&amp;quot; defines the typeface. For a list of valid typefaces, see the [[%22mesh-table%22_container_(interior_version)#font|mesh-table (interior version)]] documentation. Generally this follows closely with a number of default windows font names.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;fontsize&amp;quot; defines the size of the font. The default value for this is 0.02, and this is a pretty respectable size display.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;fontcolor&amp;quot; defines the RGB color of the text. Each value is a floating point number between 0.0 and 1.0.&lt;br /&gt;
&lt;br /&gt;
===digital-dial-spd===&lt;br /&gt;
&lt;br /&gt;
For a speedometer (or any other gauge that shows units in speed, e.g. a speed limit display), use kind &#039;digital-dial-spd&#039;.&lt;br /&gt;
&lt;br /&gt;
An example speedometer using this kind would be declared as:&lt;br /&gt;
&lt;br /&gt;
   speedo_needle2&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;digital-dial-spd&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.digispeedo&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     font                                &amp;quot;arial&amp;quot;&lt;br /&gt;
     fontsize                            0.01&lt;br /&gt;
     fontcolor                           1.0,1.0,1.0&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
===digital-dial-prs===&lt;br /&gt;
&lt;br /&gt;
For a display using pressure units, use digital-dial-prs. This is a digital brake pipe pressure gauge:&lt;br /&gt;
&lt;br /&gt;
   bptrainbrakepipe_needle2&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;digital-dial-prs&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.trainpipe_pressure&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     font                                &amp;quot;arial&amp;quot;&lt;br /&gt;
     fontsize                            0.01&lt;br /&gt;
     fontcolor                           0.0,1.0,0.0&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
==firebox==&lt;br /&gt;
&lt;br /&gt;
The firebox control is a special kind to implement the fire of a steam locomotive.&lt;br /&gt;
&lt;br /&gt;
(Further information about this specific control to follow).&lt;br /&gt;
&lt;br /&gt;
Note:  Some steam cab interior models use the firebox, fireglow and burning coal effects found in the Auran PB15 cab interior.  This can cause quite severe flickering effects in some models  The intensity of flickering varies on the textures used and can be attenuated by use of darker colours.  The flickering can be eliminated by not using the firebox effect.  The fireglow and burning coal (coal) effects are OK.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note: This feature does not work currently in T:ANE and TRS19.&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can, of course, always make your own.&lt;br /&gt;
&lt;br /&gt;
=Scripting additional behaviour in a cab=&lt;br /&gt;
&lt;br /&gt;
A lot can be achieved in Trainz purely by naming the controls correctly and relying on Trainz default cab scripts to make them work. A quite reasonable cab can be made for many locomotives without having to do any scripting whatsoever.&lt;br /&gt;
&lt;br /&gt;
However, a lot more realism can be achieved by scripting the cab. Additional features can be added beyond what Trainz supports, including new types of controls, or extended behaviour on existing controls.&lt;br /&gt;
&lt;br /&gt;
The first thing to consider when looking at scripting a cab, is &amp;quot;is the cab the best place for this feature?&amp;quot;. A cab is not a persistent asset, which means it can go away at any point. When it&#039;s gone, it isn&#039;t running it&#039;s script. Consequently, it is a bad place for any persistent or time based logic - it should only be used to script the immediate behaviour of the controls. Anything beyond this should be implemented the vehicle itself or possibly a script library, both of which are more persistent objects.&lt;br /&gt;
&lt;br /&gt;
If all you want to achieve is to add some simple extra features (e.g. a display of signal aspects within the cab), you can derive from the trainz standard classes, and inherit the default behaviour when adding your new behaviour. This means you can concentrate on just your extra feature, and don&#039;t have to worry about making existing functionality work.&lt;br /&gt;
&lt;br /&gt;
If you want to do something a little more advanced (e.g. change the behaviour of the throttle and/or brake controllers), then you are probably best deriving your cab script from the &#039;cabin&#039; class, ignoring the default cab scripts, and implementing your required behaviour from scratch. This gives you a lot more control, but you do need to do more yourself.&lt;br /&gt;
&lt;br /&gt;
For some examples of the first route, have a look at the MN cabs - the M7 or the ACMU are good examples. Both have a cab signal repeater implemented in the cab interior script, and use the base functionality for almost everything else.&lt;br /&gt;
&lt;br /&gt;
-~= To Be Continued... =~-&lt;br /&gt;
&lt;br /&gt;
==Return to Index==&lt;br /&gt;
 &lt;br /&gt;
[[HowToGuides|&amp;lt;&amp;lt; How To Guides]]&lt;br /&gt;
&lt;br /&gt;
[[Category:How-to guides]]&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=File:BasicLeverSetup.png&amp;diff=23698</id>
		<title>File:BasicLeverSetup.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=File:BasicLeverSetup.png&amp;diff=23698"/>
		<updated>2020-06-10T20:48:51Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=%22mesh-table%22_container_(interior_version)&amp;diff=23697</id>
		<title>&quot;mesh-table&quot; container (interior version)</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=%22mesh-table%22_container_(interior_version)&amp;diff=23697"/>
		<updated>2020-06-10T20:39:59Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: Added more entries to the Steam cabin entries and organized by lever and needle type.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &amp;quot;mesh-table&amp;quot; container is a top-level [[config.txt file]] entry used by various [[Content_Configuration#Content_Types|Content Types]]. Refer to the [[&amp;quot;mesh-table&amp;quot; Container]] documentation for the standard tags - this document only describes the extensions available within the mesh table when it is used in a [[KIND_Interior|cab interior]] asset.&lt;br /&gt;
&lt;br /&gt;
Most of the entries in a mesh-table for an interior will be cab controls. A cab control has a single value associated with it, which could be an input (e.g. a lever position) or an output (a dial or gauge position).&lt;br /&gt;
&lt;br /&gt;
=Standard Mesh Names=&lt;br /&gt;
&lt;br /&gt;
There are a number of standard mesh names that the trainz default cab script uses for it&#039;s controls. For a Diesel or Electric cab (either unscripted, or scripted and inheriting from the DefaultLocomotiveCabin class), the following are the default mesh names:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Needles:&#039;&#039;&#039;&lt;br /&gt;
* speedo_needle -- speedometer&lt;br /&gt;
* speedo_needle2 -- speedometer&lt;br /&gt;
* bplocomain_needle -- loco main reservoir pressure gauge&lt;br /&gt;
* bptrainbrakecylinder_needle -- locomotive brake cylinder pressure gauge&lt;br /&gt;
* bptrainbrakecylinder_needle2 -- locomotive brake cylinder pressure gauge&lt;br /&gt;
* no3pipe_needle -- brake pressure gauge (currently loco brake cylinder -- but maybe intended for something else?)&lt;br /&gt;
* bptrainbrakecylinder2_needle -- brake pressure gauge (source unknown)&lt;br /&gt;
* bptrainbrakepipe_needle -- train brake pipe pressure gauge&lt;br /&gt;
* bptrainbrakepipe_needle2 -- train brake pipe pressure gauge&lt;br /&gt;
* bploco_equaliser -- brake equaliser pressure gauge&lt;br /&gt;
* flow_needle -- brake flow rate gauge&lt;br /&gt;
* ampmeter_needle -- traction ammeter gauge&lt;br /&gt;
* ampmeter2_needle -- traction ammeter gauge&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Levers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* throttle_lever -- throttle lever control&lt;br /&gt;
* reverser_lever -- reverser lever control&lt;br /&gt;
* trainbrake_lever -- self-lapping train brake control&lt;br /&gt;
* trainbrakelap_lever -- non self-lapping train brake control&lt;br /&gt;
* independantbrake_lever -- locomotive independent brake control. Note the typo in the control name.&lt;br /&gt;
* dynamicbrake_lever -- dynamic brake control&lt;br /&gt;
* wheelslip_light -- wheelslip indicator&lt;br /&gt;
* horn -- horn control&lt;br /&gt;
* light_switch -- light control&lt;br /&gt;
* pantograph_lever -- pantograph control&lt;br /&gt;
* throttle_brake_lever -- combined throttle/self-lapping brake lever&lt;br /&gt;
* bell -- bell control&lt;br /&gt;
For a Steam cab (either unscripted, or scripted and inheriting from the DefaultSteamCabin class), these default mesh names are available:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Needles:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* speedo_needle -- speedometer&lt;br /&gt;
* bplocomain_needle -- loco main reservoir pressure gauge&lt;br /&gt;
* bptrainbrakecylinder_needle -- locomotive brake cylinder pressure gauge&lt;br /&gt;
* no3pipe_needle -- brake pressure gauge (currently loco brake cylinder -- but maybe intended for something else?)&lt;br /&gt;
* bptrainbrakecylinder2_needle -- brake pressure gauge (source unknown)&lt;br /&gt;
* bptrainbrakepipe_needle -- train brake pipe pressure gauge&lt;br /&gt;
* bploco_equaliser -- brake equaliser pressure gauge&lt;br /&gt;
* flow_needle -- brake flow rate gauge&lt;br /&gt;
* boiler_needle -- boiler pressure&lt;br /&gt;
* boiler_needle1 -- boiler pressure&lt;br /&gt;
* steam_chest_needle -- steam chest pressure&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Levers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* trainbrake_lever -- self-lapping train brake control&lt;br /&gt;
* trainbrakelap_lever -- non self-lapping train brake control&lt;br /&gt;
* independantbrake_lever -- locomotive independent brake control. Note the typo in the control name.&lt;br /&gt;
* horn -- horn control&lt;br /&gt;
* light_switch -- light control&lt;br /&gt;
* waterglass_left -- boiler water level&lt;br /&gt;
* waterglass_right -- boiler water level&lt;br /&gt;
* firebox -- the interior of the firebox (to show fire temperature) Only works pre-TANE.&lt;br /&gt;
* regulator -- regulator (throttle) control&lt;br /&gt;
* reverser -- cutoff (reverser) control&lt;br /&gt;
* water_injector_0 -- primary water injector control&lt;br /&gt;
* water_injector_1 -- secondary water injector control&lt;br /&gt;
* blower -- steam blower control&lt;br /&gt;
* fire_plates -- the firebox door&lt;br /&gt;
* sanding_lever -- locomotive sander control&lt;br /&gt;
* blowdown_lever -- blowdown control (releases water out of the boiler)&lt;br /&gt;
* bell -- bell control&lt;br /&gt;
* left_window -- Left window control&lt;br /&gt;
* right_window -- Right window control&lt;br /&gt;
* left_sliding_window-- Left sliding window control&lt;br /&gt;
* right_sliding_window-- Right sliding window control&lt;br /&gt;
* seat0 -- Seat control&lt;br /&gt;
* seat1 -- Seat control&lt;br /&gt;
* whistle_lever -- Whistle lever control. (Doesn&#039;t seem to actually control the horn, so the whistle lever should actually be called &amp;quot;horn&amp;quot; to function properly.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=Supported Tags=&lt;br /&gt;
Each mesh subcontainer supports the following tags. Each tag is shown here with its default value. Standard tags inherited from the normal mesh table are omitted for brevity.&lt;br /&gt;
&lt;br /&gt;
 tooltip-text &amp;quot;&amp;quot;&lt;br /&gt;
 tooltip-token &amp;quot;&amp;quot;&lt;br /&gt;
 tooltip-mesh &amp;quot;&amp;quot;&lt;br /&gt;
 limits 0,1&lt;br /&gt;
 angles 0,0&lt;br /&gt;
 kind &amp;quot;&amp;quot;&lt;br /&gt;
 collision-parent &amp;quot;&amp;quot;&lt;br /&gt;
 mousemode &amp;quot;&amp;quot;&lt;br /&gt;
 mousespeed 1&lt;br /&gt;
 notches &lt;br /&gt;
 invert 0&lt;br /&gt;
 notchheight &lt;br /&gt;
 onlight &amp;quot;&amp;quot;&lt;br /&gt;
 value 0.0&lt;br /&gt;
 font &amp;quot;swiss&amp;quot;&lt;br /&gt;
 fontsize 12&lt;br /&gt;
 fontcolor 1.0,1.0,1.0&lt;br /&gt;
 fade-time 0.5&lt;br /&gt;
&lt;br /&gt;
====angles====&lt;br /&gt;
:Type: Decimal Pair&lt;br /&gt;
:Desc: Specifies the minimum and maximum extents of movement for a control or needle. For control types that rotate, these values are in radians[[http://en.wikipedia.org/wiki/Radian]]. In the case of a speedometer, this would define the amount of angular movement of the needle - a speedometer running from horizontal left to horizontal right may use -1.57 to 1.57, for example. If the cab control needs to move the other way, put the higher number first.&lt;br /&gt;
&lt;br /&gt;
====collision-parent====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: A mesh of kind collision-proxy must specify a collision-parent - the mesh it is a collision proxy for. This is the name of another control in the mesh-table.&lt;br /&gt;
&lt;br /&gt;
====fade-time====&lt;br /&gt;
:Type: Float&lt;br /&gt;
:Desc: The time, in seconds, for a &amp;quot;light&amp;quot; control to fully switch on or off.  Default is 0.5 seconds.&lt;br /&gt;
&lt;br /&gt;
====font====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: Font name to use for the readout of a digital control.&lt;br /&gt;
:Options are:&lt;br /&gt;
:* &#039;&#039;swiss&#039;&#039; (Default option. Renders with arial in PC builds.)&lt;br /&gt;
:* &#039;&#039;times_new_roman&#039;&#039;&lt;br /&gt;
:* &#039;&#039;verdana&#039;&#039;&lt;br /&gt;
:* &#039;&#039;century_gothic&#039;&#039;&lt;br /&gt;
:* &#039;&#039;cordia&#039;&#039;&lt;br /&gt;
:* &#039;&#039;courier&#039;&#039;&lt;br /&gt;
:* &#039;&#039;helvetica&#039;&#039;&lt;br /&gt;
:* &#039;&#039;arial&#039;&#039;&lt;br /&gt;
:* &#039;&#039;comic_sans&#039;&#039;&lt;br /&gt;
:* &#039;&#039;sans_serif&#039;&#039;&lt;br /&gt;
:* &#039;&#039;impact&#039;&#039;&lt;br /&gt;
:* &#039;&#039;console&#039;&#039;&lt;br /&gt;
:* &#039;&#039;tohoma&#039;&#039; (renders using the &#039;&#039;Tahoma&#039;&#039; font on PC builds.)&lt;br /&gt;
:* &#039;&#039;garamond&#039;&#039;&lt;br /&gt;
:These roughly correspond with Windows font names. Beware - not all fonts are available on all platforms, and where a font is not available, a different font may be substituted.&lt;br /&gt;
&lt;br /&gt;
====fontcolor====&lt;br /&gt;
:Type: Decimal Triplet&lt;br /&gt;
:Desc: RGB font color for the readout of a digital control. Colors are specified within the range 0.0 to 1.0, with 0.0 being black and 1.0 being full intensity. Default is 1.0,1.0,1.0 - white.&lt;br /&gt;
&lt;br /&gt;
====fontsize====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Font size for the readout of a digital control. Default is 12.&lt;br /&gt;
&lt;br /&gt;
====invert====&lt;br /&gt;
:Type: Boolean&lt;br /&gt;
:Desc: Invert mouse movement for this control. If the control moves the wrong way compared to the mouse, change this setting.&lt;br /&gt;
&lt;br /&gt;
====kind====&lt;br /&gt;
:Type: Selection&lt;br /&gt;
:Desc: The type of control this mesh table element represents.&lt;br /&gt;
:Options are:&lt;br /&gt;
:* &#039;&#039;animated-lever&#039;&#039;&lt;br /&gt;
:Operates like a standard lever, only uses a named animation instead of the angles tag for movement.&lt;br /&gt;
:* &#039;&#039;animated-dial&#039;&#039;&lt;br /&gt;
:Operates like a standard needle, only uses a named animation to represent the gauge readout instead of the angles tag.&lt;br /&gt;
:* &#039;&#039;collision-proxy&#039;&#039;&lt;br /&gt;
:This element type defines a volume within the cab where the mouse pointer will be considered to be over the cab control. Generally used in conjunction with an animated-lever. Name of the animated lever is defined in the tag &#039;&#039;collision-parent&#039;&#039;.&lt;br /&gt;
:* &#039;&#039;digital-dial-spd&#039;&#039;&lt;br /&gt;
:Digital readout for a speedometer, and using speed units.&lt;br /&gt;
:* &#039;&#039;digital-dial-prs&#039;&#039;&lt;br /&gt;
:Digital readout for a pressure gauge, using pressure units.&lt;br /&gt;
:* &#039;&#039;firebox&#039;&#039;&lt;br /&gt;
:The animated firebox in a steam locomotive.&lt;br /&gt;
:* &#039;&#039;lever&#039;&#039;&lt;br /&gt;
:A standard lever, often used for throttle and brake controls. Requires the user to click hold and move the mouse to move the lever between it&#039;s notches. This control will stay at any notch position when let go.&lt;br /&gt;
:* &#039;&#039;light&#039;&#039;&lt;br /&gt;
:A light glow / overlay - this mesh is hidden when the light is off and shown when the light is on.&lt;br /&gt;
:* &#039;&#039;needle&#039;&#039;&lt;br /&gt;
:An analogue gauge needle. Can be used to implement many different types of gauges.&lt;br /&gt;
:* &#039;&#039;pulllever&#039;&#039;&lt;br /&gt;
:Like a lever, only sprung to return to it&#039;s initial position when the user lets go of the control. Useful for horns.&lt;br /&gt;
:* &#039;&#039;pullrope&#039;&#039;&lt;br /&gt;
:Like a pulllever, only with linear (not rotational) movement.&lt;br /&gt;
:* &#039;&#039;switch&#039;&#039;&lt;br /&gt;
:This control requires only a single click to move between it&#039;s two endpoints. It is better suited than a lever to small switches and buttons.&lt;br /&gt;
:* &#039;&#039;button&#039;&#039;&lt;br /&gt;
:Similar to switch but requires the mouse be held down to keep the control active. I.e., press and hold the mouse button to push the control down, release the mouse and the control will return to the off position.&lt;br /&gt;
&lt;br /&gt;
====limits====&lt;br /&gt;
:Type: Decimal Pair&lt;br /&gt;
:Desc: Specifies the minimum and maximum values for a cab control or needle at it&#039;s two endpoints of movement. In the case of a speedometer, this would be the range of speeds it can display - 0m/s to 50m/s, for example.&lt;br /&gt;
&lt;br /&gt;
====mousemode====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: If set to &amp;quot;exact&amp;quot;, will require the mouse to be positioned over the geometry of the control precisely to activate it. Otherwise a bounding volume is used. This is useful for large controls which would otherwise block access to smaller controls.&lt;br /&gt;
&lt;br /&gt;
====mousespeed====&lt;br /&gt;
:Type: Float&lt;br /&gt;
:Desc: Controls the mouse speed and push/pull direction for controls.  &#039;&#039;&#039;&#039;&#039;Do not use zero&#039;&#039;&#039;&#039;&#039;.&lt;br /&gt;
:Examples of use:&lt;br /&gt;
:* mousespeed -1   Inverts mouse direction.&lt;br /&gt;
:* mousespeed 2    Doubles mouse speed in default direction.&lt;br /&gt;
:* mousespeed -0.5 Inverts mouse direction and halves the speed.&lt;br /&gt;
&lt;br /&gt;
====notches====&lt;br /&gt;
:Type: Decimal List&lt;br /&gt;
:Desc: Specifies the positions of the notches for this control. Notches are discrete positions within the movement of the control where the lever can be stopped. If a lever does not have notches, it can be positioned at any location. There are two common uses for notches. Firstly, they can be used to define a control which has a number of discrete positions which mean specific things (e.g. a brake valve). Secondly, they are used to define pre-set discrete values that a control can provide (e.g. a throttle lever). A typical US diesel 8 notch throttle would have something like &amp;quot;notches 0.0,0.125,0.25,0.375,0.5,0.625,0.75,0.875,1.0&amp;quot;, specifying nine positions (for &#039;off&#039; and notches 1 thru 8).&lt;br /&gt;
&lt;br /&gt;
====notchheight====&lt;br /&gt;
:Type: Integer List&lt;br /&gt;
:Desc: Specifies the importance of the notches for this control. This affects how the graphical overlay draws each notch. This is useful for a combined brake and throttle controller, or any other control where you want to mark a specific position relative to the others. This should have the same number of values as the &#039;notches&#039; list.&lt;br /&gt;
:Three styles are available:&lt;br /&gt;
:* &#039;1&#039; configures this bar to be a standard length and width bar.&lt;br /&gt;
:* &#039;2&#039; configures this bar to be shorter in length, and is often used for intermediate positions.&lt;br /&gt;
:* &#039;3&#039; configures this bar to be standard length, but thicker in width. This is often used for marking a specific position.&lt;br /&gt;
&lt;br /&gt;
====onlight====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: Specify the name of a &#039;&#039;light&#039;&#039; kind mesh which is enabled when this switch/lever is in the &#039;&#039;on&#039;&#039; position, and disabled when it is in the &#039;&#039;off&#039;&#039; position. The mesh name must be in the mesh-table.  See the example below.&lt;br /&gt;
&lt;br /&gt;
====radius====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Specifies the distance for the 2D notch overlay.&lt;br /&gt;
&lt;br /&gt;
====tooltip-mesh====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: Specifies the name of a mesh-table entry for a mesh to show when the control is moused over. The mesh will be faded in/out over a short period.&lt;br /&gt;
&lt;br /&gt;
====tooltip-text====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: OBSOLETE: DO NOT USE. This text will be used in the tooltip that appears when the mouse cursor hovers over a cab control.&lt;br /&gt;
&lt;br /&gt;
====tooltip-token====&lt;br /&gt;
:Type: String&lt;br /&gt;
:Desc: The name of a string table entry. The contents of the named string table entry will be displayed as a tooltip that appears when the mouse cursor hovers over a cab control. If a token is used then it must appear as a tag in the  [[%22String-table%22 container]].&lt;br /&gt;
&lt;br /&gt;
====value====&lt;br /&gt;
:Type: Decimal&lt;br /&gt;
:Desc: Specifies the initial value for this control. For a lever or other input device, this will specify the initial position of the control before the user moves it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Cab Interior Mesh-Table Example=&lt;br /&gt;
The following is an example of a mesh-table which implements a number of cab controls&lt;br /&gt;
&lt;br /&gt;
 mesh-table&lt;br /&gt;
 {&lt;br /&gt;
   default&lt;br /&gt;
   {&lt;br /&gt;
     mesh                                &amp;quot;interior.im&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   wheelslip_light&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;light&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;wheelslip_light.im&amp;quot;&lt;br /&gt;
     auto-create                         0&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   bptrainbrakepipe_needle2&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;digital-dial-prs&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.brakepipe2&amp;quot;&lt;br /&gt;
     limits                              0,55&lt;br /&gt;
     font                                &amp;quot;arial&amp;quot;&lt;br /&gt;
     fontsize                            0.007&lt;br /&gt;
     fontcolor                           80,240,120&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   speedo_needle2&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;digital-dial-spd&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.digispeedo&amp;quot;&lt;br /&gt;
     limits                              0,55&lt;br /&gt;
     font                                &amp;quot;arial&amp;quot;&lt;br /&gt;
     fontsize                            0.01&lt;br /&gt;
     fontcolor                           0,0,0&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   throttle_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;throttle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.throttle&amp;quot;&lt;br /&gt;
     limits                              0,8&lt;br /&gt;
     angles                              0,1.69&lt;br /&gt;
     notches                             0,0.125,0.25,0.375,0.5,0.625,0.75,0.875,1&lt;br /&gt;
     notchheight                         1,2,2,2,2,2,2,2,1&lt;br /&gt;
     radius                              0.35&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   dynamicbrake_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;dynamic_handle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.dynamic&amp;quot;&lt;br /&gt;
     limits                              0,2&lt;br /&gt;
     angles                              0,-1.69&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0.1,1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     radius                              0.35&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   trainbrakelap_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     mesh                                &amp;quot;trainbrake_handle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.trainbrake_handle&amp;quot;&lt;br /&gt;
     limits                              0,4&lt;br /&gt;
     angles                              0,-2&lt;br /&gt;
     notches                             0,0.25,0.5,0.75,1&lt;br /&gt;
     notchheight                         2,2,2,2,2&lt;br /&gt;
     mousespeed                          1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   independantbrake_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;indy_handle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.ind&amp;quot;&lt;br /&gt;
     limits                              0,32&lt;br /&gt;
     angles                              0.94,0&lt;br /&gt;
     notches                             0,0.5,1&lt;br /&gt;
     notchheight                         1,1,1&lt;br /&gt;
     radius                              0.35&lt;br /&gt;
     mousespeed                          1&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   flow_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;flowneedle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.bpflow&amp;quot;&lt;br /&gt;
     limits                              0,1050&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   bplocomain_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedlered.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.mainres&amp;quot;&lt;br /&gt;
     limits                              0,1240&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   bploco_equaliser&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.eqres&amp;quot;&lt;br /&gt;
     limits                              0,1240&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   bptrainbrakecylinder_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedlered.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.brakecyl&amp;quot;&lt;br /&gt;
     limits                              -50,1390&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   bptrainbrakepipe_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;brakeneedle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.brakepipe&amp;quot;&lt;br /&gt;
     limits                              0,1240&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   speedo_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;speedo_pointer.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.speedo&amp;quot;&lt;br /&gt;
     limits                              0,43&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   ampmeter_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;needleamps.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.ampmeter&amp;quot;&lt;br /&gt;
     limits                              0,1700&lt;br /&gt;
     angles                              0,3.02058&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   reverser_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;reverser_handle.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.throttle01&amp;quot;&lt;br /&gt;
     limits                              0,2&lt;br /&gt;
     angles                              -0.55,0.55&lt;br /&gt;
     notches                             0,0.5,1&lt;br /&gt;
     notchheight                         1,1,1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   light_switch&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.hdlt&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;hdltswtch.im&amp;quot;&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     angles                              0,2&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0.1,0.1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   horn&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;pulllever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;horn.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.horn&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     angles                              0,-0.55&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     radius                              -0.02&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0,0&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   pantograph_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;pantograph_lever.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.pantograph_lever&amp;quot;&lt;br /&gt;
     limits                              0,3&lt;br /&gt;
     angles                              1.4,0&lt;br /&gt;
     notches                             0,0.5,0.75,1.0&lt;br /&gt;
     notchheight                         0,0,1,1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     onlight                             &amp;quot;line_power&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   line_power&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;light&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;line_power.im&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;a.line_power&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
[[Category:Config Container|M]]&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Class_MeshObject&amp;diff=22878</id>
		<title>Class MeshObject</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Class_MeshObject&amp;diff=22878"/>
		<updated>2020-03-02T23:42:55Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[TrainzScript Language Reference|API Hierarchy]]&lt;br /&gt;
**[[Class GSObject|GSObject]]&lt;br /&gt;
***[[Class GameObject|GameObject]]&lt;br /&gt;
****[[Class PropertyObject|PropertyObject]]&lt;br /&gt;
****[[Class TrainzGameObject|TrainzGameObject]]&lt;br /&gt;
*****MeshObject&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a base class for [[class Asset|Asset]] based game objects that have meshes, effects, animations and particles. Interface methods to deal with these are provided so things like showing or hiding a mesh, attaching a mesh to an attachment point or controlling an animation can be done from a script.&lt;br /&gt;
&lt;br /&gt;
For animation Trainz interpolates between key frames. This means an intermediate animation frame is calculated dynamically to be-in-synch with the game&#039;s framerate.&lt;br /&gt;
&lt;br /&gt;
Trainzscript is an interpreted scripting language intended to be used to monitor and react to events in the Trainz world, not to perform sophisticated real-time animation tasks. Using a script to start an animation in response to an event in a thread is reasonable. However trying to control animation tightly down to short intervals is likely to provide unsatisfactory results and to adversely affect overall performance of the game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==MeshObject Messages==&lt;br /&gt;
Messages related to MeshObject assets:&lt;br /&gt;
*[[Animation-Event Message]]&lt;br /&gt;
*[[pfx Message]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetFXAttachment==&lt;br /&gt;
{{MethodHeader|public native MeshObject GetFXAttachment(string effect)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;effect&#039;&#039;&#039; = name of the mesh effect to query. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*Returns a reference to the MeshObject currently attached to the named effect.&lt;br /&gt;
;Syntax&lt;br /&gt;
 MeshObject attachment = GetFXAttachment(&amp;quot;coupler&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*The method returns null if the effect is unoccupied.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetMeshAnimationFrame==&lt;br /&gt;
{{MethodHeader|public native float GetMeshAnimationFrame(string mesh)&#039;&#039;&#039;}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh container which includes the animation file to be queried.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*Current fame of the animation file within the specified mesh container.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float height = GetMeshAnimationFrame(&amp;quot;zPosition&amp;quot;)&lt;br /&gt;
;Notes&lt;br /&gt;
*Note that the returned value is likely to be an interpreted floating point value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetMeshAnimationFrameCount==&lt;br /&gt;
{{MethodHeader|public native float GetMeshAnimationFrameCount(string mesh)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh container which includes the animation file to be queried.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The number of frames in the specified animation.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float positions = GetMeshAnimationFrameCount(&amp;quot;lever&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Note that the returned value is a float rather than an integer.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetTextureSelfIlluminationState==&lt;br /&gt;
{{MethodHeader|public native bool GetTextureSelfIlluminationState(string texture)&#039;&#039;&#039;}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;texture&#039;&#039;&#039; = root name of &#039;&#039;*.texture.text&#039;&#039; file to query.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*Returns true if the specified texture has self illumination set.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool isEmissive = GetTextureSelfIlluminationState(&amp;quot;texture&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Compatibility warning: Use of this function is not recommended, it may become non-functional in future Trainz versions.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==HasMesh==&lt;br /&gt;
{{MethodHeader|public native bool HasMesh(string mesh)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh to be queried.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (HasMesh(&amp;quot;ventilation&amp;quot;)) StartMeshAnimationLoop(&amp;quot;fans&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetFXAnimationState==&lt;br /&gt;
{{MethodHeader|public native void SetFXAnimationState(string effect, bool state)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;effect&#039;&#039;&#039; = name of attached-animation effect containing the animation to play.&lt;br /&gt;
*&#039;&#039;&#039;state&#039;&#039;&#039; = true to start the animation loop, false to stop.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (gateClosed) SetFXAnimationState(&amp;quot;gate&amp;quot;,false);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetFXAttachment==&lt;br /&gt;
{{MethodHeader|public native MeshObject SetFXAttachment(string effect, Asset asset)&#039;&#039;&#039;}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;effect&#039;&#039;&#039; = effect containing the attachment to be manipulated.&lt;br /&gt;
*&#039;&#039;&#039;asset&#039;&#039;&#039; = mesh asset to attach to the effect. If asset is null any existing asset will be removed and nothing will be added.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*Returns a reference to the MeshObject which has been attached to the named effect. If the mesh asset isn&#039;t &amp;quot;kind mesh&amp;quot;, returns null.&lt;br /&gt;
;Syntax&lt;br /&gt;
 MeshObject lamp = SetFXAttachment(&amp;quot;lamp0&amp;quot;,redlamp);&lt;br /&gt;
;Notes&lt;br /&gt;
*Returns null if the effect is unoccupied when the method returns.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetFXCoronaTexture==&lt;br /&gt;
{{MethodHeader|public native void SetFXCoronaTexture(string effect, Asset texture)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;effect&#039;&#039;&#039; = effect containg the corona to be manipulated.&lt;br /&gt;
*&#039;&#039;&#039;asset&#039;&#039;&#039; = corona texture asset to attach to the effect. If asset is null the corona will be turned off.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetFXCoronaTexture(&amp;quot;stopLight&amp;quot;,redCorona);&lt;br /&gt;
;Notes&lt;br /&gt;
*Other corona parameters such as frequency and size are defined in &#039;&#039;config.txt&#039;&#039; and cannot be altered by script code.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetFXNameText==&lt;br /&gt;
{{MethodHeader|public native void SetFXNameText(string effect, string text)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;effect&#039;&#039;&#039; = effect containg the name effect to be changed.&lt;br /&gt;
*&#039;&#039;&#039;text&#039;&#039;&#039; = new string value.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetFXNameText(&amp;quot;home&amp;quot;,&amp;quot;Shangri-La&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Method will not accept an empty string in the &#039;&#039;text&#039;&#039; parameter.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetFXTextureReplacement==&lt;br /&gt;
{{MethodHeader|public native void SetFXTextureReplacement(string effect, Asset textureGroup, int index)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;effect&#039;&#039;&#039; = texture-replacement effect to be changed.&lt;br /&gt;
*&#039;&#039;&#039;textureGroup&#039;&#039;&#039; = reference to texture group asset which is the source of the texture to be applied.&lt;br /&gt;
*&#039;&#039;&#039;index&#039;&#039;&#039; = index into &#039;&#039;textures&#039;&#039; table of texture-group indicating which texture to apply.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetFXTextureReplacement(&amp;quot;load&amp;quot;,loadTextures,5);   // applies texture 5 from texture-group&lt;br /&gt;
 SetFXTextureReplacement(&amp;quot;load&amp;quot;,null,0);             // clears the effect, reinstating the texture defined in the asset.&lt;br /&gt;
;Notes&lt;br /&gt;
*Use null in the textureGroup parameter to turn texture replacement off.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetFXTextureReplacementTexture==&lt;br /&gt;
{{MethodHeader|public native void SetFXTextureReplacementTexture(string effectName, string textureName)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;effectName&#039;&#039;&#039; = the name of the texture-replacement effect that is in the effects container of the mesh.&lt;br /&gt;
*&#039;&#039;&#039;textureName&#039;&#039;&#039; = the &#039;&#039;*.texture.txt&#039;&#039; file that will replace the current texture being used on the mesh.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetFXTextureReplacementTexture(&amp;quot;fk_parameter&amp;quot;,&amp;quot;lms_p3_fk_body/fk_parameter.texture&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*This should replace any instance of SwapTextureOnMesh.&lt;br /&gt;
*Unlike SwapTextureOnMesh, there is no need to mention what the previous texture being used was. Simply telling Trainz to load the new texture is all that is needed for this to work.&lt;br /&gt;
*Swap one texture against another texture on specified mesh.&lt;br /&gt;
*Similar to texture-replacement effects, but without the need for an extra texture asset. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetMesh==&lt;br /&gt;
{{MethodHeader|public native void SetMesh(string mesh, float fadeDuration)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh to be displayed.&lt;br /&gt;
*&#039;&#039;&#039;fadeDuration&#039;&#039;&#039; = period in seconds during which mesh visibility will be faded in or out.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMesh(&amp;quot;default&amp;quot;,0.5);&lt;br /&gt;
;Notes&lt;br /&gt;
*Shows the specified mesh and hides all other meshes.&lt;br /&gt;
*If fadeDuration is 0.0 the mesh transition will be instantaneous.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetMeshAnimationFrame==&lt;br /&gt;
{{MethodHeader|public native void SetMeshAnimationFrame(string mesh, float frame)&amp;lt;br&amp;gt;&lt;br /&gt;
public native void SetMeshAnimationFrame(string mesh, float frame, float period)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh container which includes the animation file to be manipulated.&lt;br /&gt;
*&#039;&#039;&#039;frame&#039;&#039;&#039; = the frame position to which the animation is to be moved, this may be an interpolated value.&lt;br /&gt;
*&#039;&#039;&#039;period&#039;&#039;&#039; = the period over which the animation will be moved from its current position to the newly specified point.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMeshAnimationFrame(&amp;quot;default&amp;quot;,5.0);      // move the animation to frame 5 instantaneously&lt;br /&gt;
 SetMeshAnimationFrame(&amp;quot;default&amp;quot;,5.0,2.0);  // move the animation to frame 5 over 2 seconds&lt;br /&gt;
;Notes&lt;br /&gt;
*Moves the specified animation to the specified frame.&lt;br /&gt;
*For the first variant the transition is instant.&lt;br /&gt;
*For the second variant the transition will complete during the specified period.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetMeshAnimationSpeed==&lt;br /&gt;
{{MethodHeader|public native void SetMeshAnimationSpeed(string mesh, float speed)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh container which includes the animation file to be manipulated.&lt;br /&gt;
*&#039;&#039;&#039;speed&#039;&#039;&#039; = multiplication factor to apply to the original animation speed.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMeshAnimationSpeed(&amp;quot;fans&amp;quot;,2.0);   // run fans at double speed&lt;br /&gt;
 SetMeshAnimationSpeed(&amp;quot;fans&amp;quot;,-1.0);  // run fans backwards at original speed&lt;br /&gt;
;Notes&lt;br /&gt;
*Modifies the speed at which the animation is played.&lt;br /&gt;
*The original speed is multiplied by the new speed factor.&lt;br /&gt;
*Use negative values to make the animation run in reverse.&lt;br /&gt;
*It is &#039;&#039;not&#039;&#039; compatible with SetMeshAnimationState function for the same mesh. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetMeshAnimationState==&lt;br /&gt;
{{MethodHeader|public native void SetMeshAnimationState(string mesh, bool state)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh container which includes the animation file to be played.&lt;br /&gt;
*&#039;&#039;&#039;state&#039;&#039;&#039; = the direction in which the file is to be played, true for forwards, false for backwards.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMeshAnimationState(&amp;quot;door&amp;quot;,true);    // opens the door&lt;br /&gt;
 SetMeshAnimationState(&amp;quot;door&amp;quot;,false);   // closes the door&lt;br /&gt;
;Notes&lt;br /&gt;
*This method plays animations and is best suited to those which have defined start and end points such as the opening and closing of a gate or door.&lt;br /&gt;
*If &#039;&#039;state&#039;&#039; is true the animation plays forwards from its current position to the last frame. If the current position is already at the last frame the call has no effect.&lt;br /&gt;
*If &#039;&#039;state&#039;&#039; is false the animation plays backwards from its current position to the first frame. If the current position is already at the first frame the call has no effect.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetMeshVisible==&lt;br /&gt;
{{MethodHeader|public native void SetMeshVisible(string mesh, bool visible, float fadeDuration)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh to be displayed.&lt;br /&gt;
*&#039;&#039;&#039;visible&#039;&#039;&#039; = true to show the mesh, false to hide it.&lt;br /&gt;
*&#039;&#039;&#039;fadeDuration&#039;&#039;&#039; = period in seconds during which mesh visibility will be faded in or out.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMeshVisible(&amp;quot;driver&amp;quot;, false, 1.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*If fadeDuration is 0.0 the mesh transition will be instantaneous.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetTextureSelfIllumination==&lt;br /&gt;
{{MethodHeader|public native void SetTextureSelfIllumination(string texture, float r, float g, float b)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;texture&#039;&#039;&#039; = root name of &#039;&#039;*.texture.text&#039;&#039; file to query.&lt;br /&gt;
*&#039;&#039;&#039;r,g,b&#039;&#039;&#039; = red green and blue components of self illumination value to apply.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetTextureSelfIllumination(&amp;quot;interior&amp;quot;,0.5,0.5,0.5);&lt;br /&gt;
;Notes&lt;br /&gt;
*Applies a [[material emissive color]] to materials that use the texture, using the red, green and blue components specified.&lt;br /&gt;
*Compatibility warning: Use of this function is not recommended, it may become non-functional in future Trainz versions.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==StartMeshAnimationLoop==&lt;br /&gt;
{{MethodHeader|public native void StartMeshAnimationLoop(string mesh)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh container which includes the animation file to be played.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 StartMeshAnimationLoop(&amp;quot;windmill&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*This method plays animations and is best suited to those which are designed to run in a continuous loop.&lt;br /&gt;
*The speed of the animation can be altered using [[#SetMeshAnimationSpeed|SetMeshAnimationSpeed()]]&lt;br /&gt;
*Using [[#SetMeshAnimationSpeed|SetMeshAnimationSpeed()]] with a negative value will cause the animation to play in reverse.&lt;br /&gt;
*[[#StopMeshAnimation|StopMeshAnimation()]] will halt the animation.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==StopMeshAnimation==&lt;br /&gt;
{{MethodHeader|public native void StopMeshAnimation(string mesh)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh container which includes the animation file to be stopped.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 StopMeshAnimation(&amp;quot;default&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Turns animation off for the specified mesh.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SwapTextureOnMesh==&lt;br /&gt;
{{MethodHeader|public native void SwapTextureOnMesh(string mesh, string oldTexture, string newTexture)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh container which includes the texture to be changed.&lt;br /&gt;
*&#039;&#039;&#039;oldTexture&#039;&#039;&#039; = the original &#039;&#039;*.texture.txt&#039;&#039; file to use as the source of the transition.&lt;br /&gt;
*&#039;&#039;&#039;newTexture&#039;&#039;&#039; = the new &#039;&#039;*.texture.txt&#039;&#039; file to apply.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SwapTextureOnMesh(&amp;quot;left-passenger-door&amp;quot;,&amp;quot;gwr&amp;quot;,&amp;quot;lms&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*&#039;&#039;&#039;Obsolete: Use SetFXTextureReplacementTexture instead.&#039;&#039;&#039;&lt;br /&gt;
*Swap one texture against another texture on specified mesh.&lt;br /&gt;
*Similar to texture-replacement effects, but without the need for an extra texture asset. &lt;br /&gt;
*&#039;&#039;&#039;possible bug&#039;&#039;&#039; Texture names in the .im file must be lower case for this function to work properly.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Code Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related Methods==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Categories==&lt;br /&gt;
[[Category:Script Class]]&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Class_MeshObject&amp;diff=22877</id>
		<title>Class MeshObject</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Class_MeshObject&amp;diff=22877"/>
		<updated>2020-03-02T23:34:22Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: Added SetFXTextureReplacementTexture&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[TrainzScript Language Reference|API Hierarchy]]&lt;br /&gt;
**[[Class GSObject|GSObject]]&lt;br /&gt;
***[[Class GameObject|GameObject]]&lt;br /&gt;
****[[Class PropertyObject|PropertyObject]]&lt;br /&gt;
****[[Class TrainzGameObject|TrainzGameObject]]&lt;br /&gt;
*****MeshObject&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a base class for [[class Asset|Asset]] based game objects that have meshes, effects, animations and particles. Interface methods to deal with these are provided so things like showing or hiding a mesh, attaching a mesh to an attachment point or controlling an animation can be done from a script.&lt;br /&gt;
&lt;br /&gt;
For animation Trainz interpolates between key frames. This means an intermediate animation frame is calculated dynamically to be-in-synch with the game&#039;s framerate.&lt;br /&gt;
&lt;br /&gt;
Trainzscript is an interpreted scripting language intended to be used to monitor and react to events in the Trainz world, not to perform sophisticated real-time animation tasks. Using a script to start an animation in response to an event in a thread is reasonable. However trying to control animation tightly down to short intervals is likely to provide unsatisfactory results and to adversely affect overall performance of the game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==MeshObject Messages==&lt;br /&gt;
Messages related to MeshObject assets:&lt;br /&gt;
*[[Animation-Event Message]]&lt;br /&gt;
*[[pfx Message]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetFXAttachment==&lt;br /&gt;
{{MethodHeader|public native MeshObject GetFXAttachment(string effect)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;effect&#039;&#039;&#039; = name of the mesh effect to query. &lt;br /&gt;
;Returned Value&lt;br /&gt;
*Returns a reference to the MeshObject currently attached to the named effect.&lt;br /&gt;
;Syntax&lt;br /&gt;
 MeshObject attachment = GetFXAttachment(&amp;quot;coupler&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*The method returns null if the effect is unoccupied.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetMeshAnimationFrame==&lt;br /&gt;
{{MethodHeader|public native float GetMeshAnimationFrame(string mesh)&#039;&#039;&#039;}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh container which includes the animation file to be queried.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*Current fame of the animation file within the specified mesh container.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float height = GetMeshAnimationFrame(&amp;quot;zPosition&amp;quot;)&lt;br /&gt;
;Notes&lt;br /&gt;
*Note that the returned value is likely to be an interpreted floating point value.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetMeshAnimationFrameCount==&lt;br /&gt;
{{MethodHeader|public native float GetMeshAnimationFrameCount(string mesh)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh container which includes the animation file to be queried.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*The number of frames in the specified animation.&lt;br /&gt;
;Syntax&lt;br /&gt;
 float positions = GetMeshAnimationFrameCount(&amp;quot;lever&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Note that the returned value is a float rather than an integer.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GetTextureSelfIlluminationState==&lt;br /&gt;
{{MethodHeader|public native bool GetTextureSelfIlluminationState(string texture)&#039;&#039;&#039;}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;texture&#039;&#039;&#039; = root name of &#039;&#039;*.texture.text&#039;&#039; file to query.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*Returns true if the specified texture has self illumination set.&lt;br /&gt;
;Syntax&lt;br /&gt;
 bool isEmissive = GetTextureSelfIlluminationState(&amp;quot;texture&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Compatibility warning: Use of this function is not recommended, it may become non-functional in future Trainz versions.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==HasMesh==&lt;br /&gt;
{{MethodHeader|public native bool HasMesh(string mesh)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh to be queried.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (HasMesh(&amp;quot;ventilation&amp;quot;)) StartMeshAnimationLoop(&amp;quot;fans&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetFXAnimationState==&lt;br /&gt;
{{MethodHeader|public native void SetFXAnimationState(string effect, bool state)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;effect&#039;&#039;&#039; = name of attached-animation effect containing the animation to play.&lt;br /&gt;
*&#039;&#039;&#039;state&#039;&#039;&#039; = true to start the animation loop, false to stop.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 if (gateClosed) SetFXAnimationState(&amp;quot;gate&amp;quot;,false);&lt;br /&gt;
;Notes&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetFXAttachment==&lt;br /&gt;
{{MethodHeader|public native MeshObject SetFXAttachment(string effect, Asset asset)&#039;&#039;&#039;}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;effect&#039;&#039;&#039; = effect containing the attachment to be manipulated.&lt;br /&gt;
*&#039;&#039;&#039;asset&#039;&#039;&#039; = mesh asset to attach to the effect. If asset is null any existing asset will be removed and nothing will be added.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*Returns a reference to the MeshObject which has been attached to the named effect. If the mesh asset isn&#039;t &amp;quot;kind mesh&amp;quot;, returns null.&lt;br /&gt;
;Syntax&lt;br /&gt;
 MeshObject lamp = SetFXAttachment(&amp;quot;lamp0&amp;quot;,redlamp);&lt;br /&gt;
;Notes&lt;br /&gt;
*Returns null if the effect is unoccupied when the method returns.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetFXCoronaTexture==&lt;br /&gt;
{{MethodHeader|public native void SetFXCoronaTexture(string effect, Asset texture)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;effect&#039;&#039;&#039; = effect containg the corona to be manipulated.&lt;br /&gt;
*&#039;&#039;&#039;asset&#039;&#039;&#039; = corona texture asset to attach to the effect. If asset is null the corona will be turned off.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetFXCoronaTexture(&amp;quot;stopLight&amp;quot;,redCorona);&lt;br /&gt;
;Notes&lt;br /&gt;
*Other corona parameters such as frequency and size are defined in &#039;&#039;config.txt&#039;&#039; and cannot be altered by script code.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetFXNameText==&lt;br /&gt;
{{MethodHeader|public native void SetFXNameText(string effect, string text)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;effect&#039;&#039;&#039; = effect containg the name effect to be changed.&lt;br /&gt;
*&#039;&#039;&#039;text&#039;&#039;&#039; = new string value.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetFXNameText(&amp;quot;home&amp;quot;,&amp;quot;Shangri-La&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Method will not accept an empty string in the &#039;&#039;text&#039;&#039; parameter.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetFXTextureReplacement==&lt;br /&gt;
{{MethodHeader|public native void SetFXTextureReplacement(string effect, Asset textureGroup, int index)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;effect&#039;&#039;&#039; = texture-replacement effect to be changed.&lt;br /&gt;
*&#039;&#039;&#039;textureGroup&#039;&#039;&#039; = reference to texture group asset which is the source of the texture to be applied.&lt;br /&gt;
*&#039;&#039;&#039;index&#039;&#039;&#039; = index into &#039;&#039;textures&#039;&#039; table of texture-group indicating which texture to apply.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetFXTextureReplacement(&amp;quot;load&amp;quot;,loadTextures,5);   // applies texture 5 from texture-group&lt;br /&gt;
 SetFXTextureReplacement(&amp;quot;load&amp;quot;,null,0);             // clears the effect, reinstating the texture defined in the asset.&lt;br /&gt;
;Notes&lt;br /&gt;
*Use null in the textureGroup parameter to turn texture replacement off.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetMesh==&lt;br /&gt;
{{MethodHeader|public native void SetMesh(string mesh, float fadeDuration)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh to be displayed.&lt;br /&gt;
*&#039;&#039;&#039;fadeDuration&#039;&#039;&#039; = period in seconds during which mesh visibility will be faded in or out.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMesh(&amp;quot;default&amp;quot;,0.5);&lt;br /&gt;
;Notes&lt;br /&gt;
*Shows the specified mesh and hides all other meshes.&lt;br /&gt;
*If fadeDuration is 0.0 the mesh transition will be instantaneous.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetMeshAnimationFrame==&lt;br /&gt;
{{MethodHeader|public native void SetMeshAnimationFrame(string mesh, float frame)&amp;lt;br&amp;gt;&lt;br /&gt;
public native void SetMeshAnimationFrame(string mesh, float frame, float period)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh container which includes the animation file to be manipulated.&lt;br /&gt;
*&#039;&#039;&#039;frame&#039;&#039;&#039; = the frame position to which the animation is to be moved, this may be an interpolated value.&lt;br /&gt;
*&#039;&#039;&#039;period&#039;&#039;&#039; = the period over which the animation will be moved from its current position to the newly specified point.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMeshAnimationFrame(&amp;quot;default&amp;quot;,5.0);      // move the animation to frame 5 instantaneously&lt;br /&gt;
 SetMeshAnimationFrame(&amp;quot;default&amp;quot;,5.0,2.0);  // move the animation to frame 5 over 2 seconds&lt;br /&gt;
;Notes&lt;br /&gt;
*Moves the specified animation to the specified frame.&lt;br /&gt;
*For the first variant the transition is instant.&lt;br /&gt;
*For the second variant the transition will complete during the specified period.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetMeshAnimationSpeed==&lt;br /&gt;
{{MethodHeader|public native void SetMeshAnimationSpeed(string mesh, float speed)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh container which includes the animation file to be manipulated.&lt;br /&gt;
*&#039;&#039;&#039;speed&#039;&#039;&#039; = multiplication factor to apply to the original animation speed.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMeshAnimationSpeed(&amp;quot;fans&amp;quot;,2.0);   // run fans at double speed&lt;br /&gt;
 SetMeshAnimationSpeed(&amp;quot;fans&amp;quot;,-1.0);  // run fans backwards at original speed&lt;br /&gt;
;Notes&lt;br /&gt;
*Modifies the speed at which the animation is played.&lt;br /&gt;
*The original speed is multiplied by the new speed factor.&lt;br /&gt;
*Use negative values to make the animation run in reverse.&lt;br /&gt;
*It is &#039;&#039;not&#039;&#039; compatible with SetMeshAnimationState function for the same mesh. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetMeshAnimationState==&lt;br /&gt;
{{MethodHeader|public native void SetMeshAnimationState(string mesh, bool state)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh container which includes the animation file to be played.&lt;br /&gt;
*&#039;&#039;&#039;state&#039;&#039;&#039; = the direction in which the file is to be played, true for forwards, false for backwards.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMeshAnimationState(&amp;quot;door&amp;quot;,true);    // opens the door&lt;br /&gt;
 SetMeshAnimationState(&amp;quot;door&amp;quot;,false);   // closes the door&lt;br /&gt;
;Notes&lt;br /&gt;
*This method plays animations and is best suited to those which have defined start and end points such as the opening and closing of a gate or door.&lt;br /&gt;
*If &#039;&#039;state&#039;&#039; is true the animation plays forwards from its current position to the last frame. If the current position is already at the last frame the call has no effect.&lt;br /&gt;
*If &#039;&#039;state&#039;&#039; is false the animation plays backwards from its current position to the first frame. If the current position is already at the first frame the call has no effect.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetMeshVisible==&lt;br /&gt;
{{MethodHeader|public native void SetMeshVisible(string mesh, bool visible, float fadeDuration)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh to be displayed.&lt;br /&gt;
*&#039;&#039;&#039;visible&#039;&#039;&#039; = true to show the mesh, false to hide it.&lt;br /&gt;
*&#039;&#039;&#039;fadeDuration&#039;&#039;&#039; = period in seconds during which mesh visibility will be faded in or out.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetMeshVisible(&amp;quot;driver&amp;quot;, false, 1.0);&lt;br /&gt;
;Notes&lt;br /&gt;
*If fadeDuration is 0.0 the mesh transition will be instantaneous.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetTextureSelfIllumination==&lt;br /&gt;
{{MethodHeader|public native void SetTextureSelfIllumination(string texture, float r, float g, float b)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;texture&#039;&#039;&#039; = root name of &#039;&#039;*.texture.text&#039;&#039; file to query.&lt;br /&gt;
*&#039;&#039;&#039;r,g,b&#039;&#039;&#039; = red green and blue components of self illumination value to apply.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetTextureSelfIllumination(&amp;quot;interior&amp;quot;,0.5,0.5,0.5);&lt;br /&gt;
;Notes&lt;br /&gt;
*Applies a [[material emissive color]] to materials that use the texture, using the red, green and blue components specified.&lt;br /&gt;
*Compatibility warning: Use of this function is not recommended, it may become non-functional in future Trainz versions.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==StartMeshAnimationLoop==&lt;br /&gt;
{{MethodHeader|public native void StartMeshAnimationLoop(string mesh)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh container which includes the animation file to be played.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 StartMeshAnimationLoop(&amp;quot;windmill&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*This method plays animations and is best suited to those which are designed to run in a continuous loop.&lt;br /&gt;
*The speed of the animation can be altered using [[#SetMeshAnimationSpeed|SetMeshAnimationSpeed()]]&lt;br /&gt;
*Using [[#SetMeshAnimationSpeed|SetMeshAnimationSpeed()]] with a negative value will cause the animation to play in reverse.&lt;br /&gt;
*[[#StopMeshAnimation|StopMeshAnimation()]] will halt the animation.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==StopMeshAnimation==&lt;br /&gt;
{{MethodHeader|public native void StopMeshAnimation(string mesh)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh container which includes the animation file to be stopped.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 StopMeshAnimation(&amp;quot;default&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*Turns animation off for the specified mesh.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SetFXTextureReplacementTexture==&lt;br /&gt;
{{MethodHeader|public native void SetFXTextureReplacementTexture(string effectName, string textureName)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;effectName&#039;&#039;&#039; = the name of the texture-replacement effect that is in the effects container of the mesh.&lt;br /&gt;
*&#039;&#039;&#039;textureName&#039;&#039;&#039; = the &#039;&#039;*.texture.txt&#039;&#039; file that will replace the current texture being used on the mesh.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SetFXTextureReplacementTexture(&amp;quot;fk_parameter&amp;quot;,&amp;quot;lms_p3_fk_body/fk_parameter.texture&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*This should replace any instance of SwapTextureOnMesh.&lt;br /&gt;
*Unlike SwapTextureOnMesh, there is no need to mention what the previous texture being used was. Simply telling Trainz to load the new texture is all that is needed for this to work.&lt;br /&gt;
*Swap one texture against another texture on specified mesh.&lt;br /&gt;
*Similar to texture-replacement effects, but without the need for an extra texture asset. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SwapTextureOnMesh==&lt;br /&gt;
{{MethodHeader|public native void SwapTextureOnMesh(string mesh, string oldTexture, string newTexture)}}&lt;br /&gt;
;Parameters&lt;br /&gt;
*&#039;&#039;&#039;mesh&#039;&#039;&#039; = the name of the mesh or submesh container which includes the texture to be changed.&lt;br /&gt;
*&#039;&#039;&#039;oldTexture&#039;&#039;&#039; = the original &#039;&#039;*.texture.txt&#039;&#039; file to use as the source of the transition.&lt;br /&gt;
*&#039;&#039;&#039;newTexture&#039;&#039;&#039; = the new &#039;&#039;*.texture.txt&#039;&#039; file to apply.&lt;br /&gt;
;Returned Value&lt;br /&gt;
*None&lt;br /&gt;
;Syntax&lt;br /&gt;
 SwapTextureOnMesh(&amp;quot;left-passenger-door&amp;quot;,&amp;quot;gwr&amp;quot;,&amp;quot;lms&amp;quot;);&lt;br /&gt;
;Notes&lt;br /&gt;
*&#039;&#039;&#039;Obsolete: Use SetFXTextureReplacementTexture instead.&#039;&#039;&#039;&lt;br /&gt;
*Swap one texture against another texture on specified mesh.&lt;br /&gt;
*Similar to texture-replacement effects, but without the need for an extra texture asset. &lt;br /&gt;
*&#039;&#039;&#039;possible bug&#039;&#039;&#039; Texture names in the .im file must be lower case for this function to work properly.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Code Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related Methods==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Categories==&lt;br /&gt;
[[Category:Script Class]]&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Adding_the_TRS19_F7_Cabin_to_your_Asset&amp;diff=22187</id>
		<title>Adding the TRS19 F7 Cabin to your Asset</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Adding_the_TRS19_F7_Cabin_to_your_Asset&amp;diff=22187"/>
		<updated>2019-11-24T21:39:32Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: /* Modifying the Nose color */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The new TRS19 EMD F7 cabin has the ability to change the color of the nose to match the road name of your locomotive asset. Changing the color of the nose is as simple as adding a few lines into the config of your locomotive of choice. &lt;br /&gt;
&lt;br /&gt;
[[File:F7IntroPage.png|800px]]&lt;br /&gt;
&lt;br /&gt;
== Adding the Cab to your Asset ==&lt;br /&gt;
&lt;br /&gt;
To begin, open the config of the locomotive you wish to have a custom nose color for. For this tutorial, we will be using &amp;lt;kuid2:999999:2222:1&amp;gt; 1 Hot Rod Special F7 from the DLS. It is recommended to open the config in a superior notepad program such as Notepad++ to preserve formatting. When the config for the Hot Rod F7 is opened, it looks something like this:&lt;br /&gt;
&lt;br /&gt;
    kuid                                    &amp;lt;kuid2:999999:2222:1&amp;gt;&lt;br /&gt;
    username                                &amp;quot;1 Hot Rod Special F7&amp;quot;&lt;br /&gt;
    kind                                    &amp;quot;traincar&amp;quot;&lt;br /&gt;
    trainz-build                            3.5&lt;br /&gt;
    engine                                  1&lt;br /&gt;
    enginespec                              &amp;lt;kuid:999999:42004250&amp;gt;&lt;br /&gt;
    enginesound                             &amp;lt;kuid:-1:42003000&amp;gt;&lt;br /&gt;
    hornsound                               &amp;lt;kuid:37581:1234&amp;gt;&lt;br /&gt;
    interior                                &amp;lt;kuid:217537:220&amp;gt;&lt;br /&gt;
    mesh-table&lt;br /&gt;
    {&lt;br /&gt;
      default&lt;br /&gt;
      {&lt;br /&gt;
        mesh                                &amp;quot;f7_hotrod_body/f7_hotrod_body.im&amp;quot;&lt;br /&gt;
        auto-create                         1&lt;br /&gt;
      }&lt;br /&gt;
  &lt;br /&gt;
      shadow&lt;br /&gt;
      {&lt;br /&gt;
        mesh                                &amp;quot;f7_hotrod_shadow/f7_hotrod_shadow.im&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    bogeys&lt;br /&gt;
    {&lt;br /&gt;
      0&lt;br /&gt;
      {&lt;br /&gt;
        bogey                               &amp;lt;kuid:999999:100100&amp;gt;&lt;br /&gt;
        reversed                            0&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    mass                                    100000&lt;br /&gt;
    company                                 &amp;quot;Auran Brew Crew&amp;quot;&lt;br /&gt;
    fonts                                   0&lt;br /&gt;
    smoke_shade                             0.5&lt;br /&gt;
    smoke_random                            2.6&lt;br /&gt;
    smoke_slowlife                          5&lt;br /&gt;
    smoke_fastlife                          4&lt;br /&gt;
    smoke_height                            2.3&lt;br /&gt;
    smoke_fastspeed                         100&lt;br /&gt;
    category-class                          &amp;quot;AC&amp;quot;&lt;br /&gt;
    category-era                            &amp;quot;2000s&amp;quot;&lt;br /&gt;
    category-region                         &amp;quot;AU&amp;quot;&lt;br /&gt;
    description                             &amp;quot;&amp;quot;&lt;br /&gt;
    author                                  &amp;quot;Brew Crew Productions&amp;quot;&lt;br /&gt;
    organisation                            &amp;quot;Auran Games Pty. Ltd.&amp;quot;&lt;br /&gt;
    contact-website                         &amp;quot;www.virtualtrainz.com&amp;quot;&lt;br /&gt;
    contact-email                           &amp;quot;helpdesk@auran.com&amp;quot;&lt;br /&gt;
    thumbnails&lt;br /&gt;
    {&lt;br /&gt;
      0&lt;br /&gt;
      {&lt;br /&gt;
        image                               &amp;quot;$screenshot$.jpg&amp;quot;&lt;br /&gt;
        width                               240&lt;br /&gt;
        height                              180&lt;br /&gt;
      }&lt;br /&gt;
      1&lt;br /&gt;
      {&lt;br /&gt;
        image                               &amp;quot;f7_hotrod_art\f7_hotrod_art_icon.texture&amp;quot;&lt;br /&gt;
        width                               128&lt;br /&gt;
        height                              64&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    kuid-table&lt;br /&gt;
    {&lt;br /&gt;
      0                                     &amp;lt;kuid:-1:101212&amp;gt;&lt;br /&gt;
      1                                     &amp;lt;kuid:-1:42003000&amp;gt;&lt;br /&gt;
      2                                     &amp;lt;kuid:-1:42003101&amp;gt;&lt;br /&gt;
      3                                     &amp;lt;kuid:999999:100100&amp;gt;&lt;br /&gt;
      4                                     &amp;lt;kuid:999999:42004250&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
The first thing to change is the interior kuid to reference the proper F7 cab. If your locomotive is right-hand drive and uses MPH, use the following kuid:&lt;br /&gt;
    &amp;lt;kuid:-25:1308&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Change the following line from: &lt;br /&gt;
    interior                                &amp;lt;kuid:217537:220&amp;gt;&lt;br /&gt;
to:&lt;br /&gt;
    interior                                &amp;lt;kuid:-25:1308&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The next step is to add an extensions table. Copy and paste the following code into your config:&lt;br /&gt;
&lt;br /&gt;
    extensions&lt;br /&gt;
    {&lt;br /&gt;
      f7cab_parameters&lt;br /&gt;
      {&lt;br /&gt;
        nosecolor                           &amp;quot;XXX&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
The placement of this code does not matter. I placed it directly under the interior tag line and above the mesh table to make editing the extensions easier to edit in the future. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    kuid                                    &amp;lt;kuid2:999999:2222:1&amp;gt;&lt;br /&gt;
    username                                &amp;quot;1 Hot Rod Special F7&amp;quot;&lt;br /&gt;
    kind                                    &amp;quot;traincar&amp;quot;&lt;br /&gt;
    trainz-build                            3.5&lt;br /&gt;
    engine                                  1&lt;br /&gt;
    enginespec                              &amp;lt;kuid:999999:42004250&amp;gt;&lt;br /&gt;
    enginesound                             &amp;lt;kuid:-1:42003000&amp;gt;&lt;br /&gt;
    hornsound                               &amp;lt;kuid:37581:1234&amp;gt;&lt;br /&gt;
    interior                                &amp;lt;kuid:217537:220&amp;gt;&lt;br /&gt;
    extensions&lt;br /&gt;
    {&lt;br /&gt;
      f7cab_parameters&lt;br /&gt;
      {&lt;br /&gt;
        nosecolor                           &amp;quot;XXX&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    mesh-table&lt;br /&gt;
    {&lt;br /&gt;
      default&lt;br /&gt;
      {&lt;br /&gt;
        mesh                                &amp;quot;f7_hotrod_body/f7_hotrod_body.im&amp;quot;&lt;br /&gt;
        auto-create                         1&lt;br /&gt;
      }&lt;br /&gt;
  &lt;br /&gt;
      shadow&lt;br /&gt;
      {&lt;br /&gt;
        mesh                                &amp;quot;f7_hotrod_shadow/f7_hotrod_shadow.im&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    ....&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Modifying the Nose color ==&lt;br /&gt;
&lt;br /&gt;
The final step is to change &amp;quot;XXX&amp;quot; to an appropriate string. Use the first column in the following table to determine the proper string to replace &amp;quot;XXX&amp;quot; with. The strings are case sensitive, so make sure it matches the table or else the cabin will default to black.&lt;br /&gt;
&lt;br /&gt;
By default, the F7 Cab supports these pre-built liveries:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Supported Road names&lt;br /&gt;
|-&lt;br /&gt;
|String &#039;&#039;&#039;(case sensitive!)&#039;&#039;&#039;&lt;br /&gt;
|Color&lt;br /&gt;
|Roadname&lt;br /&gt;
|-&lt;br /&gt;
|red&lt;br /&gt;
|Red&lt;br /&gt;
|Generic Red&lt;br /&gt;
|-&lt;br /&gt;
|superchief&lt;br /&gt;
|Red with Yellow Stripe&lt;br /&gt;
|ATSF Warbonnet&lt;br /&gt;
|-&lt;br /&gt;
|darkblue&lt;br /&gt;
|Dark Blue with Yellow Stripe&lt;br /&gt;
|ATSF Blue Warbonnet&lt;br /&gt;
|-&lt;br /&gt;
|green&lt;br /&gt;
|Green&lt;br /&gt;
|Burlington Northern&lt;br /&gt;
|-&lt;br /&gt;
|orange&lt;br /&gt;
|Orange/Green&lt;br /&gt;
|Great Northern&lt;br /&gt;
|-&lt;br /&gt;
|yellow&lt;br /&gt;
|Yellow&lt;br /&gt;
|North Western/Alaska&lt;br /&gt;
|-&lt;br /&gt;
|lightgrey&lt;br /&gt;
|Light Grey&lt;br /&gt;
|Canadian Pacific&lt;br /&gt;
|-&lt;br /&gt;
|blackred&lt;br /&gt;
|Red with black nose top&lt;br /&gt;
|Canadian National / CP Rail&lt;br /&gt;
|-&lt;br /&gt;
|winetrain&lt;br /&gt;
|Green/Gold&lt;br /&gt;
|Nappa Valley Wine Train&lt;br /&gt;
|-&lt;br /&gt;
|silver&lt;br /&gt;
|Silver/Black&lt;br /&gt;
|Southern Pacific&lt;br /&gt;
|-&lt;br /&gt;
|unionpacific&lt;br /&gt;
|Yellow with Green nose top&lt;br /&gt;
|Union Pacific&lt;br /&gt;
|-&lt;br /&gt;
|darkgrey&lt;br /&gt;
|Dark Grey with Dark Blue nose top&lt;br /&gt;
|Baltimore and Ohio&lt;br /&gt;
|-&lt;br /&gt;
|amtrakphase1&lt;br /&gt;
|Black/Red/White&lt;br /&gt;
|Amtrak Phase I&lt;br /&gt;
|-&lt;br /&gt;
|hotrod&lt;br /&gt;
|Black with Flames&lt;br /&gt;
|Hot Rod Special&lt;br /&gt;
|-&lt;br /&gt;
|prr_red_5stripe&lt;br /&gt;
|PRR Tuscan with 5 Stripe&lt;br /&gt;
|Pennsylvania Railroad&lt;br /&gt;
|-&lt;br /&gt;
|prr_red_1stripe&lt;br /&gt;
|PRR Tuscan with 1 Stripe&lt;br /&gt;
|Pennsylvania Railroad&lt;br /&gt;
|-&lt;br /&gt;
|prr_green_5stripe&lt;br /&gt;
|PRR Brunswick with 5 Stripe&lt;br /&gt;
|Pennsylvania Railroad&lt;br /&gt;
|-&lt;br /&gt;
|prr_green_1stripe&lt;br /&gt;
|PRR Brunswick with 1 Stripe&lt;br /&gt;
|Pennsylvania Railroad&lt;br /&gt;
|-&lt;br /&gt;
|southernpacific_orange&lt;br /&gt;
|Daylight Paint Scheme&lt;br /&gt;
|Southern Pacific&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The final config would look something like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    kuid                                    &amp;lt;kuid2:999999:2222:1&amp;gt;&lt;br /&gt;
    username                                &amp;quot;1 Hot Rod Special F7&amp;quot;&lt;br /&gt;
    kind                                    &amp;quot;traincar&amp;quot;&lt;br /&gt;
    trainz-build                            3.5&lt;br /&gt;
    engine                                  1&lt;br /&gt;
    enginespec                              &amp;lt;kuid:999999:42004250&amp;gt;&lt;br /&gt;
    enginesound                             &amp;lt;kuid:-1:42003000&amp;gt;&lt;br /&gt;
    hornsound                               &amp;lt;kuid:37581:1234&amp;gt;&lt;br /&gt;
    interior                                &amp;lt;kuid:217537:220&amp;gt;&lt;br /&gt;
    extensions&lt;br /&gt;
    {&lt;br /&gt;
      f7cab_parameters&lt;br /&gt;
      {&lt;br /&gt;
        nosecolor                           &amp;quot;hotrod&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    mesh-table&lt;br /&gt;
    {&lt;br /&gt;
      default&lt;br /&gt;
      {&lt;br /&gt;
        mesh                                &amp;quot;f7_hotrod_body/f7_hotrod_body.im&amp;quot;&lt;br /&gt;
        auto-create                         1&lt;br /&gt;
      }&lt;br /&gt;
  &lt;br /&gt;
      shadow&lt;br /&gt;
      {&lt;br /&gt;
        mesh                                &amp;quot;f7_hotrod_shadow/f7_hotrod_shadow.im&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    bogeys&lt;br /&gt;
    {&lt;br /&gt;
      0&lt;br /&gt;
      {&lt;br /&gt;
        bogey                               &amp;lt;kuid:999999:100100&amp;gt;&lt;br /&gt;
        reversed                            0&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    mass                                    100000&lt;br /&gt;
    company                                 &amp;quot;Auran Brew Crew&amp;quot;&lt;br /&gt;
    fonts                                   0&lt;br /&gt;
    smoke_shade                             0.5&lt;br /&gt;
    smoke_random                            2.6&lt;br /&gt;
    smoke_slowlife                          5&lt;br /&gt;
    smoke_fastlife                          4&lt;br /&gt;
    smoke_height                            2.3&lt;br /&gt;
    smoke_fastspeed                         100&lt;br /&gt;
    category-class                          &amp;quot;AC&amp;quot;&lt;br /&gt;
    category-era                            &amp;quot;2000s&amp;quot;&lt;br /&gt;
    category-region                         &amp;quot;AU&amp;quot;&lt;br /&gt;
    description                             &amp;quot;&amp;quot;&lt;br /&gt;
    author                                  &amp;quot;Brew Crew Productions&amp;quot;&lt;br /&gt;
    organisation                            &amp;quot;Auran Games Pty. Ltd.&amp;quot;&lt;br /&gt;
    contact-website                         &amp;quot;www.virtualtrainz.com&amp;quot;&lt;br /&gt;
    contact-email                           &amp;quot;helpdesk@auran.com&amp;quot;&lt;br /&gt;
    thumbnails&lt;br /&gt;
    {&lt;br /&gt;
      0&lt;br /&gt;
      {&lt;br /&gt;
        image                               &amp;quot;$screenshot$.jpg&amp;quot;&lt;br /&gt;
        width                               240&lt;br /&gt;
        height                              180&lt;br /&gt;
      }&lt;br /&gt;
      1&lt;br /&gt;
      {&lt;br /&gt;
        image                               &amp;quot;f7_hotrod_art\f7_hotrod_art_icon.texture&amp;quot;&lt;br /&gt;
        width                               128&lt;br /&gt;
        height                              64&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    kuid-table&lt;br /&gt;
    {&lt;br /&gt;
      0                                     &amp;lt;kuid:-1:101212&amp;gt;&lt;br /&gt;
      1                                     &amp;lt;kuid:-1:42003000&amp;gt;&lt;br /&gt;
      2                                     &amp;lt;kuid:-1:42003101&amp;gt;&lt;br /&gt;
      3                                     &amp;lt;kuid:999999:100100&amp;gt;&lt;br /&gt;
      4                                     &amp;lt;kuid:999999:42004250&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
==Return to Index==&lt;br /&gt;
 &lt;br /&gt;
[[HowToGuides|&amp;lt;&amp;lt; How To Guides]]&lt;br /&gt;
&lt;br /&gt;
[[Category:How-to guides]]&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=Adding_the_TRS19_F7_Cabin_to_your_Asset&amp;diff=22163</id>
		<title>Adding the TRS19 F7 Cabin to your Asset</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=Adding_the_TRS19_F7_Cabin_to_your_Asset&amp;diff=22163"/>
		<updated>2019-11-23T01:22:21Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: Created page with &amp;quot;The new TRS19 EMD F7 cabin has the ability to change the color of the nose to match the road name of your locomotive asset. Changing the color of the nose is as simple as addi...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The new TRS19 EMD F7 cabin has the ability to change the color of the nose to match the road name of your locomotive asset. Changing the color of the nose is as simple as adding a few lines into the config of your locomotive of choice. &lt;br /&gt;
&lt;br /&gt;
[[File:F7IntroPage.png|800px]]&lt;br /&gt;
&lt;br /&gt;
== Adding the Cab to your Asset ==&lt;br /&gt;
&lt;br /&gt;
To begin, open the config of the locomotive you wish to have a custom nose color for. For this tutorial, we will be using &amp;lt;kuid2:999999:2222:1&amp;gt; 1 Hot Rod Special F7 from the DLS. It is recommended to open the config in a superior notepad program such as Notepad++ to preserve formatting. When the config for the Hot Rod F7 is opened, it looks something like this:&lt;br /&gt;
&lt;br /&gt;
    kuid                                    &amp;lt;kuid2:999999:2222:1&amp;gt;&lt;br /&gt;
    username                                &amp;quot;1 Hot Rod Special F7&amp;quot;&lt;br /&gt;
    kind                                    &amp;quot;traincar&amp;quot;&lt;br /&gt;
    trainz-build                            3.5&lt;br /&gt;
    engine                                  1&lt;br /&gt;
    enginespec                              &amp;lt;kuid:999999:42004250&amp;gt;&lt;br /&gt;
    enginesound                             &amp;lt;kuid:-1:42003000&amp;gt;&lt;br /&gt;
    hornsound                               &amp;lt;kuid:37581:1234&amp;gt;&lt;br /&gt;
    interior                                &amp;lt;kuid:217537:220&amp;gt;&lt;br /&gt;
    mesh-table&lt;br /&gt;
    {&lt;br /&gt;
      default&lt;br /&gt;
      {&lt;br /&gt;
        mesh                                &amp;quot;f7_hotrod_body/f7_hotrod_body.im&amp;quot;&lt;br /&gt;
        auto-create                         1&lt;br /&gt;
      }&lt;br /&gt;
  &lt;br /&gt;
      shadow&lt;br /&gt;
      {&lt;br /&gt;
        mesh                                &amp;quot;f7_hotrod_shadow/f7_hotrod_shadow.im&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    bogeys&lt;br /&gt;
    {&lt;br /&gt;
      0&lt;br /&gt;
      {&lt;br /&gt;
        bogey                               &amp;lt;kuid:999999:100100&amp;gt;&lt;br /&gt;
        reversed                            0&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    mass                                    100000&lt;br /&gt;
    company                                 &amp;quot;Auran Brew Crew&amp;quot;&lt;br /&gt;
    fonts                                   0&lt;br /&gt;
    smoke_shade                             0.5&lt;br /&gt;
    smoke_random                            2.6&lt;br /&gt;
    smoke_slowlife                          5&lt;br /&gt;
    smoke_fastlife                          4&lt;br /&gt;
    smoke_height                            2.3&lt;br /&gt;
    smoke_fastspeed                         100&lt;br /&gt;
    category-class                          &amp;quot;AC&amp;quot;&lt;br /&gt;
    category-era                            &amp;quot;2000s&amp;quot;&lt;br /&gt;
    category-region                         &amp;quot;AU&amp;quot;&lt;br /&gt;
    description                             &amp;quot;&amp;quot;&lt;br /&gt;
    author                                  &amp;quot;Brew Crew Productions&amp;quot;&lt;br /&gt;
    organisation                            &amp;quot;Auran Games Pty. Ltd.&amp;quot;&lt;br /&gt;
    contact-website                         &amp;quot;www.virtualtrainz.com&amp;quot;&lt;br /&gt;
    contact-email                           &amp;quot;helpdesk@auran.com&amp;quot;&lt;br /&gt;
    thumbnails&lt;br /&gt;
    {&lt;br /&gt;
      0&lt;br /&gt;
      {&lt;br /&gt;
        image                               &amp;quot;$screenshot$.jpg&amp;quot;&lt;br /&gt;
        width                               240&lt;br /&gt;
        height                              180&lt;br /&gt;
      }&lt;br /&gt;
      1&lt;br /&gt;
      {&lt;br /&gt;
        image                               &amp;quot;f7_hotrod_art\f7_hotrod_art_icon.texture&amp;quot;&lt;br /&gt;
        width                               128&lt;br /&gt;
        height                              64&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    kuid-table&lt;br /&gt;
    {&lt;br /&gt;
      0                                     &amp;lt;kuid:-1:101212&amp;gt;&lt;br /&gt;
      1                                     &amp;lt;kuid:-1:42003000&amp;gt;&lt;br /&gt;
      2                                     &amp;lt;kuid:-1:42003101&amp;gt;&lt;br /&gt;
      3                                     &amp;lt;kuid:999999:100100&amp;gt;&lt;br /&gt;
      4                                     &amp;lt;kuid:999999:42004250&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
The first thing to change is the interior kuid to reference the proper F7 cab. If your locomotive is right-hand drive and uses MPH, use the following kuid:&lt;br /&gt;
    &amp;lt;kuid:-25:1308&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Change the following line from: &lt;br /&gt;
    interior                                &amp;lt;kuid:217537:220&amp;gt;&lt;br /&gt;
to:&lt;br /&gt;
    interior                                &amp;lt;kuid:-25:1308&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The next step is to add an extensions table. Copy and paste the following code into your config:&lt;br /&gt;
&lt;br /&gt;
    extensions&lt;br /&gt;
    {&lt;br /&gt;
      f7cab_parameters&lt;br /&gt;
      {&lt;br /&gt;
        nosecolor                           &amp;quot;XXX&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
The placement of this code does not matter. I placed it directly under the interior tag line and above the mesh table to make editing the extensions easier to edit in the future. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    kuid                                    &amp;lt;kuid2:999999:2222:1&amp;gt;&lt;br /&gt;
    username                                &amp;quot;1 Hot Rod Special F7&amp;quot;&lt;br /&gt;
    kind                                    &amp;quot;traincar&amp;quot;&lt;br /&gt;
    trainz-build                            3.5&lt;br /&gt;
    engine                                  1&lt;br /&gt;
    enginespec                              &amp;lt;kuid:999999:42004250&amp;gt;&lt;br /&gt;
    enginesound                             &amp;lt;kuid:-1:42003000&amp;gt;&lt;br /&gt;
    hornsound                               &amp;lt;kuid:37581:1234&amp;gt;&lt;br /&gt;
    interior                                &amp;lt;kuid:217537:220&amp;gt;&lt;br /&gt;
    extensions&lt;br /&gt;
    {&lt;br /&gt;
      f7cab_parameters&lt;br /&gt;
      {&lt;br /&gt;
        nosecolor                           &amp;quot;XXX&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    mesh-table&lt;br /&gt;
    {&lt;br /&gt;
      default&lt;br /&gt;
      {&lt;br /&gt;
        mesh                                &amp;quot;f7_hotrod_body/f7_hotrod_body.im&amp;quot;&lt;br /&gt;
        auto-create                         1&lt;br /&gt;
      }&lt;br /&gt;
  &lt;br /&gt;
      shadow&lt;br /&gt;
      {&lt;br /&gt;
        mesh                                &amp;quot;f7_hotrod_shadow/f7_hotrod_shadow.im&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    ....&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Modifying the Nose color ==&lt;br /&gt;
&lt;br /&gt;
The final step is to change &amp;quot;XXX&amp;quot; to an appropriate string. Use the right column in the following table to determine the proper string to replace &amp;quot;XXX&amp;quot; with. The strings are case sensitive, so make sure it matches the table or else the cabin will default to black.&lt;br /&gt;
&lt;br /&gt;
By default, the F7 Cab supports these pre-built liveries:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Supported Road names&lt;br /&gt;
|-&lt;br /&gt;
|String &#039;&#039;&#039;(case sensitive!)&#039;&#039;&#039;&lt;br /&gt;
|Color&lt;br /&gt;
|Roadname&lt;br /&gt;
|-&lt;br /&gt;
|red&lt;br /&gt;
|Red&lt;br /&gt;
|Generic Red&lt;br /&gt;
|-&lt;br /&gt;
|superchief&lt;br /&gt;
|Red with Yellow Stripe&lt;br /&gt;
|ATSF Warbonnet&lt;br /&gt;
|-&lt;br /&gt;
|darkblue&lt;br /&gt;
|Dark Blue with Yellow Stripe&lt;br /&gt;
|ATSF Blue Warbonnet&lt;br /&gt;
|-&lt;br /&gt;
|green&lt;br /&gt;
|Green&lt;br /&gt;
|Burlington Northern&lt;br /&gt;
|-&lt;br /&gt;
|orange&lt;br /&gt;
|Orange/Green&lt;br /&gt;
|Great Northern&lt;br /&gt;
|-&lt;br /&gt;
|yellow&lt;br /&gt;
|Yellow&lt;br /&gt;
|North Western/Alaska&lt;br /&gt;
|-&lt;br /&gt;
|lightgrey&lt;br /&gt;
|Light Grey&lt;br /&gt;
|Canadian Pacific&lt;br /&gt;
|-&lt;br /&gt;
|blackred&lt;br /&gt;
|Red with black nose top&lt;br /&gt;
|Canadian National / CP Rail&lt;br /&gt;
|-&lt;br /&gt;
|winetrain&lt;br /&gt;
|Green/Gold&lt;br /&gt;
|Nappa Valley Wine Train&lt;br /&gt;
|-&lt;br /&gt;
|silver&lt;br /&gt;
|Silver/Black&lt;br /&gt;
|Southern Pacific&lt;br /&gt;
|-&lt;br /&gt;
|unionpacific&lt;br /&gt;
|Yellow with Green nose top&lt;br /&gt;
|Union Pacific&lt;br /&gt;
|-&lt;br /&gt;
|darkgrey&lt;br /&gt;
|Dark Grey with Dark Blue nose top&lt;br /&gt;
|Baltimore and Ohio&lt;br /&gt;
|-&lt;br /&gt;
|amtrakphase1&lt;br /&gt;
|Black/Red/White&lt;br /&gt;
|Amtrak Phase I&lt;br /&gt;
|-&lt;br /&gt;
|hotrod&lt;br /&gt;
|Black with Flames&lt;br /&gt;
|Hot Rod Special&lt;br /&gt;
|-&lt;br /&gt;
|prr_red_5stripe&lt;br /&gt;
|PRR Tuscan with 5 Stripe&lt;br /&gt;
|Pennsylvania Railroad&lt;br /&gt;
|-&lt;br /&gt;
|prr_red_1stripe&lt;br /&gt;
|PRR Tuscan with 1 Stripe&lt;br /&gt;
|Pennsylvania Railroad&lt;br /&gt;
|-&lt;br /&gt;
|prr_green_5stripe&lt;br /&gt;
|PRR Brunswick with 5 Stripe&lt;br /&gt;
|Pennsylvania Railroad&lt;br /&gt;
|-&lt;br /&gt;
|prr_green_1stripe&lt;br /&gt;
|PRR Brunswick with 1 Stripe&lt;br /&gt;
|Pennsylvania Railroad&lt;br /&gt;
|-&lt;br /&gt;
|southernpacific_orange&lt;br /&gt;
|Daylight Paint Scheme&lt;br /&gt;
|Southern Pacific&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The final config would look something like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    kuid                                    &amp;lt;kuid2:999999:2222:1&amp;gt;&lt;br /&gt;
    username                                &amp;quot;1 Hot Rod Special F7&amp;quot;&lt;br /&gt;
    kind                                    &amp;quot;traincar&amp;quot;&lt;br /&gt;
    trainz-build                            3.5&lt;br /&gt;
    engine                                  1&lt;br /&gt;
    enginespec                              &amp;lt;kuid:999999:42004250&amp;gt;&lt;br /&gt;
    enginesound                             &amp;lt;kuid:-1:42003000&amp;gt;&lt;br /&gt;
    hornsound                               &amp;lt;kuid:37581:1234&amp;gt;&lt;br /&gt;
    interior                                &amp;lt;kuid:217537:220&amp;gt;&lt;br /&gt;
    extensions&lt;br /&gt;
    {&lt;br /&gt;
      f7cab_parameters&lt;br /&gt;
      {&lt;br /&gt;
        nosecolor                           &amp;quot;hotrod&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    mesh-table&lt;br /&gt;
    {&lt;br /&gt;
      default&lt;br /&gt;
      {&lt;br /&gt;
        mesh                                &amp;quot;f7_hotrod_body/f7_hotrod_body.im&amp;quot;&lt;br /&gt;
        auto-create                         1&lt;br /&gt;
      }&lt;br /&gt;
  &lt;br /&gt;
      shadow&lt;br /&gt;
      {&lt;br /&gt;
        mesh                                &amp;quot;f7_hotrod_shadow/f7_hotrod_shadow.im&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    bogeys&lt;br /&gt;
    {&lt;br /&gt;
      0&lt;br /&gt;
      {&lt;br /&gt;
        bogey                               &amp;lt;kuid:999999:100100&amp;gt;&lt;br /&gt;
        reversed                            0&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    mass                                    100000&lt;br /&gt;
    company                                 &amp;quot;Auran Brew Crew&amp;quot;&lt;br /&gt;
    fonts                                   0&lt;br /&gt;
    smoke_shade                             0.5&lt;br /&gt;
    smoke_random                            2.6&lt;br /&gt;
    smoke_slowlife                          5&lt;br /&gt;
    smoke_fastlife                          4&lt;br /&gt;
    smoke_height                            2.3&lt;br /&gt;
    smoke_fastspeed                         100&lt;br /&gt;
    category-class                          &amp;quot;AC&amp;quot;&lt;br /&gt;
    category-era                            &amp;quot;2000s&amp;quot;&lt;br /&gt;
    category-region                         &amp;quot;AU&amp;quot;&lt;br /&gt;
    description                             &amp;quot;&amp;quot;&lt;br /&gt;
    author                                  &amp;quot;Brew Crew Productions&amp;quot;&lt;br /&gt;
    organisation                            &amp;quot;Auran Games Pty. Ltd.&amp;quot;&lt;br /&gt;
    contact-website                         &amp;quot;www.virtualtrainz.com&amp;quot;&lt;br /&gt;
    contact-email                           &amp;quot;helpdesk@auran.com&amp;quot;&lt;br /&gt;
    thumbnails&lt;br /&gt;
    {&lt;br /&gt;
      0&lt;br /&gt;
      {&lt;br /&gt;
        image                               &amp;quot;$screenshot$.jpg&amp;quot;&lt;br /&gt;
        width                               240&lt;br /&gt;
        height                              180&lt;br /&gt;
      }&lt;br /&gt;
      1&lt;br /&gt;
      {&lt;br /&gt;
        image                               &amp;quot;f7_hotrod_art\f7_hotrod_art_icon.texture&amp;quot;&lt;br /&gt;
        width                               128&lt;br /&gt;
        height                              64&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    kuid-table&lt;br /&gt;
    {&lt;br /&gt;
      0                                     &amp;lt;kuid:-1:101212&amp;gt;&lt;br /&gt;
      1                                     &amp;lt;kuid:-1:42003000&amp;gt;&lt;br /&gt;
      2                                     &amp;lt;kuid:-1:42003101&amp;gt;&lt;br /&gt;
      3                                     &amp;lt;kuid:999999:100100&amp;gt;&lt;br /&gt;
      4                                     &amp;lt;kuid:999999:42004250&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
==Return to Index==&lt;br /&gt;
 &lt;br /&gt;
[[HowToGuides|&amp;lt;&amp;lt; How To Guides]]&lt;br /&gt;
&lt;br /&gt;
[[Category:How-to guides]]&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=File:F7IntroPage.png&amp;diff=22162</id>
		<title>File:F7IntroPage.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=File:F7IntroPage.png&amp;diff=22162"/>
		<updated>2019-11-23T01:13:44Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=HowTo/Build_a_cab_interior&amp;diff=21806</id>
		<title>HowTo/Build a cab interior</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=HowTo/Build_a_cab_interior&amp;diff=21806"/>
		<updated>2019-11-05T20:15:37Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: Added visual representation of a pull rope type&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Trainz uses an [[KIND_Interior|interior]] object to represent a locomotive cab, or view from another vehicle, e.g. a passenger coach, brake van or caboose. Interiors can also be attached to some non-train assets. For this howto, I am going to assume that we are creating a traincar interior, and focus primarily on a cab interior for a diesel or electric locomotive.&lt;br /&gt;
&lt;br /&gt;
=Basic structure=&lt;br /&gt;
&lt;br /&gt;
The basic structure of a cab is quite similar to a number of different assets. You will have a main mesh with a number of attached sub-meshes, which are arranged using a [[%22mesh-table%22_container_(interior_version)|mesh-table]].&lt;br /&gt;
&lt;br /&gt;
The main cab mesh typically consists of the interior walls, roof and floor of the cab, the control desk or stand, all furniture or other static objects visible inside the cab, and also all parts of the locomotive exterior that are visible from inside the cab - e.g. the top of any projecting nose below the cab windows. Remember to consider the sightlines out of rear windows too for visible bodywork panels - the user can move around the cab and rotate the camera to any angle. Users are not restricted to looking forward out of the front windows only.&lt;br /&gt;
&lt;br /&gt;
=Artwork considerations=&lt;br /&gt;
&lt;br /&gt;
There are some differences in style between the construction of an interior object and a typical trainz object.&lt;br /&gt;
&lt;br /&gt;
Except in very specific circumstances, there will not be more than one interior object in existence at any time, and that interior is always viewed from very close range - the user is inside it. Because of this, interiors are typically modelled with a high polygon count and with high resolution textures, to give an impressive visual feel. LOD is not used, as the user never gets far enough away from the interior for LOD techniques to have worthwhile benefit.&lt;br /&gt;
&lt;br /&gt;
Trainz lights interior objects differently to map objects like buildings and other scenery - the main illumination is ambient, not directional. (A steam loco does have a directional light coming from the firebox, but a diesel or electric cab typically has no directional light inside, and relies entirely on ambient illumination).&lt;br /&gt;
&lt;br /&gt;
With ambient illumination, effects such as normal and specular mapping do not have much (if any) effect. Because of this, more effort needs to be put into the diffuse texture for a cab interior than would normally be applied to Trainz objects. Drawing or baking shadows and other effects into the diffuse textures is required to produce a nice looking cab interior.&lt;br /&gt;
&lt;br /&gt;
An example cab would be the [[File:PB_interior.rar]]&lt;br /&gt;
&lt;br /&gt;
=A basic config file=&lt;br /&gt;
&lt;br /&gt;
The minimal required config for an interior to show in-game is:&lt;br /&gt;
&lt;br /&gt;
 kind                                    interior&lt;br /&gt;
 kuid                                    &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&amp;lt;kuid2:YOUR:KUID:HERE&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
 trainz-build                            2.9&lt;br /&gt;
 username                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Your interior name here&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
 category-class                          ZI&lt;br /&gt;
 &lt;br /&gt;
 mesh-table&lt;br /&gt;
 {&lt;br /&gt;
   default&lt;br /&gt;
   {&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;your_interior_mesh_name.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Note: There are also other base tags that should be added that are common to all asset types - e.g. the download station will require a valid thumbnails container before the asset can be uploaded. See the documentation for [[KIND TrainzBaseSpec]] for details of tags which apply to all trainz assets. Depending on which Trainz version you have and which trainz-build number you have specified, some of these may be required - content manager will tell you what is required, listing missing tags as errors.&lt;br /&gt;
&lt;br /&gt;
==camera positions==&lt;br /&gt;
&lt;br /&gt;
If we load a cab up with that config file, we will note that the view is not particularly appealing. Chances are we&#039;re right down near the floor. To fix this, we need to define some default positions for camera views. This is done with the [[%22cameralist%22_Container|cameralist container]] and the [[KIND_Interior#cameradefault|cameradefault]] tag.&lt;br /&gt;
Add the following to your config.txt file:&lt;br /&gt;
&lt;br /&gt;
 cameralist&lt;br /&gt;
 {&lt;br /&gt;
   camera0                               0,0,2,0,0&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 cameradefault                           0&lt;br /&gt;
&lt;br /&gt;
The cameralist container can contain any number of cameras, but they must be numbered sequentially and start at zero.&lt;br /&gt;
&lt;br /&gt;
The five numbers are the X, Y and Z coordinates of the camera in metres relative to the 0,0,0 point of the interior mesh, and the Yaw and Pitch in radians. Luckily you don&#039;t have to work these values out from scratch - add the line &amp;quot;-freeintcam&amp;quot; to your trainzoptions.txt file, and you can move the camera about in the cab with the mouse and keyboard, and the precise position will be displayed in the bottom right corner.&lt;br /&gt;
&lt;br /&gt;
When you have found a position you like, write the numbers down. When you&#039;ve got a good selection of positions recorded, add them to the cameralist container.&lt;br /&gt;
&lt;br /&gt;
You may wish to return to this and tweak the values later once all the controls are in place - but it&#039;s handy to have a good starting position for the camera while testing.&lt;br /&gt;
&lt;br /&gt;
=Cab controls=&lt;br /&gt;
&lt;br /&gt;
A locomotive cab interior needs working cab controls. What fun would sitting in the drivers seat be without being able to pull on the levers, change the switches, and watch the gauges and dials move?&lt;br /&gt;
&lt;br /&gt;
The moving part of each lever, switch, gauge or dial is created as a separate mesh, which is then attached to the cab with an attachment point. (The static part, e.g. guide rails for levers, should be part of the cab mesh itself).&lt;br /&gt;
&lt;br /&gt;
==Lever==&lt;br /&gt;
&lt;br /&gt;
The lever is the basic input device in a cab. It is based on rotational movement, and any object that requires rotational movement (e.g. a wheel or ring) can be implemented as a lever.&lt;br /&gt;
&lt;br /&gt;
If you actually want linear movement, you can still use a lever - just move the attachment point a long way away - e.g. 10 or 20 metres away from the control. The resulting small arc will not be noticable over the length of movement. As an example, sliding windows in Trainz cabs have been implemented as levers &amp;quot;attached&amp;quot; something like 10 or 20 metres out to the side of the vehicle for a long time. (The exception to this is a horn pull rope - trainz provides a control specifically for this purpose).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will need to create the lever in your modelling program aligned correctly - the rotation needs to be around the Z axis, and main part of the object will point along the Y axis.&lt;br /&gt;
&lt;br /&gt;
When adding the attachment point to the main mesh, align it so the Z axis is the axis of rotation. It is common to point the Y axis at the default position - e.g. levers in the &#039;off&#039; or &#039;neutral&#039; position, and needles pointing to zero. This is not strictly required, as the range of movement can be adjusted at both ends, but it provides a handy reference when creating the config file.&lt;br /&gt;
&lt;br /&gt;
It is worth noting that you can reuse a mesh for multiple attachments. This is particularly useful for switches, as identical appearance switches are often used repeatedly in a cab for different purposes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Throttle Lever===&lt;br /&gt;
&lt;br /&gt;
A good example of a standard lever in use is a locomotive throttle control. A typical US diesel throttle has 9 notched positions (from 0 to 8 inclusive).&lt;br /&gt;
&lt;br /&gt;
As noted above, the lever is created in the modelling package so it points along the Y axis and the axis of rotation is along the Z axis. The attachment point is added to the cab interior mesh at the correct position, and rotated so the Z axis is aligned with the axis of rotation, and the Y axis points to the default position.&lt;br /&gt;
&lt;br /&gt;
Now we need to add an entry to the config file to add our throttle lever.&lt;br /&gt;
&lt;br /&gt;
Into the mesh table, add an entry like this:&lt;br /&gt;
&lt;br /&gt;
   throttle_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;throttle_lever.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.throttle_lever&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,8&lt;br /&gt;
     angles                              0,1.57&lt;br /&gt;
     notches                             0,0.125,0.25,0.375,0.5,0.625,0.75,0.875,1&lt;br /&gt;
     notchheight                         1,2,2,2,2,2,2,2,1&lt;br /&gt;
     radius                              0.35&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
... remember to set your attachment point and mesh name correctly.&lt;br /&gt;
&lt;br /&gt;
The &#039;angles&#039; line defines how far the control rotates. It is in radians - there are 2 x Pi (6.28) radians in a complete circle. My default of 1.57 will give you about 90 degrees of rotation, in the positive direction. Adjust this number to get the control to rotate the correct amount. You should be able to work out the number you need in your modelling program by using the rotate tool on the attachment point, and recording the amount of rotation required to move to the intended maximum location. It should not require significant trial and error.&lt;br /&gt;
&lt;br /&gt;
The &#039;radius&#039; line defines the position of the notch position overlay and the text label. It is in metres. If the overlay is too close in, increase this number. If it is too far out, decrease it.&lt;br /&gt;
&lt;br /&gt;
If the lever is the wrong way round (notch 8 is at the wrong end), swap the numbers in the &#039;angles&#039; tag over, so the higher one is first.&lt;br /&gt;
&lt;br /&gt;
If the lever moves the wrong way when you drag it with the mouse (i.e. it goes left in response to a right drag), add the line:&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
This will invert the mouse movement.&lt;br /&gt;
&lt;br /&gt;
The fact we called this lever &amp;quot;throttle_lever&amp;quot; means it will be used to control the throttle by the default cab script.&lt;br /&gt;
&lt;br /&gt;
So what happens if we wanted a different number of notches? Below is an example of a throttle which has 22 notches. The second value in the &#039;limits&#039; tag has been edited to return up to notch 22, and more entries have been added to the &#039;notches&#039; and &#039;notchheight&#039; tags:&lt;br /&gt;
&lt;br /&gt;
   throttle_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;throttle_lever.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.throttle_lever&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,22&lt;br /&gt;
     angles                              0,0.94&lt;br /&gt;
     notches                             0,0.045,0.091,0.136,0.182,0.227,0.273,0.318,0.364,0.409,0.455,0.5,0.545,0.591,0.636,0.682,0.727,0.773,0.818,0.864,0.909,0.955,1&lt;br /&gt;
     notchheight                         1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1&lt;br /&gt;
     radius                              0.35&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Reverser Lever===&lt;br /&gt;
&lt;br /&gt;
The reverser lever is created in a similar manner to throttle lever. The mesh table entry for this will look like:&lt;br /&gt;
&lt;br /&gt;
   reverser_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;reverser_lever.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.reverser_lever&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,2&lt;br /&gt;
     angles                              -0.79,0.79&lt;br /&gt;
     notches                             0,0.5,1&lt;br /&gt;
     notchheight                         1,1,1&lt;br /&gt;
     radius                              0.25&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
In this case, because the &#039;angles&#039; entry has a range both positive and negative, the lever can move in both directions relative to the attachment point. The game will set the default position to neutral (1), so if you&#039;ve lined up your attachment point at one end, don&#039;t worry - you can use angles which range from zero if you need to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Train Air Brake Lever===&lt;br /&gt;
&lt;br /&gt;
There are two types of train air brake lever. A given locomotive only has one type - the brakes are either require manual lapping or are self-lapping. Use the appropriate name and configuration for the loco you are modelling.&lt;br /&gt;
&lt;br /&gt;
====Manual Lapped Brakes====&lt;br /&gt;
&lt;br /&gt;
The manual train brake lever has five positions numbered from zero to four, each one representing a different function. Those functions are Release, Lap, Application, Emergency and Handle Off respectively.&lt;br /&gt;
&lt;br /&gt;
A lever for a manual lap train air brake is defined as follows:&lt;br /&gt;
&lt;br /&gt;
   trainbrakelap_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;train_brake_lap_lever.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.train_brake_lap_lever&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,4&lt;br /&gt;
     angles                              0,0.94&lt;br /&gt;
     notches                             0,0.25,0.5,0.75,1&lt;br /&gt;
     notchheight                         1,1,1,1,1&lt;br /&gt;
     radius                              0.25&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
In this case, the attachment for the lever has been created in the &#039;release&#039; position. If it had been created in the &#039;handle off&#039; position, the angle tag would have been more like:&lt;br /&gt;
&lt;br /&gt;
     angles                             -0.94,0&lt;br /&gt;
&lt;br /&gt;
====Self Lapping Brakes====&lt;br /&gt;
&lt;br /&gt;
A self lapping trainbrake lever has a number of primary notches similar to the manual lap train brake lever. However, instead of a &#039;lap&#039; and &#039;apply&#039; position, it has a grade of application between the &#039;initial&#039; and &#039;full application&#039; positions. An example of a self-lapping brake handle is this one:&lt;br /&gt;
&lt;br /&gt;
   trainbrake_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;train_brake_lever.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.train_brake_lever&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,4&lt;br /&gt;
     angles                              0,0.94&lt;br /&gt;
     notches                             0,0.25,0.27,0.29,0.31,0.33,0.35,0.37,0.39,0.41,0.43,0.45,0.47,0.49,0.5,0.75,1&lt;br /&gt;
     notchheight                         1,1,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1&lt;br /&gt;
     radius                              0.25&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
In this case, there are 14 possible levels of brake application - initial at 0.25, 12 intermediate levels, and full application at 0.5. There is no restriction on the number of intermediate levels - if you are modelling a prototype brake handle with a specific number, you may create precisely that number of notches and arrange them between 0.25 and 0.5 as required.&lt;br /&gt;
&lt;br /&gt;
===Combined throttle brake lever===&lt;br /&gt;
&lt;br /&gt;
There is also another control option - a combined throttle brake lever. This type of control is often found on multiple unit trains. This control is split into two halves. The first half of the movement is an inverted throttle - i.e. max power at zero, no power at 0.5. The second half is an auto lapped train brake application, with 0.5 as release, and 1.0 as emergency.  An example of how to configure a combined throttle and brake lever is below:&lt;br /&gt;
&lt;br /&gt;
   throttle_brake_lever&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;lever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;throttle_brake_handle.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.throttle_brake_handle&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,16&lt;br /&gt;
     angles                              0.94,-0.94&lt;br /&gt;
     notches                             0,0.0625,0.125,0.1875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.8125,0.75,0.875,0.9375,1&lt;br /&gt;
     notchheight                         1,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,1&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
     radius                              0.12&lt;br /&gt;
     invert                              1&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
Unfortunately, trains that use this type of control generally use blended and/or EP brakes, and this control uses the standard Trainz air brake, which operates in a distinctly different manner, and as a result, can feel very wrong for this control type. (See the section on scripting controls for how a better combined brake and throttle lever may be implemented).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Pull lever==&lt;br /&gt;
&lt;br /&gt;
This is a sprung lever. You pull on this lever to activate it, and when you let it go, it returns to the original position. This kind of action is commonly associated with a locomotive horn, and this is what I am using as an example:&lt;br /&gt;
&lt;br /&gt;
   horn&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;pulllever&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;horn.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.horn&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     angles                              0,-0.55&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
     radius                              -0.02&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0,0&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
==Switch==&lt;br /&gt;
&lt;br /&gt;
A switch is a lever that does not require the user to &#039;drag&#039; it with the mouse - it operates on a click only. This is used for smaller controls that are &#039;on&#039; or &#039;off&#039;, and do not have intermediate positions. Parameters are much like they are for a &#039;lever&#039;, only a switch should only have two notches - on and off.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, some things you&#039;d normally associate with being a &#039;switch&#039; (e.g. the headlight switch control) require mulitple positions, and will need to remain as a &#039;lever&#039; in order to allow the player to set the correct position for the control.&lt;br /&gt;
&lt;br /&gt;
An example of a switch would be:&lt;br /&gt;
&lt;br /&gt;
   switch1&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;switch&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;switch.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.switch1&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     angles                              1.4,0&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0,0&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
As &#039;switch&#039; was introduced in TS2009 SP2, interiors that use kind &#039;switch&#039; controls should be marked trainz-build 3.1 or later in the config.txt.&lt;br /&gt;
&lt;br /&gt;
==button==&lt;br /&gt;
&lt;br /&gt;
A button is a momentary contact press-and-hold button. This is a brand new control added for TS12 patch 2, released end of june 2011. Content using this feature should have trainz-build 3.6 or later in the config.txt.&lt;br /&gt;
&lt;br /&gt;
Finally this brings Trainz the &amp;quot;click to press&amp;quot;, &amp;quot;hold to hold pressed&amp;quot;, &amp;quot;let go to release&amp;quot; style momentary pushbutton. &lt;br /&gt;
&lt;br /&gt;
   button1&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;button&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;switch.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.switch1&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     angles                              0,0.1&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0,0&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Pull rope==&lt;br /&gt;
&lt;br /&gt;
This is a linear pull rope control. Unlike the rotating controls discussed previously, this control type moves the mesh linearly along the Z axis of the attachment. It behaves as you would expect from a suspended rope - click and drag to pull, let go to release. It will spring back to it&#039;s initial position in the same manner as kind &#039;pulllever&#039;.&lt;br /&gt;
&lt;br /&gt;
[[File:Pullropetype.png|800px]]]&lt;br /&gt;
&lt;br /&gt;
   horn&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;pullrope&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;horn_rope.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.horn&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,1&lt;br /&gt;
     angles                              0.1,0&lt;br /&gt;
     notches                             0,1&lt;br /&gt;
     notchheight                         0,0&lt;br /&gt;
     mousespeed                          -1&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
==needle==&lt;br /&gt;
&lt;br /&gt;
A needle is the standard Trainz output device. Like the lever, it is based on rotational movement, and any gauge, dial, or other output device based on rotational movement can be implemented. Any static part of the gauge should be modelled as part of the cab, and only the moving part as part of the needle. Like the lever, the rotation will be around the Z axis of the needle, and it is common practice to point the point of the needle along the Y axis. Cabs often have a number of similar gauges, and re-using the same needle repeatedly in each gauge is a lot easier if this setup is done consistently.&lt;br /&gt;
&lt;br /&gt;
As an example of a needle, here is a basic speedometer:&lt;br /&gt;
&lt;br /&gt;
   speedo_needle&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;needle&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;speedo_needle.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.speedo_needle&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,67.056&lt;br /&gt;
     angles                              0,4.712&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
The default cab script knows to move the &amp;quot;speedo_needle&amp;quot; object as the train speed changes, so simply by naming this control &amp;quot;speedo_needle&amp;quot;, it has become a speedometer.&lt;br /&gt;
&lt;br /&gt;
For a speedo, the &#039;limits&#039; values will be the minimum and maximum reportable speed in m/s.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Creating other rotational gauges is similar - refer to the [[%22mesh-table%22_container_(interior_version)|mesh-table (interior version)]] documentation to see all the different values that Trainz can show by default.&lt;br /&gt;
&lt;br /&gt;
==light==&lt;br /&gt;
&lt;br /&gt;
Another common type of control is a light. This is created simply as a textured plane, which is either hidden or shown to represent light off or light on. It is attached as any other standard mesh attachment would be - there is no rotation to worry about here.&lt;br /&gt;
&lt;br /&gt;
   wheelslip_light&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;light&amp;quot;&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;wheelslip_light.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.wheelslip_light&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
This light will be used to show wheelslip in a default cab. &lt;br /&gt;
&lt;br /&gt;
==animated-lever==&lt;br /&gt;
&lt;br /&gt;
If you want more complex movement than simple rotation, you have the option of animating the lever and using kind &#039;animated-lever&#039;. This will use an animation you create in your modelling program to move the control about. An example of this is visible in the MN ACMU cab. (I&#039;ve reduced the number of notches here for readability - the real one has 32, not 16).&lt;br /&gt;
&lt;br /&gt;
   throttle_lever&lt;br /&gt;
   {&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;throttlehandle.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     anim                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;throttlehandle.kin&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.throttlelever&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     limits                              0,16&lt;br /&gt;
     notches                             0,0.0625,0.125,0.1875,0.25,0.3125,0.375,0.4375,0.5,0.5625,0.625,0.6875,0.8125,0.75,0.875,0.9375,1&lt;br /&gt;
     notchheight                         1,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,1&lt;br /&gt;
     att-parent                          &amp;quot;default&amp;quot;&lt;br /&gt;
     kind                                &amp;quot;animated-lever&amp;quot;&lt;br /&gt;
     test-collisions                     0&lt;br /&gt;
     mousespeed                          1&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
Where the standard lever is rotated between it&#039;s angles to move from notch to notch, the animated-lever has it&#039;s animation played to the corresponding frame.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===collision-proxy===&lt;br /&gt;
&lt;br /&gt;
Animated levers can be hard to grab hold of compared to normal levers. To get around this, an invisible mesh is used to show the game the range of movement the control has, and to allow the user to grab the lever more easily. This example again comes from the MN ACMU cab:&lt;br /&gt;
&lt;br /&gt;
   throttle-collision-box&lt;br /&gt;
   {&lt;br /&gt;
     mesh                                &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;throttlehandleselection.im&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     att-parent                          &amp;quot;throttle_lever&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.selection_box&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
     kind                                &amp;quot;collision-proxy&amp;quot;&lt;br /&gt;
     opacity                             0&lt;br /&gt;
     collision-parent                    &amp;quot;throttle_lever&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
==animated-dial==&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve been paying attention to levers, needles and animated levers, I think you can guess where we are going with this one. This is an animated needle. Instead of rotating between the angles specified, it plays it&#039;s animation to the relevant frame to show the value. Use this when what you want to achieve can&#039;t be done with simple rotational movement.&lt;br /&gt;
&lt;br /&gt;
(Example usage for this control to follow).&lt;br /&gt;
&lt;br /&gt;
==digital-dial==&lt;br /&gt;
&lt;br /&gt;
Some locomotives use a digital readout rather than analogue dials.&lt;br /&gt;
&lt;br /&gt;
Trainz has two control kinds to support digital displays - one for speed units, and one for pressure units. Instead of angles of movement, these both have some font specific options to configure how the digits appear.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;font&amp;quot; defines the typeface. For a list of valid typefaces, see the [[%22mesh-table%22_container_(interior_version)#font|mesh-table (interior version)]] documentation. Generally this follows closely with a number of default windows font names.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;fontsize&amp;quot; defines the size of the font. The default value for this is 0.02, and this is a pretty respectable size display.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;fontcolor&amp;quot; defines the RGB color of the text. Each value is a floating point number between 0.0 and 1.0.&lt;br /&gt;
&lt;br /&gt;
===digital-dial-spd===&lt;br /&gt;
&lt;br /&gt;
For a speedometer (or any other gauge that shows units in speed, e.g. a speed limit display), use kind &#039;digital-dial-spd&#039;.&lt;br /&gt;
&lt;br /&gt;
An example speedometer using this kind would be declared as:&lt;br /&gt;
&lt;br /&gt;
   speedo_needle2&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;digital-dial-spd&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.digispeedo&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     font                                &amp;quot;arial&amp;quot;&lt;br /&gt;
     fontsize                            0.01&lt;br /&gt;
     fontcolor                           1.0,1.0,1.0&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
===digital-dial-prs===&lt;br /&gt;
&lt;br /&gt;
For a display using pressure units, use digital-dial-prs. This is a digital brake pipe pressure gauge:&lt;br /&gt;
&lt;br /&gt;
   bptrainbrakepipe_needle2&lt;br /&gt;
   {&lt;br /&gt;
     kind                                &amp;quot;digital-dial-prs&amp;quot;&lt;br /&gt;
     att                                 &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;a.trainpipe_pressure&amp;lt;/span&amp;gt;&amp;quot;&lt;br /&gt;
     font                                &amp;quot;arial&amp;quot;&lt;br /&gt;
     fontsize                            0.01&lt;br /&gt;
     fontcolor                           0.0,1.0,0.0&lt;br /&gt;
     auto-create                         1&lt;br /&gt;
   }&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
==firebox==&lt;br /&gt;
&lt;br /&gt;
The firebox control is a special kind to implement the fire of a steam locomotive.&lt;br /&gt;
&lt;br /&gt;
(Further information about this specific control to follow).&lt;br /&gt;
&lt;br /&gt;
Note:  Some steam cab interior models use the firebox, fireglow and burning coal effects found in the Auran PB15 cab interior.  This can cause quite severe flickering effects in some models  The intensity of flickering varies on the textures used and can be attenuated by use of darker colours.  The flickering can be eliminated by not using the firebox effect.  The fireglow and burning coal (coal) effects are OK.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note: This feature does not work currently in T:ANE and TRS19.&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can, of course, always make your own.&lt;br /&gt;
&lt;br /&gt;
=Scripting additional behaviour in a cab=&lt;br /&gt;
&lt;br /&gt;
A lot can be achieved in Trainz purely by naming the controls correctly and relying on Trainz default cab scripts to make them work. A quite reasonable cab can be made for many locomotives without having to do any scripting whatsoever.&lt;br /&gt;
&lt;br /&gt;
However, a lot more realism can be achieved by scripting the cab. Additional features can be added beyond what Trainz supports, including new types of controls, or extended behaviour on existing controls.&lt;br /&gt;
&lt;br /&gt;
The first thing to consider when looking at scripting a cab, is &amp;quot;is the cab the best place for this feature?&amp;quot;. A cab is not a persistent asset, which means it can go away at any point. When it&#039;s gone, it isn&#039;t running it&#039;s script. Consequently, it is a bad place for any persistent or time based logic - it should only be used to script the immediate behaviour of the controls. Anything beyond this should be implemented the vehicle itself or possibly a script library, both of which are more persistent objects.&lt;br /&gt;
&lt;br /&gt;
If all you want to achieve is to add some simple extra features (e.g. a display of signal aspects within the cab), you can derive from the trainz standard classes, and inherit the default behaviour when adding your new behaviour. This means you can concentrate on just your extra feature, and don&#039;t have to worry about making existing functionality work.&lt;br /&gt;
&lt;br /&gt;
If you want to do something a little more advanced (e.g. change the behaviour of the throttle and/or brake controllers), then you are probably best deriving your cab script from the &#039;cabin&#039; class, ignoring the default cab scripts, and implementing your required behaviour from scratch. This gives you a lot more control, but you do need to do more yourself.&lt;br /&gt;
&lt;br /&gt;
For some examples of the first route, have a look at the MN cabs - the M7 or the ACMU are good examples. Both have a cab signal repeater implemented in the cab interior script, and use the base functionality for almost everything else.&lt;br /&gt;
&lt;br /&gt;
-~= To Be Continued... =~-&lt;br /&gt;
&lt;br /&gt;
==Return to Index==&lt;br /&gt;
 &lt;br /&gt;
[[HowToGuides|&amp;lt;&amp;lt; How To Guides]]&lt;br /&gt;
&lt;br /&gt;
[[Category:How-to guides]]&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=File:Pullropetype.png&amp;diff=21805</id>
		<title>File:Pullropetype.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=File:Pullropetype.png&amp;diff=21805"/>
		<updated>2019-11-05T20:13:03Z</updated>

		<summary type="html">&lt;p&gt;Gdennish: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Gdennish</name></author>
	</entry>
</feed>