1. Dismiss Notice
  2. GOG.com logo

    Thanks to YOUR votes, GOG.com now sells:
    - Sea Dogs - Sea Dogs: Caribbean Tales
    - Sea Dogs: City of Abandoned Ships

    Vote now to add Pirates of the Caribbean to the list!

    Dismiss Notice
  3. Under the Crossbones Podcast

    A Pirate Podcast with Interviews
    Music, Comedy and all things Pirate!

    - Episode Guide - About - Subscribe -
    - Twitter - Facebook - iTunes - Android -
    - Youtube - Fill the Coffers -

    Dismiss Notice
  4. New Horizons logo

    Quick links for PotC: New Horizons
    - Download latest version
    - Wiki - FAQ - Report bugs here
    - ModDB profile

  5. GOF logo

    Quick links for AoP2: Gentlemen of Fortune 2
    - Downloads and info
    - Historical Immersion Supermod
    - ModDB Profile

Dismiss Notice
New to the forum?
Please take a moment to read our Welcome Message and Forum Rules.

Certain types of ships not available at shipyard

Discussion in 'City of Abandoned Ships Gameplay & Tips' started by BuriBuriZaemon, Mar 4, 2010.

  1. BuriBuriZaemon

    BuriBuriZaemon Landlubber

    Joined:
    Mar 1, 2010
    Messages:
    4
    I noticed certain types of ships are not available for purchase at shipyards, such as brigantine and barquentine. I am at Rank 12 or 14 and I know this is not because my rank is not high enough (that applies to Class 3 ships upward) because I have seen a lot of other Class 4 ships, such as Brig and Caravel. Will they eventually appear at shipyards or do I have to capture them?
     
  2. Luke159

    Luke159 Buccaneer Storm Modder

    Joined:
    May 27, 2009
    Messages:
    2,950
    Gender:
    Male
    Location:
    Somewhere in the caribbean
    I would say you are playing without mods, if this is true then the answer to your question is very simple. You will never see either of those ships generated in shipyards because they are not set to be generated, so yes the only way would be to capture one at sea however there are way's to make the shipyard generate such ships which requires some minor editing to ShipsUtilites.C located in Age of Pirates 2\Program\scripts. Bellow is the file which effects ships been genertated at shipyards and at what rank they are generated.

    Code:
    void SetShipyardStore(ref NPChar)
    {
    int    iTest_ship, i;
    string attrName;
    
    if (CheckAttribute(NPChar, "shipyard")) return; // åùå åñòü êîðàáëè ñ òîãî ðàçà
    
    SaveCurrentNpcQuestDateParam(npchar, "shipyardDate"); // äàòà çàïîëíåíèÿ âåðôè
    
    if (bBettaTestMode)
    {
    for (i = 1; i <=SHIP_TYPES_QUANTITY; i++)
    {
    attrName = "ship" + i;
    FillShipParamShipyard(NPChar, GenerateStoreShip(i-1), attrName);
    }
    
    return;
    }
    
    FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_TARTANE), "ship1");
    
    iTest_ship = rand(2);
    if (iTest_ship == 1)
    {
    FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_WAR_TARTANE), "ship2");
    }
    if (iTest_ship == 2)
    {
    FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_LUGGER), "ship2");
    }
    
    iTest_ship = rand(2);
    if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_LUGGER), "ship3");
    if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SLOOP), "ship3");
    
    iTest_ship = rand(3);
    if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SLOOP), "ship4");
    if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_LUGGER), "ship4");
    
    if (sti(PChar.rank) > 1)
    {
    iTest_ship = rand(4);
    if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SCHOONER), "ship5");
    if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BARQUE), "ship5");
    
    iTest_ship = rand(4);
    if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SCHOONER), "ship6");
    if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BARQUE), "ship6");
    }
    if (sti(PChar.rank) > 3)
    {
    iTest_ship = rand(6);
    if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_CARAVEL), "ship8");
    if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_CARAVEL), "ship8");
    
    iTest_ship = rand(6);
    if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_FLEUT), "ship9");
    if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_CARAVEL), "ship9");
    
    iTest_ship = rand(6);
    if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_FLEUT), "ship10");
    if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_CARAVEL), "ship10");
    }
    if (sti(PChar.rank) > 5)
    {
    iTest_ship = rand(8);
    if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BRIG), "ship11");
    if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_FLEUT), "ship11");
    
    iTest_ship = rand(8);
    if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BRIG), "ship12");
    if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_GALEON_L), "ship12");
    
    iTest_ship = rand(8);
    if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BRIG), "ship13");
    if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_GALEON_L), "ship13");
    }
    if (sti(PChar.rank) > 8)
    {
    iTest_ship = rand(50);
    if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_GALEON_L), "ship14");
    if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_CORVETTE), "ship14");
    
    iTest_ship = rand(70);
    if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_GALEON_H), "ship15");
    if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_PINNACE), "ship15");
    }
    
    if (sti(PChar.rank) > 12)
    {
    iTest_ship = rand(50);
    if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_FRIGATE), "ship141");
    if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_CORVETTE), "ship141");
    
    iTest_ship = rand(70);
    if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_FRIGATE), "ship151");
    if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_PINNACE), "ship151");
    if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_GALEON_H), "ship151");
    }
    
    if (sti(PChar.rank) > 18)
    {
    iTest_ship = rand(120);
    if (iTest_ship == 1)   FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_LINESHIP), "ship16");
    if (iTest_ship == 2)   FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_WARSHIP), "ship16");
    if (iTest_ship == 3)   FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BATTLESHIP), "ship16");
    
    iTest_ship = rand(120);
    if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_LINESHIP), "ship17");
    if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_WARSHIP), "ship17");
    if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BATTLESHIP), "ship17");
    }
    }
    
    void FreeShipFromShipyard(ref NPChar)
    Take this line of code, you can copy one of the above codes for this or one from the file its self.
    Code:
    if (iTest_ship == XX) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_XXX), "shipXX");
    Now we add the line of code for the ship, you can get this information from both Ships_init and ships.H located in Age of Pirates 2\Program\Ships, you will only need to look at one file and its easier to look at the Ships_init file because it tells you what ship it is. Ok so scroll down till you see the first ship ie, Barkentine and you will see this line of code.
    Code:
    SHIP_BARKENTINE
    We require that line of code for each ship we want to add to the ShipsUtilites.C file. So copy the name and now add the name to the area where its looks like (iTest_ship == XX) so now the full code would look like.
    Code:
    if (iTest_ship == XX) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BARKENTINE), "shipXX");
    now its time to add this to the ShipsUtilites.C file, take note this ship is a class 4 ship so ideally you would want the shipyards to be generating this ship at about the same point or just before other class 4 start to be generated at the shipyard, as you can see from looking at the full list of ships to be generated at shipards, that the first class 4 ship to be generated is the Fluet at rand AKA rank 6 upwards. So you can add your code to this area, see bellow.
    Code:
    if (iTest_ship == XX) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BARKENTINE), "shipXX");
    Before this ship is added we need to change two things, where the XX are is what needs fixing. The first XX is how many ships are in that rand, so each ship in the rand will follow in order of 1, 2, 3, 4, etc. so if adding to rand 6 the ship would be, if (iTest_ship == 3) the other XX at the other end is the ships rand code i guess, the code is the same for ever ship in that rand. So in short all ships in rand 6 have the following value as its codeline, "ship9"); so the end of our line of code for the new ship would be as follows, "ship9"); this means the whole code would look like this.

    Code:
    if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BARKENTINE), "ship9");
    You can add ships to as many rands as you like, but you can only add them to each rand once. The more often that ship is added the larger the chance for that ship to be generated, edits to this file should not require a new game to be started. When adding new ships follow the above advice its quick to pick up once you have added a ship to a few rands or added a few ships to the ShipUtilities.C file. Then my advice would no longer be required. little mistakes made like the ships line of code ie, shipXX could course your game not to geberate that ship at what ever rank the error was made so pay close attention to the XX parts and make sure they are correctly, you would be amazed at how easy it is to over look such small things.

    Hope this all helps and the best of luck. :onya
     
  3. BuriBuriZaemon

    BuriBuriZaemon Landlubber

    Joined:
    Mar 1, 2010
    Messages:
    4
    Thanks, Luke. Your post is very useful and it sure did take some efforts to put up together, much appreciated. And yes, I'm playing without any mod.
     
  4. Luke159

    Luke159 Buccaneer Storm Modder

    Joined:
    May 27, 2009
    Messages:
    2,950
    Gender:
    Male
    Location:
    Somewhere in the caribbean
    No problem bud, happy i could help. :onya

    Oh if your nor playing the Peter Blood story line then you will never see the ship "Arabella" at shipyards or at sea, you can add that ship using the above methode, in ship_init file look towards the bottom of the file, you will see the fort, flying dutchman the first 6 ships above the fort are the ships you get from quests and all but the Arabella are available for all characters. Adding the Arabella will allow you to buy and sail the ship, although the name will not show as Arabella because thats the name it uses for the Peter Blood storyline the ships new name will be Frigate, its a 52 gun ship and is very much worth every piaster. Enter the following line of code changing the first and second set of "XX" for the required value's for which ever rand you add the ship to etc.

    Code:
    if (iTest_ship == XX) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_ARABELLA), "shipXX");
    Now once added to the shiputilities.C file you will see the Arabella AKA Frigate in shipyards and at sea.

    If you like seeing many ships we are in the process of making a new mod which i highly recomend you wait for but it will add many many new ships to your game, fix some broken quests, add new weapons, new characters etc. The new mod COAS Combined Mod Version 3 or CMV3 for short is in testing at the moment and you can read all about it HERE the is CMV2 which will add almost all the ships and characters but i would strongly suggest waiting for CMV3 it'll be worth the wait. And once installed it would require a new game, which is worth it.
     
  5. BuriBuriZaemon

    BuriBuriZaemon Landlubber

    Joined:
    Mar 1, 2010
    Messages:
    4
    Thanks again, Luke. Fortunately, I'm playing as Peter Blood so I do have my "Arabella" docked somewhere in Port Royal. Haven't got the time to play the game yet, but I will eagerly wait for CMV3. :onya
     
  6. Luke159

    Luke159 Buccaneer Storm Modder

    Joined:
    May 27, 2009
    Messages:
    2,950
    Gender:
    Male
    Location:
    Somewhere in the caribbean
    No problem bud. :onya

    Good to here you already have the Arabella, one of my favourite ships. :yes

    We look forward to reading about your thourghts on CMV3 when its released. :onya
     
  7. goja

    goja Landlubber

    Joined:
    May 27, 2015
    Messages:
    4
    Gender:
    Male
    at which point during the storyline do you get the arabella?
     
  8. Hylie Pistof

    Hylie Pistof Curmudgeon Staff Member QA Tester Storm Modder

    Joined:
    Jan 15, 2010
    Messages:
    13,768
    Gender:
    Male
    Nice necropost. Why resurrect a 5 year old thread?
     
  9. TheBlackKnight

    TheBlackKnight Corsaire Flibustier Storm Modder

    Joined:
    Dec 2, 2013
    Messages:
    339
    Gender:
    Male
    Occupation:
    Professional Engineer Retired Army Officer
    Location:
    Libertatia
    You do not unless you play the Peter Blood introductory quest.
    The Arabella is a unique ship ONLY available under that set of starting conditions, unless it was modded into your copy of the game.
     
  10. Alex Hayes

    Alex Hayes Landlubber

    Joined:
    Jun 15, 2017
    Messages:
    1
    Gender:
    Male
    Occupation:
    Lonely captain
    Location:
    Brazil
    Hello everyone. I wanted to have a question about the mod (historical immersion) of Age of Pirates Caribbean tales. It's about the ships at the shipyard: because after the fully developed colony I can not build ships like the ship of line and the flying Dutchman who was added to the game after the mod. Do I need to catch them at sea?
     
    Last edited: Jun 15, 2017
  11. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,628
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Then this is technically the wrong subforum.

    That mod was made by @Modder01; he isn't around very often, so you may want to send him a PM instead.
     

Share This Page