KIND tni-controls-plugin

From TrainzOnline
(Difference between revisions)
Jump to: navigation, search
(Created page with "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 c...")
 
(controllers)
 
(4 intermediate revisions by one user not shown)
Line 10: Line 10:
 
Each tni-controls-plugin asset supports the following tags:
 
Each tni-controls-plugin asset supports the following tags:
  
   kind                             "tni-controls-plugin"
+
   kind                                   "tni-controls-plugin"
   tni-library-name                 ""
+
   tni-library-name                       ""
 
   controllers
 
   controllers
 
   {
 
   {
Line 18: Line 18:
 
====tni-library-name====
 
====tni-library-name====
 
:Type: string
 
:Type: string
:Desc: Specifies the filename of the [[TrainzNativeInterface|plugin DLL]] to load (minus the platform-specific file extension). This plugin is expected find hardware controls at the OS level, and provide an interface between them and [[TNI_Controls_Interface|TNIControls]].
+
:Desc: Specifies the filename of the [[TNI_Core_Interface|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 [[TNI_Controls_Interface|TNIControls]].
  
 
====controllers====
 
====controllers====
:Type: [[controller-device-list_container]]
+
:Type: [[controller-device-list_container|controller-device-list]]
:Desc: Specifies the various controller types supported by this plugin (e.g. a RailDriver device, a joystick, or a gamepad). The specification for the controllers themselves are documented separately [[controller-device-list_container|here]].
+
: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 [[controller-device-list_container|here]].
  
 
==Example Config.txt==
 
==Example Config.txt==

Latest revision as of 15:43, 22 November 2017

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

[edit] KIND Hierarchy

[edit] Parent Classes

[edit] Child Classes

  • none

[edit] Supported Tags

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

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

[edit] 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.

[edit] 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.

[edit] 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.
 }

[edit] Categories

Personal tools