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

Switching Captain's Cabins?

Brenda

Landlubber
One of the coolest features of the Builds is the ability to go in the Captain's Cabin and love all the different ones. Of course, I have my favorites which is why this thread. Now that I have Build13 Update3, before I start a new game, I was wondering if one of the wonderful modders here could help me switch the different cabins around?

If it is not too hard, I would like to put the one with the "head" in the frigate with red on black and I would like to put the one taken from Age of Pirates* in one of the 1st or 2nd rate ships. (*The cabin where the stern windows look out to a small deck and there is a globe in the starboard corner near the desk.)

Thanks All!! <img src="style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" />
 
Hi.

First I must tell that cabin for the ship is taken by going from refShip.AbordageLocation in PROGRAM\Ships\Ships_init.c for a given ship until reaching final deck (which usually is one of the cabins). For example, for the ship <i>frigate3</i> (which is red-black frigate you mentioned, I think), that line is as follows:

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->refShip.AbordageLocation = "BOARDING_CORVETTE";<!--c2--></div><!--ec2-->

Now, if you check location with id of "BOARDING_CORVETE" in PROGRAM\Locations\init\boarding.c, you should notice that the last line, defining which deck to go after that one when boarding, looks like this:

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->Locations[n].boarding.nextdeck = "NEXT1_CORVETTE";<!--c2--></div><!--ec2-->

The deck "NEXT1_CORVETTE" will have reference to "NEXT2_CORVETTE", and that one will lead to "Boarding_Cabin2". If we change that reference from "NEXT2_CORVETTE" from

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->Locations[n].boarding.nextdeck = "Boarding_Cabin2";<!--c2--></div><!--ec2-->

to, for example:

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->Locations[n].boarding.nextdeck = "Boarding_Cabin3";<!--c2--></div><!--ec2-->

This way we would change final cabin for all ships with "BOARDING_CORVETTE" set as AbordageLocation. However, that's not a case, as we want only to change cabin for that particular ship.

I propose to do following:
1. In file PROGRAM\Ships\Ships_init.c find part of code with definition of frigate3 (I skiped less important parts of code using [...] symbol):

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->//-------------------------------------------------------------------------
// Frigate PIRATE from A&M
//-------------------------------------------------------------------------
    // PS -->
    makeref(refShip,ShipsTypes[n]);
    n++;
    // PS <-- makeref(refShip,ShipsTypes[SHIP_FRIGATE_PIRATE+21]);
    refShip.Name            = "Frigate3";
    refShip.All                = "Frigate2"; // PS
    //PRS3 - refShip.Nation            = PIRATE;
    refShip.id                = refShip.Name;
    [...]
    refShip.AbordageLocation = "BOARDING_CORVETTE";
    [...]<!--c2--></div><!--ec2-->

Then, change that bold line to following:

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->refShip.AbordageLocation = "BOARDING_FRIGATE3";<!--c2--></div><!--ec2-->

2. Add following code to file PROGRAM\Locations\init\boarding.c, for example, after lines

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->    // -------------------------------------------------
    // -------------------------------------------------
    // ------------------------------------------2 class<!--c2--></div><!--ec2-->

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->    //ID
    Locations[n].id = "BOARDING_FRIGATE3";
    locations[n].id.label = "Boarding deck";
    //Info
    Locations[n].filespath.models = "locations\decks\udeck2";
    Locations[n].image = "Boarding.tga";
    //Sound
    locations[n].type = "deck";
    Locations[n].lockCamAngle = 0.4;

    //Models
    //Always
    Locations[n].models.always.locators = "udeck_l";
    Locations[n].models.always.l1 = "udeck";
    //Day
    Locations[n].models.day.charactersPatch = "udeck_p";
    //Night
    Locations[n].models.night.charactersPatch = "udeck_p";
    //Environment
    Locations[n].environment.weather = "true";
    Locations[n].environment.sea = "true";
    Locations[n].boarding = "true";
    Locations[n].boarding.nextdeck = "NEXT1_FRIGATE3";
    
    n = n + 1;

    //ID
    Locations[n].id = "NEXT1_FRIGATE3";
    Locations[n].id.label = "Boarding deck";
    //Info
    Locations[n].filespath.models = "locations\decks\deck1";
    Locations[n].image = "Deck_01.tga";
    //Sound
    Locations[n].type = "deck";

    //Models
    //Always
    Locations[n].models.always.locators = "deck1_l";
    Locations[n].models.always.l1 = "deck1";
    //Day
    Locations[n].models.day.charactersPatch = "deck1_p";
    Locations[n].models.day.fonar = "deck1_fd";
    //Night
    Locations[n].models.night.charactersPatch = "deck1_p";
    Locations[n].models.night.fonar = "deck1_fn";
    //Environment
    Locations[n].environment.weather = "true";
    Locations[n].environment.sea = "true";
    Locations[n].boarding = "true";
    Locations[n].boarding.nextdeck = "NEXT2_FRIGATE3";
    
    n = n + 1;
    
    //ID
    Locations[n].id = "NEXT2_FRIGATE3";
    Locations[n].id.label = "Boarding deck";
    //Info
    Locations[n].filespath.models = "locations\decks\deck2";
    Locations[n].image = "Deck_02.tga";
    //Sound
    Locations[n].type = "deck";

    //Models
    //Always
    Locations[n].models.always.locators = "deck2_l";
    Locations[n].models.always.l1 = "deck2";
    //Day
    Locations[n].models.day.charactersPatch = "deck2_p";
    Locations[n].models.day.fonar = "deck2_fd";
    //Night
    Locations[n].models.night.charactersPatch = "deck2_p";
    Locations[n].models.night.fonar = "deck2_fn";
    //Environment
    Locations[n].environment.weather = "true";
    Locations[n].environment.sea = "true";
    Locations[n].boarding = "true";
    Locations[n].boarding.nextdeck = "<cabin_id>";
    
    n = n + 1;<!--c2--></div><!--ec2-->

where <cabin_id> should be replaced with one of following: Boarding_Cabin_small, Boarding_Cabin_medium, Boarding_Cabin1 or Boarding_Cabin3 (I'm sorry, I didn't understand which cabin is with "head". Boarding_Cabin_small is, as name implies, small one with two cannons on stern, Boarding_Cabin_medium is that with desk in corridor and fleut model on desk serving as weaponslocker, Boarding_Cabin1 is stock PotC where Malcolm talks with main character at the start of the game, and Boarding_Cabin3 is second cabin "borrowed" from AoP (the current setting, Boarding_Cabin2, is also cabin from AoP).

3. Reintialize or (better) start a new game and check if that works. If not, leave here a note and I'll make necessary changes for you (I'm sorry I didn't do that now, but I don't have your version of PotC).

I hope this helps.

pirate_kk
 
Thanks Pirate_KK, this looks like exactly what I wanted. Give me a couple days to try it, then I will report back to let you know how it went. Of course, if I have problems, I will be back sooner.

I'm sorry, "head" is the nautical term for bathroom, so the one I was referring to is Cabin_ medium and the other one would be Cabin_3. And yes, Frigate3 is the one with Red on Black, but I have not decided yet which 1st or 2nd rate ship I want to modify. Kind of leaning toward the Warship, but I have not seen them all.
 
Back
Top