• 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 Stormy Start Does Not Use Correct Contraband Goods

Pieter Boelen

Navigation Officer
Administrator
Storm Modder
Hearts of Oak Donator
When I was looking into making the changes for Planned Feature - Change Evil Stormy Start into Free Play Opening Scenario Choice | PiratesAhoy! , I noticed that all the contraband goods you get for a Stormy Start were hardcoded.
Which means that the goods you got may not be contraband any longer.

So I rewrote the attached file to replace stuff like this (extract to PROGRAM\Storyline\standard\quests to use):
Code:
       switch(rand(STORMY_START_CHOICES) )   // ccc mar 06  New islands
       {
         case 0:
           DoQuestReloadToLocation("Douwesen_shore_01", "reload", "reload1" ,"_");  
           PlaceFleetNearShore("Douwesen_shore_01"); // KK
           if (GetDifficulty() == DIFFICULTY_SWASHBUCKLER)
             AddCharacterGoods(PChar, GOOD_LINEN, makeint(2));   // contraband
           else
             AddCharacterGoods(PChar, GOOD_LINEN, makeint(20 + rand(20)));   // contraband
         break;
With this:
Code:
       switch(rand(STORMY_START_CHOICES) )   // ccc mar 06  New islands
       {
         case 0:
           loadPort = "Douwesen_shore_01";
           loadTown = "Douwesen_shore_01";
           rldLocator = "reload1";
         break;
And then AFTER the switch statement, we can do:
Code:
       i = getRandomContrabandGood(GetIslandByID(FindIslandByLocation(loadTown)));
       if (i > 0) AddCharacterGoods(PChar, i, (2.0+rand(2))/10.0 * GetCharacterFreeSpace(PChar, i) ); // PB&Levis: Between 20%-40% contraband
       DoQuestReloadToLocation(loadTown, "reload", rldLocator, "_");  
       PlaceFleetNearShore(loadPort); // KK

As far as I can tell, this works. BUT I'd like to know if this is actually a good idea or if there is anything I am not considering here. :facepalm
 

Attachments

  • both_reaction.zip
    17 KB · Views: 161
Looks fine to me. I don't see a reason why this couldn't be done
 
I always play stormy start and in the past I got contraband on some islands an not on others. Most recently playing the 1/18 version I wound up on Jamica with coffee.
 
I always play stormy start and in the past I got contraband on some islands an not on others.
Do you mean that you ALWAYS got goods, but it wasn't always contraband on that island?
Or did you sometimes not get goods at all?

The original intention was that you should always get contraband.
But what good you got was hardcoded per island. Then "what is contraband" changed.
So then the goods you got may or may not have been contraband.
Now I rewrote the code so now the goods you get should ALWAYS be contraband for the island where you arrive.

That is how it was originally intended to work.
Whether we still want it to work that way is a different question though.
So if you don't like getting contraband, now would be a good time to mention that. ;)
 
This has been in the mod for three weeks now.
Who has been playing Stormy Start? Any concerns regarding the contraband that you get?
 
Back
Top