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

Limiting ships to certain nations

<!--quoteo(post=246806:date=Mar 24 2008, 01:33 PM:name=Thomas the Terror)--><div class='quotetop'>QUOTE (Thomas the Terror @ Mar 24 2008, 01:33 PM) <a href="index.php?act=findpost&pid=246806"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->one note on them! you need to add // before the ships name, and before the word Period. I forgot this, and if you don't do so, it will see those things as code, but it isn't which can crash the game.

Example, not Amsterdam, but //Amsterdam....//Periods<!--QuoteEnd--></div><!--QuoteEEnd-->


is this what you guys are looking for? Pieter also posted a section of code does that go in each ship entry as well? If so where? beginning end or does it matter?
also should the word nation be commented as well? ie:
....
refShip.period4 = 1.0; //
refShip.period5 = 0.9; //
//Nation
refShip.england = 0.0; //
refShip.france = 0.0; //
....


//-------------------------------------------------------------------------
// Amsterdam by Doober and Kazeite
//-------------------------------------------------------------------------

//Period
refShip.period0 = 0.0; //
refShip.period1 = 0.4; //
refShip.period2 = 0.6; //
refShip.period3 = 0.8; //
refShip.period4 = 1.0; //
refShip.period5 = 0.9; //
Nation
refShip.england = 0.0; //
refShip.france = 0.0; //
refShip.holland = 1.0; //
refShip.portugal = 0.0; //
refShip.pirate = 0.0; //
refShip.spain = 0.0; //


// PS -->
makeref(refShip,ShipsTypes[n]);
n++;
// PS <-- makeref(refShip,ShipsTypes[SHIP_CORVETTE_FRANCE]);
refShip.Name = "Amsterdam";
refShip.id = refShip.Name;
refShip.SName = "Amsterdam";
refShip.all = "corvette1";
refShip.Nation = HOLLAND; // PB
refShip.Class = 3; // PB
refShip.Cannon = CANNON_TYPE_LONG_LBS12;
refShip.MaxCaliber = 12;
refShip.Weight = Tonnes2CWT(1000);
refShip.Capacity = 3500;
refShip.CannonsQuantity = 46;
// NK cannon qtys 05-04-18 -->
refShip.Cannons.Borts.cannonf.qty = 2;
refShip.Cannons.Borts.cannonb.qty = 4;
// NK <--
refShip.Walk = "Amsterdam"; // SeaNorris
refShip.MaxCrew = 400;
refShip.MinCrew = 100;
refShip.SpeedRate = 13;
refShip.TurnRate = 35;
refShip.Price = 220000;
refShip.HP = 5000;
refShip.SP = 100;
// KK refShip.AbordageLocation = "BOARDING_CORVETTE";

refShip.QDeck = "ShipDeck6"; // KK
refShip.CannonsDeck = 2; // KK
refShip.CargoHold = 2; // KK
refShip.Cabin = "Cabin2"; // KK

refShip.Type.Trade = true;
refShip.Type.War = false;

refShip.CanBuy = true;
refShip.CanEncounter = true;

refShip.Rigtype = "Corvette1";
refShip.WaterLine = -0.3;
refShip.SpeedDependWeight = 0.3;
refShip.SubSeaDependWeight = 0.6;
//refShip.TurnDependWeight = 0.8;

refShip.InertiaAccelerationX = 0.2; refShip.InertiaBrakingX = 2.0;
refShip.InertiaAccelerationY = 10; refShip.InertiaBrakingY = 6;
refShip.InertiaAccelerationZ = 4.0; refShip.InertiaBrakingZ = 1.0;

refShip.GeraldSails.rey_b2 = 1;
refShip.GeraldSails.rey_b3 = 1;
 
You have to put a // in front of "Nation" as well, but other than that, it looks good. You might want to move it to below the CanBuy and CanEncounter lines and above the Rigtype and WaterLine line though. But that is just a cosmetic suggestion so that the most important lines come first. <img src="style_emoticons/<#EMO_DIR#>/icon_confused.gif" style="vertical-align:middle" emoid=":?" border="0" alt="icon_confused.gif" />

You don't need to do anything with the code I posted. That is just some code so that these values might actually be used somewhere. But it's completely untested. I just made sure it didn't crash the game, but without the work you're doing, I can't check if it actually works either. <img src="style_emoticons/<#EMO_DIR#>/icon_confused.gif" style="vertical-align:middle" emoid=":?" border="0" alt="icon_confused.gif" />

Thanks very much for being willing to work on this! <img src="style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" />
 
