Repository navigation
MSTS Texture Files
MSTS texture assets use the proprietary ACE image container. ACE files provide color and optional alpha data for shapes, terrain, cab displays, route scenery, signs, and environment variants. They normally reside in GLOBAL/TEXTURES/, a route's TEXTURES/, TERRTEX/, or an environment texture directory such as ENVFILES/TEXTURES/.
The .ace extension does not by itself identify compression, pixel format, or SIMISA envelope. FTS/Open Rails and TSRE5 provide implementation evidence for the container and common pixel formats. FTS and Open Rails share parser ancestry; TSRE5 is an independent implementation. Exact header offsets, reserved bytes, seasonal lookup, and the complete alternative-texture flag map remain provisional.
On this page
- Container: Serialization · Header and format options · Pixel formats
- Image data: Channels and alpha · Mipmaps · Compression
- Integration: Texture references · Implementation boundaries · Validation · Open questions · Sources
ACE files can be wrapped in the SIMISA family of envelopes. Uncompressed and compressed files occur, and the image payload is binary. A reader should detect the envelope and compression from the bytes rather than assume one representation from the extension.
The exact compressed-stream framing and all producer variants should be preserved as observed. Do not rewrite an ACE file through a generic image library unless the original container metadata, channel representation, mipmap chain, and compression choice are retained separately.
The examined implementations expose a header containing a format marker, format-option flags, dimensions, a surface-format code, channel information, and additional header data. A simplified logical outline is:
Treat format options and surface-format codes as field-specific symbolic values under MSTS flags, selectors, and enumerations.
ACE header (
format-marker
format-options
width
height
surface-format
channel-count
additional-header-data
)
image or channel payload
mipmap levels (optional)
Some implementations identify a mipmap option and a raw-data option. The frequently observed raw-data surface codes include BGR565, BGRA5551, BGRA4444, DXT1, DXT3, and DXT5. Treat numeric codes as raw values in a preservation model; names are implementation labels until corroborated by content and independent code.
The remaining header region includes values whose purpose is not established. Preserve it byte-for-byte when possible rather than treating it as padding that can be regenerated.
| Format | Working interpretation | Evidence status |
|---|---|---|
| BGR565 | 16-bit color without a full alpha channel | FTS/Open Rails and TSRE5 decoder evidence. |
| BGRA5551 | 16-bit color with a one-bit alpha channel | Decoder evidence; exact alpha convention needs corpus testing. |
| BGRA4444 | 16-bit color with four-bit channels | Decoder evidence; exact channel ordering needs corpus testing. |
| DXT1 | Block-compressed color with opaque or one-bit-alpha behavior | Common decoder evidence; original MSTS encoder choices remain open. |
| DXT3 | Block-compressed color with explicit alpha | Decoder evidence. |
| DXT5 | Block-compressed color with interpolated alpha | Decoder evidence. |
A format name describes the decoded surface model, not necessarily the complete ACE storage layout. Keep the original surface code and any unknown format options alongside a decoded image.
Non-raw channel data can contain per-channel records describing channel size and channel type. Implementations expose mask, red, green, blue, and alpha channel roles. One-bit channels may be bit-packed, while eight-bit channels use byte values. When no alpha or mask channel is present, decoders commonly supply opaque alpha.
Channel order, bit significance, scanline orientation, and the treatment of missing channels must be verified against real ACE samples. A tool must not discard an alpha or mask channel merely because a decoded preview appears opaque.
An ACE file may contain a chain of progressively smaller images. The examined implementations associate this with a format option and commonly expect power-of-two dimensions for a complete chain. Levels are typically stored from the base image toward smaller dimensions, potentially down to 1 by 1.
Do not assume that every file has a complete chain or that every producer uses the same stopping rule. Preserve the number, dimensions, ordering, and payload of all levels. A renderer may generate missing levels, but generated levels are not equivalent to serialized levels.
Raw-data ACE surfaces can store uncompressed pixel data or block-compressed DXT data. Compressed SIMISA envelopes are a separate concern from DXT surface compression: one concerns the file/container stream, the other concerns image pixels. A file can therefore combine an envelope choice with a surface-format choice.
DXT data uses 4 by 4 pixel blocks. The exact handling of partial blocks, small mipmap levels, alpha interpolation, and byte ordering belongs to the decoder contract and should be tested against a corpus rather than normalized during conversion.
Texture names, owning asset contexts, case handling, and fallback candidates follow MSTS names and resource lookup.
Shapes refer to texture images through their ImageNames array and texture/material state records. Other consumers include:
| Consumer | Typical record or use | Usual lookup context |
|---|---|---|
Shape .s
|
ImageNames and texture state records |
Shape folder, route TEXTURES, or global texture assets according to the loader. |
World Forest
|
TreeTexture |
Route or global texture directories. |
World Transfer
|
Texture filename field | Route texture directories and route-specific content. |
World Speedpost
|
Speed_Digit_Tex |
Route or global texture directories. |
Route .trk
|
Graphic and LoadingScreen references |
Route and environment content. |
Cab-view .cvf
|
AceFile references |
Vehicle cab-view content. |
| Terrain and environment | Terrain texture and seasonal/environment records |
TERRTEX and environment texture directories. |
Filename resolution is content-context dependent. Preserve the raw filename, case, relative spelling, and referring asset so a missing texture can be diagnosed without losing the original relationship. Seasonal and night variants may use alternative directories or descriptor flags; the exact precedence is not established here.
FTS and Open Rails use shared ancestry for ACE parsing and rendering support, so their agreement is derived implementation evidence rather than two independent confirmations. TSRE5 uses a separate C++/Qt texture implementation and corroborates the broad container, channel, mipmap, and DXT concepts.
Implementation differences include validation strictness for dimensions and mipmaps, offset calculations, maximum accepted dimensions, and error handling. A loader accepting a file does not prove that original MSTS accepted every same-shaped variant. Keep implementation-specific limits and repair behavior outside the original MSTS field model.
ESD_Alternative_Texture belongs to the .sd descriptor schema, not to the ACE container itself. Observed seasonal or night values should not be promoted to a complete flag specification without a larger corpus or controlled experiments.
- Detect the SIMISA envelope, compression, ACE marker, and encoding of any auxiliary data from bytes.
- Validate width, height, channel count, surface-format code, and format options without discarding raw header values.
- Validate channel sizes, channel roles, bit packing, and payload lengths.
- Validate every mipmap level's dimensions, ordering, and payload length; preserve incomplete or unusual chains.
- Decode DXT blocks and uncompressed surfaces without replacing the original payload.
- Preserve unknown header bytes, format flags, channel records, and trailing data.
- Resolve references relative to the owning route, global, terrain, environment, vehicle, or cab-view context.
- Keep missing textures and fallback decisions as diagnostics rather than rewriting references.
- Separate compressed SIMISA envelopes from DXT surface compression in both models and reports.
- Confirm the complete ACE header layout, exact byte offsets, reserved-field meanings, and all surface-format codes.
- Establish the compressed SIMISA stream framing and whether all observed ACE envelopes use the same compression variant.
- Confirm channel endianness, scanline orientation, bit significance, and missing-channel defaults against original content.
- Determine mipmap requirements, stopping rules, and behavior for non-power-of-two or non-square images.
- Measure the prevalence of BGR565, BGRA5551, BGRA4444, DXT1, DXT3, and DXT5 in shipped and community content.
- Establish texture lookup precedence among route, environment, terrain, vehicle, and global directories.
- Enumerate
ESD_Alternative_Texturevalues and distinguish seasonal, night, and other variants. - Compare ACE handling in TSRE5 field by field with FTS/Open Rails and test original MSTS behavior where possible.
- FTS
AceFile.csandEnums.cs: derived ACE container, channel, option, and surface-format evidence. - Open Rails
AceFile.cs: shared derived parser lineage and texture decoding behavior. - TSRE5
AceLib.cpp,AceLib.h,TexLib.cpp, andTerrainClient.cpp: independent texture loading and seasonal lookup evidence. - [[Shape files (
.sand.sd)|MSTS-Shape-Files]], [[World files (.w)|MSTS-World-Files]], and Vehicles and cab views: consuming asset schemas. - How to write shape data files, recorded in the MSTS research source register: conditional authoring evidence for shape/texture workflows; publisher provenance remains unverified.
- MSTS Content
- Research Sources
- Kuju File Format
- Coordinates and Identity
- References, Collections, and Graphs
- Units and Numeric Values
- Flags, Selectors, and Enumerations
- Names and Resource Lookup
- Track Database (.tdb)
- Track Sections (tsection.dat)
- Route Definition (.trk)
- Path Files (.pat)
- Activity Files (.act)
- Service Files (.srv)
- Traffic Files (.trf)
- Consist Files (.con)
- Vehicles and Rolling Stock
- Shape Files (.s and .sd)
- Texture Files (.ace)
- Sound Assets (.sms, .wav, .ws)
- Track Types (ttype.dat)
- Speedpost Configuration (speedpost.dat)
- Car-Spawner Configuration (carspawn.dat)
- Route Editor Reference Files (.ref)
- Route Editor Marker Files (.mkr)
- Hazard Configuration (.haz)
- Pickup Authoring and Configuration
- Gantry Configuration (gantry.dat)
- Signals and Scripting
- Validation Experiments
- World Files (.w)