• 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 Easy Way to Add Ambient Sound at Sea?

Mazioman

Landlubber
Hey hey party pirates, I was wondering if someone could help me find out a way to add in a soft ambient track that would essentially always be playing when at sea, that ambient track would be crew sounds ported from Naval Action (you know, the little shouts, talking, etc. they do in that game--really adds to the atmosphere). I know there's a set of ambient sounds that play quite frequently for wind and waves and wanted to know if there was an easy way to add in another version of that. Depending on how the engine handles sound though, I wouldn't want to mess it up and have the sounds start playing over one another or anything like that. I'm trying to work it out on my own, but if anyone has any pointers, please feel free to let me know! Also, the other thing I have in progress is a Reshade preset, but it's going to need some tweaking because while the ocean looks great, interiors are kinda...blown out with the brightness currently, which I think is a tonemapper thing. Here's a couple of preview shots, I think it looks way more muted and a lot less cartoony, it was vaguely inspired by the colorgrading in Master and Commander:
demo13.JPG
dEMO7.JPG
dEMO8.JPG

And one last alternate history one where sailmaking techniques developed a little differently in Europe :)

demo14.JPG

The Dolphin actually looks very nice with Junk sails in my opinion...
 
Indeed that does have a bit of a Master & Commander / Naval Action / North Sea look to it all.
Not bad!

As for your continuous sound question, I'm reminded of the steam engine sound I added.
From PROGRAM\NK.c:
Code:
void StackSteam(aref rCharacter, int puffs_per_second)
// Character and number of tentacles
{
    if (!bSeaActive) return;
    bool PlayEngineSound = false;
    int delay = 0;

    // Particle Effects
    for (int i=0; i < puffs_per_second; i++)
    {
        PostEvent("CreateStackSteam", delay, "i", rCharacter);
        delay = delay + 1000/puffs_per_second;
    }

    if(IsMainCharacter(rCharacter) && abs(sti(GetAttribute(rCharacter,"Ship.Power"))) > 0)
    {
        // Sound
        if(!CheckAttribute(rCharacter,"Ship.PlayedEngineSound"))
        {
            rCharacter.Ship.PlayedEngineSound = GetSeaTime();
            PlayEngineSound = true;
        }
        if(GetSeaTime() >= sti(rCharacter.Ship.PlayedEngineSound) + sti(rCharacter.basetime)) PlayEngineSound = true;

        if(PlayEngineSound)
        {
            int SoundID;
            SoundID = PlayStereoSound("objects\engine.wav");
            float volume;
            volume = 0.1 + 0.9*abs(stf(GetAttribute(rCharacter,"Ship.Power")))/100;
            SendMessage(Sound,"llf",MSG_SOUND_SET_VOLUME, SoundID, volume);
            rCharacter.Ship.PlayedEngineSound = GetSeaTime();
        }

        // Fuel Consumption
        if(!CheckAttribute(rCharacter,"Ship.FuelConsumption"))    rCharacter.Ship.FuelConsumption = 0;
        else    rCharacter.Ship.FuelConsumption = stf(rCharacter.Ship.FuelConsumption) + abs(stf(GetAttribute(rCharacter,"Ship.Power")))/100;
        if(stf(rCharacter.Ship.FuelConsumption) >= 195)
        {
            RemoveCharacterGoods(rCharacter,GOOD_PLANKS,1);
            rCharacter.Ship.FuelConsumption = 0;
        }
    }
}
Maybe with some variation of that, you could make it work?

The sound file I used is very, very short so no chance of overlapping.
But perhaps if you code in the length of the sound file you use, you can use a similar if-statement to stop it from playing every single second too?

The Dolphin actually looks very nice with Junk sails in my opinion...
Doesn't look like junk. ;)
 
Back
Top