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

Tutorial POTC ships to AOP" COAS

Captain Hawk

Landlubber
Storm Modder
Hello I have uploaded "Packet_Brig_Potc_Coas.7z" to ftp. Captain hawk folder

This is a test port of POTC ship to AOP2 COAS.
First Ship model and walk file.
Add "1" to your POTC ship folder, "Packet_Brig1".
Add "1" to All ship gm files also, "Packet_Brig1.gm".
Ship folder "Packet_Brig1". goes to RESOURCE/MODELS/Ships/.
You must change "Brig_walk" file to aop format sailorspoints file.
I think there is in forum tutorial how to do it, so no problem there I hope.
sailorspoints file named "Packet_Brig1" goes to RESOURCE/MODELS/Ships/ sailorspoints/.
Next textures.
Deck texture "Deck.tga.tx" named as "Dick.tga.tx" goes to RESOURCE/textures/.
Hull texture "Packetbr.tga.tx" goes to RESOURCE/textures/Ships/Packet_Brig1/Hull1, Hull2 and Hull3, folders.
interface ship pic," Packet_Brig.tga.tx "goes to RESOURCE/textures/INTERFACES/SHIPS/.
Next text file changes.

RESOURCE/INI/interfaces/ "pictures" file

[SHIPS_packet_brig]
sTextureName = ships\Packet_Brig.tga
wTextureWidth = 128
wTextureHeight = 128
picture = ship,0,0,128,128
----------------------------------------------------------------------
\RESOURCE\INI\texts\russian\ "common" file

string = Packet_Brig,"Packet Brig"
string = Packet_BrigGen,"Packet Brig"
string = Packet_BrigAcc,"Packet Brig"
string = Packet_BrigDat,"Packet Brig"
------------------------------------------------------------------------------------------
\RESOURCE\INI\texts\russian\ "ShipsDescribe" file

Packet_Brig {
Packet Brig -Post office hired small brigs to transport letters, packets etc.
}
-------------------------------------------------------------------------------------------------------------------------
Program/Ships/ "Ships_init" file

///////////////////////////////////////////////////////////////////////////
/// PacketBrig
///////////////////////////////////////////////////////////////////////////
makeref(refShip,ShipsTypes[SHIP_PACKET_BRIG]);
refShip.Name = "Packet_Brig";
refship.Soundtype = "lugger";
refShip.Class = 6;
refShip.Cannon = CANNON_TYPE_CANNON_LBS12;
refShip.MaxCaliber = 12;
refShip.Weight = Tonnes2CWT(250);
refShip.Capacity = 1000;
refShip.CannonsQuantity = 22;
refShip.rcannon = 9;
refShip.lcannon = 9;
refShip.fcannon = 2;
refShip.bcannon = 2;
refShip.MaxCrew = 250;
refShip.MinCrew = 32;
refShip.BoardingCrew = 80;
refShip.GunnerCrew = 10;
refShip.CannonerCrew = 40;
refShip.SailorCrew = 120;
refShip.SpeedRate = 14.5;
refShip.TurnRate = 45.0;
refShip.Price = 250;
refShip.HP = 2500;
refShip.SP = 100;
//refShip.AbordageLocation = "Boarding Deck_02";
refship.Type.Merchant = false;
refship.Type.War = true;
refShip.fWindAgainstSpeed = 2.0;
refShip.sea_enchantment = 1.8;
refShip.lowpolycrew = 12;
refShip.buildtime = 60;

refship.Rocking.y = 0.5;
refship.Rocking.az = 0.04;

refship.WaterLine = 0.1;
refship.SpeedDependWeight = 0.27;
refship.SubSeaDependWeight = 0.6;
refship.TurnDependWeight = 0.3;
refship.WindAgainstSpeed = 3.3;//boal
refship.CabinType = "Cabin_Medium"; // boal 28.03.05

refship.InertiaAccelerationX = 5.5; refship.InertiaBrakingX = 5.5;
refship.InertiaAccelerationY = 8; refship.InertiaBrakingY = 8;
refship.InertiaAccelerationZ = 6.0; refship.InertiaBrakingZ = 6.0;

