<!--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="http://forum.piratesahoy.net//public/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="
" border="0" alt="rolleyes.gif" />