<!--quoteo(post=246825:date=Mar 24 2008, 03:44 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE (Pieter Boelen @ Mar 24 2008, 03:44 PM) <a href="index.php?act=findpost&pid=246825"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->You have to put a // in front of "Nation" as well, but other than that, it looks good. You might want to move it to below the CanBuy and CanEncounter lines and above the Rigtype and WaterLine line though. But that is just a cosmetic suggestion so that the most important lines come first. <img src="style_emoticons/<#EMO_DIR#>/icon_confused.gif" style="vertical-align:middle" emoid=":?" border="0" alt="icon_confused.gif" />

You don't need to do anything with the code I posted. That is just some code so that these values might actually be used somewhere. But it's completely untested. I just made sure it didn't crash the game, but without the work you're doing, I can't check if it actually works either. <img src="style_emoticons/<#EMO_DIR#>/icon_confused.gif" style="vertical-align:middle" emoid=":?" border="0" alt="icon_confused.gif" />

Thanks very much for being willing to work on this! <img src="style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" /><!--QuoteEnd--></div><!--QuoteEEnd-->


glad to help, I just dont want to screw it up <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
can I add you to msn as i have more questions
 
Of course you can. But I'll be gone for two days, so I can't be of much help until Thursday or Friday or so. <img src="style_emoticons/<#EMO_DIR#>/icon_confused.gif" style="vertical-align:middle" emoid=":?" border="0" alt="icon_confused.gif" />
 
Ok, I managed to get everything that I could reference finished. I had to find the closest match on a few. These "refship.names" seem to have no reference in the shiplist:
Is it possible to attach this file without having anywhere to host it ie upload?
Manowar3_44
Frigate_sat
Corvette4_44
Schooner4_50
War_Pinnace
RN_Lineship
bermsloop263
BlackPearl
WickedWench
FlyingDutchman
CursedDutchman
FastCaravel
Manowar4
Corvette6
TwoDecker1_47
pinnace4_47

P.S. After spending roughly 6 hours doing this tiny little job, I have even more respect for you guys donating so much of your free time to bring mods like this to everyone. I was very happy to be able to give a little back.
 
Thank you, thank you, thank you! I am very glad you helped us! Well done. Now you can put the file in a zip file, and post it as attachement.
 
Thanks very much. I think this forum doesn't allow RAR file uploads. If I remember, I'll see if I can do something about that later.
 
Is there any more of those tedious jobs you need doing? As you know I am no modder but if you instruct me correctly I can possibly save you guys some time better spent on the hard stuff.
 
Well... we could do with some <a href="http://forum.piratesahoy.net//index.php?showtopic=11464" target="_blank">screenshots</a>... <img src="style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />
 
To weapon: Thanks again for your work. However, after having had a look at it, I must ask you for another favour. Can you please move the code you added to between the <i>refShip.Type.War</i> and <i>refShip.WaterLine lines</i>? This code MUST be below the ship's <i>n++;</i> line, otherwise it will apply to the previous ship in ships_init.c. <img src="style_emoticons/<#EMO_DIR#>/piratesing.gif" style="vertical-align:middle" emoid=":shock" border="0" alt="piratesing.gif" />
 
<!--quoteo(post=248751:date=Apr 3 2008, 10:22 AM:name=Pieter Boelen)--><div class='quotetop'>QUOTE (Pieter Boelen @ Apr 3 2008, 10:22 AM) <a href="index.php?act=findpost&pid=248751"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->To weapon: Thanks again for your work. However, after having had a look at it, I must ask you for another favour. Can you please move the code you added to between the <i>refShip.Type.War</i> and <i>refShip.WaterLine lines</i>? This code MUST be below the ship's <i>n++;</i> line, otherwise it will apply to the previous ship in ships_init.c. <img src="style_emoticons/<#EMO_DIR#>/piratesing.gif" style="vertical-align:middle" emoid=":shock" border="0" alt="piratesing.gif" /><!--QuoteEnd--></div><!--QuoteEEnd-->


no problem dude, just repost the file for me and consider it done.
still working on those screenies btw, a8 wip1 is pretty crashy for me so its slow going
 
I've got a slight improvement for this mod. In PROGRAM\Ships\ships.c replace:
Code:
	if(SHIPYARD_SELL_ALL_CLASSES) iClassMax = 1; // NK 05-03-19 add toggle to class limiting
else
{
if(sTownName != "")
{
if(GetTownSize(sTownName) >= (STORE_MINSIZE/2)) iClassMax = 3;
if(GetTownSize(sTownName) >= STORE_MINSIZE) iClassMax = 2;
}
}
if(iNation == PIRATE) iClassMax = 1;
With:
Code:
	if(sTownName != "")
{
if(GetTownSize(sTownName) >= (STORE_MINSIZE/2)) iClassMax = 2;
if(GetTownSize(sTownName) >= STORE_MINSIZE) iClassMax = 1;
}
if(iNation == PIRATE) iClassMax = 3;
This should improve realism. You can buy class 1 ships if you've got a LoM and have a high enough navy rank. That way navy players can get their navy ships, while ordinary privateers can't buy them. It's still hard to buy class 1 ships because you need the rank of Admiral. Pirate shipyards now only sell smaller ships. This makes it harder to get high class pirate design ships. You now MUST capture them. So no easy pirate design Manowars anymore.
 
Thanks. I had wanted to do this earlier, but people didn't much seem to like the idea. I don't remember why; it should work very well with my Realistic Ship Purchasing mod.
Has anybody tried this yet? How does it work?
 
I haven't runed PotC for playng abot ... since i joined here... Only for testings <img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />
 
Ok. Same thing here. <img src="style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" />
 
Back
Top