Create content for TANE

From TrainzOnline
Jump to: navigation, search

This is a work-in-progress page not for public release. If you find this page and publish it we will not be happy and will not invite you to our Christmas party ;)

Because things are still in development, anything said here may, and in fact, is LIKELY, to change.

Contents

Overview

Trainz:A New Era (TANE) provides the biggest update in the history of Trainz. With a brand new game engine, content is handled differently than it was in the past and there are more features that content creators can take advantage of. This therefore means new validation tags to ensure content meets the requirements of a next generation engine and new error messages to inform content creators of problems with their assets.

While our goal is to provide backwards compatibility with existing content, we do not expect that every item will work seamlessly. With over 300,000 items available and with thousands of different content creators, it is highly likely that some people have created assets that "work" in their version of Trainz that will not work in TANE. i.e. copying content from your existing Trainz 12 (or earlier) build across to TANE is likely to yield a variety of errors. Many of these will be easy to fix and will be as simple as a single line entry in a config file. Others may require the source asset (which means it will require the original creator to update the assets).

In addition, items that looked fine in older Trainz may not look the same in TANE. As an example, with improved lighting and shadowing from E2 an "inside-out" texture will stand out. To solve this, the face normals of a texture should be properly set in the source mesh file, so the object is not inside out when exported and doesn't need double sided texturing.


Validation Errors

There are a number of new errors that are likely to appear. Following is a description of the most common errors and the steps required to fix the asset.

Error: Image file 'product.tga' is incorrectly used as both a texture.txt source file and a raw image file

This error is telling you that the config file references an image (in this case, product.tga) directly, when there is also a .texture.txt file that uses the same image file.

Content Manager will compile the .texture.txt and the image file it references into a .texture file when the asset is committed. This .texture file is the most efficient way for Trainz to load an image texture - the vast majority of the work such as texture compression has been done beforehand by Content Manager.

Prior to this error being reported, Trainz must load two copies of the same texture, one of which needs to be created on the fly from an image file. When loading the image directly fails completely, Trainz instead displays a solid white image. A common example of this is the loco thumbnail showing as a white rectangle. That failure case is why this report is considered an error, and not just a warning.

Solution: Ensure the texture.txt file is referenced instead of the tga file.

Steps:

  • Open the config file
  • Change <name>.tga to <name>.texture (where <name> is the name of your image)
  • Update the KUID to the next revision version
  • Commit the asset
  • Upload the newly revised asset to the DLS.

Error: The meshes in LOD level X must total at least 20% fewer polygons than the next higher LOD. X= 1,2,3,4

This error identifies that there are two LODs that are pretty much identical in poly count. This means that TANE will devote resources to replacing an object with another one that is almost the same. Removing the 2nd LOD level completely would provide better performance and better visuals, so there isn't ever a case where the overhead is really justified. The key here is that by reducing each LOD level by 30-70% you are providing the best performance.

Solution: Either remove unnecessary LODs or replace with improved LOD levels.

Steps:

  • Using the PEV Trainz Mesh viewer, open each LOD of the asset along with the original asset
  • Starting with the highest LOD, compare the number of polys with the next LOD level.
  • Identify any LODs that are not 20% less polys than the previous level (i.e. 2,000 polys LOD1, 20% = 400 polys. 2,000 - 400 = 1,600 maximum in LOD2
  • Remove any reference to the LOD level in the config file.

Reference: HowTo/Make_your_first_Trainz_Asset

http://forums.auran.com/trainz/entry.php?884-Introduction-to-LOD

http://forums.auran.com/trainz/entry.php?828-Mesh-LOD-and-Texture-Resolution

http://forums.auran.com/trainz/entry.php?890-Using-LOD-effectively

Error: Failed to load sound file '[X].wav', please ensure this is a valid wav file

The sound file could not be loaded. The file could be missing or corrupt, or in the wrong format, or the config file incorrectly specified (e.g. quote marks missing or the wrong quote marks used, or trailing spaces etc).

Solution: Identify the reason for the error and follow the appropriate steps

Steps:

  • Fix config errors if found
  • Open file in Audacity or similar sound editing tool and export as .wav file

Error: Track preview mesh 'default.im' is missing

Indicates a missing asset, most likely because someone has incorrectly used another asset as a template and left pieces out, or a typo. Check the config file and dependencies for spelling mistakes of the mentioned file.

Solution: Fix the typos or replace the missing file.

Steps:

  • Find a track asset that includes [default.im].
  • Copy this file and any relevent [.tga] or [.texture] files and paste them into the asset
  • Commit the asset, check that the error has gone

Error: The Decimal tag 'grounded' in container 'obsolete-track' is not a valid Decimal value

The value in the tag is incorrect. It is possible that there is a comma used rather than a decimal point.

Solution: Find and fix the mistake

Steps:

  • Change the [,] in 0.4 to [.]
Personal tools