UTS Format (Sound Object Blueprint)
Description: The Sound Object (.uts) blueprint defines dynamic, positional, and ambient audio emitters placed throughout a game map. Ranging from environmental hums and randomized crowd chatter to highly localized looping sound effects, .uts files act as physical sound nodes combining strict spatial coordinates with randomized pitch, interval, and varying volume matrices.
At a Glance
| Property | Value |
|---|---|
| Extension(s) | .uts |
| Magic Signature | UTS / V3.2 |
| Type | Sound Object Blueprint |
| Rust Reference | View rakata_generics::Uts in Rustdocs |
Data Model Structure
Rakata maps the Sound Object definition directly into the rakata_generics::Uts struct. To view the exhaustive binary schema and strict GFF field mappings, please refer to the Rustdocs for this struct, where each field is explicitly documented.
A Sound Object breaks down into five main categories:
- Audio Emitters (
SoundsList): An array containing the audio files (.wavfiles) the engine will sequence or shuffle through. - Spatial Geometry: Distance boundaries determining exactly where the sound is audible in the map (
MinDistance,MaxDistance). - Playback Automation: Rules for how the sound loops and strings together (
Continuous,Random,Active,Looping). - Algorithmic Variations: Modifiers that dynamically distort the audio file’s pitch and volume at runtime (
PitchVariation,FixedVariance,VolumeVrtn). - Procedural Generators: Identifiers that tell the engine if the sound represents specific background noise like crowd chatter or combat ambiance (
GeneratedType).
- State Validation:
rakata-lintchecks the data against engine constraints to prevent runtime bugs.
Engine Audits & Decompilation
(Decompilation logic for this section was entirely audited and verified via native Ghidra pipeline against swkotor.exe, explicitly pulling from CSWSSoundObject::Load at 0x005c9040.)
Sound Objects represent one of the most streamlined parsers in the engine. They completely lack script triggers and rely almost entirely on mathematically calculating randomized positional matrices and variations natively.
Structural Load Phasing
| Function | Size | Behavior |
|---|---|---|
Load | 1345 B | The primary physical parser evaluating 24 core audio metric bounds, defining spatial positioning, volume variation, pitch scales, and active looping capabilities. |
Sounds List | – | Iterates through the list of associated audio clips, actively loading sound resrefs into memory sequentially for playback. |
Core Structural Findings
| Engine Rule | Runtime Behavior |
|---|---|
| Generated Type Truncation | The engine reads GeneratedType as a massive 32-bit integer from the file, but forcefully truncates it and stores only the bottom single byte in memory. Setting this number astronomically high physically corrupts the expected generator type. |
| Constructor Defaults | If fields are missing from the .uts binary, the engine physically relies on its internal C++ constructor to populate default values, completely avoiding hardcoded literal checks during parse time. |
| Spatial Loading Context | When loaded globally via a static map (CSWSArea::LoadSounds), the engine skips reading positional coordinates from the .uts file entirely and strictly enforces the X, Y, and Z vectors defined practically in the area’s .git file. |
| Silent Sound Lists | When pulling the list of sounds, the engine actively ignores missing entries. It only pushes a sound struct into playable memory if the file actually provided a valid Sound reference string. |
Legacy & Ignored Data
| Finding Type | Explanation |
|---|---|
| Legacy Engine Artifacts | Some older tools and legacy file revisions include values like TemplateResRef, LocName, Comment, Elevation, Priority, and PaletteID. These are artifacts from other Odyssey Engine branches (like Neverwinter Nights) and the KOTOR engine never evaluates them natively. |
Implemented Linter Rules (Rakata-Lint)
Phase 1 (intra-resource, no context)
Implemented under rakata_lint::rules::uts.
- UTS-001 (Volume Ceiling): Warns when
Volume > 127; values outside the engine’s byte threshold cause distortion or clipping. - UTS-002 (Audio Integrity): Warns when the
Soundslist contains blank entries; the engine skips them silently. - UTS-003 (Emitter Verification): Errors when the
Soundslist is empty; the object loads as a dead audio node. - UTS-004 (GeneratedType Truncation): Errors when
GeneratedType > 255; the engine truncates to a single byte and corrupts intended behavior. - UTS-005 (Legacy Engine Artifacts): Informs when
TemplateResRef,Elevation,Priority, orPaletteIDare populated; never natively evaluated by the K1 engine.
Phase 2 (resource existence, requires LintContext)
Implemented under rakata_lint::rules::uts_range.
- UTS-006 (Sound Resref Existence): Warns when any non-blank
Sounds[i].Sounddoes not resolve to a.wavresource in the configured sources. Blank entries are skipped (UTS-002 already covers them).