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

ADD Ships and Cannons to AoP 2

GHOSTMD

Powder Monkey
Storm Modder
<img src="style_emoticons/<#EMO_DIR#>/hi.gif" style="vertical-align:middle" emoid=":gday" border="0" alt="hi.gif" />

Hello there <img src="style_emoticons/<#EMO_DIR#>/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" />

I was searching in the open program folder and looked at different files.....
What i want is: has anyone a clue HOW to Add new ships and cannons to AoP 2???

I will try the old AoP 1 tutorial to put my own frigate into the game.
specially the with "refshipcanencounter" command..... so that the AI can not used my own frigate.

but i have searched trough the ship files.... for example on the entrys for the flyingdutchman and
i have not seen such a commandline so i don 't know if it work....

If i have success with the old tutorial i will post it.....
i also try to add a new cannontype to AoP 2 .... hope i get it work into the game so that i can
tell you HOW.....

but if anyone have an advice or an example it would help me

THX
 
Ok. <img src="style_emoticons/<#EMO_DIR#>/yes.gif" style="vertical-align:middle" emoid=":yes" border="0" alt="yes.gif" />
 
<!--quoteo(post=323524:date=May 29 2009, 05:22 PM:name=GHOSTMD)--><div class='quotetop'>QUOTE (GHOSTMD @ May 29 2009, 05:22 PM) <a href="index.php?act=findpost&pid=323524"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec--><img src="style_emoticons/<#EMO_DIR#>/hi.gif" style="vertical-align:middle" emoid=":gday" border="0" alt="hi.gif" />

What i want is: has anyone a clue HOW to Add new ships and cannons to AoP 2???

THX<!--QuoteEnd--></div><!--QuoteEEnd-->


Hello, I have. My ship is from Arabella, called "Vette" in new files:

In ship_init:

makeref(refShip,ShipsTypes[SHIP_VETTE]);
refShip.Name = "Vette";
refship.Soundtype = "manowar";
refShip.Class = 7;
refShip.Cannon = CANNON_TYPE_CANNON_LBS92;
refShip.MaxCaliber = 92;
refShip.Weight = Tonnes2CWT(600);
refShip.Capacity = 8250;
refShip.CannonsQuantity = 62;//= 52;
refShip.rcannon = 25;//= 22;
refShip.lcannon = 25;//= 22;
refShip.fcannon = 6;//= 4;
refShip.bcannon = 6;//= 4;
refShip.MaxCrew = 800;
refShip.MinCrew = 120;
refShip.BoardingCrew = 440;
refShip.GunnerCrew = 100;
refShip.CannonerCrew = 128;
refShip.SailorCrew = 800;
refShip.SpeedRate = 45.1;//= 30.2;
refShip.TurnRate = 55.0;
refShip.Price = 80000;
refShip.HP = 3450;
refShip.SP = 100;
//refShip.AbordageLocation = "Boarding Deck_01";
refship.Type.Merchant = false;
refship.Type.War = true;
refShip.fWindAgainstSpeed = 2.2;
refShip.sea_enchantment = 1.5;
refShip.lowpolycrew = 16;
refShip.buildtime = 80;

refship.Rocking.y = 0.8;
refship.Rocking.az = 0.025;

refship.WaterLine = -0.4;
refship.SpeedDependWeight = 0.3;
refship.SubSeaDependWeight = 0.7;
refship.TurnDependWeight = 0.35;
refship.WindAgainstSpeed = 4.8;//boal
refship.CabinType = "Cabin_Medium"; // boal 28.03.05

refship.InertiaAccelerationX = 8.0; refship.InertiaBrakingX = 8.0;
refship.InertiaAccelerationY = 6; refship.InertiaBrakingY = 6;
refship.InertiaAccelerationZ = 6.0; refship.InertiaBrakingZ = 6.0;

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

refship.Track.Enable = true;
refship.Track1.ZStart = 0.17;
refship.Track1.LifeTime = 12.5;
refship.Track1.Width = "4.0, 5.0";
refship.Track1.Speed = "6.0, 8.0";

refship.Track2.ZStart = -0.15;
refship.Track2.LifeTime = 6.5;
refship.Track2.Width = "5.0, 7.0";
refship.Track2.Speed = "0.15, 0.25";

In ship.h

#define SHIP_TYPES_QUANTITY 29//28<=Philippe

#define SHIP_TYPES_QUANTITY_WITH_FORT 31//30 // must be (SHIP_TYPES_QUANTITY + 1)

