Prof. Garfield

Deity
Supporter
Joined
Mar 6, 2004
Messages
4,049
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:

Prof. Garfield

Deity
Supporter
Joined
Mar 6, 2004
Messages
4,049
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.
 

Prof. Garfield

Deity
Supporter
Joined
Mar 6, 2004
Messages
4,049
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.

EDIT: Removed file, since Github Repository has been updated for a long time now.
 
Last edited:

Prof. Garfield

Deity
Supporter
Joined
Mar 6, 2004
Messages
4,049
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.

EDIT: Removed file, since Github Repository has been updated for a long time now.
 
Last edited:

Prof. Garfield

Deity
Supporter
Joined
Mar 6, 2004
Messages
4,049
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.
 

Prof. Garfield

Deity
Supporter
Joined
Mar 6, 2004
Messages
4,049
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.

EDIT: Removed file, since Github Repository has been updated for a long time now.
 
Last edited:

duplj

Chieftain
Joined
Jul 11, 2022
Messages
11
Location
Россия
Thanks
something similar exists for a civilization of 2 mge? as well as its own music from the game in mp3 and the possibility of its implementation in the game?
 
Top Bottom