• 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

That worked. :onya I've been working on "Help the Church" and have added that to "Periods.c", as well as a whole load of preprocessor commands in various "dialog.c" files - six of them make contributions to the questbook! One thing remains - how do I get a preprocessor command to make a variable name work on an item? The description of "love_letters_of_priest" is "Love letters from Father Jerald to a certain girl".

Also, I'd like to remove the reference to the Mefisto from the first line of the questbook and preferably get rid of Father Bernard's dialog options which lead to a shortcut in "Strange Things Going On". If you haven't taken that quest at least as far as Bridgetown then your character doesn't know the name Mefisto and if you're a novice player who doesn't know the side quests inside out then you don't know the name either! Worse, I tried following that shortcut dialog line after blitzing "Help the Church" in a test run. Father Bernard (or rather, Padre Random_Name) tells you to talk to Father Gareth, which won't work very well because if you haven't done the first parts of "Strange Things Going On" then Father Gareth isn't there.
 
That worked. :onya I've been working on "Help the Church" and have added that to "Periods.c", as well as a whole load of preprocessor commands in various "dialog.c" files - six of them make contributions to the questbook! One thing remains - how do I get a preprocessor command to make a variable name work on an item? The description of "love_letters_of_priest" is "Love letters from Father Jerald to a certain girl".
If I recall, item names and descriptions do work with preprocessors. For example, some quest items have a dynamic town name defined, don't they? Check the ItemsDescribe.txt file for examples.
These probably take the "generally defined" preprocessors. Can't remember what file those are usually in, but I think it might be PROGRAM\utils.c .
Search the PROGRAM folder for "CursedShip" because I remember using a general preprocessor for that as it can be either Black Pearl or Crimson Blood.

Also, I'd like to remove the reference to the Mefisto from the first line of the questbook and preferably get rid of Father Bernard's dialog options which lead to a shortcut in "Strange Things Going On". If you haven't taken that quest at least as far as Bridgetown then your character doesn't know the name Mefisto and if you're a novice player who doesn't know the side quests inside out then you don't know the name either! Worse, I tried following that shortcut dialog line after blitzing "Help the Church" in a test run. Father Bernard (or rather, Padre Random_Name) tells you to talk to Father Gareth, which won't work very well because if you haven't done the first parts of "Strange Things Going On" then Father Gareth isn't there.
If you think that is an improvement, you're welcome to do so as far as I'm concerned. :doff
 
