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

Need Help Several minor bugs + questions

Did you put that 'DumpAttributes' line into "console.c"? If you press F12, it's supposed to put a full list of everything about the merchant into "compile.log", and there's nothing about him in there. If you press F12 and you do not get the message on screen "Executed Console" then there's something wrong with "console.c" and there ought to be an "error.log" file which will give some clue as to what is wrong.

I've no idea what's going on with that officer. If it had happened in the "Tales of a Sea Hawk" storyline, there's one place where weirdness like that can happen, though I thought I'd fixed it. But "compile.log" tells me you're playing FreePlay, so I can't think of any reason why the officer might get into that condition. The black woman is the interface picture the game uses when it has a valid character but doesn't know which interface picture is supposed to go with that character. Assigning a new model means the character now has the interface picture for that model. Don't put him in charge of a ship, because the weirdness I'm thinking of can cause the ship to go blank as well.
 
Did you put that 'DumpAttributes' line into "console.c"? If you press F12, it's supposed to put a full list of everything about the merchant into "compile.log", and there's nothing about him in there. If you press F12 and you do not get the message on screen "Executed Console" then there's something wrong with "console.c" and there ought to be an "error.log" file which will give some clue as to what is wrong.
I think I should have pressed F12 after dialogue then, not when dialogue screen in actually... on screen lol.

Redid this the right (I suppose) way

I've no idea what's going on with that officer. If it had happened in the "Tales of a Sea Hawk" storyline, there's one place where weirdness like that can happen, though I thought I'd fixed it. But "compile.log" tells me you're playing FreePlay, so I can't think of any reason why the officer might get into that condition. The black woman is the interface picture the game uses when it has a valid character but doesn't know which interface picture is supposed to go with that character. Assigning a new model means the character now has the interface picture for that model. Don't put him in charge of a ship, because the weirdness I'm thinking of can cause the ship to go blank as well.
It can eat not only officers, but ships too?! Whooah, Davy Jones would be proud.
I won't put him in captain slot then. Will tell if something weird/absurd happens with him.
 

Attachments

  • compile.log
    13.9 KB · Views: 115
  • system.log
    1.2 KB · Views: 117
Pressing either before or after the dialog would work. Just not while you're in the dialog. xD

Next question - did you download the version of "quests_common.c" in post #39? If so, did you put it into "PROGRAM\QUESTS"?

The reason I ask is that "compile.log" contains these lines:
Code:
Quest name prepare_for_convoy_quest FOUND in CommonQuestComplete
Quest name prepare_for_convoy_quest_2 FOUND in CommonQuestComplete
That's fine, that's the part of the code which makes the merchant talk to you.

It may look like a different merchant every time, but in fact it's the same character, now with a new model, new name and new ship. The game calls him "Quest trader". And part of the result of that 'DumpAttributes' is this:
Code:
dialog =
  filename = Cabinfight_dialog.c
    debug = Debug.c
  currentnode = prepare_convoy_quest
He's still set to use dialog file "Cabinfight_dialog.c", which is the file he's supposed to use when he's surrendered and you're talking to him on his ship deck. The blank dialog is because he's looking for a piece of dialog which isn't in that file, it's in a different file.

The new version of "quests_common.c" has this:
Code:
       case "prepare_for_convoy_quest_2":
           LAi_SetPlayerType(pchar);
           characters[GetCharacterIndex("quest trader")].Dialog.Filename = "anacleto_dialog.c";
           characters[GetCharacterIndex("quest trader")].dialog.currentnode = "prepare_convoy_quest";
           LAi_ActorDialog(characterFromID("Quest trader"), pchar, "", 10.0, 1.0);
       break;
That's supposed to put him back to using dialog file "anacleto_dialog.c", which is the file he should be using when he offers the quest.
 
Next question - did you download the version of "quests_common.c" in post #39? If so, did you put it into "PROGRAM\QUESTS"?
Did it now and game crashes on start with replaced quest_common file.
maybe this could be done through console? Attacing my quest_common file, if needed.
 
Could you put back the new "quests_common.c", run the game and after it crashes, post "error.log"? I probably messed up something and "error.log" should tell me what it is.
 
Oh no, not again. :oops: That's not the first time I've missed out a bracket, and it probably won't be the last time...

Now with extra ')'. Put this one into "PROGRAM\QUESTS", try the game again, and if it still crashes, post "error.log" again. I'll get it working yet...
 

Attachments

  • quests_common.c
    240.4 KB · Views: 107
That fixed this. Wow. I mean... Thank you :8q:8q :onya I did not truly believe that this could be removed from current playthrough х)

Talked to merchant, normal dialogue, no issue
 
New thing)
I cannot buy exact amount of food from merchant. I've got cargo place, he's (merchant) got 333 food in storage), but I cant buy after certain point. Only amount that... that what?
Or maybe it's not a bug at all and I'm doing something wrong :wp
 