refShip.Height.Bombs.Y = 1.0; refShip.Height.Bombs.DY = 1.0;
refShip.Height.Grapes.Y = 2.0; refShip.Height.Grapes.DY = 1.0;
refShip.Height.Knippels.Y = 15.0; refShip.Height.Knippels.DY = 10.0;
refShip.Height.Balls.Y = 1.0; refShip.Height.Balls.DY = 1.0;

refShip.GeraldSails.rey_b2 = 1;
refShip.GeraldSails.rey_b3 = 1;
refShip.GeraldSails.rey_b2.vscale = 0.8;
refShip.GeraldSails.rey_b3.vscale = 0.8;

refship.Track.Enable = true;
refship.Track1.ZStart = 0.20;
refship.Track1.LifeTime = 12;
refship.Track1.Width = "2.0, 3.0";
refship.Track1.Speed = "6.0, 8.0";

refship.Track2.ZStart = -0.15;
refship.Track2.LifeTime = 7.5;
refship.Track2.Width = "4.0, 6.0";
refship.Track2.Speed = "0.15, 0.25";
------------------------------------------------------------------------------------------------------------------------------------
Program/Ships/ "ships.H" file

#define SHIP_PACKET_BRIG 4
-----------------------------------------------------------------------------------------------------------------------------------------
Program/battle_interface/ "battleinterface" file -------- not sure if I have right map ship :shrug

case "Packet_Brig":
BI_intNRetValue[0] = 2+4*8;
BI_intNRetValue[1] = 2+4*8 + 1;
BI_intNRetValue[2] = BI_ICONS_TEXTURE_SHIP1;
break;
------------------------------------------------------------------------------------------------------------------------------------------------
Program/scripts/ "ShipsUtilites" file --------- this makes ship avaiable in shipyard :)

if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_PACKET_BRIG), "ship3");
--------------------------------------------------------------------------------------------------------------------------------------------------------

If you like to test "Packet_Brig" in AOP2 COAS, start new game as holland trader. ship costs about 250 piasters in shipyard. :)
:drunk
 
Last edited by a moderator:
I stickied this thread for you. <img src="style_emoticons/<#EMO_DIR#>/doff.gif" style="vertical-align:middle" emoid=":doff" border="0" alt="doff.gif" />
 