If I recall, item names and descriptions do work with preprocessors. For example, some quest items have a dynamic town name defined, don't they? Check the ItemsDescribe.txt file for examples.
These probably take the "generally defined" preprocessors. Can't remember what file those are usually in, but I think it might be PROGRAM\utils.c .
Yes, that contains the definition of 'Preprocessor_Init', which contains a lot of 'Preprocessor_Save' commands for all the towns and islands, along with "cursed_ship" (Black Pearl) and "uncursed_ship" (Crimson Blood).
Does that mean if I add some more 'Preprocessor_Save' commands for character names then I don't need to keep adding 'Preprocessor_AddQuestData' and 'Preprocessor_Remove' lines in various "dialog.c" files? Otherwise, yes, town names work but character names probably won't. (Wasn't there a problem getting town and island names to work in item descriptions? Specifically, the names of Jamaica and Santo Domingo in "SpanishLetter" for the Vogelstruijs side quest? I have a vague memory of reporting a problem there and you did something to make it work.)
 
Yes, that contains the definition of 'Preprocessor_Init', which contains a lot of 'Preprocessor_Save' commands for all the towns and islands, along with "cursed_ship" (Black Pearl) and "uncursed_ship" (Crimson Blood).
Does that mean if I add some more 'Preprocessor_Save' commands for character names then I don't need to keep adding 'Preprocessor_AddQuestData' and 'Preprocessor_Remove' lines in various "dialog.c" files? Otherwise, yes, town names work but character names probably won't.
Indeed you should be able to define them there once, I reckon.
I personally don't think that is a very good solution for stuff that only needs to be there once (quest cargo quantities) or is dynamic depending on the character you talk to (address form),
but certainly for persistant characters whose names you need, such as the two priests, it should work.

Wasn't there a problem getting town and island names to work in item descriptions? Specifically, the names of Jamaica and Santo Domingo in "SpanishLetter" for the Vogelstruijs side quest? I have a vague memory of reporting a problem there and you did something to make it work.
Indeed in some of the interfaces, preprocessors in the item names/descriptions didn't show up like they should.
I fixed it at the time though, so theoretically this should work now also for your custom preprocessors. :yes
 
I tried adding some 'Preprocessor_Save' commands to "utils.c". It worked, partly - it didn't apply the first name overrides you'd put into "Periods.c" so Father Bernard got a random first name in questbook entries. I tried putting the override into Bernard's definition in "Characters\init\redmond.c" and that didn't work either, he then got the random name both in questbook and face to face. So I'm back to doing it the hard way, with 'Preprocessor_Add' and 'Preprocessor_AddQuestData' lines at relevant points. Incidentally, I found out why putting one of them near the top of, for example, "Father Bernard_dialog.c" outside the 'switch' block doesn't always work. An entry to the questbook seems to cancel any previous 'Preprocessor_Add', so while the command outside the 'switch' covers most dialog cases, those which involve a questbook entry (and therefore a 'Preprocessor_AddQuestData' and 'Preprocessor_Remove' pair) need another 'Preprocessor_Add' just before the 'break'. It's not because the same label is used for both the dialog and questbook entries - I've been defining another variable, "#sFather#", specifically for dialogs so that lines such as "May I talk with you, Father?" change to "May I talk with you, Padre?" when Father Bernard is actually Padre Randomname.

This, then, is the finished product for "Help the Church" in "Early Explorers". As well as variable dialogs and questbook, it also contains a revised "ItemsDescribe.txt" so that the love letters (allegedly) from Father Jerald are now from whatever name Father Jerald is using. The reference to Mefisto in the questbook and the shortcut into "Strange Things Going On" are removed.
 

Attachments

  • fix_church_help.zip
    45.4 KB · Views: 132
I tried adding some 'Preprocessor_Save' commands to "utils.c". It worked, partly - it didn't apply the first name overrides you'd put into "Periods.c" so Father Bernard got a random first name in questbook entries.
You could try putting those Preprocessor_Save lines into Periods.c right after the lines where they're set to Padre (but OUTSIDE the if-statement). That might still work.
 
Several dialog files refer to a black frigate. Any objection to replacing this with something more generic such as "black warship", so it works reasonably well for both the frigate and the fluyt-of-war?

"Terry Snider_dialog.h" is for the dock worker at Nevis who sends you to "Fathah Bernard on Redmon'". He's going to have to lose some of his accent because Redmon' - sorry, Redmond, he's got me at it now :oops: - hasn't been a valid name for ages, and the priest will have a different name in "Early Explorers". Both therefore need to be replaced by variables which will give the plainer but more accurate names of the town and the priest.
 
Several dialog files refer to a black frigate. Any objection to replacing this with something more generic such as "black warship", so it works reasonably well for both the frigate and the fluyt-of-war?
Fine by me. "Warship" suggests a navy ship, so I wouldn't suggest that one, but "black pirate ship" should be specific enough.

"Terry Snider_dialog.h" is for the dock worker at Nevis who sends you to "Fathah Bernard on Redmon'". He's going to have to lose some of his accent because Redmon' - sorry, Redmond, he's got me at it now :oops: - hasn't been a valid name for ages, and the priest will have a different name in "Early Explorers". Both therefore need to be replaced by variables which will give the plainer but more accurate names of the town and the priest.
Indeed I noticed that too when I played that part two weeks ago. You're very welcome to correct that too! :onya
 
Both sounds fine to me.
if I get bored one day I might add a .dialect attribute to some characters so the dialog system will automaticly perform dialect stuff to the text after its processed. So we could remove the things from the dialog files but instead program them with replacements etc.

But like I said that will only happen if I'm really really bored XD.
 
Both sounds fine to me.
if I get bored one day I might add a .dialect attribute to some characters so the dialog system will automaticly perform dialect stuff to the text after its processed. So we could remove the things from the dialog files but instead program them with replacements etc.

But like I said that will only happen if I'm really really bored XD.
Really, REALLY bored. The dialect stuff is already there for the non-dynamic parts, so it doesn't make much of a difference. :shrug
 
Fine by me. "Warship" suggests a navy ship, so I wouldn't suggest that one, but "black pirate ship" should be specific enough.
Is "warship" really more suggestive of a navy ship than the original "frigate"?

"Pirate ship" is going to be a bit funny in those dialogs and questbook messages involving pirates...

If "warship" isn't allowed then I'll just say "black ship with red sails" or "strange black ship" to start with, and simply "ship" in follow-up lines.
 
Just so you know, I'm now putting your updated Church Help into my game and you might want to know that this section of code appears to work:
Code:
  if(GetCurrentPeriod() == PERIOD_EARLY_EXPLORERS)
   {
     Characters[GetCharacterIndex("Father Bernard")].name = "Padre"; // Override random first name
     Characters[GetCharacterIndex("Father Jerald")].name = "Padre"; // Override random first name
     Characters[GetCharacterIndex("Father Gareth")].name = "Padre"; // Override random first name
     ChangeCharacterAddress(characterFromID("Contre-Amirale"), "none", ""); //Sinking the Vogelstruijs
   }
   else
   {
     //First Contact quest
     PChar.quest.Firstcontact = "";
     PChar.quest.Contact_start.win_condition.l1 = "location";
     PChar.quest.Contact_start.win_condition.l1.character = PChar.id;
     PChar.quest.Contact_start.win_condition.l1.location = "Grand_Cayman_townhall";
     PChar.quest.Contact_start.win_condition = "Contact_start";
     //First Contact quest
   }

   //Church_Help
   characters[GetCharacterIndex("Father Bernard")].quest.church_help.quest.Church_Help = "";
   characters[GetCharacterIndex("Father Bernard")].quest.Church_Help.win_condition.l1 = "location";
   characters[GetCharacterIndex("Father Bernard")].quest.Church_Help.win_condition.l1.character = PChar.id;
   characters[GetCharacterIndex("Father Bernard")].quest.Church_Help.win_condition.l1.location = "Redmond_Church";
   characters[GetCharacterIndex("Father Bernard")].quest.Church_Help.win_condition = "Church_help";

   Preprocessor_Save("Father", GetMyFirstNames(CharacterFromID("Father Bernard"), false));
   Preprocessor_Save("FatherBernard", GetMySimpleName(CharacterFromID("Father Bernard")));
   Preprocessor_Save("FatherGareth", GetMySimpleName(CharacterFromID("Father Gareth")));
   Preprocessor_Save("FatherJerald", GetMySimpleName(CharacterFromID("Father Jerald")));
   Preprocessor_Save("Jerald", GetMyLastName(CharacterFromID("Father Jerald")));
   //Church_help
Might save you the trouble of adding too many preprocessor add/remove lines for ones that are being reused throughout the game.

EDIT: "Father Gareth" was a bit trickier because he isn't IN "Redmond" when the game starts so doesn't change to Spanish.
But that appears to be sorted now in my game too; will upload the changes soon.

Is "warship" really more suggestive of a navy ship than the original "frigate"?
A little bit, perhaps. :shrug

If "warship" isn't allowed then I'll just say "black ship with red sails" or "strange black ship" to start with, and simply "ship" in follow-up lines.
"Not allowed" are strong terms. You're welcome to make it whatever you think is best.
I'm just suggesting you might consider something else. "Black ship with red sails" sounds quite evocative; I like it. :cheeky
 
Last edited:
Just so you know, I'm now putting your updated Church Help into my game and you might want to know that this section of code appears to work:
Code:
<deleted to save space>
Might save you the trouble of adding too many preprocessor add/remove lines for ones that are being reused throughout the game.

I was ahead of you and had already added some of those. I didn't add the "Preprocessor_Save" lines for "Father" or "Jerald", though, as they're not used often enough to make it worth saving them.

What do the other lines about Father Bernard do?

EDIT: "Father Gareth" was a bit trickier because he isn't IN "Redmond" when the game starts so doesn't change to Spanish.
But that appears to be sorted now in my game too; will upload the changes soon.
Father Gareth doesn't change to Spanish because of the line 'ch.questchar = true;' in his entry in "PROGRAM\Characters\init\SideQuest.c". You may remember advising me to get rid of that so that the women standing outside Palo Brasil townhall got Spanish names instead of their original Dutch names. ;)

"Not allowed" are strong terms. You're welcome to make it whatever you think is best.
I'm just suggesting you might consider something else. "Black ship with red sails" sounds quite evocative; I like it. :cheeky
It will depend on context. "Black warship" is more specific than just "black ship" and shorter than "black ship with red sails". It also depends on who you're talking to - calling it a pirate ship when you're looking for help from the pirates of Nevis is probably not a good idea. xD It may, however, make sense when you're talking to Alistair Garcilaso, leader of the Isla do Palo Brasil pirates - the reason you're talking to him is that at this point you think it might be a pirate ship, and he becomes co-operative when you describe the ship because it's been attacking his ships too.
 
I was ahead of you and had already added some of those. I didn't add the "Preprocessor_Save" lines for "Father" or "Jerald", though, as they're not used often enough to make it worth saving them.
Even better! :woot

What do the other lines about Father Bernard do?
You know the Padre overrides and the Preprocessor_Save ones already, so I'm assuming you mean these:
Code:
characters[GetCharacterIndex("Father Bernard")].quest.church_help.quest.Church_Help = "";
characters[GetCharacterIndex("Father Bernard")].quest.Church_Help.win_condition.l1 = "location";
characters[GetCharacterIndex("Father Bernard")].quest.Church_Help.win_condition.l1.character = PChar.id;
characters[GetCharacterIndex("Father Bernard")].quest.Church_Help.win_condition.l1.location = "Redmond_Church";
characters[GetCharacterIndex("Father Bernard")].quest.Church_Help.win_condition = "Church_help";
Those are the lines that actually enable that sidequest. Without those, he will still be there, but there will be no quest to start.

Father Gareth doesn't change to Spanish because of the line 'ch.questchar = true;' in his entry in "PROGRAM\Characters\init\SideQuest.c". You may remember advising me to get rid of that so that the women standing outside Palo Brasil townhall got Spanish names instead of their original Dutch names. ;)
That is the first thing I did, but even that didn't seem to work. In the end, I did all this instead:
Code:
  if(GetCurrentPeriod() == PERIOD_EARLY_EXPLORERS)
   {
     ref ch = CharacterFromID("Father Gareth");
     ch.nation = GetTownNation("Redmond");
     SetRandomNameToCharacter(ch);
     ch.name = "Padre"; // Override random first name
   }
I think that is because he isn't IN "Redmond" when the game starts (he's set to location "None" by default) so didn't change to Spanish either.

