KIND tni-controls-plugin

From TrainzOnline
Jump to: navigation, search

KIND tni-controls-plugin is an asset type which provides an interface to a custom hardware control device, via TrainzNativeInterface. This asset type requires native code support and it's use is restricted to authorised TNI content creators only.

Contents

KIND Hierarchy

Parent Classes

Child Classes

  • none

Supported Tags

Each tni-controls-plugin asset supports the following tags:

 kind                                    "tni-controls-plugin"
 tni-library-name                        ""
 controllers
 {
 }

tni-library-name

Type: string
Desc: Specifies the filename of the plugin DLL to load (minus the platform-specific file extension). This plugin is expected find hardware controls at the OS level, and direct input from that device to TNIControls.

controllers

Type: controller-device-list
Desc: Specifies the various controller types supported by this plugin (e.g. a RailDriver device, a joystick, or a gamepad). The format for the controller subcontainers is documented separately here.

Example Config.txt

Sample config.txt file for a tni-controls-plugin asset, with some standard tags excluded for brevity:

 kuid                                    <kuid:401543:1080>
 kind                                    "tni-controls-plugin"
 trainz-build                            4.6
 username                                "RailDriver Plugin"
 tni-library-name                        "TNIRailDriver"
 category-class                          "YL"
 description                             "TNI plugin for RailDriver controller"
 
 controllers
 {
   raildriver
   {
     name-token                          "device-name-raildriver"
     desc-token                          "device-desc-raildriver"
     
     controls
     {
       reverser
       {
         name-token                      "control-name-reverser"
         type                            "lever"
       }
       throttle
       {
         name-token                      "control-name-throttle"
         type                            "lever"
       }
       
       etc.
     }
   }
 }
 
 string-table
 {
   device-name-raildriver                "RailDriver Desktop Cab Controller"
   device-desc-raildriver                "RailDriver Desktop Train Cab Controller, with prototypical levers and controls for the ultimate interface to computer-based railroading."
   control-name-reverser                 "RailDriver Reverser"
   control-name-throttle                 "RailDriver Throttle"
   
   etc.
 }

Categories

Personal tools