Trainz/tags
Tags are Trainz term for simple data pairings containing one elemental type of data paired with a reserved keyword. In Trainz data pairs, the keyword always precedes the data on a line.
|
|||
|
Glossary |
HKeys-CM |
HKeys-DVR |
HKeys-SUR |
HKeys-WIN |
Mouse use |
Notations |
Operations Note: Clicking on a footnote ([2]) or note tag ([note 12]) in the main body of text will navigate you (position the page) to the exact text for the entry. • Then: Clicking there on the ? symbol, will return you back to read on from where you started. |
- Related Introductory Trainz articles and reference pages:
Trainz/ACS Text_Format, Trainz data model, Assets & Content, Acquiring Content, Trainz/containers, Trainz/Kinds, and references
- Related Introductory Trainz articles and reference pages:
Elemental data types or elementary data types in Trainz means
- text strings,
- Boolean number types (0 or 1 only, always proscribed single values assessed as True or False)[note 1],
- integer (natural or counting) number types; these are used to record discreet quantities such as seven pallets, or 55 kilograms. Values in Trainz data are almost universally metric, so meters and kg units are defaults.
- or decimal (aka floating point) number types for more complex data with widely varying analog data such as brake volume of air flow per second in a traincars braking plumbing (part of an enginespec, kind engine which also models factors such as rolling friction, air resistance, Steam generation, flow rates and a host of others unsuitable for simple counting numbers.)
all of which are assigned legal values compatible with that data type.[note 2]
Hybrid data types
editThere are also a couple of work-around hybrid data types, which consolidated multiple string key name codes in the same single (newer) tag key name which are now assigned a range of values to as a string array separated by semicolons.
- These contain sorting criteria interesting to prototypers but disdained by the programmers to handle eras and regional distributions.
- There is a similar array construct for co-ordinate oriented tags such as latitude, longitude, and elevation value definitions (and many of which are vector quantities), each containing three comma-separated floating point values sometimes seen organized as a string array inside quotes.[note 3]
More complex data groups used in Trainz data definitions are discussed in Trainz containers and in Trainz kinds, in and of themselves a 'container', but of a more unique type. In one sense, Trainz assets are nothing but a collection of data organized by proper enumerated codes and these containers, including the parent-classed containers known as Kinds define the interrelationship and configuration of an asset. The container is but one element in an assets self-definition as initialized by the asset creator.
|
Heirarchy and level
edit-
- category-class tags
- KINDs declaration
KINDs in the Trainz simulators define the attribute that together with category-class set up required fields of information to make the model of an asset render properly. In a very real sense, the KIND data structure (grouping related data of disparate type relevant to the needs of model rendering and run-time simulation) is a first level container in Trainz (albeit with a special name, "KIND"), and will almost always require other container level data groups accompany it in the ini files. These are often included by reference (using a KUID, sharing a component amongst various digital models or prototypes. - containers and tags
Now all container and container-like structures will be placed in the MODELS' config.txt file, excepting only the external containers of seasons and LOD (LM.txt files), but the distinction between KINDs and Containers is simply that container types usually have scope in several different KIND assets defining specific parameters, whereas each KIND is unique and indeed, its needs (mandatory parameters) literally define that class of asset to the game engine.
Consider kind traincars:
Locomotives and rail cars both have bogeys (wheels on trucks) so both have a bogeys container in their ini file defining how their trucks or bogeys are arranged. But neither is defining what the KIND Engines type[note 4] contains: the data modeling the way the locomotive using such an enginespec will dynamically perform.[note 5] Tags on the other hand have local scope within a container, whether always seen as a separate and unique Config.txt tag, or one always found to be within a specific sort of container— All tag's are purposed the same: to define and initialize a particular single data item with a value. In the Trainz Data model, Containers are the programmer's technique for making multiple values that may or may not be needed to be defined by a single keyword and data pairing... the container is in-FACT, the values assigned to the tag (name) mapped onto that type of container. |
Enumeration and variable values
editSome values are tightly proscribed by a pre-defined list of allowed values, this is known as an enumerated type.
- The values in the tag category-class tags are tightly controlled, which is to say must come from a given list of allowed values on which they were enumerated (listed out). They are in-effect, alphanumeric codes which when defined, must be on the list.
- Other normally seen upper level Config.txt tags category-era tags and category-region tags are two tag types which are both enumerated and odd because they are both 'string-arrays'—both of which replace a variable and uncertain number of listed individual tags (to which a numeric suffix was appended) as was the formulation in many an older, but now obsolescent Trainz release version. But the data arrangements live on in the DLS and in many many dependent assets.
Most other tags have even less options, notable amongst these are tags requiring a Boolean value, a 0 or 1 binary weighted value; generally these are yes/no or true/false keywords defining which part of two options in a decision tree the processing software should branch to.
- For example, consider these very commonly seen config tags:
night, engine, nightmode, lamp, auto-create, start, period, rate, velocity, lifetime, minsize, and maxsize
; can you begin to guess (by their names) which might be defining decimal values, a yes-no (or a do/don't do this) condition, and which may want a small selection of alternative proscribed and enumerated values?[note 6] Understand what the tag does, and it's meaning will become obvious.
Be advised this new Trainz Wikibooks topic page is rough and incomplete. It was last edited on 6 April 2021, and is still under heavy construction. Work needed: The below seems to be at best, on the wrong page, and certainly is a false start. A simple table of tags linked to tags pages and those tied into the kind pages would seem to be a target approach. This Page UNDERCONSTRUCTION: Content here is likely to be changed significantly in a short amount of time. All Trainzer's and Wikibookians with knowledge in this subject are welcome to help out. You can remove this tag and replace it with {{Trainz-stub}} or with section stub templates ({{Trainz-sect-stub}}) on unfinished sections when the 'page' has become more mature. |
Important Everyday Tags
editThe answer is dependent upon what sort of assets you are dealing with at the moment.
This Trainz/Tags/tags section is a stub placeholder, an outline or marker that this section of the book is otherwise incomplete. You can help the Wikibooks Trainz project by expanding it with fuller discussion of the topic. |
Scenery Kinds
editThese are generally simpler so we use these to introduce the use of Kinds, and with scenery,
- Kind scenery, kind scenery with track, kind buidable
This Trainz/Tags/tags section is a stub placeholder, an outline or marker that this section of the book is otherwise incomplete. You can help the Wikibooks Trainz project by expanding it with fuller discussion of the topic. |
Freight Cars
edit- Basic cars that don't interact with users, industries or those that do!
This Trainz/Tags/tags section is a stub placeholder, an outline or marker that this section of the book is otherwise incomplete. You can help the Wikibooks Trainz project by expanding it with fuller discussion of the topic. |