Random Music 1.1
Created: 11/27/04 by Mikail, EvilleJedi
Last updated: 09/11/05
Homepage: http://www.geocities.com/Area51/Quad.../homeworld.htm
Discussion: http://forums.relicnews.com/showthread.php?t=52251
==========================================================================
INTRODUCTION
An updated version of EvilleJedi's gamerule, this script randomly selects the
background music from a playlist. The process is repeated after each piece of
music is completed.
DOWNLOAD
http://www.geocities.com/Area51/Quad.../homeworld.htm
INSTALLATION
Extract this archive into your "Homeworld2\Data\" directory.
INSTRUCTIONS
The music files must already exist in the proper format. For instructions on
how to convert tracks to the suitable format, read the tutorial found here:
http://hw2.tproc.org/wiki/TutorialImportSound.
Call the script from within the "OnInit" function of a game-type LUA using the
"dofilepath" function. For example:
The script reads track information from the "PlayList" table. Simply addCode:function OnInit() dofilepath("data:RandomMusic.lua") MPRestrict() Rule_Add("MainRule") end
whichever tracks you wish to play to this table. The syntax for the table is:
where TrackFilePath is the path to the music file you wish to play, relative toCode:{TrackFilePath, TrackTitle, TrackLength (in seconds),},
the "Homeworld2\Data\sound\music\" directory, TrackTitle is the title of the
track, and TrackLength is the length of time the track should play (in seconds).
==========================================================================
CHANGE LOG
v1.1
* Simplified how the script works. You no longer need to have the ATI file for
it to function.
* All tracks are now in the "PlayList" table.
* Changed the syntax for the "PlayList" table. Track titles now come before
track times.
* I changed the track lengths so that all tracks now play for roughly five
minutes.



