This would seem to be the thread in question:
How to create nation, add music and create a new quests-book?
How to create nation, add music and create a new quests-book?
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!
Quick links for Beyond New Horizons
- Download latest version
- Wiki
- FAQ
- Report bugs here
- Bug Tracker on Github
Quick links for Maelstrom
- Download the latest version of Maelstrom
- Download the latest version of ERAS II
- Download the latest version of New Horizons on Maelstrom
Quick links for PotC: New Horizons
- Download latest version
- Wiki
- FAQ
- Report bugs here
Thanks to YOUR votes, GOG.com now sells:
- Sea Dogs
- Sea Dogs: Caribbean Tales
- Sea Dogs: City of Abandoned Ships
Vote now to add Pirates of the Caribbean to the list!
Quick links for AoP2: Gentlemen of Fortune 2
- Downloads and info
- ModDB Profile
- Forums Archive
A Pirate Podcast with Interviews
Music, Comedy and all things Pirate!
- Episode Guide - About - Subscribe -
- Twitter - Facebook - iTunes - Android -
- Youtube - Fill the Coffers -
Could you do a WinMerge on those files? I don't think I ever tried those files in the game and they never went in the mod either.This would seem to be the thread in question:
How to create nation, add music and create a new quests-book?
//============ KRAKEN ATTACK =======
tmpref.music_kraken_attacl.f1.name = "MUSIC\krakenattack.ogg";
if(CheckAttribute(pchar, "KrakenAttack")) return false; // No Kraken attack is available until a set time after the previous attack
if(CheckAttribute(pchar, "ship.SubmergeDutchman")) return false; // No Kraken attack is available while the Dutchman is submerged
PauseAllSounds();
FadeOutMusic(150);
PlaystereoOGG("music_krakenattack");
//FadeOutMusic(500);
if (!bDisableMapEnter) PostEvent("LoadSceneSound", 110000);
else PostEvent("LoadSceneSound", 41500);
That depends. I don't think anyone has it on their to-do list, so it could take literally an infinite amount of time.So I guess it will take some time for custom music in the various storylines ...?
Relevant files are (you can edit these with Notepad/Notepad++):I would very much like to do it on my own, although I'm not good at code, it's just been signed up and I'm looking at some tutorials in the meantime. I got an idea with the "modding tutorials and history" manual (I think it made a certain @Talisman) in the first sections dedicated to these difficult codes
//ASVS --->
PChar.main_theme.value = "10";
PChar.main_theme.musicname = "music_Bart_main_theme";
//ASVS <---
Change_MainThemeMusic_Chance(5);
PROGRAM\sound\sound.c this is the section of code you'll want to tweak:Yes, while trying to find out exactly what 'FadeOutMusic' does. I couldn't figure out what it does because it eventually ends up at a 'SendMessage' command, and I've no idea how those work. It's also how I know I need to deal separately with night and day sailing music. Storm music isn't going to be an issue because the end theme doesn't work too well with a storm anyway, so a 'SetNextWeather' command means it's going to be a clear day (or night) when you sail off into free-play.
So I'm back to trying a bunch of commands to store the values of the current "tmpref.music_day_sailing.f*.name" attributes, set the attributes all to "Silence.ogg", and play my end theme. A further quest, triggered by "MapEnter", can put the attributes back from wherever I stored them.
void SetSchemeForSea()
{
ResetSoundScheme();
AddSoundScheme("sea");
if (Whr_IsStorm())
{
AddSoundScheme("sea_weather_storm");
int rainSoundID = PlayStereoSoundLooped_JustCache("rain_storm");
SendMessage(Sound,"llf",MSG_SOUND_SET_VOLUME, rainSoundID, 0.5);
SendMessage(Sound,"lll",MSG_SOUND_RESUME, rainSoundID, 0);
int windSoundID = PlayStereoSoundLooped_JustCache("water_sea_storm");
SendMessage(Sound,"llf",MSG_SOUND_SET_VOLUME, windSoundID, 0.45);
SendMessage(Sound,"lll",MSG_SOUND_RESUME, windSoundID, 0);
SetMusic("music_storm");
}
else
{
// LDH to get night sailing music when you're sailing - 20Jan09
// if we're not using night music, use this line instead of the section below
// SetMusic("music_day_sailing");
// LDH set night music properly - 11Feb09
ref pchar = GetMainCharacter();
// LDH 30Mar09
if (sti(pchar.Ship.POS.Mode) == SHIP_WAR) // PB: !bMapEnter doesn't have the same effect
SetMusic("music_sea_battle");
else
{
if(Whr_IsNight()) SetMusicAlarm("music_night_sailing");
else
{
if(Whr_IsFog()) SetMusicAlarm("music_fog_sailing");
else SetMusicAlarm("music_day_sailing");
}
}
if (Whr_IsRain())
{
AddSoundScheme("sea_weather_rain");
PlayStereoSoundLooped("rain");
int waterSoundID = PlayStereoSoundLooped_JustCache("water_sea");
SendMessage(Sound,"llf",MSG_SOUND_SET_VOLUME, waterSoundID, 0.6);
SendMessage(Sound,"lll",MSG_SOUND_RESUME, waterSoundID, 0);
}
else
{
AddSoundScheme("sea_weather");
int water2SoundID = PlayStereoSoundLooped_JustCache("water_sea");
SendMessage(Sound,"llf",MSG_SOUND_SET_VOLUME, water2SoundID, 0.35);
SendMessage(Sound,"lll",MSG_SOUND_RESUME, water2SoundID, 0);
}
}
ResumeAllSounds();
}
// LDH set night music properly - 11Feb09
ref pchar = GetMainCharacter();
if (CheckAttribute(pchar, "seamusic"))
{
if (sti(pchar.Ship.POS.Mode) == SHIP_WAR) // PB: !bMapEnter doesn't have the same effect
SetMusic(pchar.seamusic);
else
{
SetMusicAlarm(pchar.seamusic);
}
}
else
{
// LDH 30Mar09
if (sti(pchar.Ship.POS.Mode) == SHIP_WAR) // PB: !bMapEnter doesn't have the same effect
SetMusic("music_sea_battle");
else
{
if(Whr_IsNight()) SetMusicAlarm("music_night_sailing");
else
{
if(Whr_IsFog()) SetMusicAlarm("music_fog_sailing");
else SetMusicAlarm("music_day_sailing");
}
}
}
It is for a storyline specific main theme.In essence is it a code that allows you to have personalized music or misunderstood?
bool musicdone = false;
if (CheckAttribute(PChar, "seabattlemusic") && sti(pchar.Ship.POS.Mode) == SHIP_WAR)
{
SetMusic(PChar.seabattlemusic);
musicdone = true;
}
if (CheckAttribute(PChar, "seamusic") && sti(pchar.Ship.POS.Mode) != SHIP_WAR)
{
SetMusicAlarm(PChar.seamusic);
musicdone = true;
}
if (!musicdone)
<normal sound code>
void Sound_OnSeaAlarm(bool _seaAlarmed)
{
ref PChar = GetMainCharacter();
seaAlarmed = _seaAlarmed;
if (seaAlarmed == oldSeaAlarmed)
return;
if (seaAlarmed)
{ //alarm on!
if (CheckAttribute(PChar, "seabattlemusic"))
{
SetMusic(PChar.seabattlemusic);
}
else
{
SetMusic("music_sea_battle");
}
}
else
{ //alarm off
SetMusic(oldMusicName);
}
oldSeaAlarmed = seaAlarmed;
}
With @Grey Roger's recent change, I think it is.Instead, I just finished the battle between the Black Pearl and The Interceptor. But the background music was not the right one, but it was 'Sailing01'. Is there a way to place custom music here at this time of battle?