Difference between revisions of "Riven SLST resources"

From A look inside The Link @ wiki
Jump to: navigation, search
(import)
 
(explained the record structure)
Line 1: Line 1:
 
<noinclude>{{Riven}}</noinclude>
 
<noinclude>{{Riven}}</noinclude>
They contain ambient sound info for the card. Ambient sounds are arbitrary mixes of a number of sounds (for example wind + steam flowing in a pipe). Sounds are read from tWAV resources stored in the associated *_sounds.mhk archive (not in the same archive storing the SLST resource). For example, a SLST resource in a_Data will point to tWAV sounds stored in a_Sounds, not a_Data. The record structure is:
+
They contain ambient sound info for the card. Ambient sounds are arbitrary mixes of a number of sounds (for example wind + steam flowing in a pipe). Sounds are read from tWAV resources stored in the associated *_sounds.mhk archive (not in the same archive storing the SLST resource). For example, a SLST resource in a_Data will point to tWAV sounds stored in a_Sounds, not a_Data.
 +
 
 +
Each SLST resource is a list of records; it starts with an unsigned short record count, followed by that many records. The record structure is:
  
 
{| class="structure"
 
{| class="structure"

Revision as of 19:35, 8 February 2008

Riven
Mohawk Overview
BLST CARD FLST HSPT
MLST NAME PLST RMAP
SFXE SLST tBMP tMOV
tWAV VARS VERS ZIPS
Scripts Variables
External commands

They contain ambient sound info for the card. Ambient sounds are arbitrary mixes of a number of sounds (for example wind + steam flowing in a pipe). Sounds are read from tWAV resources stored in the associated *_sounds.mhk archive (not in the same archive storing the SLST resource). For example, a SLST resource in a_Data will point to tWAV sounds stored in a_Sounds, not a_Data.

Each SLST resource is a list of records; it starts with an unsigned short record count, followed by that many records. The record structure is:

unsigned short index Record index, starting from 1
unsigned short sound_count How many sounds to mix
unsigned short sound_ids[sound_count] tWAV resource IDs of the sounds to use
unsigned short fade_flags
unsigned short loop If set to 1, the mix loops forever
unsigned short global_volume Volume of the resulting sound mix
unsigned short u0
unsigned short u1
unsigned short volumes[sound_count] Volume for each sound component
unsigned short balances[sound_count] Balance for each sound component (<0 left, 0 center, >0 right)
unsigned short u2[sound_count]

fade_flags is a bit field controlling how to fade the sound channels when the record is activated. Bit 0 controls the fading out of any previous playing sound, bit 1 controls the fading in of the sound specified by the new record. For example, 3 would cause both sounds to fade, while 0 would suddenly stop the previous sound and immediately start the new one.

u0 is usually 0 or 1, and changing it seems to do nothing. u1 is 0; giving it a non-zero value prevents sounds from playing. u2[] seems always 255 or 256 (for every sound component) and changing it seems to do nothing.

The first record is automatically enabled when entering the card, so it doesn't need to be activated from scripts.