"Extensions" container

From TrainzOnline
(Difference between revisions)
Jump to: navigation, search
m ("Extensions" container Example)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The [["extensions" container]] is a top-level [[config.txt file]] entry available to any Asset which derives from [[KIND TrainzBaseSpec]] (in short, all Assets.) This container is intended to allow third-party developers to introduce custom Asset-keyed data which may be processed by custom scripts.
+
The [["Extensions" container]] is a top-level [[config.txt file]] entry available to any Asset which derives from [[KIND TrainzBaseSpec]] (in short, all Assets.) This container is intended to allow third-party developers to introduce custom Asset-keyed data which may be processed by custom scripts.
  
 
The extensions container is a list of custom tags or subcontainers with a specific naming convention.
 
The extensions container is a list of custom tags or subcontainers with a specific naming convention.
Line 5: Line 5:
 
==Supported Tags==
 
==Supported Tags==
  
The naming of top-level tags within the [["extensions" container]] is important. Tag names should be meaningful and must end with a hyphen followed by the [[KUID#User_ID_Number|User ID]] of the content creator who is introducing the extension. This content creator is solely responsible for determining any rules and restrictions which apply to the tag or subcontainer, and should ideally make an effort to provide this information to other creators via this wiki. While content creators are permitted to make use of each other's extension formats, it is not permissible for a creator to introduce a new extension (or change the meaning of an extension) which exists in a namespace belonging to another content creator.
+
The naming of top-level tags within the [["Extensions" container]] is important. Tag names should be meaningful and must end with a hyphen followed by the [[KUID#User_ID_Number|User ID]] of the content creator who is introducing the extension. This content creator is solely responsible for determining any rules and restrictions which apply to the tag or subcontainer, and should ideally make an effort to provide this information to other creators via this wiki. While content creators are permitted to make use of each other's extension formats, it is not permissible for a creator to introduce a new extension (or change the meaning of an extension) which exists in a namespace belonging to another content creator.
  
 
Each tag in the extensions container may be either a single value, or a subcontainer. If a subcontainer is used, the contents of the subcontainer should be specified in the extension documentation. No restrictions are placed by N3V on the values within a specific extension.
 
Each tag in the extensions container may be either a single value, or a subcontainer. If a subcontainer is used, the contents of the subcontainer should be specified in the extension documentation. No restrictions are placed by N3V on the values within a specific extension.
Line 11: Line 11:
 
==Validation==
 
==Validation==
  
At the current time, the contents of the [["extensions" container]] is not validated. It is expected that future versions of Trainz and the [[Download Station]] will perform validation of the extensions container according to the rules described on this page. Furthermore, it is feasible that N3V will formally adopt specific extensions which have entered common use. In this scenario, N3V may choose to introduce asset validation to the extension creator's formal specification or, where such specification is not available, to a formal specification written by N3V derived from the common usage.
+
At the current time, the contents of the [["Extensions" container]] is not validated. It is expected that future versions of Trainz and the [[Download Station]] will perform validation of the extensions container according to the rules described on this page. Furthermore, it is feasible that N3V will formally adopt specific extensions which have entered common use. In this scenario, N3V may choose to introduce asset validation to the extension creator's formal specification or, where such specification is not available, to a formal specification written by N3V derived from the common usage.
  
 
==Extension Documentation==
 
==Extension Documentation==
Line 19: Line 19:
 
* Add your entry here.
 
* Add your entry here.
  
=="extensions" container Example==
+
=="Extensions" container Example==
  
 
  extensions
 
  extensions
 
  {
 
  {
   TBD
+
   delayinterval-474195      0.1
 +
  signaltype-474195        "DTV"
 
  }
 
  }
  
[[Category:Config Container]]
+
[[Category:Config Container|E]]

Latest revision as of 04:09, 1 February 2016

The "Extensions" container is a top-level config.txt file entry available to any Asset which derives from KIND TrainzBaseSpec (in short, all Assets.) This container is intended to allow third-party developers to introduce custom Asset-keyed data which may be processed by custom scripts.

The extensions container is a list of custom tags or subcontainers with a specific naming convention.

Contents

[edit] Supported Tags

The naming of top-level tags within the "Extensions" container is important. Tag names should be meaningful and must end with a hyphen followed by the User ID of the content creator who is introducing the extension. This content creator is solely responsible for determining any rules and restrictions which apply to the tag or subcontainer, and should ideally make an effort to provide this information to other creators via this wiki. While content creators are permitted to make use of each other's extension formats, it is not permissible for a creator to introduce a new extension (or change the meaning of an extension) which exists in a namespace belonging to another content creator.

Each tag in the extensions container may be either a single value, or a subcontainer. If a subcontainer is used, the contents of the subcontainer should be specified in the extension documentation. No restrictions are placed by N3V on the values within a specific extension.

[edit] Validation

At the current time, the contents of the "Extensions" container is not validated. It is expected that future versions of Trainz and the Download Station will perform validation of the extensions container according to the rules described on this page. Furthermore, it is feasible that N3V will formally adopt specific extensions which have entered common use. In this scenario, N3V may choose to introduce asset validation to the extension creator's formal specification or, where such specification is not available, to a formal specification written by N3V derived from the common usage.

[edit] Extension Documentation

If you are a third-party content creator who has created a custom extensions according to these specifications, please document your extension on this wiki and link to your extension page here:

  • Add your entry here.

[edit] "Extensions" container Example

extensions
{
  delayinterval-474195      0.1
  signaltype-474195         "DTV"
}
Personal tools