• 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

:ship btw the ship looks very nice!
 
Also, 'GetTownNation("Greenford")' will presumably return a number. How do I convert that to a name, i.e. "England" or "Portugal"? If you threaten the prison commandant, you get a questbook entry which says "But I suspect this incident will cause my relationship with England to suffer", which it shouldn't do if "Greenford" is actually Portuguese Santa Ines.
It's not all talk or surmise. I guess you already know but there is code in there to sour relations with England (specifically) or leave service at least (I know because I think I ensured soured relations also happened if you killed the Prison Warden through the Viper patch which it didn't before). So as well as the questbook it will need actual relations effects adjusting - which will presumably need to reflect the Nations Relations changes @Pieter Boelen has just/is making.

But maybe you did all that already?:shrug
 
Getting there...

The preprocessor works for item descriptions but not, apparently, for item titles. So, from "itemsDescribe.txt",
Code:
itmname_letter_to_bernard   {Letter for #sFatherBernard#}
itmdescr_letter_to_bernard
{
A letter from Padre Domingues to #sFatherBernard#.
}
shows up as "Letter for" and "A letter from Padre Domingues to Padre <RandomName>".
Are you telling me that "A letter from Padre Domingues to Padre <RandomName>" DOES actually show the "Padre" part? Because that is ALSO based on a preprocessor, isn't it?

I got round the problem with taking the Teacher to Puerto Rico by using cheatmode to get a couple of levels, which in turn got me enough Leadership to persuade the commandant to let me interrogate the Teacher right away. And finally I was able to meet my own creation. After trading a few broadsides, I boarded and captured her, then went to San Juan to berth my original ship so she wouldn't get in the way. And then I took the new Mefisto back to her island for her photo shoot. So this is what you'll be facing in "Early Explorers", or for that matter "Spanish Main", because frigates similar to the underlying design of the original Mefisto don't exist before "Golden Age".
Very nicely done! :bow

First shot: from the front, which should also be what will appear in its interface picture.
Second shot: from behind, showing the scary new stern decor.
Third shot: the original fleut-of-war has some flying horse sculptures around the stern. I repainted those, too.
@Armada might object to having land visible in the background. :wp
I remember the time when I took the shot from the stern or with the ship sailing towards the other side.
That was NOT acceptable! :rofl

According to the questbook, the Dark Teacher "was no easy opponent". In fact I dropped him with one strike. Admittedly I was using Francis Drake's sword, but anyone who isn't Francis Drake will probably have some other decent sword - for one thing, if you've got this far then you must have acquired at least "Matey" reputation and have visited Kralendijk, and if you did them in that order then you probably have Toff Oremans' sword. The Dark Teacher is a wimp.

Not any more... Mua-ha-ha-ha!
Excellent change too! Because quest characters are initialized only once, I think quite a fair few are really low-level characters and nowhere near as challenging as your average highwaymen.
So thanks for improving on that one too! :cheers
 
Probably 'GetNationIDByType', then. :onya
The "ID" is more of a code thing; you would need the NationName or something like that.
I know there's a function for that too. :yes

It's not all talk or surmise. I guess you already know but there is code in there to sour relations with England (specifically) or leave service at least (I know because I think I ensured soured relations also happened if you killed the Prison Warden through the Viper patch which it didn't before). So as well as the questbook it will need actual relations effects adjusting
When you made your changes, didn't I already make it refer to the "Greenford" nationality there too? So it might already be done.
If not, that should also be added. :yes
 
Are you telling me that "A letter from Padre Domingues to Padre <RandomName>" DOES actually show the "Padre" part? Because that is ALSO based on a preprocessor, isn't it?
Yes, if it translates at all then it translates the lot. So the item description appears correct and the item name doesn't show the substitute name at all.
@Armada might object to having land visible in the background. :wp
I remember the time when I took the shot from the stern or with the ship sailing towards the other side.
That was NOT acceptable! :rofl
Tough, it's not his ship. :whipa But there isn't a problem anyway because there's only a little bit of the island visible to the right of that picture. After the picture has been trimmed down to a square, then the edges faded into the border, there's nothing of the island left. (I do know about the tradition of having the ship facing forward toward the left, so I turned the ship around so that the port side was facing the sun before I took the screen shot. :))

