• 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 No cargo for escorted ships

Hylie Pistof

Curmudgeon
QA Tester
Storm Modder
Pirate Legend
Like before the escorted ships carry no cargo. This is no big deal except that there WILL be fighting during these escort jobs and it would be nice if they could, you know, defend themselves.
 
If this wields as intended, then they do have Cargo.
You just can't see or touch it because the ship is locked.

Perhaps there is an error with the code though that also returns zero outside the interface even if they do have the cargo.
That would be annoying!
 
Execute this line through console:
Code:
SetRemovable(CharacterFromID("Quest trader"), true);
I'm writing from memory here, but I think that is the correct syntax.

That sets him back to normal so that you actually CAN touch his cargo again and sell his ship and all that stuff.
It does not actually GIVE him new cargo, though.

This should allow you to check if he really does have cargo or not and also to check if he does participate in battles afterwards.
 
There's an even easier way to check if he participates in battles. Watch and see if his ship fires. :keith (Personally, I don't want him joining in a battle, and about the first thing I do is tell him to sail away. It's my job to protect him, not the other way round!)
 
Hylie already reported that he doesn't fire. What I want to know is if he does fire when he is Removable.
 
So far in this new game in two battles the escorted ship never fired. Then I could not get any more escort quests.
 
Nope. They just stopped, so I have been doing other things. Will try again soon.
 
Confirmed: I tried one during my last play session, the escorted ship had no cargo, and when I found something to attack, the escorted ship did not fire.

This has never really bothered me. It's my job to protect that ship, not the other way round! So when we run into trouble, the first thing I usually do is tell it to sail away, then I engage the enemy myself. And I'm not interested in double-crossing the client so its cargo doesn't interest me. But I can see how it would upset the people who wanted escort missions to be "interesting" by being able to double-cross the merchant; it won't fight back, then you board the ship and find that you wasted your time as there's nothing to steal. Perhaps the reason the merchant doesn't fire at you is that, knowing you've betrayed him, the crew aren't manning the guns because they're busy throwing all the cargo overboard. :razz
 
Confirmed: I tried one during my last play session, the escorted ship had no cargo, and when I found something to attack, the escorted ship did not fire.
What happens after you execute this through console?
Code:
SetRemovable(CharacterFromID("Quest trader"), true);
I really need to know because that would mean the SetRemovable disables more than it should.

And I'm not interested in double-crossing the client so its cargo doesn't interest me. But I can see how it would upset the people who wanted escort missions to be "interesting" by being able to double-cross the merchant; it won't fight back, then you board the ship and find that you wasted your time as there's nothing to steal. Perhaps the reason the merchant doesn't fire at you is that, knowing you've betrayed him, the crew aren't manning the guns because they're busy throwing all the cargo overboard. :razz
I think they DO fire on you after you betray them because they are then no longer in your fleet. They used to anyway.
Hylie's note is that they don't fire when they're assaulted while they are still in your fleet.
I understand that isn't a huge issue because it should be YOU protecting THEM but that effect certainly is unintentional and should ideally be fixed.
Probably got caused by some changes of mine in the first place.
 
Any news on this?
 
Indeed the quest ship does NOT have any cargo at all! Which is strange, because there IS code giving her cargo.
Tracking this down now....
 
This problem actually got caused by a fix of mine. I rewrote this function to do what I think it was once intended to do:
Code:
bool IsTrader(ref _refCharacter)
{
   int findIdx = -1; // KK
   if (CheckAttribute(_refCharacter, "index"))
     findIdx = sti(_refCharacter.index); // changed by MAXIMUS
   else
     return false;

   // PB: Just check single character officer type -->
   if (GetAttribute(_refCharacter, "quest.officertype") == OFFIC_TYPE_TRADER)   return true;
   else                                     return false;
   // PB: Just check single character officer type <--
/*
   // PB: What was this supposed to be doing?
   ref mc = GetMainCharacter();
   for (int i = 1; i < 4; i++)
   {
     if (GetCompanionIndex(mc, i) == findIdx && CheckAttribute(&Characters[findIdx], "quest.officertype") == true && Characters[findIdx].quest.officertype == OFFIC_TYPE_TRADER) return true;
   }
   return false;
*/
}
However, that function was used (and originally doing nothing) in several spots, such as this:
Code:
void SetCharacterGoods(ref _refCharacter,int _Goods,int _Quantity)
{
//   if (IsTrader(_refCharacter)) return; // KK - PB: Quest traders need cargo too
And this:
Code:
int AddCharacterGoods(ref _refCharacter,int _Goods,int _Quantity)
{
   int i,cn,freeQuantity;
   string goodsName = Goods[_Goods].name;

   for (i = 0; i < 4; i++)
   {
     cn = GetCompanionIndex(_refCharacter,i);
     if(cn != -1)
     {
     //   if (IsTrader(GetCharacter(cn))) continue; // KK - PB: Quest traders need cargo too
Since the function now actually DOES do something, that prevented quest traders from getting any cargo.
Note that I have now outcommented both instances. After testing, I can confirm that quest traders now DO get cargo again AND fire their cannons on any enemies like they should.

So "Fixed" too. :cheeky
 
Back
Top