• 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!

Devlin Opera for the 65742th time

- Santo Domingo: The little part with Guille the Kid has been changed, it all makes more sense now and even advertises a certain sidequest.
- Easter egg with the Cayman governor calling guards is still to do.
- Changing the name to O'Klee is still to do. But it would probably make sense and save a lot of time to leave the character ID's as O'Byrne.
- For the 'Pastenague' I found a nice spot much closer to Eden Rock, yet slightly hidden in a cove. But so far, executing console didn't dump the neccessary coordinates in compile.log as it does with land locations.

I also have a new dialog where neither "Señor" (it shows as the "SeYor" we've seen before) nor #sSenor# (it doesn't show at all) work. :confused:
 
Last edited:
Indeed there is no need to change the characters' ID's in code. For similar reason, if you look at the code for "Rescue Peter Blood's crew" and "Search for Peter's ship", the leading character's ID is "Bartolomeu o Portugues", which is what he used to be until he was changed to be different from the main character of a storyline.

Can you upload both the dialog.c and dialog.h files which are causing the trouble?

Incidentally:
Killian O'Byrne said:
We caught up with them near Santiago, right as a storm was brewing, and enganged them in battle.
That should be "engaged". :pirate07:
 
Last edited:
At case "phrase2", add:
Code:
Preprocessor_Add("Senor", GetAddressForm(ADDR_CIVIL, SPAIN, false);
Preprocessed variable such as "#sSenor#" don't do much if they haven't been preprocessed. ;)
 
I can't even see how you do get coordinates for land locations from console! You presumably have changed the 'switch(0)' command to 'switch(2)'. That should activate this:
Code:
        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;
Do you get the message on the screen showing your coordinates?

It's using 'logit' to produce all the messages on screen. As far as I know, that doesn't put anything into "compile.log". Replace:
Code:
Logit("Ship position: x="+pchar.ship.pos.x+", z="+pchar.ship.pos.z);
... with:
Code:
traceandlog("Ship position: x="+pchar.ship.pos.x+", z="+pchar.ship.pos.z);
That should copy the message into "compile.log" as well as displaying it on screen.
 
Now I have coordinates in compile.log with just x and z coordinates. Like this

Code:
Ship position: x=-890.462, z=885.667

But when I write "Cayman_locators.gm" to a text file, they look more like this

Code:
Quest_ships,quest_ship_16,1,0,0,0,1,0,0,0,1,0,0,2000,1,0,0,0,0,0,0,0,0,

My console looks like this:


Code:
                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 {
                  traceandlog("Ship position: x="+pchar.ship.pos.x+", z="+pchar.ship.pos.z);
            }
            //Logit("Ship position: x="+worldMap.playerShipX+", z="+worldMap.playerShipZ);
        break;
 
The entry in "compile.log" is the result of that 'traceandlog' line which only shows x and z coordinates. You could add a bit in the middle to show y, which would be pchar.ship.pos.y and is probably 0 because your ship is at sea level.

That line shows where your ship is in the game. "Cayman_locators.gm", and its text equivalent, show the locator's position. You now want to use TOOL to change the coordinates to match your ship's position as shown in "compile.log", assuming you sailed your ship to where you want Godefroi Bonamy's ship to appear.

Or you could try editing the text file and then reading that back into "Cayman_locators.gm" using TOOL, if you can figure out which three numbers are the coordinates. My guess is that the first 9 numbers are xx, xy, xz, yx, yy, yz, zx, zy, zz, currently set as 1, 0, 0, 0, 1, 0, 0, 0, 1 respectively. That will have the locator pointing straight down the z axis, probably due south. The next three numbers would be the coordinates, which are 0, 0, 2000, putting your locator 2000 points north of centre - depending on how big a point is on the map, that's either somewhere on the north coast, somewhere in the middle of the island, or away off to the north. After the 2000 are 1 and a string of 0's - leave those alone!

But really, it's a lot easier to edit the coordinates and the xx, xy, xz etc. using TOOL because then there's no guessing, you can see exactly what each number represents - and you're going to need TOOL to save the locator file anyway.
 
I don't think I understand... For land locators, I can just copy a line of coordinates from compile.log into the text file generated by using "write to file" on the .gm locator file. Can't I do this here as well somehow? Or what do you mean with "edit the coordinates using TOOL"? Actually, I'd have zero clue what each number represents, that's why I like to copy them all from compile.log...
 
I don't think I understand... For land locators, I can just copy a line of coordinates from compile.log into the text file generated by using "write to file" on the .gm locator file. Can't I do this here as well somehow? Or what do you mean with "edit the coordinates using TOOL"? Actually, I'd have zero clue what each number represents, that's why I like to copy them all from compile.log...
In TOOL, click "View" -> "Locators". That should bring up a table of locators with each column labelled so you can see what each number represents. You can edit the coordinates. There should be a button somewhere near the bottom to save changes, then you need to go back to the main TOOL screen to save the .gm file.

Normally I'll use the text file to add a new locator by copying an existing one of similar type, then read the text file, then use "View" -> "Locators" to change the name and coordinates. Even if I'm reading the new locator along with all its values from the text file, I'll check it with "View" -> "Locators" just to make sure it's where it should be in the table and that it has the correct values, before saving the .gm file.

Otherwise, try this version of "console.c". It won't dump coordinates in a format which can be copied; it will dump all the player character's attributes. Sail to your chosen location, point the ship the way you want Godefroi Bonamy's ship to point, then press F12, and then upload "compile.log". I'll see if I can find what attributes show your coordinates and direction, then try to modify case 2 to show ship coordinates along with xx, xz, zx and zz, the same as it does for land locations.
 

