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

Fixed Correcting "Early Explorers" Period

Everything is now working, apart from one small detail. Is it possible to change the small ship icons which appear in sea mode?
It is possible to set different icons to different ships, but I cannot remember how. Have a look through the top and bottom of ships_init.c .
Maybe @Armada has some memory of this?

As a reward for your patience, you'll get a fixed version of "Saving Toff's Daughter" as well. :D
Fixed? What was wrong? :shock
 
For one thing, if they get random names then Tanneken doesn't have the same surname as Toff. You can imagine for yourself what that means for their relationship. ;) The questbook referred to Toff's standard name and also described Bernardo Gamboa as "some Spaniard in Holland's service". So I did the same as for Antoine Chamfort; made their names fixed and Spanish in "PROGRAM\Characters\init\Douwesen.c" if the period is "Early Explorers". Bernardo Gamboa is now "some Spanish pirate in the service of the governor of #sDouwesen#". And the questbook now has variable names supplied by 'Preprocessor' statements in "Toff Oremans_dialog.c" so that it shows his correct name.
 
For one thing, if they get random names then Tanneken doesn't have the same surname as Toff. You can imagine for yourself what that means for their relationship. ;) The questbook referred to Toff's standard name and also described Bernardo Gamboa as "some Spaniard in Holland's service". So I did the same as for Antoine Chamfort; made their names fixed and Spanish in "PROGRAM\Characters\init\Douwesen.c" if the period is "Early Explorers". Bernardo Gamboa is now "some Spanish pirate in the service of the governor of #sDouwesen#". And the questbook now has variable names supplied by 'Preprocessor' statements in "Toff Oremans_dialog.c" so that it shows his correct name.
Brilliant! :woot
Do you also have Tanneken's lastname matched with Toff? I did that with Arabella Silehard and whatever happens to be the name of the Jamaica governor.

Another one that occurred to me is Marc Blacque. Since Martinique remains French, it should be OK for him to remain himself.
But if he doesn't have the .questch attribute, he'd become some random Spaniard instead. Not sure if that is the case or not, but might be worth checking?
 