<!--quoteo(post=322326:date=May 24 2009, 04:59 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE (Pieter Boelen @ May 24 2009, 04:59 PM) <a href="index.php?act=findpost&pid=322326"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I stickied this thread for you. <img src="style_emoticons/<#EMO_DIR#>/doff.gif" style="vertical-align:middle" emoid=":doff" border="0" alt="doff.gif" /><!--QuoteEnd--></div><!--QuoteEEnd-->
Thanks <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
I hope someone can help with "ship type name not in user interface" problem <img src="style_emoticons/<#EMO_DIR#>/buds.gif" style="vertical-align:middle" emoid=":drunk" border="0" alt="buds.gif" />
 
<!--quoteo(post=322327:date=May 24 2009, 06:09 PM:name=Captain Hawk)--><div class='quotetop'>QUOTE (Captain Hawk @ May 24 2009, 06:09 PM) <a href="index.php?act=findpost&pid=322327"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec--><!--quoteo(post=322326:date=May 24 2009, 04:59 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE (Pieter Boelen @ May 24 2009, 04:59 PM) <a href="index.php?act=findpost&pid=322326"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I stickied this thread for you. <img src="style_emoticons/<#EMO_DIR#>/doff.gif" style="vertical-align:middle" emoid=":doff" border="0" alt="doff.gif" /><!--QuoteEnd--></div><!--QuoteEEnd-->
Thanks <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
I hope someone can help with "ship type name not in user interface" problem <img src="style_emoticons/<#EMO_DIR#>/buds.gif" style="vertical-align:middle" emoid=":drunk" border="0" alt="buds.gif" />
<!--QuoteEnd--></div><!--QuoteEEnd-->
thx to moo <img src="style_emoticons/<#EMO_DIR#>/bow.gif" style="vertical-align:middle" emoid=":bow" border="0" alt="bow.gif" />
Iput my common.ini in wrong place. right place is "\RESOURCE\INI\texts\russian\" common.ini
 
I greatly appreaciate if anyone can help me out installing the soleil royal 1670 mod into COAS <img src="style_emoticons/<#EMO_DIR#>/bow.gif" style="vertical-align:middle" emoid=":bow" border="0" alt="bow.gif" />
<!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->files i have edited;
ships.h
#define SHIP_TYPES_QUANTITY 31
#define SHIP_TYPES_QUANTITY_WITH_FORT 32
#define SHIP_SOLEIL_ROYAL 31

ships_init
(i create a copy one from the existing soleyru)
///////////////////////////////////////////////////////////////////////////
/// SOLEILROYAL
///////////////////////////////////////////////////////////////////////////
makeref(refShip,ShipsTypes[SHIP_SOLEIL_ROYAL]);
refShip.Name = "Soleilroyal";
refship.Soundtype = "manowar";
refShip.Class = 1;
refShip.Cannon = CANNON_TYPE_CANNON_LBS42;
refShip.MaxCaliber = 42;
refShip.Weight = Tonnes2CWT(4500);
refShip.Capacity = 7000;
refShip.CannonsQuantity = 112;
refShip.rcannon = 52;
refShip.lcannon = 52;
refShip.fcannon = 4;
refShip.bcannon = 4;

RPGUtilite.c
pchar.Ship.Type = GenerateShip(SHIP_SOLEIL_ROYAL , 0);

\Age of Pirates 2\RESOURCE\Textures\INTERFACES\SHIPS
I copied SoleyRu.tga.tx and renamed it Soleilroyal.tga.tx

I put 16 models files into \RESOURCE\MODELS\Ships\Soleilroyal1\

I put the 4 texture file(deck.tga,deco.tga.tgx,Soleilroyal1.tga.tx,unicorn1.tga.tx) into \RESOURCE\MODELS\Ships\Soleilroyal1\ hull1, hull2 and hull3 each.

I put sailorpoint file into \Age of Pirates 2\RESOURCE\MODELS\Ships\SAILORSPOINTS

I edit/add battleinterface.c
case "Soleilroyal":
BI_intNRetValue[0] = 4+4*8;
BI_intNRetValue[1] = 4+4*8 + 1;
BI_intNRetValue[2] = BI_ICONS_TEXTURE_SHIP1;
break;

\Age of Pirates 2\RESOURCE\INI\interfaces\pictures
[SHIPS_Soleilroyal]
sTextureName = ships\manowar.tga
wTextureWidth = 128
wTextureHeight = 128
picture = ship,0,0,128,128

\Age of Pirates 2\RESOURCE\INI\texts\russian\common
string = Soleilroyal,"King's Man-of-war"
string = SoleilroyalGen,"King's Man-of-war"
string = SoleilroyalAcc,"King's Man-of-war"
string = SoleilroyalDat,"King's Man-of-war"<!--QuoteEnd--></div><!--QuoteEEnd-->

The good thing is i am half underwater and can see sharks. the bad thing is i have no ship. And everytime i pressed 1,2,3 the game crashes.
 
Having looked over the data you posted I noticed that your soleilroyal is listed as being ship number 31 and it says you have 31 ships this is wrong very wrong if you have 31 ships soleilroyal should be number 30 the ship count doesnt start at 1 it starts at 0 so in effect number 31 is the fort.
And you are effectively spawning as a fort, its highly likely thats the cause of you spawning underwater since forts dont float. :p

There is another thing, the ships_init.c file is that all you have under the entry for soleilroyal?
If so then it is incomplete.

I hope this is of any help to you.
 
Maybe one of you could advise me on a problem i am having with porting the ships....

As i have mentioned i have just ported the Yacht from PoTC to CoAS, it works fine, the ship sailable, i have attached the "Medium Cabin" to it and it transits between the two fine, all the cannons and smoke effects come from the correct place and so on..

However....
<img src="http://i111.photobucket.com/albums/n139/Fantasia_011/Yacht.png" border="0" class="linked-image" />

Notice nothing is on the left side where my ship list should be, i cannot work out why.. If you right click, it's description shows okay and the custom image of the ship i made is there, but their is no ship name...

Where can i add this?
 
Do you mean the ship "type", eg. "yacht"?
In PotC you had to set refShip.SName for the ship type and if it's an unexisting one, add it to RESOURCE\TEXTS\English\common.ini.
 
Got it, thanks.. It's fully ported now <img src="style_emoticons/<#EMO_DIR#>/happy.gif" style="vertical-align:middle" emoid="^_^" border="0" alt="happy.gif" />
 
Hi all

I can't find any tutorial that explains how to change characters starting ships, i want to give Jack Sparrow the Black Pearl and since the smuggler mod added Jerremy Pitt with a Colonial Schooner i want to give Jerremy that as his starting ship and a few other character's need ship types been altered.

If you can explain how to do this please it will be of great help, i'm playing COAS.
 
Ok here you go ;)

Open the file RPGUtilite.c in PROGRAM/characters and then find this line of code
Code:
pchar.Ship.Type = GenerateShip((SHIP_LUGGER + rand(2) - 1), 0);
change this line to something like:
Code:
pchar.Ship.Type = GenerateShip((SHIP_BLACK_PEARL), 0);
 
Thanks for your reply, however i think that will change the ship for which ever character i choose to start with the same ship doesn't it?

SDorry for not been a little more clear, i don't want to make every character start with the same ship what i want is to give say Jeremy Pit the Colonial Schooner, Jack Sparrow the Black Pearl, so when you choose a character the ship you start with is the ship you would expect them to have, so no need to edit the file every time you start a new game with a different character.
 
Ah... do this then ;)

