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

Included in Build Revamped Smuggling [3.3 compatible]

Sounds good to me. What Did you actually change?
 
In smuggling.c, the main change was just the CheckAttribute(stown, "nation") .
Also added a GetNationNameByType in the trace logs to get nation names instead of numbers.
 
I need to check something but i think the init should stay where it is else every time a game is loaded the Schedule changes.

Or is newgame_continue not called on loading a game?
 
Ok then its okay to put it there.
 
What would happen in the Assassin storyline where there are some islands with smuggling nation = SPAIN, but no actual Spanish towns.
Example would be Saint Martin, which has the Dutch Philipsburg and French Marigot.
However, to simulate the still major Spanish influence in the Caribbean in that time period, the island smuggling nation is Spain.
I think this would result in Saint Martin having zero coast guard troops, wouldn't it? :shock
 
Yes it would
 
It does sound right i think. If the island is technically Spain but some others are on it to nobody would probably bother to capture smugglers
 
It does make sense that the Dutch and French settlements don't care, since they're too busy fighting each other.
And the Spanish wouldn't be around very much either.
So that means you can basically smuggle whatever you want to Saint Martin in the Assassin storyline, right?
Sounds.... profitable. :wp

Could that be too much of an exploit, though?
If there is a LOT smuggled to the island, will the number for patrols ever be increased from zero?
It had originally been my intention that you could still be caught by Spanish patrols.

How does it work for islands with multiple nations anyway? Take for example Hispaniola with a Spanish and a French town.
I think the smuggling nation is set to Spain. So if you arrange to meet the smugglers from Port-au-Prince, would there be any coast guard at all?
And if so, would you be able to find out the schedule from a French soldier in the Tavern, despite the smuggling nation being Spain?
 
The game always checks for the smuggling nation. I changed that in the previous version and that caused way to much problems so I kept it island related so it always checks for the island nation.
So if you make a deal with the smuggler in port au price you can still be captured by spanish coast guard cause they seem to be the one who are in charge over the whole island so they do the patrolling.
It's a bit of an exploid indeed if the island always has 0. What we could do is have a attribute given to the island with a amount of coastguard troops (seperate).
Then the game takes more from the towns if needed (higher states) but there always is a small regiment of troops dedicated to the coasterguard for (at least some) islands.
That shouldn't be to hard to implement.
 
Perhaps it could be as simple as replacing this:
Code:
int troops = 0;
With a default minimum value:
Code:
int troops = 5;

Still do wonder about getting the Spanish patrol schedule from a French soldier....
 
@Pieter Boelen I added a default values based on the state of the island. Also added a few checks in the code to speed things up and skip some islands (like if they are pirate nation they dont need a patrol schedule).
Also added a SMUGGLING_MAX_GROUPS_PER_STATE. This sets the max amount of groups, say the state is 2 then the max amount is 8, so the total max amount of groups is 16.
This is to make the schedules a bit nicer. Also improved the schedule generation code a bit again so it generates better schedules again.
 

Attachments

  • smuggling.c
    49.4 KB · Views: 126
Just noticed something with Antigua. It is supposed to have ALL goods set to contraband there due to its special status as British Navy base.
Is it possible to set that up again?
 
@Levis: Finally got around to doing some proper smuggling and noticed this:

upload_2015-1-3_15-27-9.png


I think you wanted to know about that.
 
Also here:

upload_2015-1-3_15-49-8.png


That's the pop-up menu you get when right-clicking on an item in the Loot Interface.
 
And I seem to have found another issue: You cannot unlock the ImproveSmuggling ability.
The only place it is used outside perks_init.c seems to be here in smuggling.c:
Code:
void CreateCoastGuardPatrol()
{
   ref PChar = GetMainCharacter();
   ref sld;

   //LAi_CreateFantomCharacter(0, "soldier_eng", "", "");
   //Levis add smuggling perk -->
   float largegroup_chance = 100.0;
   if(CheckCharacterPerk(Pchar,"ImproveSmuggling"))
   {
     largegroup_chance = largegroup_chance*0.5;
   }
So there are two things missing there:
1. The unlock for the ability
2. The 5% reduction in chance for a coast guard patrol to appear

There is a large chance that if the coast guard finds you they will be in a smaller group then usual. And the chance they find you at all is reduced with 5%.

Edit: Is it also a thought to make the Coast Guard Patrol Schedules show up under Quest Items?
They would be easier to find there, I think.
 
Further finding: Could it be that the Smuggling Questbook entries only work the first time?
I'm now on my third smuggling run on Cuba, but I still have the completed and closed quest book entry from the first time in there.
I think the Questbook entries should be completely deleted upon completing the smuggling run.
Then the next run can put new ones there.

Edit: Additionally, the time that your crew gives you seems to be rounded on the whole hour.
So if it is 23:28, they will say that it is actually 23:00. Does that affect the actual coast guard patrols too?
 
Anyway, apart from the above imperfections, this seems to be working quite well for me. And it's a lot of fun!
Much more interesting than before as far as I'm concerned.
Makes the game world seem a bit more real and gets the player a more involved by properly thinking through each smuggling run.

Should there be a book EVERY time a coast guard patrol catches you?
Because that means smuggling suddenly becomes REAL easy after the first time you've been caught.
It does make sense to have it this way for testing. But should it remain like that for the release version?
 
Just noticed something with Antigua. It is supposed to have ALL goods set to contraband there due to its special status as British Navy base.
Is it possible to set that up again?

Sure, just need to set a special flag for that.
@Levis: Finally got around to doing some proper smuggling and noticed this:

View attachment 19592

I think you wanted to know about that.
This should work ... let me check it and come back to you. You obtained this from a guard right? You didn't do give item 2 player?

And I seem to have found another issue: You cannot unlock the ImproveSmuggling ability.
The only place it is used outside perks_init.c seems to be here in smuggling.c:
Code:
void CreateCoastGuardPatrol()
{
   ref PChar = GetMainCharacter();
   ref sld;

   //LAi_CreateFantomCharacter(0, "soldier_eng", "", "");
   //Levis add smuggling perk -->
   float largegroup_chance = 100.0;
   if(CheckCharacterPerk(Pchar,"ImproveSmuggling"))
   {
     largegroup_chance = largegroup_chance*0.5;
   }
So there are two things missing there:
1. The unlock for the ability
2. The 5% reduction in chance for a coast guard patrol to appear



Edit: Is it also a thought to make the Coast Guard Patrol Schedules show up under Quest Items?
They would be easier to find there, I think.

the 5% chance reduction is in getCoastGuardEncounterChance() in smuggling.c
The unlocking of the ability is set in the init_items for the book, might not be the best way how its set now so I could move the thing to the other function, but I tought it was easier now cause its with the other skillbooks.

Further finding: Could it be that the Smuggling Questbook entries only work the first time?
I'm now on my third smuggling run on Cuba, but I still have the completed and closed quest book entry from the first time in there.
I think the Questbook entries should be completely deleted upon completing the smuggling run.
Then the next run can put new ones there.

Edit: Additionally, the time that your crew gives you seems to be rounded on the whole hour.
So if it is 23:28, they will say that it is actually 23:00. Does that affect the actual coast guard patrols too?

Indeed forgot to remove the quest header, changed in the smuggler agent dialog file now.
And forgot a bracked in the time to text translation. Should be fixed in calender.c

There is a book each time you smuggle yes. But the patrol schedule changes each time the state is changed and you need to fine a new patrol schedule then.
 

Attachments

  • FIRST_FIXES.zip
    6.2 KB · Views: 94
Back
Top