It will depend on context. "Black warship" is more specific than just "black ship" and shorter than "black ship with red sails". It also depends on who you're talking to - calling it a pirate ship when you're looking for help from the pirates of Nevis is probably not a good idea. xD It may, however, make sense when you're talking to Alistair Garcilaso, leader of the Isla do Palo Brasil pirates - the reason you're talking to him is that at this point you think it might be a pirate ship, and he becomes co-operative when you describe the ship because it's been attacking his ships too.
Sounds like you've got it well thought out. :onya
 
Even better! :woot

You know the Padre overrides and the Preprocessor_Save ones already, so I'm assuming you mean these:
Code:
characters[GetCharacterIndex("Father Bernard")].quest.church_help.quest.Church_Help = "";
characters[GetCharacterIndex("Father Bernard")].quest.Church_Help.win_condition.l1 = "location";
characters[GetCharacterIndex("Father Bernard")].quest.Church_Help.win_condition.l1.character = PChar.id;
characters[GetCharacterIndex("Father Bernard")].quest.Church_Help.win_condition.l1.location = "Redmond_Church";
characters[GetCharacterIndex("Father Bernard")].quest.Church_Help.win_condition = "Church_help";
Those are the lines that actually enable that sidequest. Without those, he will still be there, but there will be no quest to start.
I don't think that's necessary. The lines to start the quest are in "Father Bernard_dialog.c". In case "quest lines" there are some checks on the status of the "church_help" and "animists" quests, and in particular:
Code:
      if (npchar.quest.church_help == "" && iTest < QUEST_COUNTER)
       {
         link.l1 = DLG_TEXT[18];
         link.l1.go = "church_help";
         iTest = iTest + 1;
       }