Code:
if (pchar.model == "Sparrow";) //not sure of model name
{
pchar.Ship.Type = GenerateShip((SHIP_BLACK_PEARL), 0);
}
else
{
pchar.Ship.Type = GenerateShip((SHIP_LUGGER + rand(2) - 1), 0);
}
 
Excellent thanks, i will try that out when i get chance.;)

And i can do that for each of the characters i want to give there own ship types too?
 
If you want more than one do it like this:
Code:
if (pchar.model == "*model1*")
{
ship
}
else
{
if (pchar.model == "*model2*")
{
ship
}
else
{
defaultship
}
}
 
How about:
Code:
switch(pchar.model)
{
case "*model1*": pchar.Ship.Type = "THINGEY"; break;
case "*model2*": pchar.Ship.Type = "THANGEY"; break;
case "*model3*": pchar.Ship.Type = "THUNGEY"; break;
pchar.Ship.Type = "DEFAULT";
}
I prefer switches to nested if-then-else statements; those get confusing if they get complicated. :?
 
How about:
Code:
switch(pchar.model)
{
case "*model1*": pchar.Ship.Type = "THINGEY"; break;
case "*model2*": pchar.Ship.Type = "THANGEY"; break;
case "*model3*": pchar.Ship.Type = "THUNGEY"; break;
pchar.Ship.Type = "DEFAULT";
}
I prefer switches to nested if-then-else statements; those get confusing if they get complicated. :?

Thanks Pietre, but i couldn't get it to work i will try and see if i can get Maggee's way to work in a few minutes, i'm new to editing codes for games, i've done a little editing to other games i have played like FSX and my forum but codes for forums are different to games so that doesn't count.

Anyway if anyone else has tips on how to get either/both of the above to work that will be great

Thanks in advance.
Luke.
 
Hello everyone!

Maybe even someone have seen or read me my "New Story Idea" in the forum .

I would add two / three small questions concerning whether additional vessels.

1. Is there already a good Black Pearl Mod?

2. What should I do to give, for example, "The Black Pearl," to a NPC, so there may be is a quest-ship or you can simply capers in combat.

Cu Jack
 
1. Is there already a good Black Pearl Mod?
There is a Black Pearl in the ship mods I think (it isnt very good though). The Build Mod version is movie accurate and it should be the Pearl you want. I could probably port it over sometime soonish.
2. What should I do to give, for example, "The Black Pearl," to a NPC, so there may be is a quest-ship or you can simply capers in combat.
I will take a look at the code and see if the line is the same as the Build...

Well it isnt but this line should do it:
Code:
characters[GetCharacterIndex("*ID*")].Ship.Type = GenerateShip((SHIP_BLACK_PEARL,0);
Of course you need the Black Pearl for that line to work ;)
 
I have a problem, where can i find the walk files in POTC for the ships? and the second question is how do i convert them so they will work as sailorspoints files in COAS?

Ok after searching i have found the walk files now all i need to do is work out how to convert them, can anyone help me there please?
 
Back
Top