New thing)
I cannot buy exact amount of food from merchant. I've got cargo place, he's (merchant) got 333 food in storage), but I cant buy after certain point. Only amount that... that what?
Or maybe it's not a bug at all and I'm doing something wrong :wp
Merchants will not sell ALL their food, because they need to keep something to feed the town too.
 
Greedy bastards) And something new at all. Game crashes when I scroll down abilities list of two of my officers. Only them. First one crash game when I press open abilities screen, second only after scrolling down a bit. All other officers are ok.

Edit
Problem solve itself somehow after I take them from my secondary ships.
 

Attachments

  • compile.log
    2.5 KB · Views: 88
  • system.log
    5.7 KB · Views: 103
Last edited:
Wow. Now I've got CTD after I reassign captains to my ships and exit interface screens into game.
 

Attachments

  • compile.log
    2.9 KB · Views: 104
  • system.log
    374 bytes · Views: 107
  • error.log
    1.3 KB · Views: 111
To be more accurate. When I tried this last time

Edit. After some testing I can tell that this do not happen in shipyard. Only when I try to reassign captains staying in Charlestown port (if location is important)
 

Attachments

  • error.log
    302 bytes · Views: 126
Last edited:
Also, is there console command to change enemy crew morale level in battle? Wanted to give mutinied ships a fight, but they keep sailing away.
 
After some testing I can tell that this do not happen in shipyard. Only when I try to reassign captains staying in Charlestown port (if location is important)
It does indeed sound safer to do any swapping out of sight of your ships.

Also, is there console command to change enemy crew morale level in battle? Wanted to give mutinied ships a fight, but they keep sailing away.
That'll be crazy difficult, because how do you target specific ships?
You could adapt the Kraken Attack feature, but that'll some fairly serious modding.
 
That'll be crazy difficult, because how do you target specific ships?
You could adapt the Kraken Attack feature, but that'll some fairly serious modding.
Is it possible to trigger morale buff to any ship that mutiny to player? Maybe temporary placing this code somewhere in files, not executing through console.

Edit
Or perhaps to any hostile ship (when in open sea, only 2 mutinied ships and my main present in battle, so it should be possible to select them by selecting all hostile ships (when in 3d sea in battle) and apply morale buff.
 
Last edited:
Already figured out by adding this code to AISea

rCharacter.Ship.Crew.Morale = 45;

after this lines (mutiny section)

rCharacter.recognized = true; // PB: Have these ships always hostile, regardless of flag
rCharacter.nation = iNation; // PB: Maintain original allegiance if possible
 
Another question: technically, what happens to assigned officers (not captains) when ship mutiny? Do they dissapear immediately or still present and only not participating in boarding?

I know that after boarding they certainly dead, but what about mutiny start.
 
About the betrayed merchant captain not talking: I think I've fixed this.

The problem is in "PROGRAM\SEA_AI\AIShip.c", function "ShipMutiny()":
Code:
                   if(IsTrader(chref))
                   {
                       LAi_SetStayType(chref);
                       mchref.quest.generate_convoy_quest.board = true;
                       ChangeCharacterReputation(mchref, -10);
                       DoQuestCheckDelay("convoy_failed", 0.0);
                   }
That's supposed to put the captain into "Stay" mode so he stands still and is ready for you to talk to him, plus have the bad stuff happen as a result of your betrayal. It's not happening. Some of the bad stuff happens anyway because "convoy_failed" is triggered when he dies, but he's not put into "Stay" mode, and that's why he just stands there and doesn't respond to an attempt to talk.

The real problem is the definition of "IsTrader", which checks that the character is valid and then does this:
Code:
if (GetAttribute(_refCharacter, "quest.officertype") == OFFIC_TYPE_TRADER)   return true;
The merchant captain is set to "OFFIC_TYPE_TRADER" by default, but he doesn't stay that way. His officer type changes to match yours. So I added a second check:
Code:
if (strlower(GetAttribute(_refCharacter, "id")) == "quest trader")       return true;
The merchant is always "quest trader". He's a recyclable character who gets a new name, nation and ship when the convoy quest is generated. So "IsTrader" now returns true if the character is "OFFIC_TYPE_TRADER" or if it's "quest trader". And now the captain talks to me.

Due to the way "PROGRAM\DIALOGS\cabinfight_dialog.c" sets up conditions, the captain can't be taken prisoner but can be made an officer. But that officer can't then be assigned to command a ship or to your shore party. It may be possible to fix that, but then it occurred to me, you've just double-crossed this guy so why would he want to serve you, or even trust you to keep him alive after taking him prisoner? So the quick'n'dirty fix was simply to make "quest trader" always fight you.

Download this, extract it and copy to the top level of the game installation folder. Windows should then try to merge the downloaded "PROGRAM" folder with your existing "PROGRAM" folder. Next time you double-cross a merchant and he surrenders, he should have something to say.
 

Attachments

  • PROGRAM.zip
    142 KB · Views: 100
Back
Top