1. Firaxis celebrates the "Asian American and Pacific Islander Heritage Month", and offers a give-away of a Civ6 anthology copy (5 in total)! For all the details, please check the thread here. .
    Dismiss Notice
  2. Old World has finally been released on GOG and Steam, besides also being available in the Epic store . Come to our Old World forum and discuss with us!
    Dismiss Notice

[TOT] [TOTPP] Custom Music Patch

Discussion in 'Civ2 - General Discussions' started by Prof. Garfield, Sep 27, 2019.

  1. Prof. Garfield

    Prof. Garfield Deity Supporter

    Joined:
    Mar 6, 2004
    Messages:
    3,818
    Location:
    Ontario
    I have taken advantage of @TheNamelessOne 's TOTPPv0.18.1 to create "Extended Music For TOTPP"

    Note that this download is ~50MB, since it contains all the music that has shipped with any version of Civ II. Even if you don't want any of the extensions, this is an easy way to get the tracks required to enable the DirectShow music patch.

    This addition provides the ability to create playlists out of files in the <Test of Time>\Music folder, as well as choose playlists and tracks from those playlists by using the 3rd option of the Pick Music Menu in a game. There is also a playlist that is automatically generated from all the files in that folder.

    Note: Custom music for scenarios can now be handled directly from the Scenario's folder regardless of whether this addition is applied (though it will override this addition if used).

    Original Post:

    Here is the Custom Music Patch.

    You can download it from the GitHub: https://github.com/ProfGarfield/CustomMusicForTOTPP

    (Click the green "Clone or Download" button to download the files.)

    This link should always be the current version.

    The download is ~85 megabytes, since I included all the Civ II Music that I have (it makes installation instructions easier, too). If you have bandwidth limitations, post a response, and I'll make a smaller download and instructions.

    Be sure to read the readme, including the warning that this patch is designed to overwrite files (I think this is a minimal danger, but it is there).

    The Custom Music Patch has two main features:

    1. User Playlists

    A user can add files to Test of Time\Music and edit playlist.txt in order to have a larger variety of music. No events.lua file needed. Unfortunately, the names in Pick Music won't be changed.

    2. Custom Music For Scenarios

    A scenario creator can ship a custom playlist (changing pick music game.txt) and provide the music files for it.

    Questions, comments, bug reports, etc. are all welcome.
     
    Last edited: Jan 15, 2022
  2. Prof. Garfield

    Prof. Garfield Deity Supporter

    Joined:
    Mar 6, 2004
    Messages:
    3,818
    Location:
    Ontario
    I made a small update to customMusic.lua, basically initializing the random seed. Without it, choosing a 'random' playlist will always yield the same thing (at least until you play a bit and load the game again). It took me a while to notice this.
     
  3. Prof. Garfield

    Prof. Garfield Deity Supporter

    Joined:
    Mar 6, 2004
    Messages:
    3,818
    Location:
    Ontario
    Made another small update to the custom music patch. With the new file, the scenario folder is checked for music before the <ToT Dir>\Music folder, instead of after. (This is only relevant if 2 distinct tracks have the same name.) Also, failure to find a music file gives a text box message rather than an error (and an original track is used instead).

    customMusic.lua goes in <Test of Time Directory>\lua.
     

    Attached Files:

  4. Prof. Garfield

    Prof. Garfield Deity Supporter

    Joined:
    Mar 6, 2004
    Messages:
    3,818
    Location:
    Ontario
    EDIT: TOTPPv0.18.1 makes this update irrelevant.

    A change to civ.playMusic with TOTPPv18 requires an update to customMusic.lua, which goes in goes in <Test of Time Directory>\lua.

    When overwriting the music files, a 'silence' track is played for a few seconds, so that none of files to be replaced will be in use. The change to civ.playMusic meant that customMusic.lua could no longer find 'silence.mp3', and so caused an error when trying to overwrite the track currently in use.

    Further changes may happen in the near future to take advantage of the new civ.scen.onSelectMusic functionality.
     

    Attached Files:

    Last edited: Jan 12, 2022
  5. Prof. Garfield

    Prof. Garfield Deity Supporter

    Joined:
    Mar 6, 2004
    Messages:
    3,818
    Location:
    Ontario
    Note: With TOTPPv18.1, this update is no longer necessary.
     
  6. Prof. Garfield

    Prof. Garfield Deity Supporter

    Joined:
    Mar 6, 2004
    Messages:
    3,818
    Location:
    Ontario
    I've made a new version of this patch, which I call "Extended Music for TOTPP." It no longer involves automatically overwriting music files.
     
  7. Prof. Garfield

    Prof. Garfield Deity Supporter

    Joined:
    Mar 6, 2004
    Messages:
    3,818
    Location:
    Ontario
    Fixed a bug in the new Extended Music for TOTPP. Anyone who downloaded it before I posted this message should download the attached file for a fix.
     

    Attached Files:

Share This Page