Brilliant! :woot
Do you also have Tanneken's lastname matched with Toff? I did that with Arabella Silehard and whatever happens to be the name of the Jamaica governor.
That was exactly the point of hard-coding the alternative names into "Douwesen.c". ;) (Which is what I meant when I said I did the same as for Antoine Chamfort. I hadn't realised the reason he didn't get a random Spanish name was that, like Father Gareth, he isn't placed until the quest starts. So I hard-coded his alternative Spanish name into "SideQuests.c".)

Another one that occurred to me is Marc Blacque. Since Martinique remains French, it should be OK for him to remain himself.
But if he doesn't have the .questch attribute, he'd become some random Spaniard instead. Not sure if that is the case or not, but might be worth checking?
Though he lives in Port Royale / Villa de Vega, Marc Blacque is defined in "FalaiseDeFleur.c". He does indeed have 'ch.questchar = true'.

I can't make out much sense of the code in "Ships_init.c" but there seem to be four files which contain the small icons in "RESOURCE\Textures\BATTLE_INTERFACE": "ships1.tga.tx", "ships2.tga.tx", "ships16.tga.tx" and "ships32.tga.tx". They are all full so unless it's possible to define a new texture file and get the interface to use it, we're stuck with the regular icons. (This must have been done at some time, though, because there are icons which never existed before Build 14 - a lot of the naval ships, for a start.) But if someone doesn't figure out how to get a more accurate icon for the Mefisto soon, I'm just going to upload what I already have.
 
That was exactly the point of hard-coding the alternative names into "Douwesen.c". ;) (Which is what I meant when I said I did the same as for Antoine Chamfort. I hadn't realised the reason he didn't get a random Spanish name was that, like Father Gareth, he isn't placed until the quest starts. So I hard-coded his alternative Spanish name into "SideQuests.c".)
The Araballa Silehard method should work even if the town is given to a diferent nationality too.
But whatever works, right? :cheeky

Before the public Beta 3.5 release, I'll probably have to do a full comparison with Beta 3.4 again as well to double-check what we'll be releasing.
When I do that, I might still make some tweaks to the code if anything seems like it can be handled differently.
But we'll see about that when the time comes; not important now. :no

Though he lives in Port Royale / Villa de Vega, Marc Blacque is defined in "FalaiseDeFleur.c". He does indeed have 'ch.questchar = true'.
The file he's defined in doesn't make a shred of difference. I think his ch.location is "Redmond_town_##" right there, if I recall.
So unless he's got ch.questch too, he might be changed to Spanish. Would be easy to check either in the code or by visiting what is normally Jamaica.
I seem to remember he's OK, I'm just not sure....

I can't make out much sense of the code in "Ships_init.c" but there seem to be four files which contain the small icons in "RESOURCE\Textures\BATTLE_INTERFACE": "ships1.tga.tx", "ships2.tga.tx", "ships16.tga.tx" and "ships32.tga.tx". They are all full so unless it's possible to define a new texture file and get the interface to use it, we're stuck with the regular icons. (This must have been done at some time, though, because there are icons which never existed before Build 14 - a lot of the naval ships, for a start.) But if someone doesn't figure out how to get a more accurate icon for the Mefisto soon, I'm just going to upload what I already have.
Sounds like you managed to make quite a bit of sense of it already: you're right on all accounts. ;)

The Flying Dutchman doesn't have an appropriate icon either. She just reuses the Black Pearl one to at least give her "something cursed". Could do with some replacing too. :cheeky
New such files would be defined in RESOURCE\INI\INTERFACES\pictures.ini . Search that file for "ships16.tga" for example; that should tell you the name that gets in the code (probably "SHIPS16" or so).
Then you can search the PROGRAM folder for that and hopefully track down where that is set and used.
There might be something related in PROGRAM\BATTLE_INTERFACE too.
 
But if someone doesn't figure out how to get a more accurate icon for the Mefisto soon, I'm just going to upload what I already have.
Please do anyway. Everything I can include in the next update is one more thing that shouldn't cause incompatibility anymore in the future. :doff
 
You shouldn't have encouraged me. Now you're going to have to wait until tomorrow. :p

I didn't make any sense out of the code in "Ships_init.c". But I did take a guess that "RESOURCE\Textures\BATTLE_INTERFACE" might be a good place to poke around with ConvertorTX. Your suggestion about looking in "PROGRAM\BATTLE_INTERFACE" completed the puzzle; the relevant file is, of course, "BattleInterface.c", which includes lines such as:
Code:
   BattleInterface.CommandTextures.list.t14.name = "battle_interface\ships_32.tga";
   BattleInterface.CommandTextures.list.t14.xsize = 4;
   BattleInterface.CommandTextures.list.t14.ysize = 4;
The "xsize" and "ysize" tell the system that "ships_32.tga" has 4 rows of 4 icons. Meanwhile, back in "Ships_init.c", there are lines such as
Code:
   refShip.BI.Tex = 14;
   refShip.BI.Pic = 14;
That came from the definition of the Flying Dutchman. So that tells me that the Dutchman's icon is number 14 in "ships_32.tga". That's not the icon for the Black Pearl. ;) (You're probably going to say that the cursed Dutchman has its own definition. It does, and that includes reference to the same icon. :D)

So first I have to create a whole new icon frame. Fortunately I found that "moor-town.tga" has a similar frame, much larger with a lot of empty spaces, so I just copied a block out of that and used it as my new frame. Then I need to do to the fluyt-of-war's icon what I did to the ship itself, which is turn its hull black and its sails red. Then I need to edit "BattleInterface.c" and add a chunk to refer to the new frame, and edit the Mefisto's entry in "Ships_init.c" to point at the relevant icon in that frame. And with a bit of luck, this evening Mefisto is going to have its own icon and anyone who wants to add a new one will have somewhere to put it...
 
You shouldn't have encouraged me. Now you're going to have to wait until tomorrow. :p
Tomorrow is fine. I won't be making the installer today anyway. ;)

I didn't make any sense out of the code in "Ships_init.c". But I did take a guess that "RESOURCE\Textures\BATTLE_INTERFACE" might be a good place to poke around with ConvertorTX. Your suggestion about looking in "PROGRAM\BATTLE_INTERFACE" completed the puzzle; the relevant file is, of course, "BattleInterface.c", which includes lines such as:
Code:
   BattleInterface.CommandTextures.list.t14.name = "battle_interface\ships_32.tga";
   BattleInterface.CommandTextures.list.t14.xsize = 4;
   BattleInterface.CommandTextures.list.t14.ysize = 4;
The "xsize" and "ysize" tell the system that "ships_32.tga" has 4 rows of 4 icons. Meanwhile, back in "Ships_init.c", there are lines such as
Code:
   refShip.BI.Tex = 14;
   refShip.BI.Pic = 14;
That came from the definition of the Flying Dutchman. So that tells me that the Dutchman's icon is number 14 in "ships_32.tga". That's not the icon for the Black Pearl. ;) (You're probably going to say that the cursed Dutchman has its own definition. It does, and that includes reference to the same icon. :D)
Dutchman doesn't use the Pearl icon? I thought she did. Is the Pearl right next to the one used then?
The counting could very well start at 0; that is often the case with PotC index numbers.

So first I have to create a whole new icon frame. Fortunately I found that "moor-town.tga" has a similar frame, much larger with a lot of empty spaces, so I just copied a block out of that and used it as my new frame. Then I need to do to the fluyt-of-war's icon what I did to the ship itself, which is turn its hull black and its sails red. Then I need to edit "BattleInterface.c" and add a chunk to refer to the new frame, and edit the Mefisto's entry in "Ships_init.c" to point at the relevant icon in that frame. And with a bit of luck, this evening Mefisto is going to have its own icon and anyone who wants to add a new one will have somewhere to put it...
Very nicely figured out! It has been a long time ago since I had anything to do with that code, so I'm glad that my very sporadic clues have proven enough for you. :onya
 
Meanwhile, back in "Ships_init.c", there are lines such as
Code:
refShip.BI.Tex = 14;
refShip.BI.Pic = 14;
That came from the definition of the Flying Dutchman. So that tells me that the Dutchman's icon is number 14 in "ships_32.tga".
Yeah, those two lines are the ones to change when assigning a different Battle Interface pic.
The counting for the 'pic' line does start at 0, as Pieter said, going from top left to bottom right on the texture.

Personally, I wouldn't recommend making a brand new icon for one ship. I know the Black Pearl has its own icon, but in general, the icons are supposed to be generic, representing the broad ship type. Otherwise, we'd end up making icons for all individual ships, which would be a pain. It might also adversely affect gameplay, since you could instantly identify an enemy ship by its icon alone.
 
Personally, I wouldn't recommend making a brand new icon for one ship. I know the Black Pearl has its own icon, but in general, the icons are supposed to be generic, representing the broad ship type. Otherwise, we'd end up making icons for all individual ships, which would be a pain. It might also adversely affect gameplay, since you could instantly identify an enemy ship by its icon alone.
Indeed icons for each ship would be overkill. However, I do think there are some other ships that might be given different ones.
Different ones for certain unique ships should be fair enough. The Flying Dutchman could do with one too, for example. Using a generic one just seems somewhat wrong.
On the other hand, I don't think the current Mefisto actually has a custom icon of her own.

The realism modes already take care of part of the "adverse effect on gameplay" because on Realistic Game Mode, you should see the icons for only ships within "ship type range".
For any ships further away, you'd just see a generic "ship" icon and nothing else.
 
Correct, at long range - or at any range in a storm - you only see the generic ship icon.

The normal Mefisto currently just uses the standard frigate icon. The Flying Dutchman seems to have an icon of its own, whether cursed or uncursed. Wicked Wench has a unique icon and so does HMS Centurion, those being the only two in "ships_2.tga". And the two Galeoths share not only a single icon but an entire file to themselves, "ships_1.tga". (If we need more icons than will be provided if my new file works, what happens if "ships_1.tga" is expanded to a 4x4 grid similar to "ships_16.tga"?) Meanwhile the Revenge and Golden Hind both share the same icon as the big Spanish galleons, and if those all count as the same broad ship type then we may as well just have one icon for everything because about the only thing those three ships have in common is that they are in fact sailing ships. xD
 
Correct, at long range - or at any range in a storm - you only see the generic ship icon.
That's working as intended then; good, good! :cheers

Meanwhile the Revenge and Golden Hind both share the same icon as the big Spanish galleons, and if those all count as the same broad ship type then we may as well just have one icon for everything because about the only thing those three ships have in common is that they are in fact sailing ships. xD
Probably more related to no other icons being available. I'd have no objections to having different ones for them.
 
And now I have a bit of a problem. I can't upload the whole thing because it's too big. In fact, there's one file which is too big, even when zipped by itself, which is "shipsTR.tga.tx", the picture file which contains the interface icons for Mefisto. These are the large icons for the "Ships" screen and shipyard, not the little icons for sea mode. (That file is about 10MB. It has shrunk since I worked on it; the original version is twice that size! Other ships' shipyard icons still appear correct, though.)