#define SHIP_FLYINGDUTCHMAN 26
#define SHIP_VETTE 27
//
#define SHIP_BOAT 28//27
#define SHIP_FORT 29//28


In Battleinterface.c

case "Vette"://Philippe
BI_intNRetValue[0] = 4+3*8; <== must be same values as model ship you choose
BI_intNRetValue[1] = 4+3*8 + 1;
BI_intNRetValue[2] = BI_ICONS_TEXTURE_SHIP1;
break;

And then in RESOURCE\MODELS\Ships créate "Vette1" folder, rename *.gm Vette1,
and in RESOURCE\Textures\Ships créate "Vette1" folder and put your texture.tga in.


//////// For cannons (I unlocked Lbs92 for my ship):

In cannons.c add these lines:

case 92://Philippe
return CANNON_TYPE_CANNON_LBS92;
break;

In cannons.h

#define CANNON_TYPES_QUANTITY 11//10<=Philippe

#define CANNON_TYPE_CANNON_LBS92 10

case CANNON_TYPE_CANNON_LBS92:
return 92;
break;

In cannons_init

makeref(rCannon,Cannon[CANNON_TYPE_CANNON_LBS92]);
rCannon.type = CANNON_NAME_CANNON;
rCannon.caliber = 92;
rCannon.name = "caliber92";
rCannon.picture = "cannons8";
rCannon.Sound = "fort_cannon_fire";
rCannon.ReloadTime = 20;
rCannon.Cost = 2000;
rCannon.Weight = 50;
rCannon.FireAngMax = 0.80;
rCannon.FireAngMin = -0.35;
rCannon.DamageMultiply = 40.0;
rCannon.TimeSpeedMultiply = 0.8;
rCannon.BigBall = 0;
rCannon.SizeMultiply = 5.0;
rCannon.HeightMultiply = 1.0;
rCannon.TradeOff = true;
rCannon.hp = 80.0;
InitBaseCannons_CalcSpeedV0(&rCannon,1650.0);

In initgoods.c (you can buy them)

Goods[GOOD_CANNON_92].Name = "Cannon_92";//Philippe
Goods[GOOD_CANNON_92].CannonIdx = CANNON_TYPE_CANNON_LBS92;
Goods[GOOD_CANNON_92].Cost = Cannon[CANNON_TYPE_CANNON_LBS92].Cost;
Goods[GOOD_CANNON_92].Weight = Cannon[CANNON_TYPE_CANNON_LBS92].Weight;
Goods[GOOD_CANNON_92].Units = 1;
Goods[GOOD_CANNON_92].AfraidWater = 0;
Goods[GOOD_CANNON_92].type = TRADE_TYPE_CANNONS;
Goods[GOOD_CANNON_92].canbecontraband = 0;
Goods[GOOD_CANNON_92].FireRange = Cannon[CANNON_TYPE_CANNON_LBS92].FireRange;
Goods[GOOD_CANNON_92].DamageMultiply=Cannon[CANNON_TYPE_CANNON_LBS92].DamageMult
iply;
Goods[GOOD_CANNON_92].ReloadTime=sti(GetCannonReloadTime(Cannon[CANNON_TYPE_CANN
ON_LBS92]));


In ispyglass

case CANNON_TYPE_CANNON_LBS92:
CannonTypeName = " " + xiDStr("CannonTypeName_92");
break;

In ShipsUtilite.c (after (case 42:
iCaliber = 4;
break;)) add/modify

