Results 1 to 8 of 8

Random Music Script (currently v1.1)

  1. #1
    Lost in the code... Mikali's Avatar
    Join Date
    Jun 2003
    Location
    %HW2_ROOT%

    Random Music Script (currently v1.1)

    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:

    Code:
    	function OnInit()
    		dofilepath("data:RandomMusic.lua")
    		MPRestrict()
    		Rule_Add("MainRule")
    	end
    The script reads track information from the "PlayList" table. Simply add
    whichever tracks you wish to play to this table. The syntax for the table is:

    Code:
    	{TrackFilePath, TrackTitle, TrackLength (in seconds),},
    where TrackFilePath is the path to the music file you wish to play, relative to
    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.
    Last edited by Mikali; 11th Sep 05 at 5:52 PM.
    Download my HW2 mods, maps & tools. link
    Username|SF on Gamespy/Xfire/Hamachi/Gameranger

  2. #2
    Reaper
    Guest
    Ok i DL it to \Homeworld2\Data\Scripts\" directory. I play the game and the same music plays..no changes what so ever..found this in the read me:
    INSTRUCTIONS
    Use 'dofilepath()' within a gamerule's 'OnInit()' function to read/call the file.
    Adjust 'musicTable' to suit your needs.
    What ever all that means!!??
    Could someone please tell me how you get this random music player to work????
    Any help would be great.

  3. #3
    Lost in the code... Mikali's Avatar
    Join Date
    Jun 2003
    Location
    %HW2_ROOT%
    It's more of a resource than a mod. What I mean is that you have to edit/create other mods that then access this resource.

  4. #4
    DrunkenPirate
    Guest
    Ah, I was fearing such
    There does not happen to be some sort of mod that does this though is there? 4 hour battles with friends gets a little tiring when you have the same music on your ears.

  5. #5
    Reaper
    Guest
    you say that again

  6. #6
    Rodrivy
    Guest
    I cannot get the thing to work either ! I want to add music from homeworld 1 that I have to the playlist as well , but this is all confusing for us script rookies . PLEASE HELP !!

  7. #7
    Lost in the code... Mikali's Avatar
    Join Date
    Jun 2003
    Location
    %HW2_ROOT%
    The music files need to already have been created in their proper format. They need to be stored in a directory relative to the "Homeworld2\Data\sound\music\". Track information needs to be stored in the "musicTable" table.
    The script will then read the track information, and play the file listed in the FilePath portion.

  8. #8
    Lost in the code... Mikali's Avatar
    Join Date
    Jun 2003
    Location
    %HW2_ROOT%
    Update to v1.1.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •