Trainz AM&C/Fixing Errors/Error: Could not load texture


Error: Could not load textureEdit

Sometimes a committed asset will report a missing texture file with a file path referenced in the cache, the cab (database *.JA file) resulting in no texture file in the open-for-edit asset folder. This particular example suggests there are three possible fixes for this particular missing texture, so I'm going to cover them in order from the most difficult (cursorary mention) to possibly the easiest.

Replace the missing texture by making oneEdit

It is likely this example is after some early processing using PEV tools on the date of installation. I recollect that but also reason because most TRS2006 assets will not contain texture.txt files if they haven't been massaged to comply with later data standards. This evolution in data types and configurations is the cause of many errors, and we the user community demanding more and better graphics from Trainz are at fault in that!

The first one way this asset might be repaired is to create an appropriate *.tga (texture file) as is referenced in a 'referenced_asset_filename'.texture.txt Trainz INI file, which are listed in directory folders when opened for edit as 'referenced_asset_filename'.texture.txt files. This option can range from the trivial (create 'black.tga', often for a shadow texture, a handle, step, or under body) to the very difficult (the texture is the multi-view wrap texture that creates the detailed surface appearance of an 3D asset, meaning it's the most complicated part of any set of textures. In the easy or simple case, one makes a small image file in Microsoft Paint, GIMP, or other such graphics drawing program using a power of two squared size such as 8x8px, 16x16px, 32x32px or the like, keeping in mind Trainz will complain if a texture is monotone, to create a solid color, use the 32x32px size and change a few pixels inside to give it a little imperfection texturing, as if it showed dirt or rust, etc. For a solid black handle, try a dark grey/charcoal for a few pixels 'deliberate imperfection'. Creating a more complicated texture is beyond 'Intermediate Trainz' so the best thing to figure out is when to put things on hold and look into the asset creation pages and consult those with experience before tackling such.

But there is often another recourse, stealing the author's own texture from the author.

TRS2006-SP1 content manager and Notepad++ editor showing (Left) both the errors list and asset line, (right) The key portion of the modified confix.txt file with it's new description block, (2nd error, already repaired)

Asset creators are human beings and like the rest of us take the shortest way to doing multiple tasks given two or three choices. In the case of the two road crossing assets ('Xing' often in Trainz) here with issues, they are part of a set downloaded not from the DLS (leaving Auran and N3V off the hook, at least from the point of view of not sourcing corrupted data) but sourced from a famous Trainzer community,, with an equally good reputation. They were, as might be deduced looking at the install times, part of a kit or set of assets bundled together in one *.zip or {{TG|C|*.cdp) file as a group configured (type+region+kind+era+category-region) with the same look and feel, so naturally they tend to share textures. These I have because they were used in a number of period routes set in the early 20th century gotten from the DLS recently authored (sic) by gfisher, again a famed route builder—which is why they were recommended to me to study and steal from for my projects in the same sort of mileau. Of the four, the entity with the worst reputation is N3V/Auran!

  1. Step one in reading this error message was to examine a similar asset by the same author. The explicit file was found in 'XING_2_US_315', <kuid:523:23235> which assuming they are a direct copy, makes the fix a matter of opening both for edit, then copying the missing file into the sub-folder where the ini file
File:Trainz error fixes (Error= Could not load texture ') kuid 523 23233 XING 2 US boom-02+XING 2 US, (kuid 523 23233) (both fixed on CMP).png
AFTER screenshot, take careful note of the installation dates, and modification times on the right pane, half of which shows the source file copied.
 • The suspicious computer engineer in me suspects CMP had a hiccup, with multiple files indexing the asset, and initially indexed a temporary file it created twice or more, then when it moved the workfiles from the cache into the database, had deleted the reference it had made moments before over and over.