case 92:
iCaliber = 5;
break;
}
iCaliber = iCaliber + rand(2) - 1;
if (iCaliber < 0) iCaliber = 0;
if (rRealShip.BaseName == "Manowar")
{
if (iCaliber > 5) iCaliber = 5;
}
else
{
if (iCaliber > 3) iCaliber = 3;
}
//Philippe=>
if (rRealShip.BaseName == "Vette")
{
if (iCaliber > 5) iCaliber = 5;
}
//<=
switch(iCaliber)
{
case 0:
iCaliber = 12;
break;
case 1:
iCaliber = 16;
break;
case 2:
iCaliber = 24;
break;
case 3:
iCaliber = 32;
break;
case 4:
iCaliber = 42;
break;
case 5:
iCaliber = 92;
break;

I hope I didn't forget some lines.... <img src="style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" />
 
Really useful, thanks so much. I have had a few problems though. One is that the ship picture doesn't show up, so when you press F2 and go to ships there's no picture. Also theres no name for the ship, and the type doesn't come up, IE: Lineship, or Tartane etc. And the ship has no texture, when i set sail etc it's just grey.

Moddings hard <img src="style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" />
 
Ship pictures are set in Resource\ini\interfaces\pictures.ini

I've read somewhere that some of the ship settings won't appear correctly until you have also added them to the ship files in the \program\net directories.

The textures for ships work just like they do for AoP. There need to be three textures for each ship in a directory called \%shipname%\hull1, \hull2 and \hull3

Hope this all helps out some!

Cap'n Drow
 
<img src="style_emoticons/<#EMO_DIR#>/hi.gif" style="vertical-align:middle" emoid=":gday" border="0" alt="hi.gif" />

allright this will help me out for sure.
It seems pretty similar to AoP 1 THX a lot!!!

but what is with that commandline that you would have an UNIQUE ship
refshipcanencounter = false <<<< this line???
will this work in AoP 2??? or not??? that is the question lol
 
That should work, I know for a fact there are at least 4 unique ships you can encounter in Stock AoP2, those being the Arabella AKA Cinco Llagos, the Blue Bird, the Corvette you get from City of Abandoned Ships and the Flying Dutchman. I know for sure that each of those can ONLY be obtained when you get them in the story line.

So if you pay attention to the settings for those ships in the files, you should be able to set up custom one-off ships.

Cap'n Drow
 
Hello Cap'n_Drow

that is exactly the point!
i have searched trough the entrys from the flying dutchman and haven 't found a line
that say refshipcanencounter = false ..... therefore i ask for that commandline if they would
work if i write it in my own frigate entry... you know... i will just try out this feature.....

maybe in AoP 2 there is another file who will work for unique ships...

well i will see... i have to do some changes at first on the original frigate model <img src="style_emoticons/<#EMO_DIR#>/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" />


so long
 
<!--quoteo(post=323664:date=May 30 2009, 09:33 AM:name=philippe)--><div class='quotetop'>QUOTE (philippe @ May 30 2009, 09:33 AM) <a href="index.php?act=findpost&pid=323664"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I hope I didn't forget some lines.... <img src="style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" /><!--QuoteEnd--></div><!--QuoteEEnd-->


I did. <img src="style_emoticons/<#EMO_DIR#>/laugh.gif" style="vertical-align:middle" emoid="xD:" border="0" alt="laugh.gif" />
 
textures do work a tad different it seems the game looks for some textures in different places for older mods

got the black pearl with black masts and sails trying to sort out the potc dutchman some textures are not loading properly for it atm.

<a href="http://s139.photobucket.com/albums/q288/cerebus23/?action=view&current=Corsairs3_0012.jpg" target="_blank">http://s139.photobucket.com/albums/q288/ce...sairs3_0012.jpg</a>

if you want to see the pearl with black masts.
 
Big pictures for ships window here.
\RESOURCE\Textures\INTERFACES\SHIPS

Also check common.ini(\RESOURCE\INI\texts\russian\) to display ship type at ships window.

btw, those method works for current game?
seems only for new game to me <img src="style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" />
 
<!--quoteo(post=324719:date=Jun 3 2009, 09:20 AM:name=Moo)--><div class='quotetop'>QUOTE (Moo @ Jun 3 2009, 09:20 AM) <a href="index.php?act=findpost&pid=324719"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Big pictures for ships window here.
\RESOURCE\Textures\INTERFACES\SHIPS

Also check common.ini(\RESOURCE\INI\texts\russian\) to display ship type at ships window.

btw, those method works for current game?
seems only for new game to me <img src="style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /><!--QuoteEnd--></div><!--QuoteEEnd-->
THX for "Also check common.ini(\RESOURCE\INI\texts\russian\) to display ship type at ships window." <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
I put my common.ini in wrong place. <img src="style_emoticons/<#EMO_DIR#>/diomed.gif" style="vertical-align:middle" emoid=":dio" border="0" alt="diomed.gif" />
 
<!--quoteo(post=324137:date=May 31 2009, 11:38 PM:name=Cap'n_Drow)--><div class='quotetop'>QUOTE (Cap'n_Drow @ May 31 2009, 11:38 PM) <a href="index.php?act=findpost&pid=324137"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->The textures for ships work just like they do for AoP. There need to be three textures for each ship in a directory called \%shipname%\hull1, \hull2 and \hull3<!--QuoteEnd--></div><!--QuoteEEnd-->

Is it possible to have more than three textures for a ship by adding \Hull4\ and so on? I tried it, but it didn't seem to work (I didn't come across a ship with the new texture). I guess another way to do it, is to copy the ship as a new one and give it three different textures, as the only difference. I hope there is a better way.
 
