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

Solved Cannot buy - Contraband on board

Albert_Bowden

Sailor Apprentice
I am playing new horizons on windows 10, the latest one and I’m trying to buy a ship through the ship yard in Jamaica, and it’s not letting me because I have “contraband”. I have tried selling all my stuff and it is still not letting me buy it. What exactly counts as contraband?? I’ll attach some pics please help!!
 

Attachments

  • image.jpg
    image.jpg
    1.8 MB · Views: 223
  • image.jpg
    image.jpg
    1.7 MB · Views: 214
  • image.jpg
    image.jpg
    1.8 MB · Views: 185
The Trade/Colonies interface tells you what is contraband on each island.
It may look in your entire fleet.
Not sure...
 
The Trade/Colonies interface tells you what is contraband on each island.
It may look in your entire fleet.
Not sure...
Am I able to disable contraband altogether? Wherever I go I can’t buy any ships. Or are you able to find a method where I can delete contraband from the game?
 
DO you have contraband?

If I recall, @Levis added this check to avoid an exploit of some kind.
But I can't remember the specifics.

In PROGRAM\INTERFACE\shipyard.c, you should be able to find the code responsible.
 
DO you have contraband?

If I recall, @Levis added this check to avoid an exploit of some kind.
But I can't remember the specifics.

In PROGRAM\INTERFACE\shipyard.c, you should be able to find the code responsible.
No, as in the pictures shown I have no contraband. I don’t know if there is an extra inventory I need to show you but that is all to see. What do I need to look for in that file? Do I need to delete a line, change a number or something? Please help :(
 
I finally did it!! Contraband is no more... Thank god. Now the game is enjoyable. Sorry about this but it was a bug when I didn’t even have contraband in my ships cargo or my own inventory. Thank you very much for giving me the file destination!!!
 
Congratulations! :cheers

Weird that it happened though.
I wonder what triggered it...
No idea lol. I didnt even have contraband at all. Maybe it was picking up loot from sinking ships after boarding? All evidence is there if you want to try and fix it. All the best, LOVE THE GAME!!!
 
What I read from the code:
Code:
    //Levis: contraband checking
   if(nCurFourNum > -1)
   {
       if(cn > -1)
       {
           if(CheckForContraband(GetCharacter(cn)))
           {
               EnableString("NoBuyString");
               SetNodeUsing("NOBUYBOX2", true);
               GameInterface.strings.NoBuyString = "Cannot Buy - Contraband on board";
           }
       }
   }
It should look ONLY at the ship you're selling/replacing; not at your entire fleet.

And this is how it checks:
Code:
//Levis -->
bool CheckForContraband(ref _refCharacter)
{
   if ( GetOfficersPerkUsing(GetMainCharacter(),"Trustworthy")) return false; // PB: Check officers too
   //if ( FindFirstContrabandGoods(GetMainCharacter()) != -1) return true;
   int i;
   int curIslandIdx = GetCharacterCurrentIsland(_refCharacter);
   ref CurIsland = GetIslandByIndex(curIslandIdx);
   aref islRef; makearef(islRef,CurIsland.Trade.Contraband);
   int n;
   for(i=0;i<GetAttributesNum(islRef);i++)
   {
       n = sti(GetAttributeValue(GetAttributeN(islRef,i)));
       if( GetCargoGoods(_refCharacter,n)>0 )
       {
           return true;
       }
   }
   return false;
}
//Levis <--
At first glance, that does look like it makes sense.
It looks through the parameters like these from Islands_init.c:
Code:
       rIsland.Trade.Contraband.id1 = GOOD_SUGAR;
       rIsland.Trade.Contraband.id2 = GOOD_LINEN;
       rIsland.Trade.Contraband.id3 = GOOD_WINE;
And those are the same parameters that the TradeBook.c interface file loops over to show you what the contraband is.
So in theory, it should all always be in line.

In theory.
Wouldn't be the first time that something else happens than what appears at first glance.
It'd require checking your savegame to see what's actually happening.
 
I believe the problem is to do with varying smuggling states which can add or remove contraband. Some code may not recognise the change. So a commodity might have been removed due to the smuggling state being lower, it doesn't show up on the list of contraband, you can't smuggle it - but you can't sell it in the store or shipyard.

And this is why I get my quartermaster the "Trustworthy" perk as soon as possible. ;)
 
I believe the problem is to do with varying smuggling states which can add or remove contraband. Some code may not recognise the change. So a commodity might have been removed due to the smuggling state being lower, it doesn't show up on the list of contraband, you can't smuggle it - but you can't sell it in the store or shipyard.
Sounds plausible.
Only the code I saw should be able to deal with varying contraband levels.
Should...
 
Thanks so much guys. Just an off topic so i dont have to make another forum post... When your playing as Davy Jones, do you have to wait 10 years in game time to set foot on land? Got abit tired of just boarding ships and using the kraken, but its still a very good mode!
 
When your playing as Davy Jones, do you have to wait 10 years in game time to set foot on land? Got abit tired of just boarding ships and using the kraken, but its still a very good mode!
We never expanded it, so nothing changes after ten years.

I'm pleasantly surprised you're trying it!
Never heard of anyone doing that before.
Thought it wasn't a feature anyone seemed to care about...
 
Back
Top