Author Topic: Add music tracks to a mod  (Read 119 times)

0 Members and 1 Guest are viewing this topic.

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 7384
Add music tracks to a mod
« on: October 23, 2017, 04:53:47 AM »
i know we've talked about that at some point.... but couldn't find back the thread we did....
but anyone remember how to transform the .mp3 into compatible waves and how to incorporate them into a mod ?

and all the syntaxes that goes with.
> > > Support Mods Creation developments with Paypal Donations < < <
Click here to PayPal Donate.

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 7384
Re: Add music tracks to a mod
« Reply #1 on: October 23, 2017, 06:39:12 AM »
i made a little progress...

i used an online web site to convert my .mp3 to .wav

i named my tracks 01Track.wav to 12Track.wav and i've put them along 01Track.rsc to 12Track.rsc in an Audio/Music/ folder.
And i've called them in my resource.rsc file...

they get converted very fine. but the problem is they dont get played in game.  :(

(the game has some preset name audio files like Awesomer.rsc, Blacksmith.rsc, CalmWaters.rsc, Cemetery.rsc, Gatherers.rsc, IceStorm.rsc, Interlude.rsc, ....... if I rename my files to fit those, they get played ^^. And my music is sooooooo good and totally fit my mod so awesomely ^^. But, maybe, did i missed something somewhere ?? )
Is there a file i missed that would control which Music track it should play ?
> > > Support Mods Creation developments with Paypal Donations < < <
Click here to PayPal Donate.

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 7384
Re: Add music tracks to a mod
« Reply #2 on: October 23, 2017, 07:06:49 AM »
Oh !

i just found a file in /Game/ folder named: MusicTracks.rsc with this inside:
Code: [Select]
MusicList resource
{
Track _tracks
[
{ float _minStatus = 0.0; float _maxStatus = 1.01; int _minMonth = 0; int _maxMonth = 11; SoundEffect _track = "Audio/Music/Gatherers.rsc"; }
{ float _minStatus = 0.0; float _maxStatus = 1.01; int _minMonth = 0; int _maxMonth = 11; SoundEffect _track = "Audio/Music/Mountain.rsc"; }
{ float _minStatus = 0.0; float _maxStatus = 1.01; int _minMonth = 0; int _maxMonth = 11; SoundEffect _track = "Audio/Music/Merchant.rsc"; }
{ float _minStatus = 0.0; float _maxStatus = 1.01; int _minMonth = 0; int _maxMonth = 11; SoundEffect _track = "Audio/Music/CalmWaters.rsc"; }
{ float _minStatus = 0.0; float _maxStatus = 1.01; int _minMonth = 0; int _maxMonth = 11; SoundEffect _track = "Audio/Music/ShiveringPines.rsc"; }
{ float _minStatus = 0.0; float _maxStatus = 1.01; int _minMonth = 0; int _maxMonth = 11; SoundEffect _track = "Audio/Music/Outbreak.rsc"; }
{ float _minStatus = 0.0; float _maxStatus = 1.01; int _minMonth = 0; int _maxMonth = 11; SoundEffect _track = "Audio/Music/Interlude.rsc"; }
{ float _minStatus = 0.0; float _maxStatus = 1.01; int _minMonth = 0; int _maxMonth = 11; SoundEffect _track = "Audio/Music/IceStorm.rsc"; }
{ float _minStatus = 0.0; float _maxStatus = 1.01; int _minMonth = 0; int _maxMonth = 11; SoundEffect _track = "Audio/Music/Zoom.rsc"; }
{ float _minStatus = 0.0; float _maxStatus = 1.01; int _minMonth = 0; int _maxMonth = 11; SoundEffect _track = "Audio/Music/Awesomer.rsc"; }
{ float _minStatus = 0.0; float _maxStatus = 1.01; int _minMonth = 0; int _maxMonth = 11; SoundEffect _track = "Audio/Music/Tailor.rsc"; }
{ float _minStatus = 0.0; float _maxStatus = 1.01; int _minMonth = 0; int _maxMonth = 11; SoundEffect _track = "Audio/Music/Cemetery.rsc"; }
{ float _minStatus = 0.0; float _maxStatus = 1.01; int _minMonth = 0; int _maxMonth = 11; SoundEffect _track = "Audio/Music/Wheat.rsc"; }
{ float _minStatus = 0.0; float _maxStatus = 1.01; int _minMonth = 0; int _maxMonth = 11; SoundEffect _track = "Audio/Music/Blacksmith.rsc"; }
{ float _minStatus = 0.0; float _maxStatus = 1.01; int _minMonth = 0; int _maxMonth = 11; SoundEffect _track = "Audio/Music/Snowfall.rsc"; }
]
}

i've compared and i noticed there isnt a Audio/Music/Menu.rsc in that list so i guess this one is the music we get when we open the game and we are in the menu to choose the settings of our future game. i have to decide 1 of my track, and copy it to menu.rsc in order to get it played during that time :)

i made my own list like this:
Code: [Select]
MusicList resource
{
Track _tracks
[
{ float _minStatus = 0.0; float _maxStatus = 1.01; int _minMonth = 0; int _maxMonth = 11; SoundEffect _track = "Audio/Music/01Track.rsc"; }
{ float _minStatus = 0.0; float _maxStatus = 1.01; int _minMonth = 0; int _maxMonth = 11; SoundEffect _track = "Audio/Music/02Track.rsc"; }
{ float _minStatus = 0.0; float _maxStatus = 1.01; int _minMonth = 0; int _maxMonth = 11; SoundEffect _track = "Audio/Music/03Track.rsc"; }
{ float _minStatus = 0.0; float _maxStatus = 1.01; int _minMonth = 0; int _maxMonth = 11; SoundEffect _track = "Audio/Music/04Track.rsc"; }
{ float _minStatus = 0.0; float _maxStatus = 1.01; int _minMonth = 0; int _maxMonth = 11; SoundEffect _track = "Audio/Music/05Track.rsc"; }
{ float _minStatus = 0.0; float _maxStatus = 1.01; int _minMonth = 0; int _maxMonth = 11; SoundEffect _track = "Audio/Music/06Track.rsc"; }
{ float _minStatus = 0.0; float _maxStatus = 1.01; int _minMonth = 0; int _maxMonth = 11; SoundEffect _track = "Audio/Music/07Track.rsc"; }
{ float _minStatus = 0.0; float _maxStatus = 1.01; int _minMonth = 0; int _maxMonth = 11; SoundEffect _track = "Audio/Music/08Track.rsc"; }
{ float _minStatus = 0.0; float _maxStatus = 1.01; int _minMonth = 0; int _maxMonth = 11; SoundEffect _track = "Audio/Music/09Track.rsc"; }
{ float _minStatus = 0.0; float _maxStatus = 1.01; int _minMonth = 0; int _maxMonth = 11; SoundEffect _track = "Audio/Music/10Track.rsc"; }
{ float _minStatus = 0.0; float _maxStatus = 1.01; int _minMonth = 0; int _maxMonth = 11; SoundEffect _track = "Audio/Music/11Track.rsc"; }
{ float _minStatus = 0.0; float _maxStatus = 1.01; int _minMonth = 0; int _maxMonth = 11; SoundEffect _track = "Audio/Music/12Track.rsc"; }
]
}

then in my resource.rsc file, instead to call all the track seperately, i call the Game/MusicTracks.rsc and i call the extra Audio/Music/Menu.rsc :)


and everything is working so great !!!!!!!
so awesome !!!!  I love it !!
> > > Support Mods Creation developments with Paypal Donations < < <
Click here to PayPal Donate.

Offline Tom Sawyer

  • Modders
  • Architect
  • *****
  • Posts: 817
Re: Add music tracks to a mod
« Reply #3 on: October 23, 2017, 08:56:50 AM »
I use Audacity for making sound files. It's a very handy tool. I also thought about background music for the North theme and have collected a couple of tracks. But have not done it yet because it's always a matter of taste and of copyright. :/

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 7384
Re: Add music tracks to a mod
« Reply #4 on: October 23, 2017, 09:08:55 AM »
it's always a matter of taste and of copyright. :/

yeah :/

but i ll still do it. if people will able to find where my music will be from.... i strongly doubt ^^
> > > Support Mods Creation developments with Paypal Donations < < <
Click here to PayPal Donate.