When you made your changes, didn't I already make it refer to the "Greenford" nationality there too? So it might already be done.
If not, that should also be added. :yes
No, he's referring to this bit:
Code:
    case "exit_from_prison_with_teacher":
       // Unneeded - if(GetRMRelation(GetMainCharacter(), ENGLAND) > REL_AFTERATTACK) SetRMRelation(GetMainCharacter(), ENGLAND, REL_AFTERATTACK); // RM - SetNationRelation2MainCharacter(ENGLAND, RELATION_ENEMY);
       LeaveService(PChar, ENGLAND, false); // RM
       LAi_group_FightGroups("ENGLAND_SOLDIERS", LAI_GROUP_PLAYER, true);
     break;

Which now looks like this:
Code:
    case "exit_from_prison_with_teacher":
       // Unneeded - if(GetRMRelation(GetMainCharacter(), GetTownNation("Greenford")) > REL_AFTERATTACK) SetRMRelation(GetMainCharacter(), GetTownNation("Greenford"), REL_AFTERATTACK); // RM - SetNationRelation2MainCharacter(ENGLAND, RELATION_ENEMY);
       if (GetCurrentPeriod() == PERIOD_EARLY_EXPLORERS)
       {
         LeaveService(PChar, PORTUGAL, false); // RM
         LAi_group_FightGroups("PORTUGAL_SOLDIERS", LAI_GROUP_PLAYER, true);
       }
       else
       {
         LeaveService(PChar, ENGLAND, false); // RM
         LAi_group_FightGroups("ENGLAND_SOLDIERS", LAI_GROUP_PLAYER, true);
       }
     break;
The same applies to 'case "with_teacher_to_muelle"'.
 
Instead of using LeaveService with a specific nation, you can also just use LeaveService(PChar, GetTownNation("Greenford"), false); which should always be correct.
There is also a function to find the soldier AI group defined in nations.c, but I cannot which one it is by the top of my head.
Using that would allow you to do away with hardcoded period checks altogether.
 
Yes, if it translates at all then it translates the lot. So the item description appears correct and the item name doesn't show the substitute name at all.
But...? If it is showing "Padre", doesn't that mean the preprocessor IS doing something but is just failing to include the character name?
That might suggest that the functionality DOES work, but might rely on stuff defined in the INI files for translation.
As there is a random name in this case, that wouldn't actually be IN the INI files.
Could be because XI_ConvertString is used in the interface code instead of the more clever TranslateString .
 
Instead of using LeaveService with a specific nation, you can also just use LeaveService(PChar, GetTownNation("Greenford"), false); which should always be correct.
I thought of that, but since there has to be a condition to sort out the 'LAi_group_FightGroups', I thought I may as well hard-code the 'LeaveService' as well and avoid another call to 'GetTownNation' on the chance that this might have some slight effect on performance. If there's some way to make 'LAi_group_FightGroups' use a variable or function call rather than being hard-coded to "PORTUGAL_SOLDIERS" or "ENGLAND_SOLDIERS" then the condition can disappear entirely.
 
But...? If it is showing "Padre", doesn't that mean the preprocessor IS doing something but is just failing to include the character name?
If it shows "Padre" then it shows the character's whole name, e.g. "Father Bernard" or "Padre Whatshisname". The problem is that for the item name, it doesn't show anything.
 
If it shows "Padre" then it shows the character's whole name, e.g. "Father Bernard" or "Padre Whatshisname". The problem is that for the item name, it doesn't show anything.
I must have misunderstood then.

