HowTo/Fix Errors and Warnings

From TrainzOnline
Jump to: navigation, search

Validation Overview

Each Asset that is installed into Trainz is automatically checked for a variety of problems. This process is known as "validation" and consists of the following steps:

  • The presence of any necessary dependencies is checked. If any necessary dependencies are missing, validation may be aborted at this point and the asset will be flagged as "Missing Dependencies" regardless of whether or not it may also have errors.
  • The config file is syntax checked against the definitions for its Asset KIND.
  • Files and assets referenced by the config file are checked for correctness.
  • The asset is loaded to check for any dynamic concerns that aren't detected by static validation.

If problems are found during validation, the asset is flagged as having errors and/or warnings. "Errors" indicate problems which will prevent the asset from being used in the game. "Warnings" indicate potential problems; these often won't prevent the asset from working but may cause it to behave in an undesirable fashion.

N3V Games regularly enhances the validation process based on problems found in real Assets. When adding a new error check, we often treat the resulting error message as a warning for older assets. This helps avoid the scenario where large numbers of assets are required to be updated immediately after a new build of Trainz is released. If and when the asset is updated to the latest trainz-build version, such warnings message will become error-flagged and must be fixed. Note that not all warning messages fall into this category- many warnings will always remain warnings regardless of which "trainz-build" tag is used. In other cases, we may retroactively flag assets as faulty. This approach is typically used when the number of affected assets is small relative to the severity of the problem.


When to Fix?

While it may be tempting to fix every message you see, there are cases where this is a bad idea. The following may help you decide whether fixing something is the correct approach:

  • If the content is obsolete or out of date, then you don't need to fix it. Just use the up-to-date version. Optionally delete the faulty obsolete version once you've installed the new version.
  • Unmodified built-in content is never faulty. If you are seeing a fault in such content, something has gone wrong. Possible resolutions include:
    • Downloading the latest version of any payware content that you have installed.
    • Using "View Errors and Warnings" in Content Manager to redo the validation on the affected assets.
    • Restarting your computer.
    • Performing a repair of your Trainz Asset Database.
  • If an asset has problems (ie. is faulty or has missing/faulty dependencies) and you don't need it, then deleting it is probably the simplest option.
  • If an asset is missing a dependency, you'll need to source that before proceeding.
  • If an asset has a faulty dependency, you'll need to fix that before proceeding.
  • You are always responsible for fixing errors in your own content. If one of your own content items has an error, and you want to use it, then you'll need to fix it. (Exception: if your content was uploaded to the DLS, then it may be fixed as part of the ongoing DLS repair process if you don't upload a fixed version yourself.)
  • If the content has no errors, there is typically no need to fix warning messages, and doing so without a clear understanding is likely to lead to more problems. If the content is your own and you clearly understand and agree with the warning, you may choose to fix it anyway.
  • If the content is not yours, but is locally modified, then it's possible that your local modifications are causing the fault. This frequently happens with built-in and payware content. Consider reverting it back to the original version (this applies to both built-in and DLS assets).
  • If the content is from the DLS, but is faulty and no newer version exists, you will either need to fix it locally yourself or wait for the version on the DLS to be fixed.
  • If the content was provided to you by some other source (ie. direct CDP download from somewhere other than the DLS) then you should try to contact that source for an update.


Understanding Errors and Warnings

There are many types of error and warning. Understanding them all in detail is a subject which requires months of learning. The only way to learn is to start at the beginning and read up on the subject in question; since you've reached this page you're off to a good start. There are a few places that you can look for specific information:

  • The Content Creation page on this wiki gives an overview of various content creation topics. It's important to have a general understanding of the techniques and best practices before you start modifying content.
  • The Content Configuration pages on this wiki include detailed specifications (and some examples) explaining the correct construction of each Asset KIND.
  • The HowTo Guides on this wiki provide practical guides for a variety of techniques.
  • Right clicking on an Error or Warning in Content Manager provides (among other options) the ability to look up the specific message on this wiki to reveal a detailed discussion of the problem and message-specific techniques.
  • If all else fails, asking on the Trainz Forums.
Personal tools