• Civilization 7 has been announced. For more info please check the forum here .

Prof. Garfield

Deity
Supporter
Joined
Mar 6, 2004
Messages
4,368
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:
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.
 
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:
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:
I've made a new version of this patch, which I call "Extended Music for TOTPP." It no longer involves automatically overwriting music files.
 
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:
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?
 
Hello thx for your work on this old great game, i did everything posted here but when i enable "Directshow music" from TOTLauncher the game exit to desktop right before the start of the actual game (exactly after i click "ok" on the message: "Caesar, you have risen to become the leader of the Romans. May your reign be long and prosperous [...]." I installed DX9 but this didn't solve the problem. The only thing that solve is to turn off "Directshow music" from TOTLauncher, with the result of not having the music in game. NOTES: The music works perfectly in the menu. I have win10. If you have any suggestions .... thank you!
 
SOLVED: LUA SCRIPTING and LUA SCENARIO EVENTS need to be activated in the TOTPP launcher. Probably is something clear to most of the people but it wasn't written in the instruction
 

Attachments

  • Luamusic.jpg
    Luamusic.jpg
    334.9 KB · Views: 11
SOLVED: LUA SCRIPTING and LUA SCENARIO EVENTS need to be activated in the TOTPP launcher. Probably is something clear to most of the people but it wasn't written in the instruction
Sorry about that. I've just updated the readme. I don't think it's "obvious" so much as that most people already have it enabled in order to play Lua scripted scenarios.
 
Top Bottom