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)
These static constraints are targeted for implementation under rakata_lint::rules::uts.
- Volume Ceiling: (Pending) Prevents rendering distortion by asserting
Volumestays strictly within the standard0-127engine byte threshold. - Float Sanity Parsing: (Pending) Confirms
FixedVariancemathematically parses as a validFLOAT, protecting the engine from invalid arithmetic operations during randomization. - Audio Integrity: (Pending) Asserts that every defined
Soundreference resolves precisely to a physical audio stream in the active game modules. - Emitter Verification: (Pending) Structurally ensures the emitter has at least 1 actively mapped
Soundsentry to prevent dead objects from polluting active map memory. - Byte Truncation Warnings: (Pending) Flags when
GeneratedTypeoverflows heavily past255, predicting the engine’s physical byte wrap.