Trainz/containers/thumbnails container
|
|||
|
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. |
thumbnails container
edit- purpose: Filters in CM and Surveyor (searching criteria)
- type: The thumbnails container.
- field definition: The thumbnail(s) which are used to represent this asset in 2D preview boxes, lists, and icon form throughout the game environment (including in-game, in Content Manager, and on the Download Station.) Each data set is included in a sub-container using a placeholder parameter as the key name or tag. Convention makes these 0 indexed numbers, but the value can be any non-null text value that can be evaluated as a string.
example one
editThis example includes one root folder image, the Content Manager 240x180 required image in an common (but uncommunicative) name form.
thumbnails { A { width 240 height 180 image "$Screenshot.jpg" } } }
The above example uses an unusual, but perfectly legal 'A' dummy key-word to represent the sub-container in the thumbnails (list) data structure.
example two
editThis example includes two root folder images, the CM 240x180 and DLS 512x512 images in an explicit picture name format. The image sub-container is the more often seen numeric dummy keyword flavor.
thumbnails { 0 { width 240 height 180 image "$Screenshot (240)(kuid 68787 25222).jpg" } 1 { width 512 height 512 image "$Screenshot (512)(kuid 68787 25222).jpg" } }
Alternatives
editThe thumbnail container is part of the TrainzBaseSpec so any asset may specify a thumbnail or preview image. This obviously makes more sense in some cases than in others, but certain circumstances, such as DLS, requires some imagery for every assset. The exact usage of this image may vary depending on the asset kind and the build of Trainz, but the following usages are historically common:
- 32x32 - standard icon representation for display in lists.
- 128x64 - ‘kind traincar’ list icon in Surveyor.
- 512x512 - ‘kind traincar’ preview image in Surveyor (no longer used).
- 240x180 - Download Station thumbnail image - mandatory, and must be in JPEG format.
- For assets which have no physical appearance (engine-specs, scenery sounds, etc.) content creators tend to make up a stock splash screen sort of self-advertising image.
|
Any number of thumbnail entries may be present, however it is recommended that no more than 3 images are used. The specified width and height must match the actual width and height of the image file in pixels.
The DLS thumbnail is a general view of the asset, and may include identifying text or logos.
The minimum for rolling stock is the DLS thumbnail (240x180, JPEG) and the list icon for Surveyor (128x64). The list icon should show the rolling stock asset in a full side-on view, with a transparent background. The image should be centered horizontally, and with the base of the asset (the track level) at the vertical center. This arrangement means that the asset displays correctly in the Surveyor list, in the drivers list in QuickDrive, and also in the consist display that is provided at the bottom of the Surveyor screen. Since a transparent background is required, a 32-bit tga file format (referenced from a .texture.txt file) is recommended.
Supported image formats include:
- 32-bit uncompressed targa (.tga) - this supports an alpha channel
- 24-bit windows bitmap (.bmp)
- JPEG (.jpg) - a 240x180 JPEG format thumbnail is required for the download station.
- Texture files (.texture.txt files) -are strongly recommended by the N3V programming staff per James Moody, versions manager. This format should be used for everything other than the DLS format (240x180 jpg) thumbnail.
When displaying an image, the closest-sized image required by the function (in terms of pixel dimensions) will generally be used in Trainz. The subcontainer thumbnail-ID numbers are simply placeholder identifiers and have no meaning in themselves.
- Replacing 0←icon, 1←DLS, and 2←Obsolete works just as well, and may be usefully more clearer.
thumbnails { 0 { width 32 height 32 image "icon-32.texture" } 1 { width 128 height 64 image "vehicle-art-icon.texture" } 2 { width 240 height 180 image "$screenshot$.jpg" } 3 { width 512 height 512 image "vehicle-art-512.texture" } }
Notes and references
editReferences
editThis reference page is adapted from the TrainzOnline Wiki under the CC-BY-SA 3.0 License. This page will likely include more textual explanations, exposition, history, and/or examples than the source page on the same topic. The TrainzOnline Wiki is for the most part maintained by the programmers or knowledgeable content creators and may have newer more up-to-date information on the current trainz-build code standards, which have some tendency to change as features are added to the software. |