Attachments

  • console.c
    35.4 KB · Views: 43
This sounds quite complicated compared to just moving your character somewhere, pressing F12 and then just doing one copy paste and a handful of clicks in TOOL. I still don't see exactly how you know the coordinates and to which value they'd have to be changed. But I can try this console later today.
 
Now this is the version of compole.log which is generated when I use your console.c from above and execute it at the spot where I'd like to make a quest locator.
 

Attachments

  • compile.log
    37.1 KB · Views: 41
If you look at that file, go down a few lines, beyond the top part with the build number and savegame compatibility number, then search for the next "----". That should get you to where the player character attributes were dumped, starting with:
Code:
----------------------------------------
id = Blaze
index = 0
name = Beatrice
Further down is the part about the ship, starting with:
Code:
ship = 
  type = FastGalleon1
  name = Discovery
And the important part for setting up the locator is:
Code:
  pos = 
    x = -871.87
    z = 896.943
    y = 2.99823
    mode = 0
  ang = 
    y = 7.34721
    x = -0.0181243
    z = -0.0430663
What I don't know is what those "ang" attributes do. That is, they're presumably about the ship's heading, but I don't know how to convert them into the xx, xz, zx and zz which are needed for the locator.

Load the game again, go to sea, turn the ship to due north, press F12. Then turn to due east and press F12 again. Then post "compile.log". If I can see what those "ang" attributes are doing with known directions, I may be able to figure out the direction you were pointing when you were at the locator position.

Now I have coordinates in compile.log with just x and z coordinates. Like this

Code:
Ship position: x=-890.462, z=885.667
This time, ship position x=-871.87, z=896.943, which is somewhere near where you were last time. So you can save a bit of typing by rounding off the values. x can be -881, z can be 882. And y is 2.99823, which is strange, unless it's taking into account the ship's height and showing where you are. Use TOOL to look at "Cayman_locators.gm" and see what value other locators have for y.
 
This time, ship position x=-871.87, z=896.943, which is somewhere near where you were last time.
Very near, because I made both in that small cove just around the corner from Eden Rock, where I want to place the 'Pastenague' in the end.

Load the game again, go to sea, turn the ship to due north, press F12. Then turn to due east and press F12 again. Then post "compile.log". If I can see what those "ang" attributes are doing with known directions, I may be able to figure out the direction you were pointing when you were at the locator position.
Here is the compile.log of that. Just to be sure, I went to this very same spot near Eden Rock, Cayman. As far as I can see, the "ang" values x and z are very small numbers (0.000something) when pointing both north and east. The y value is around 9.3 when pointing north and 11 when pointing east. Does this help?

And y is 2.99823, which is strange, unless it's taking into account the ship's height and showing where you are. Use TOOL to look at "Cayman_locators.gm" and see what value other locators have for y.
Strange indeed, because the y value is zero for all the sea locators on Cayman.
1689190869998.png
 

Attachments

  • compile.log
    57.1 KB · Views: 43
I made a new locator in cayman_locators.gm , just using the x and z value from compile.log, since all the others are either 0 or 1 for all the other locators. This doesn't place the ship where I intended (just around the corner in a little bay) but it places it much closer to Eden Rock with no chance to miss or not find it. Now is the question: Is it worth trying to fix the locator so the ship is placed in the little bay spot, or is it enough if it's at least nearby, even if it's in the "wrong" direction?
 
That would be your choice - do you want it right in the bay or are you happy with where it is now?

Now look at those console lines which set the direction:
Code:
xx = -sin(ay - PId2);
zz = xx;
xz = -cos(ay - PId2);
zx = -xz;
PId2 is pi/2. It's doing its calculations in radians. You can do the same calculations yourself, using degrees, on a calculator or by using the calculator built into Windows. In that case, xx = -sin(your_angle - 90), xz = -cos(your_angle - 90). Decide which way you want Godefroi Bonamy's ship to be facing, do the calculations, and set xx, zz, xz and zx accordingly in TOOL.
 
I don't really care which way the ship faces. If it's (more or less) easily doable, I'd only be interested in placing it around the corner in the bay. But if it's for some reason so much trickier than doing locators on land, leaving it where it is now is fine as well for me.

Otherwise, there's not really much to do behind me (except for proper maps, but I'm procrastinating because barely anything I ever tried with TX and TGA files for maps or portraits ever worked). And ahead is Aruba, which would have to be started either by fleshing out a full concept or trying to import that VCO location I mentioned.
 
@BathtubPirate when you have imported a VCO location I can help you with making a walk patch for POTC.
Shores, jungles etc are more likely to work than cities as the stairs almost everytime create stops in the patches.
I have my eyes on two potential VCO locations. One is the forest with four caves, named 1001029 in my VCO folder. I have posted screenshots of that one here.

The other would be 502. I'm not 100% sure what I would do with it, but it's a cove with a shipwreck that maybe could use the same interior as the one from the Woodes Rogers mutiny "tutorial". The location looks quite promising to do something with it.

But I have no idea where to start importing these. Copying all the files in the respective PotC folders (locations and textures) would be a start I assume?
 
Copying all the files in the respective PotC folders (locations and textures) would be a start I assume?
Yes.

The textures needed are not always found in the corresponding folders in VCO. So you may have to do a search for them.
When importing textures check that it dosen't exists a texture file already in POTC with the same name. If so rename the new one and change it in Hex editor.

Check in GM-viewer that all parts of the new location look ok. (with POTC textures on)

Then we'll continue to the next step...
 
For that matter, if a texture file with the same name does exist, check to see if it is the same texture. If it's a terrain model and if we already have some VCO terrain, they may share common texture files.
 
Back
Top