Case "church_help" checks your reputation and if high enough proceeds to the dialog where Father Bernard offers the quest.

That is the first thing I did, but even that didn't seem to work. In the end, I did all this instead:
Code:
  if(GetCurrentPeriod() == PERIOD_EARLY_EXPLORERS)
   {
     ref ch = CharacterFromID("Father Gareth");
     ch.nation = GetTownNation("Redmond");
     SetRandomNameToCharacter(ch);
     ch.name = "Padre"; // Override random first name
   }
I think that is because he isn't IN "Redmond" when the game starts (he's set to location "None" by default) so didn't change to Spanish either.
Where do you put that?
 
I don't think that's necessary. The lines to start the quest are in "Father Bernard_dialog.c". In case "quest lines" there are some checks on the status of the "church_help" and "animists" quests, and in particular:
Code:
      if (npchar.quest.church_help == "" && iTest < QUEST_COUNTER)
       {
         link.l1 = DLG_TEXT[18];
         link.l1.go = "church_help";
         iTest = iTest + 1;
       }
Case "church_help" checks your reputation and if high enough proceeds to the dialog where Father Bernard offers the quest.
Unless I am very much mistaken, that is stock game code and is already in place. I just moved it a bit so it is together with your related changes.
If it isn't executed, this line will give an error.log entry because Father Bernard doesn't HAVE that attribute:
Code:
if (npchar.quest.church_help == "" && iTest < QUEST_COUNTER)
That being said, it appears that the other lines indeed are NOT needed, because:
Code:
    case "Church_help":
       SetEnterLocationQuest("redmond_church", "church_start_check", 0);
     break;

     case "church_start_check":
       if(makeint(PChar.rank) >= 1)
       {
         characters[GetCharacterIndex("Father Bernard")].quest.church_help = "";
       }
     break;