Another problem is that if I press F11 to re-initialise various things, all the variable names supplied by 'Preprocessor_Save' commands in "Periods.c" disappear, leaving blanks in both quest records and items. But island and town names supplied by "Preprocessor_Save" commands elsewhere are fine, and so are variable names supplied by 'Preprocessor_Add' and 'Preprocessor_AddQuestData' commands in dialog files. So any references to "FatherJerald", for example, disappear, but references to "Jerald" remain.

The good news is that I loaded up a savegame while I'm in Villa de la Vega (Spanish early name for Port Royale), found Marc Blacque, and he is indeed Marc Blacque and not some random Spanish gentleman.
 
And now I have a bit of a problem. I can't upload the whole thing because it's too big. In fact, there's one file which is too big, even when zipped by itself, which is "shipsTR.tga.tx", the picture file which contains the interface icons for Mefisto. These are the large icons for the "Ships" screen and shipyard, not the little icons for sea mode. (That file is about 10MB. It has shrunk since I worked on it; the original version is twice that size! Other ships' shipyard icons still appear correct, though.)
Indeed those ship interface textures are pretty huge. Did you reduce the quality setting when exporting that file though? I think we deliberately didn't do that until now to maintain HD quality.

Are you familiar with using FTP software? I can give you access to the PA! one so you can upload your work without size problems.

