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

How To Find Starting Ship generate?

Luke159

Buccaneer
Storm Modder
I want to edit the different ships generated for a starting character, i know how to change the starting ship via the charatcter file but i want to edit the types of ships generated so that it includes some of the new ships like the Ketch, Cutter etc. Since you can edit which ships are generated at the shipyard and at what ranks they will be generated i expect this can be done for the starting ship aswell, any idea's on where to find the file or a good place to look?
 
You can look into "merchantonmap.c" Luke, that's where it's edited i believe. :onya

Thanks i will look into that and see if i can get a few more ships to be generated for player's starting a new game rather than the typical Lugger etc. :onya
 
I want to edit the different ships generated for a starting character, i know how to change the starting ship via the charatcter file but i want to edit the types of ships generated so that it includes some of the new ships like the Ketch, Cutter etc. Since you can edit which ships are generated at the shipyard and at what ranks they will be generated i expect this can be done for the starting ship aswell, any idea's on where to find the file or a good place to look?

Hi Luke,

it's all in \Program\characters\RPGUtilite.c under initNewMainCharacter()

the vanilla code:
Code:
        pchar.Ship.Type = GenerateShip((SHIP_LUGGER + rand(2) - 1), 0);
if you edit this single line in:
Code:
switch (ch.HeroParam.HeroType)
{
case "Merchant":
pchar.Ship.Type = GenerateShip((SHIP_EDINBURG), 0);
break;

case "Corsair":
pchar.Ship.Type = GenerateShip((SHIP_BOUNTY), 0);
break;

case "Adventurer":
pchar.Ship.Type = GenerateShip((SHIP_SCHOONER), 0);
break;
}
you get the "english bark" as the ship for Merchanttype playercharacters and so on...

To become a more randomized ship at player start you can edit the vanilla code in:
Code:
        pchar.Ship.Type = GenerateShip((SHIP_LUGGER + rand(14) - 1), 0);
so you will get a random ship, starting with the Lugger up to a Brigantine.
Therefore your new ported ships must be integrated in \Program\Ships\ships.h and Ships_init.c in ascending order to the other ships.

As an example your ported cutter can be inserted in ships.h at index 6 maybe. And all following ships have to be incremented.

cu NW
 
See how simple it is when you know how. Thanks Nightwatcher that has helped out alot i was ready to do what this smiley is doing. :modding I will make the ship generated for the characters to be random by editing this code.

Code:
pchar.Ship.Type = GenerateShip((SHIP_LUGGER + rand(2) - 1), 0);

Thanks again Nightwatcher. :onya
 
Back
Top