• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Need Help Create a Music Pack

danitim1

Sanka Da Vinci
Storm Modder
Hi everyone! I need some help with creating a music pack for POTC and I really can't figure it out why isnt the game registering my music pack, everything is in place, here is my code, I toke and example of LegendarySpider music pack, and his code works but mine doesnt, I wanted to know why. Here is my code.
 

Attachments

  • music_piratesofthecaribbean.c
    13.6 KB · Views: 395
At the moment I'm unable to check this. Please remind me later.

In the meantime, I wonder if perhaps @Grey Roger could have a look?
 
I don't know in detail how this works. All I've done music-wise is to add a few files to the normal location and add a few lines in "music_standard.c" to integrate them into the general sound scheme.

The differences between the above attached "music_piratesofthecaribbean.c" and the normal "music_standard.c", apart from the file name are:

All music files are now loaded from "MUSIC\Pirates\" instead of "MUSIC\" - presumably, by extension, the actual folder names would be "RESOURCE\Sounds\MUSIC\Pirates" and "RESOURCE\Sounds\MUSIC\Pirates" respectively. @danitim1: do you have folder "RESOURCE\Sounds\MUSIC\Pirates" containing copies of all the music sound files you don't want to replace as well as the specific files you do want to use? (I'm assuming that, for example, 'tmpref.silence.f1.name = "MUSIC\Pirates\silence.ogg"' is not a new version of a file containing silence. ;))

At the end is this code:
Code:
void RegisterMusicScheme()
{
   ref rms; makeref(rms, registered_music_schemes);
   int n = GetAttributesNum(rms);
   string lnode = "l" + n;
   rms.(lnode).id = "PotCgame";
   rms.(lnode).resdir = "Pirates";
   switch (LanguageGetLanguage())
   {
     case "Polish":
       rms.(lnode).name = "Piraci z Karaibów";
     break;
     // default:
       rms.(lnode).name = "Pirates of the Caribbean";
   }
}
This is different to what's in the normal file:
Code:
void RegisterMusicScheme()
{
   ref rms; makeref(rms, registered_music_schemes);
   string lnode = "l0";
   rms.(lnode).id = "standard";
   rms.(lnode).resdir = "";
   switch (LanguageGetLanguage())
   {
     // default:
       rms.(lnode).name = "Standard";
   }
}
 
Hi Roger, I do have a folder with the copy of the musics, but in game it doesnt show in the Options>Sound. It just shows the standard, If I change the
string lnode = "l1"; to string lnode = "l0"; it changes the name from the "Standard" to "Pirates of the Caribbean".
 
One thing you could do:
1. Move your changes to a safe spot
2. Install the PotC Music Pack that does work
3. Slightly modify it to be more in line with your file, then see if it still works
4. Repeat until it stops working

At the moment I am too tired to check it properly.
I don't see anything stand out as being obviously wrong, so the above is probably what I'd end up doing myself. :facepalm
 
Back
Top