I thought of that, but since there has to be a condition to sort out the 'LAi_group_FightGroups', I thought I may as well hard-code the 'LeaveService' as well and avoid another call to 'GetTownNation' on the chance that this might have some slight effect on performance. If there's some way to make 'LAi_group_FightGroups' use a variable or function call rather than being hard-coded to "PORTUGAL_SOLDIERS" or "ENGLAND_SOLDIERS" then the condition can disappear entirely.
Have a look through nations.c for "soldier". I do think there is a function that does that, I just can't remember its name by the top of my head.
 
@Armada might object to having land visible in the background. :wp
I remember the time when I took the shot from the stern or with the ship sailing towards the other side.
That was NOT acceptable! :rofl
If you'd rather have someone else in charge of the four ship interface files, be my guest. I wouldn't mind not having to do that any more, anyway.

Tough, it's not his ship. :whipa But there isn't a problem anyway because there's only a little bit of the island visible to the right of that picture.
The first part was a bit harsh, but I quite agree with the second, in this particular case.
The ship itself looks pretty good, by the way.
 
The first part was a bit harsh, but I quite agree with the second, in this particular case.
Sorry, I should have put a more friendly icon there. Of course I'd have altered the picture if it was going to cause any trouble! I didn't know about the requirement not to have any land showing otherwise I'd have been out in empty ocean for the photo shoot, but as luck would have it, the sun was over the island at that time and I wanted the screenshot to show the side of the ship facing the sun. And I knew about the requirement to have the ship pointing to the left of the picture so I spent some time turning it to face the right way so that the sun was hitting the port side.

I've probably saved you a bit of work. I've added the ship into my version of "shipsTR.tga.tx" and edited "pictures.ini", filling it into the blank slot next to "Frigate_sat". Since "shipsTR.tga.tx" corresponds to "SHIPS2", which happens to be the same group that holds the original "FleutWar", its "refShip.BigPicTexName" line in "Ships_init.c" is already pointing at the correct block.
 
I thought of that, but since there has to be a condition to sort out the 'LAi_group_FightGroups', I thought I may as well hard-code the 'LeaveService' as well and avoid another call to 'GetTownNation' on the chance that this might have some slight effect on performance. If there's some way to make 'LAi_group_FightGroups' use a variable or function call rather than being hard-coded to "PORTUGAL_SOLDIERS" or "ENGLAND_SOLDIERS" then the condition can disappear entirely.
Try this:
Code:
    case "exit_from_prison_with_teacher":
       cidx = GetTownNation("Greenford");
       LeaveService(PChar, cidx, false); // RM
       homegroup = GetSoldiersName(cidx) + "_SOLDIERS";
       LAi_group_FightGroups(homegroup, LAI_GROUP_PLAYER, true);
     break;
 
That seems to have worked. After I threatened the commandant, I got to talk to the Teacher, and when I left the prison the guard attacked. The commandant sent the usual reinforcements.

The sequence involving taking Teacher to San Juan still doesn't work properly and is the subject of a bug report. Meanwhile I reloaded to before I'd threatened the commandant and instead bribed him to let me see the prisoner right away, which meant I didn't need to take him to San Juan because he told me all about the island and then fell over. And then it was time to face the new improved Dark Teacher. He still isn't too hard to beat but he certainly doesn't die after one or two hits any more, and when you loot his body you'll find out why. ;) (That plus the fact that he's now level 10 instead of level 1.)

Mefisto now has interface pictures!

ship_interface.jpg
 
Thanks Jack about the interface pictures. :doff
About the sword stats, choose what you want for the values.

btw: Sorry, if I was not on this forum these last two weeks.
 
Everything is now working, apart from one small detail. Is it possible to change the small ship icons which appear in sea mode? Here's a screenshot showing messages after the capture of Mefisto:
points.jpg

Mefisto is represented by a standard fluyt-of-war icon. But Golden Hind is represented by a standard galleon icon, so perhaps they can't be replaced. If that's so, this is finished. As a reward for your patience, you'll get a fixed version of "Saving Toff's Daughter" as well. :D
 
Back
Top