Another problem is that if I press F11 to re-initialise various things, all the variable names supplied by 'Preprocessor_Save' commands in "Periods.c" disappear, leaving blanks in both quest records and items. But island and town names supplied by "Preprocessor_Save" commands elsewhere are fine, and so are variable names supplied by 'Preprocessor_Add' and 'Preprocessor_AddQuestData' commands in dialog files. So any references to "FatherJerald", for example, disappear, but references to "Jerald" remain.
Perhaps F11 also reinitializes the preprocessors from the defaults. But Periods.c is of course not included in that.
Check PROGRAM\Reinit.c to see if you can find any calls to functions that may affect preprocessors.
If so, perhaps we can just stop reinitializing that altogether. Why should we? They shouldn't need to be updated, should they?

The good news is that I loaded up a savegame while I'm in Villa de la Vega (Spanish early name for Port Royale), found Marc Blacque, and he is indeed Marc Blacque and not some random Spanish gentleman.
Good news! :onya
 
Indeed those ship interface textures are pretty huge. Did you reduce the quality setting when exporting that file though? I think we deliberately didn't do that until now to maintain HD quality.

Are you familiar with using FTP software? I can give you access to the PA! one so you can upload your work without size problems.
Not particularly. But I do have access to some sort of FTP software so I might be able to do it with access to PA! and some hints on what to do.
Perhaps F11 also reinitializes the preprocessors from the defaults. But Periods.c is of course not included in that.
Check PROGRAM\Reinit.c to see if you can find any calls to functions that may affect preprocessors.
If so, perhaps we can just stop reinitializing that altogether. Why should we? They shouldn't need to be updated, should they?
Found it, I think. In "PROGRAM\Utils.c", look for "Preprocessor_init":
Code:
   Preprocessor_Clear(true);
   Preprocessor_Save("_hash_", "#");
   Preprocessor_Save("Falaise de Fleur", FindTownName("Falaise de Fleur"));
