• 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 Sound format and add locators

Myth

Freebooter
Good afternoon.

Now I really need help with resources. Well, at least a clue.

1) I need help with the convection of music and sounds in the format of the game. New melodies about 50 pieces, voice files for dialogs for 1000.

New music in mp3, and sounds in ogg.

The question is: do you need to change the format at all?

In addition, I need help with the addition of locators in 5 locations. All locations are in the original game.

Actually, I need:

1) In St. John's, add a couple locators for a street trader.
2) On all 3 decks of the game add as many locators as possible for the transitions between the locations. I mean locators near the doors.
3) In one of the large cabins add two locators near the table. Here it is necessary that two characters can be put on chairs near the table.
4) You need to rotate a specific locator in a particular tavern.

Can anyone get to add locators? I will be very grateful. Through them, adding locators in Tool to me is hell.

I forget how to rotate a character inside a locator.

Thank you.
 
I remembered another thing: if I want to add characters that drag boxes and other things, do I just need to add a flag to the location code? Do not need to edit the resources?
 
It is necessary to wait for the answer of the masters? Or is it better to write them in private messages? Will they see that you mentioned them?
 
It is necessary to wait for the answer of the masters? Or is it better to write them in private messages? Will they see that you mentioned them?
They will see; just be patient.

Grey Roger is usually around only outside the weekend.
And Jack Rackham shows up once every few days or so.
 
Yes I'm here again. My father suddenly got very ill so I had to leave everything.

Here's the tutorial about writing locators with the TOOL:
Locators with the TOOL
and yes it's for everyone.

To rotate a locator:
First you need the coordinates for the wanted position:

1) PROGRAM\console.c
line18: change the switch(0) to switch(2). save

2) start game and go to the position. Turn yourself to the wanted direction too.
press F12: write down these values x, y, z, xx, xz, zx, zz. Round off to 1 decimal

place yourself in the wanted direction and check xx, xz, zx, and zz.
(xx = zz xz = -zx yy =1)
 
@Jack Rackham: sorry to hear about your father! I hope he pulls through.

Also, thanks for the hint about the xx, xz, zx, zz etc. I haven't been able to quite figure them out myself, and when I've created a new locator, I just copied the values from another, already existing locator which faces the same way as the one I want to create.
 
case 2:
if (!bSeaActive) {
float x,y,z,ay,xx,zz,xz,zx;
GetCharacterPos(GetMainCharacter(), &x, &y, &z);
GetCharacterAy(pchar, &ay);
xx = -sin(ay - PId2);
zz = xx;
xz = -cos(ay - PId2);
zx = -xz;
Logit("Location id: "+pchar.location);
Logit("Your Coords x: " + x+" y: "+y+" z: "+z );
Logit("Viewangle ay: "+ay+"; xx= "+xx+" xz= "+xz+" zx= "+zx+" zz= "+zz);
Logit("Curlocator: "+chrWaitReloadLocator);
// trace("rld,loc," +xx+",0,"+xz+",0,1,0,"+zx+",0,"+zz+","+x+","+y+","+z+",1,0,0,0,0,0,0,0,0,");
// trace("rld,aloc,"+xx+",0,"+xz+",0,1,0,"+zx+",0,"+zz+","+x+","+y+","+z+",1,0,0,0,0,0,0,0,0,");
} else {
Logit("Ship position: x="+pchar.ship.pos.x+", z="+pchar.ship.pos.z);
}
//Logit("Ship position: x="+worldMap.playerShipX+", z="+worldMap.playerShipZ);
break;

This?
 
That looks like the right part. You'll need functions 'GetCharacterPos' and 'GetCharacterAy'. In PoTC, those are defined in "PROGRAM\Characters\characters.c". If they aren't defined somewhere in CoAS, you will need to add them somewhere. They look like this:
Code:
bool GetCharacterPos(ref character, ref float_x, ref float_y, ref float_z)
{
   float cx, cy, cz;
   if(SendMessage(character, "leee", MSG_CHARACTER_GETPOS, &cx, &cy, &cz) == 0) return false;
   float_x = cx; float_y = cy; float_z = cz;
   return true;
}

bool GetCharacterAy(ref character, ref float_ay)
{
   float ay = 0.0;
   if(SendMessage(character, "le", MSG_CHARACTER_GETAY, &ay) == 0) return false;
   float_ay = ay;
   return true;
}
You'll also need to define "PId2" somewhere. In PoTC it's in "PROGRAM\globals.c". It's pi/2, i.e. 1.5707963267948966192313216916398
 
Last edited:
And who can help me with converting music and sounds? There are a lot of files, I wanted someone to convince the files. I've never done this before, and batch processing is needed.
 
I've never found the correct settings to convert a file to the .wav format needed for sound effects.

Music is .ogg format and indeed, it can be as simple as converting .mp3 to .ogg. The last time I converted a music file, though, it turned out to be too quiet in the game. But I use Audacity, which can do other things to sound files, including boost the volume. And so the music ended up at the same sort of volume as other game music files.
 
I've never found the correct settings to convert a file to the .wav format needed for sound effects.
@Jack Rackham should know.

Music is .ogg format and indeed, it can be as simple as converting .mp3 to .ogg. The last time I converted a music file, though, it turned out to be too quiet in the game. But I use Audacity, which can do other things to sound files, including boost the volume. And so the music ended up at the same sort of volume as other game music files.
MP3Gain

Dont save old name file.
Depends on your settings.
 
Here are 2 settings that work for .wav sound effects:

22050Hz 16bit Mono 352kb/s
22050Hz 16bit Stereo 705kb/s

among others.

for music it's .OGG:

44100Hz 16 bit Stereo and almost anything for kb/s
 
Back
Top