• 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 Dutch envoy @ Antigua bug tracker

A.H

Privateer
This is a reminder for the fixing of the dialog bug found in the Dutch envoy in Naval HQ @ Antigua.
Thanks for the support.
 

Attachments

  • compile.log
    63.6 KB · Views: 86
  • engine.ini
    35.2 KB · Views: 62
  • error.log
    2.2 KB · Views: 85
  • system.log
    7.4 KB · Views: 74
  • 14.jpg
    14.jpg
    143.9 KB · Views: 82
PROGRAM\DIALOGS\governor.c remove one of the two lines that look like this:
Code:
ref PChar = GetMainCharacter();
 
Alright I removed the PChar = GetMainCharacter(); and right above it there was one NPC char or something, as you can see in my file i uploaded.


Luckily for me as well, just hit Charlestown with 200 men and managed to take over the port! Nederland now have a presence in the year of our lord 1501 :p
17.jpg
 

Attachments

  • governor.c
    10.3 KB · Views: 78
Oops something maybe I did wrong? Still the same blank dialog.. he doesn't talk.
Or maybe governor cut out his tongue :eek:
14.jpg
 
There's also another issue I just encountered.. after I took over Charlestown (Puerto cabeza or whatever), the same spanish governor is still there. Is it also a bug or it's normal? I was hoping for promotion, quest, etc. but he doesn't seem interested to talk to me.

18.jpg
 
Agh! Put this line where the other one used to be:
Code:
int iNation = sti(NPChar.nation);

Playing as Beatrice also allowed me to find an error in the GetMyAddressForm function thanks to this.
Beatrice referred to him as "Juffrouw" which is obviously a tiny bit wrong.
Turns out that it checked the NPC nation but the PLAYER gender. Uhm... Well, that was weird. :wp
 
  • Like
Reactions: A.H
There's also another issue I just encountered.. after I took over Charlestown (Puerto cabeza or whatever), the same spanish governor is still there. Is it also a bug or it's normal? I was hoping for promotion, quest, etc. but he doesn't seem interested to talk to me.
For a promotion, you can also talk to that emissary. Hopefully with my above change, you will finally be able to.
Though indeed a Dutch governor should do it too. Perhaps the second time you talk to him, though?

I think the following code in the character init entries are required to swap out the governor with another nation one:
Code:
// KK -->
   ch.nation.n0.name = "Michael";
   ch.nation.n0.lastname = "Johnson";
   ch.nation.n0.model = "huber_eng2_17";
   ch.nation.n0.sex = "man";
   ch.nation.n0.greeting = "Gr_Robert Christopher Silehard";
   ch.nation.n1.name = "Joseph";
   ch.nation.n1.lastname = "Fayette";
   ch.nation.n1.model = "huber_fra3_17";
   ch.nation.n1.sex = "man";
   ch.nation.n1.greeting = "Gr_joseph claude le moigne";
   ch.nation.n2.name = "Miguel";
   ch.nation.n2.lastname = "de Suza";
   ch.nation.n2.model = "huber_spa2_17";
   ch.nation.n2.sex = "man";
   ch.nation.n2.greeting = "Gr_Christofor Manuel de Alencar";
   ch.nation.n4.name = ch.old.name;
   ch.nation.n4.lastname = ch.old.lastname;
   ch.nation.n4.model = ch.model;
   ch.nation.n4.sex = ch.sex;
   ch.nation.n4.greeting = ch.greeting;
   ch.nation.n5.name = "Menirez";
   ch.nation.n5.lastname = "De Marco";
   ch.nation.n5.model = "huber_por_17";
   ch.nation.n5.sex = "man";
   ch.nation.n5.greeting = "Gr_Jacinto Arcibaldo Barreto";
// <-- KK
However, "Thomas Modiford" (=Charlestown governor) doesn't have that so that is probably why the governor would remain himself.

It is also possible that the CaptureTownForNation function in PROGRAM\Towns\TownTable.c doesn't quite do what I would want it to.
Do you still have the compile.log from when you did this capture? Look through that for "CaptureTownForNation: town=" and post the entire line here.
That should confirm what I need to know.

Also worth noting that while I think that code could potentially keep the governor's name and model, his nation SHOULD still change.
Can you ask him about nation relations? That should tell you whether he is Dutch now or not.
Also check the Archipelago Map/Colonies Interface to see if the town is actually taken over.
 
UGH! I just noticed that the emissaries don't have their governor group dialog set either! :modding

Will be fixed in my next update, of course. But in the meantime, use the console to execute these lines of code:
Code:
  ch = CharacterFromID("Dutch Emissary");
   ch.Dialog.Filename.GroupDialog = "governor.c";