You should be able to add more textures, but if they are used by the upgrades system I don't know if it would use them.

If all of the upgrade system runs through accessible code, then no problem, just a matter of adding the additonal contents to the interface to make it work. But if its hard coded in a DLL, would only be possible by explicitely calling the texture from code.

Cap'n Drow
 
I have tried some more, and either I'm extremely unlucky not to run into a ship with a new texture, or the game reads only the content of /Hull1, /Hull2 and /hull3. Unless I did something wrong, which I don't believe I did. So much for the easy way of adding more textures. Can anyone confirm? <img src="style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" />
 
Sorry bit of a noob with this game.

I've managed to get my ship in (by giving to PC as starting ship)
with interface icons (both the small and big ones)
the class no.
and ship type

The only thing stopping my boat from being 'sailable' is the textures, or lack of, as my ship is a nice shade of grey
my shipname/type is Wraith
I have copied the manowar textures and renamed with wraith
textures\ships\wraith1\hull1
textures\ships\wraith1\hull2
textures\ships\wraith1\hull3

and (again copied from manowar folder)

models\ships\wraith1


What am i missing?




EDIT- oh yeah about the refshipcanencounter line, SHIP_SOLEYRU has that line. I imagine it makes the ship unique but don't know
 
Hello <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
Look here for help <a href="http://forum.piratesahoy.net//index.php?showtopic=13390" target="_blank">http://forum.piratesahoy.net//index.php?showtopic=13390</a>
 
<!--quoteo(post=333966:date=Jun 30 2009, 12:44 AM:name=Captain Hawk)--><div class='quotetop'>QUOTE (Captain Hawk @ Jun 30 2009, 12:44 AM) <a href="index.php?act=findpost&pid=333966"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Hello <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
Look here for help <a href="http://forum.piratesahoy.net//index.php?showtopic=13390" target="_blank">http://forum.piratesahoy.net//index.php?showtopic=13390</a><!--QuoteEnd--></div><!--QuoteEEnd-->

Great, thanks.

Cool, I got my ship in (with textures, lol).
 
I dont suppose this is proper behave for a skipper but... i love you guys !!! <img src="style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" />
 
Hi people, i did everything but seem to have a little runtime error on start.exe...
Doublechecked with:
<!--quoteo(post=333966:date=Jun 29 2009, 11:44 AM:name=Captain Hawk)--><div class='quotetop'>QUOTE (Captain Hawk @ Jun 29 2009, 11:44 AM) <a href="index.php?act=findpost&pid=333966"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Hello <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
Look here for help <a href="http://forum.piratesahoy.net//index.php?showtopic=13390" target="_blank">http://forum.piratesahoy.net//index.php?showtopic=13390</a><!--QuoteEnd--></div><!--QuoteEEnd-->
Maybe something wrong unlocking 92's in a frigate ?

PS: Also having a terrible time posting, i get "Autorization mismatch" all the time...

EDIT:
Ok, did a full rollback, and re inserted the ship based on...
<!--quoteo(post=333966:date=Jun 29 2009, 11:44 AM:name=Captain Hawk)--><div class='quotetop'>QUOTE (Captain Hawk @ Jun 29 2009, 11:44 AM) <a href="index.php?act=findpost&pid=333966"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Hello <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
Look here for help <a href="http://forum.piratesahoy.net//index.php?showtopic=13390" target="_blank">http://forum.piratesahoy.net//index.php?showtopic=13390</a><!--QuoteEnd--></div><!--QuoteEEnd-->
without editing the cannons and worked like charm... now, how do i get my ship !?!?!?!?! <img src="style_emoticons/<#EMO_DIR#>/keith.gif" style="vertical-align:middle" emoid=":keith" border="0" alt="keith.gif" />

EDIT2:
<!--quoteo(post=334224:date=Jun 30 2009, 02:21 PM:name=Cap'n_Drow)--><div class='quotetop'>QUOTE (Cap'n_Drow @ Jun 30 2009, 02:21 PM) <a href="index.php?act=findpost&pid=334224"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Any of the Man'o Wars you own currently would NOT be affected by the new code.

The stats for all items and ships you own are saved as part of your save game, but newly generated ships will be based on the new code.

Cap'n Drow<!--QuoteEnd--></div><!--QuoteEEnd-->

Got it...
 
Back
Top