... followed by a whole lot more 'Preprocessor_Save' commands to re-save all the town and island names, plus "cursed_ship" and "uncursed_ship".

There's a call to 'Preprocessor_init' in "Reinit.c". So I can either remove that or, in case there's a reason for it, add copies of all the 'Preprocessor_Save' commands from "Periods.c" to "Utils.c".

Meanwhile, back at sea and after an F11 (which is how I found out about the Preprocessor problem):
early_mefisto_stern2.jpg

The battle interface icon shows up as intended. Also, I wasn't happy about how the red lines on the stern don't match up with those on the side, so I had another look at the original fluyt-of-war (and other fluyts). There are some additional lines which seem to depict supports for the captain's cabin. So I painted those red as well.
 
Last edited:
Not particularly. But I do have access to some sort of FTP software so I might be able to do it with access to PA! and some hints on what to do.
I added you to the conversation with the FTP login details. If you get in, just upload your file to the PotC folder and I should be able to find it.

Found it, I think. In "PROGRAM\Utils.c", look for "Preprocessor_init":
Code:
   Preprocessor_Clear(true);
   Preprocessor_Save("_hash_", "#");
   Preprocessor_Save("Falaise de Fleur", FindTownName("Falaise de Fleur"));
... followed by a whole lot more 'Preprocessor_Save' commands to re-save all the town and island names, plus "cursed_ship" and "uncursed_ship".

There's a call to 'Preprocessor_init' in "Reinit.c". So I can either remove that or, in case there's a reason for it, add copies of all the 'Preprocessor_Save' commands from "Periods.c" to "Utils.c".
Ah, that'll be it then!
At the moment I cannot think of a reason for having it, so you cna try disabling it and see what happens.
Maybe if new preprocessors are added to a savegame, you might need it. But with the amount of new games requires due to our heavy development, that isn't much of a concern.

Adding the Periods.c preprocessors into the utils.c function would be nice, but I think at least the "Padre" change wouldn't be included then.
Unless you're suggesting having it twice, once for game start in Periods.c (which overrides the utils.c definiton, I hope) and the utils.c ones being correct for a reinit, because Periods.c would have corrected the character names by then.

The battle interface icon shows up as intended. Also, I wasn't happy about how the red lines on the stern don't match up with those on the side, so I had another look at the original fluyt-of-war (and other fluyts). There are some additional lines which seem to depict supports for the captain's cabin. So I painted those red as well.
Excellent!
But is it my screen, or are those sails on the battle interface picture a bit purplish/pinkish?
Pretty cool anyway, though! :cheers
 
I think that's done it. Have a look at the FTP site for "fix_strange_things". This ought to include a revised version of "ships_48.tga.tx" with reshaded sails. ;)
 
Sorry, I didn't see the folder. Since a couple of other people have their own folders inside "PotC", I've created one as well, then put "fix_strange_things" in there. Have another look now.
 
Sorry, I didn't see the folder. Since a couple of other people have their own folders inside "PotC", I've created one as well, then put "fix_strange_things" in there. Have another look now.
Found it! You might want to post all those files included in a ZIP though, rather than as separate files.
That makes for a faster download, but I think also the format of text files (such as code files) may be changed depending on the system that the FTP server is running on.
Can't remember where I got that idea from, but it is something I generally try to avoid.
 
Back
Top