See here point #4 for how to do that: http://www.piratesahoy.net/threads/modding-tips-tricks.24942/
 
YEa it didn't work either.. and also Winston Churchil seems to have his tongue cut out lol

As for charlestown governor.. he is the same spaniard except my reputation is now good because he is governing a dutch port.
But I can't ask him for dutch relations with other nations; only:
- I have some business to discuss
- Just paying my respects

And after i chose anyone of them, conversation ends.


However now i tried the
ch = CharacterFromID("Dutch Emissary");
ch.Dialog.Filename.GroupDialog = "governor.c";

It still doesn't work.
As for Caputre on compile file, i can't seem to find it. :S
 

Attachments

  • console.c
    34.4 KB · Views: 76
  • compile.log
    3.6 KB · Views: 51
  • error.log
    799 bytes · Views: 80
  • Towntable.c
    62 KB · Views: 74
Attached files work for me for the Emissary. Press F12 to execute the console after placing these on top of your main game folder.

What about the Colonies/Map Interfaces? Those should tell you if the town is Dutch now.
Or check the soldiers now guarding it.
 

Attachments

  • FIXES.zip
    44.4 KB · Views: 59
Ok great, the dialog with winston & dutch envoy works.. except that the envoy only introduce himself then says he is busy lol.. he says exact same dialog as winston but he says "Dutch republic" while winston says "her majesty ...."

There wasn't any option for promotion, etc.

Anyhow, with regards to charlestown.. still the same situation. The soldiers are dutch yes, when i leave port and go open world map.. it's dutch flag.. the fort even has a dutch flag when i'm near it.

Some characters such as shipyard have dutch names.. it seems everyone except mr. governor who is too arrogant to get off his throne.
 
Ok great, the dialog with winston & dutch envoy works.. except that the envoy only introduce himself then says he is busy lol.. he says exact same dialog as winston but he says "Dutch republic" while winston says "her majesty ...."
They wouldn't until you execute the console with F12.

And I just noticed that the Charlestown governor ALSO didn't have that line added to him. So execute also this through console:
Code:
ch = CharacterFromID("Thomas Modiford");
ch.Dialog.Filename.GroupDialog = "governor.c";

Anyhow, with regards to charlestown.. still the same situation. The soldiers are dutch yes, when i leave port and go open world map.. it's dutch flag.. the fort even has a dutch flag when i'm near it.

Some characters such as shipyard have dutch names.. it seems everyone except mr. governor who is too arrogant to get off his throne.
So the capture did happen. That's something. Then the problem is probably in here:
Code:
      if (CheckAttribute(gov, "nation." + sNation)) {
         gov.name = TranslateString("", gov.nation.(sNation).name);
         gov.old.name = gov.name;
         if (CheckAttribute(gov, "nation." + sNation + ".middlename")) {
           gov.middlename = TranslateString("", gov.nation.(sNation).middlename);
           gov.old.middlename = gov.middlename;
         } else {
           DeleteAttribute(gov, "middlename");
         }
         gov.lastname = TranslateString("", gov.nation.(sNation).lastname);
         gov.old.lastname = gov.lastname;
         gov.sex = gov.nation.(sNation).sex;
         if (CheckAttribute(gov, "old.location")) {
           gov.location = gov.old.location;
           DeleteAttribute(gov, "old.location");
         }
         gov.greeting = gov.nation.(sNation).greeting;
         SetModelFromID(gov, gov.nation.(sNation).model);
       } else {
         if (iNation == PIRATE) {
           gov.old.location = gov.location;
           gov.location = "none";
         } else {
           if (bFirstInit) {
             if (CheckAttribute(gov, "middlename")) {
               DeleteAttribute(gov, "old.middlename");
               DeleteAttribute(gov, "middlename");
             }
             gov.name = "";
             gov.old.name = "";
             gov.lastname = "";
             gov.old.lastname = "";
             SetRandomNameToCharacter(gov);
             SetModelFromID(gov, GetRandomModelForTypeExSubCheck(1, "Rich_citizens", "man", iNation)); // PB: Give this guy a random model
           }
         }
       }
The top part of this if-statement applies to governors that DO have variations set for different nations.
The bottom part is for characters that don't. Note that everything there is within another if (bFirstInit) statement.
I think that means that the random name and character model happen only when this is called upon NEW GAME.
That would explain why the guy didn't change for you. But that is merely for show.

Let me start a new thread on that....
 
Alright cool, i'm just restarting my PC to make sure the function works properly..

20.jpg

I pressed F12 but didn't get much options during dialog. But will keep trying again now.
 
Back
Top