So all that does is to add an attribute that is already there when you reach level 2 which you probably already are by the time you get there.
So we could probably do away with all that and it won't make a difference.

Where do you put that?
Periods.c together with the related stuff. This is how I've got it now:
Code:
  //Santiago quest
   PChar.quest.Santiago = "";
   PChar.quest.Santiago_start.win_condition.l1 = "location";
   PChar.quest.Santiago_start.win_condition.l1.character = "Bartolomeu o Portugues";
   PChar.quest.Santiago_start.win_condition.l1.location = "Guadeloupe_Port";
   PChar.quest.Santiago_start.win_condition = "Santiago_start";
   PChar.quest.Santiago_start.skip = "yes";
   //Santiago quest

   if(GetCurrentPeriod() == PERIOD_EARLY_EXPLORERS)
   {
     Characters[GetCharacterIndex("Father Bernard")].name = "Padre"; // Override random first name
     Characters[GetCharacterIndex("Father Jerald")].name = "Padre"; // Override random first name
     ref ch = CharacterFromID("Father Gareth");
     ch.nation = GetTownNation("Redmond");
     SetRandomNameToCharacter(ch);
     ch.name = "Padre"; // Override random first name
     ChangeCharacterAddress(characterFromID("Contre-Amirale"), "none", ""); //Sinking the Vogelstruijs
   }
   else
   {
     //First Contact quest
     PChar.quest.Firstcontact = "";
     PChar.quest.Contact_start.win_condition.l1 = "location";
     PChar.quest.Contact_start.win_condition.l1.character = PChar.id;
     PChar.quest.Contact_start.win_condition.l1.location = "Grand_Cayman_townhall";
     PChar.quest.Contact_start.win_condition = "Contact_start";
     //First Contact quest
   }

   //Church_Help
   characters[GetCharacterIndex("Father Bernard")].quest.church_help.quest.Church_Help = "";
   Preprocessor_Save("Father",      GetMyFirstNames(CharacterFromID("Father Bernard"), false));
   Preprocessor_Save("FatherBernard",   GetMySimpleName(CharacterFromID("Father Bernard")));
   Preprocessor_Save("FatherJerald",   GetMySimpleName(CharacterFromID("Father Jerald")));
   Preprocessor_Save("Jerald",       GetMyLastName(CharacterFromID("Father Jerald")));
   Preprocessor_Save("FatherGareth",   GetMySimpleName(CharacterFromID("Father Gareth")));
   //Church_help

   //Jackpot
   PChar.quest.Jackpot = "";
   PChar.quest.Jackpot_start.win_condition.l1 = "location";
   PChar.quest.Jackpot_start.win_condition.l1.character = PChar.id;
   PChar.quest.Jackpot_start.win_condition.l1.location = "Tortuga_tavern";
   PChar.quest.Jackpot_start.win_condition = "Jackpot_start";
   //Jackpot
 
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>".

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".

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.

early_mefisto.jpg early_mefisto_stern.jpg early_mefisto_pegasus.jpg

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!
 
The preprocessor should work because as far as I know I use it for the patrolbooks too....
But it could be it doesn't use translate strings.
Please make a bug report for it and I will fix it today...
 
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.
 
I only got a few files here but saw this one in the interface for nation relations
Code:
GetFlagPicName

if you search for that function it will probably lead you to the function you can use :), You could even use this one but I prefer you search for where it leads and take the root function.
 
Back
Top